First time here? Check out the FAQ!
x

How do I create a wavetable to use in a waveshaper? (in Kyma 7)

0 votes
770 views

In the Description of the MultiplyingWaveshaper it says:

To design a new input-output characteristic function, open the Sample/Wavetable editor and use the InputOutputCharacteristic template to generate a new transfer function with the desired compression/expansion parameters.

I can't find the InputOutputCharacteristic template in Kyma 7. I can see on pg 367 of Kyma X Revealed, the template is shown in an image of the "programs" menu. Does this still exist in Kyma 7?

I've got some curves on paper, eg y=x^(1/3), that I want to use to rescale some signals and I imagined that to do that in the audio domain (or to encapsulate them as a sound) I'd end up using something like the TimbreWaveshaper and a wavetable - hence my question.

 

 

 

asked Jul 28, 2018 in Using Kyma by alan-jackson (Virtuoso) (15,840 points)

2 Answers

+1 vote

You can find this in the prototypes: Distortion & Waveshaping.

To see the wave editor f.i. browse through the Sound brouwser and select an audio file.

It will open automatic into the wave editor.

Like this.

Best, 

Roland

answered Jul 28, 2018 by roland-kuit (Master) (3,350 points)
edited Jul 28, 2018 by roland-kuit
Thanks, Roland!
@Alan, you can also create a new Sample file and, in the Generate section of the side bar, select polynomial. Then you can set the coefficient of each power of x in the polynomial.
+1 vote

The template for creating polynomial wavetables is assuming that you want positive integer powers of x. If you want to do something like your cube root function, you'd either have to find the Taylor series expansion (but that is undefined at 0 for y = x^(1/3)), or you could use InputOutputCharacteristic to map input (x) to output (y).

answered Jul 28, 2018 by ssc (Savant) (128,200 points)
Ha ha, that's really clever. I wouldn't have thought of that but it's obvious now I see it. Inverting the **3 function by applying it to the InValues:

"{(-1 to: 1 by: 0.001) collect: [ :x | x ** 3]}"

... but wait, it gets more mysterious. If I take your example sound and edit the InValues function and change the "3" to anything other than a 1 or a 2 I get an error as soon as I click the accept button,

"There is a problem with the InValues Parameter.
If you are using an expression in the parameters field, you should enclose it within curly braces."

For instance if I change the 3 to a "5" or "!Power". If I ctrl-Y the expression it evaluates to nil.

eg:

{(-1 to: 1 by: 0.1) collect: [ :x | x ** 3]}

evaluates to:

 (-1.0 -0.729 -0.512 -0.343 -0.216 -0.125 -0.064 -0.027 -0.008 -9.99999e-4 0.0 0.001 0.008 0.027 0.064 0.125 0.216 0.343 0.512 0.729 1.0)

but

{(-1 to: 1 by: 0.1) collect: [ :x | x ** 5]}

evaluates to

 nil


Why's that?
ok I've discovered a bit more. If I replace " ** " with " raisedTo: " it works for other numbers. eg.

{(-1 to: 1 by: 0.1) collect: [ :x | x raisedTo: 5]}

evaluates to:

 (-1.0 -0.59049 -0.32768 -0.16807 -0.07776 -0.03125 -0.01024 -0.00243 -3.2e-4 -9.99998e-6 0.0 1.0e-5 3.2e-4 0.00243 0.01024 0.03125 0.07776 0.16807 0.32768 0.59049 1.0)


but the following doesn't work:

{(-1 to: 1 by: 0.1) collect: [ :x | x raisedTo: !Power]}

I get the error:

"HotVariables cannot perform the operation asRational"

whereas

{(-1 to: 1 by: 0.1) collect: [ :x | x * !Multiplier]}

does compile and run fine. How do I raise x to the power of a HotVariable?

thanks,
-Alan
Interesting aside - The "asRational" message seems to be missing from the manual / help.

It does this though:

    Float pi asRational

Evaluates to:    

    (918253 / 292289)
...