First time here? Check out the FAQ!

Changing the timing of partials in OscillatorBank

+1 vote
Hi all,

I hope is well with everyone.

I'm trying to delay individual partials of harmonic spectra (e.g. delay partial number x by x*10 ms), but I'm a bit stumped on how to go about doing so. For smaller spectra I can do this manually, but any ideas on the syntax to do this for something with 256 frequency components?

asked May 23 in Capytalk & Smalltalk by simon-hutchinson (230 points)

3 Answers

+1 vote
Best answer

Because all the delays are different lengths you would have to create 256 delays. You could do that with a replicator. In which case, in the Delay parameter of the delays you would put something like:

(?VoiceNumber - 1) * 10 ms

with a DelayScale of 1.

You could use a PulseTrain to select out each partial by multiplying the PulseTrain by the amplitude channel of the spectrum (the left channel) using a Product Sound. If you have a PulseTrain with a duration of 256 samp and a duty cycle of a single sample width that would select the first partial. You would then feed that into the Delay. (The PulseTrain has to be 256 samp in duration to synchronise with your spectrum frame).

To select each subsequent partial you could delay the PulseTrain before multiplying with the amplitude channel by passing it through another Delay Sound (let's call that one the "PulseTrain Delay"). The size of the delay would be:

(?VoiceNumber - 1) samp

But 256 delays may be overkill for what you're trying to do. Instead you might want to split the spectrum into a number of bands, like 16 bands. To do that you want to increase the DutyCycle of the PulseTrain so it selects more than a single sample. The DutyCycle would be something like:

16 / 256

and the PulseTrain Delay would be:

(?VoiceNumber - 1) * 16 samp

This would give evenly spaced bands. Alternatively you could use a SyntheticSpectrumFromArray Sound instead of a PulseTrain to select the different bands and then you can more easily adjust the width of each band.

Gustav made a great video describing how you do that.


answered May 24 by alan-jackson (Master) (9,330 points)
selected May 24 by simon-hutchinson
Thanks! I'm going to give this a shot. This seems exactly what I was looking for.
+1 vote
If you are processing spectrum files analyzed using the Spectral Analysis option in the Tools menu (rather than live input), you could use the option in the Spectrum Editor to "arpeggiate" the partials.
answered May 24 by ssc (Savant) (90,660 points)
Ah! That's a great idea, but, while the spectrum is pre-analyzed, I want to be able to do these changes in real time (e.g. have a variable for "!spectralOffset" or something that I can give an envelope for continuous changes).
0 votes
WF Delay of our WireFrames Library does exactly that. Without replication so it’s really efficient. The trick is to write the whole spectrum in a buffer and to design a sample accurate reader.

Hope you don’t mind the ad ;)
answered May 25 by kymaguy (Virtuoso) (10,500 points)