First time here? Check out the FAQ!

XenOsc with constantly changing Y values

0 votes

I'm a very new Kyma user , currently exploring the Xen oscillator.

How can I assign a modulator that constantly changes the Y values? More specifically, I'd like every YValue to be modulated by a sine of different amplitude and frequency, so I guess I need 16 different LFOs. What's the Capytalk syntax I should use in the YValues field?


asked Jun 13 in Using Kyma by giuseppe-caiazzo (130 points)

1 Answer

+1 vote

Ciao Giuseppe,

To create a sine oscillator in Capytalk, you would generate a linear phase using repeatingFullRamp and then take the sine of that, for example:

(1 repeatingFullRamp: (!Rate hz inverse)) normSin

I used normSin as a shortcut so I would not have to multiply the (-1, 1) phase by 2 π.

Since there are 15 of them in the Prototype example (because Y00 and Y15 are the same point), I used a TransformEventValues to map !Y00, !Y02.. !Y14 to a collection of 15 expressions:

{(0 to: 14) collect: [ :i | (1 repeatingFullRamp: (!Rate suffix2: i) hz inverse) normSin]}

The suffix2: is for adding a number to the end of each !Rate so you can control them independently.

Here's an example Sound.

All that remains is to add an independent amplitude control to each of the LFOs which you can do by multiplying each element in the collection by a unique !Amp control, for example:

{(0 to: 14) collect: [ :i | (1 repeatingFullRamp: (!Rate suffix2: i) hz inverse) normSin * (!Amp suffix2: i)]}


answered Jun 15 by ssc (Savant) (118,030 points)
Thanks a lot!
I had found a solution by using 16 sine oscillators as modulators, and associating each one of them to !Y00,...!Y16 , but it is a bit cumbersome. Going to implement your suggestion right now.

All the best,