• ### Another modulation technique (experimenting with wavesets)

Here's a patch demonstrating a modulation technique that I just found while I was experimenting with waveset operations as described by Trevor Wishart (I'm not sure how this technique should be called, "waveset modulation" might not be a good name):

waveset-modulation.pd

Does anyone know, whether this or something similar has been used before?

• Posts 13 | Views 729
• I am glad you posted. I had never heard of wavesets or Trevor Wishart before. I looked at his site a little and it said he had used waveset distortion in a few compositions (This is a link to one https://icrdistribution.bandcamp.com/track/tongues-of-fire), but I don't know if he used the same technique you did here. I will definitely be looking into wavesets and Wishart more.

I made a patch using a similar idea about a month ago: GeneralizedPWM.pd

I was thinking of it as applying the analogous process of pulse width modulation to a sine wave.

• Yeah, that's basically the same idea!

Taking the cosine instead of the sine has, of course, the advantage of not having any DC offset (in my attempt, impair numbers of wavesets per cycle sometimes produce DC offset because of the amplitude scaling). And with the cosine you don't even have to do the scaling to avoid discontinuities. Here's a slightly modified cosine version of my patch: waveset-modulation-cos.pd

I guess, the main reason for working with wavesets is the application on recorded sound (which Trevor Wishart does). It's much easier to find zero crossings than turning points, and wavesets allow to "jump" between different portions of the sound without having jumps in the signal.

• @manuels I made this patch to try to work with wavesets on a recorded sound. It find zero crossings and store their locations in an array. It doesn't quite sound to me like what I heard in Tongues of Fire, but maybe a step in that direction:
waveset-experiments.pd

I read that Wishart used CDP to work with wavesets. Have you used it before?

• That looks interesting! But it will take me some more time to understand what's going on in your patch ...

By the way: Wouldn't this better be a new topic?

• @gn Finally, I found some time for this ... (continuing the digression )

Here's a variation of your patch. For better results (and since this is how wavesets are usually defined), I only considered zero crossings from negative to positive. It also seemed easier to me using the vline~ instead of the phasor~ object: waveset-experiments-ms.pd

I guess, there are still some bugs in it ...

• Thank you for humoring my digression.

This works way better. I knew that my patch was playing each waveset for the same amount of time rather than for the length of the waveset. I wasn't sure how to address it, but it works way better using vline~.

• To be honest, I hadn't tested the patch before I shared it. Which I definately should have, because I just found some serious distortion problems! Not the kind of distortion that you may want, of course ...

The problem is this: In a digital (sampled) signal you can never really find zero-crossings. All you can get is the first sample after the zero crossing. So I had to calculate an imaginary point between the samples n (> 0) and n-1 (< 0) using linear interpolation. The point of zero crossing then is: n - x[n] / (x[n] - x[n-1])

Fortunately, the vline~ object is sub-sample accurate and can handle this!

So here is an improved version of the patch: waveset-experiments-ms.pd

One more problem might be pd's limited precision. But I've never worked with "double precision" and it would probably be an overkill for this kind of problem anyway.

• I just returned to this and made another patch now dealing with wavesets in real-time. Could probably be done much easier, but anyway ... wavesets-real-time.pd

• Two of the four counters could be replaced by rpole~, so it's maybe better like this (probably not clearer, though): wavesets-real-time.pd

• wavesets are often only created unipolar/halfwave style - like in the PPG wave to blofeld line of synthsizers - but today we have enough RAM to do a full wave, and in a language like pd it can become complicated to read out halfwaves as full waves, when the phase accumulator itself should be modulated (doing realtime FM and PM on a wavetable generator and things like that, but also situations of interpolated readout, resetting the phase and so on)

• @Obineg Is it really a Pd thing or a problem with digital signals in general? Not sure if this is what you mean, but I made the following observation: Subtracting the result of a halfwave readout of [cos~] from the regular full wave readout doesn't give zero output for the second half of the cycle. The differences wouldn't cause any audible effect in most situations, I guess, but maybe you get into trouble with this when doing more complicated stuff like you mentioned. Or am I missing something else?

• @manuels said:

Subtracting the result of a halfwave readout of [cos~] from the regular full wave readout doesn't give zero output for the second half of the cycle.

Posts 13 | Views 729
Internal error.

Oops! Looks like something went wrong!