Wavetables.....Again..... How do I playback only 1 cycle of a wavetable?


#121

The HP filter will remove the DC component of the modulator.

If it tracks the modulator frequency, it will have an optimal response time (so that almost no pitch deviation will occur). But beware fast modulations of the cutoff of a highpass filter of the modulator can cause some clicks. FM and PM tend to accentuate clicks of the modulator signal.

With a fixed highpass filter, you can have some short transient pitch deviation, and maybe that's not a bad thing.


#122

Have been doing some research on FM modulation lately, as I am trying to build the circuit of an Elektron Digitone in Pure Data. Just for the fun of it. I love these bigger project, to see how close one can come with freeware :slight_smile: But they always end up being a bit over the top for Axoloti so I end up in PD every time.

Been trying to find out, which is the best way of doing these things, like for example fm and fm feedback. It seems the use of FM/PM quickly get a bit blurry as some synth use one thing and call it the other and vice versa.

Here is some papers, which were suggested by a guy in the PD forums, whom is very knowledgable.

https://ccrma.stanford.edu/software/snd/snd/fm.html

And he actually talked about trying to avoid using HP filters in fm, cause it could cause small burst in a feedback FM situation if the amount was too high. But yeah it might not be the same, cause we are not talking about FM feedback here. He mentioned in context of FM feedback.

Anyway, he as referring to this patent here, when he mentioned it, figure 7 is the burst and figure 8 is the filter, he said:
https://patents.google.com/patent/US4249447?oq=4249447

He also talked about doing oversampling to prevent some of those mishabs that sometimes happens in FM synthesis.


#123

About feedback

The low pass filter in the PM feedback scheme is related to a different problem caused by the feedback.

PM with feedback is a looped non linear system, it is prone to chaos.

As the output non linearly depends of itself, in the case of high level feedback, there is more than one value that fits. The equation y = sin(phi + beta * y) has many solutions for a high beta. Without low pass filtering, y can jump from one solution to another, hence this "hunting". A simple low pass filter limits the jumps (see bifurcation in chaos theory). A more complex filter is not suitable to limit "hunting" as it would induce phase changes that would cause more harm than benefits.

BTW, i think that the Tomisawa patent is one of the greatest achievement in early digital synthesis.


#124

In the case of the Axoloti, feedback can be more unstable if done by connecting objects (as opposed to feedbacks hard coded in modules) because of the implicit 16 sample delay.


#125

Yes I kind of thought it might be a totally different problem, but I was not totally sure. Thanks for pointing it out :slight_smile:

Yes I think so too. Also regarding precision. It is probably related to the 16 sample latency that happens if it is nok coded internally?

In a karplus strong algo I wrote, for example, only when the feedback was done internally, the pitch would be correct. So I am kind of thinking pitch will not be 199% correct if the feedback is done externally over internally.


#126

this is clear. since essentially you cannot go below 16 samples delay. as soon as you go below that (or try to) the pitch will stay the same/be out of tune.


#127

Yes exactly, it cant go below the 16 samples for a round trip :slight_smile:

In pure data to do the same you also have to use "block~ 1" to be able to get the right tuning, to be able to work around the standard block of 64 samples that PD works in.


#128

i don't think that is right. maybe it can be made with block~ 1 but i think it will be more expensive... see example G05.execution.order.pd (in the documentation) there everything is explained. basically you have to put the delwrite~ and vd~ objects into sub patches to make sure they are executed in the right order.


#129

I have a tiar/delay/read tuned object with an offset param that can be set to -16 to compensate for the intrinsic delay (there is an help file to show how to use it)


#130

Oh yeah it might be possible in other ways to, I will not question that. But one way to be able to go below the block of 64 samples is to use "block~ 1" in a subpatch, it is pretty common to do that.

Almost all of the karplus strong algos that I have tried in PD, uses that method to achieve correct tuning. For simple stuff like karplus strong I would argue that it is not something that will bring you CPU down.


#131

I just hard coded into the object and it works fine :slight_smile:

Something like this:


#132

i see. still does not mean that is it the "right" way. but i guess you are right, that it does not matter that much for a small patch.


#133

Yes true :slight_smile: Its the simple way, where you dont really have to take order of execution in to consideration. Which can be a bit hard to understand. For example all the select objects and so on are processed from right to left. Took me damn long time and a lot of head scratching before I realised that. After I realised it, everything seemed to work as supposed. That is what you get for not reading the manuals, hehe :slight_smile: Which I think alot of people dont do, they just play around until they got it right. But order of execution, is super important if one wants to make complicated patches and do things "the right way" :slight_smile:


#134

Thank you for the explanation!
I though this is most critical when the modulator is a complex signal, right?


#135

Even with simple sines, a small amplitude discontinuity can produce a glitch.

I think that the main trouble with complex signal PM or FM is aliasing. That's why I have added the tiar/osc/PIW objects. Pre Integrated Waves allow to reduce aliasing, even in the case of PM. With x2 oversampling, it is able to antialias a phase modulated fractal waveform (you can try the help patch Help->Library->community->tiar->PIW->O2osc to get an idea).


#136

@lokki I've tried the wavetable_pm.axp and is very close to what I was looking for, thank you!
But I found that the xfade isn't working... Can you get to work again?


#137

@sebo that is very strange since i did not change that part of the code. maybe you have to enable interpolation to make it work? i will add a version where the only change is the pm input, can you try that? i have switched to a system where i make all my wavetables and fades on a pc and upload the final 2048 points and 256 waves to the axoloti, no need for xfade, and it is much lighter on the cpu as well.

wavetablepm.axp (4.6 KB)


#138

I've tried with interpolation on and off, and is always te same. I wil try the new object.
Thank you!


#139

Hi @lokki and @Sebo,

I have finally finished some wavetable objects that use integro-differential aliasing limiting.
I have made a loader compatible with your wavetable raw files (64 tables x 256 samples x 2 bytes little endian) from 60wavetables

You can test the help file. 'Help -> Library -> community -> tiar ->XT -> load'

Note: Change the load object's mode to "vintage" to disable sample interpolation and get the typical grit on bass sounds (anti aliasing and inter wave interpolations are still enabled in this mode).


#140

great work! i am looking forward to test this soon.