First time here? Check out the FAQ!

Signals and control messages over the range [-1,1]

0 votes

Pretty new to Kyma, and just started to implement a few things I did formerly in Max MSP and Pure Data (reverbs and filters in particular). I'm facing a few difficulties with the Kyma paradigm. So this is maybe either a naive question, or simply I adopted a wrong approach.

For instance, let's say I want a signal to be the result of the calculation (a+b)/(c+d), with the terms a,b,c and d  a mix of control messages (frequency, resonance for instance) and audio signals (feedback loops, input signal etc..). (this is for instance the case in the filter I uploaded in the community library).

The resulting signal is within [-1,1] (this is my output signal), but each of the terms can go well over that range.

If I'm not wrong, Kyma clips signals transiting between sounds to the range [-1,1]. In that case, what is a good approach to deal with that? I ended up attenuating most of the terms, and then adding gains before the output to compensate, but this seems pretty inelegant.

Hope my question is not too convoluted, I feel I'm trying too much to apply the Max paradigm, and missing something important regarding Kyma. Thank you for your help!
asked Jan 10 in Capytalk & Smalltalk by johannes-regnier (210 points)

2 Answers

+1 vote
Hi Johannes


One of things we do often in Kyma, is to normalise.

if you have a range which you already know the limits of, for example the current sample rate

SignalProcessor halfSampleRate

type this in any parameter field and evaluate it

Then it is normalised to the (-1,1) range by

1/ (SignalProcessor halfSampleRate)


SignalProcessor halfSampleRate inverse

If you inverse that normalised value then you will extract the un-normalised number.
answered Jan 10 by cristian-vogel (Master) (6,710 points)
Thank you very much! inverse is exactly what I need.
+1 vote
Hi johannes.

Yes the wires between modules are clipped to +/-1 although you can just as easily think of it a +/-256 or what ever range you like. In this case the product module would not give the correct answer but as you found by attenuating and adding gain at the end can sort this out. Remember you have 32 bits of resolution so the attenuation won't add too much of a noise floor to the signal.

Note that these are sample rate (stereo ) signals, but for conveneance and efficiancy there are also control signals (capy talk) in kyma, and these run a 1kHz. These are not restricted to +/- 1. Hot parameters (!Fred) run at 1kHz rate and are common to all modules that use them. They can be put in capy talk formula. These do not run down wires and are more like invisable live comms and you'll be suprised just how much of what you do, doesn't realy need to be at sample rate so long as when it controls the audio signal it is smoothed or intepolated. If you want to broadcast control values from one module to another, you can use the soundToGlobalControler module. Similarly if you want to get the values from a sample rate sound into1kHz capytalk you can paste the module into the capytalk fromula. More of what can be done with control signals can be found in the capytalk appendix at the back of the Kyma X revealed manuel.

I hope this helps.
answered Jan 10 by pete-johnston (Practitioner) (340 points)
reshown Jan 10 by pete-johnston
Yes, very helpful, thank you. Starting now to get an idea of how to deal with control values, looks ultimately very powerful.