Kyma Forum
  Kyma Support
  self controller polyphony

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   self controller polyphony
Pieter
Member
posted 13 December 2007 05:42         Edit/Delete Message   Reply w/Quote

Test.kym

 
Hi all,
I have a question about Midi-Scripts:
I want to create an algorithmic score where a parameter is controlled by "self controller:" In my test-script self controller is changing the parameter for all voices and not only for every new voice. Is self controller not polyphon or am I doing something wrong. I attached my small Test-Script.
Thanks for help.
Pieter

IP: Logged

Pieter
Member
posted 16 December 2007 08:56         Edit/Delete Message   Reply w/Quote
So I try it again as I havn't received an answer yet (please excuse if it is a RTFM question...).
I want to create a polyphon FM-synth where the modulation-ratio receives with every new KeyDown a value from a script.
| r t |

t := 0.
i := randomNewForKyma
100 timesRepeat: [

self
keyDownAt: t s
duration: 7 s
frequency: 110 hz.
self controller: !modRatio setTo: (i * 110) atTime: t.
t := t + 2.
i := i +1.
].

I tried it this way but now !modRatio is changing for all playing voices and not only for the last triggered. Has anyone any advice for me please...

Pieter

IP: Logged

SSC
Administrator
posted 17 December 2007 17:19         Edit/Delete Message   Reply w/Quote

PieterTest.kym

 
Hello Pieter,

Sorry for the delay (this slipped by me the first time; thanks for following up!)

Yes, as you've already noticed, MIDI controllers have a global effect over all voices. In this case, since you are setting !modRatio to a fixed value at the start of each note event, you could sample and hold the value of this global controller when each individual key goes down.

For example, you could use the global control in the Script:

code:

| i t |

"Initialize time to zero and i to a random value."
t := 0.
i := (Random newForKymaWithSeed: 9876) next.
100 timesRepeat: [
self
keyDownAt: t s
duration: 7 s
frequency: 110 hz
velocity: i.
self controller: !modRatio setTo: i atTime: t.
t := t + 2.
i := i + 0.5.
].


Then, in the parameter field with !modRatio is actually used (in this case the Frequency field of the Modulator Oscillator), you could use:

code:

!KeyPitch nn hz * (!KeyDown sampleAndHold: !modRatio)

Please give this a try and let us know how it goes. (An example is attached)


IP: Logged

Pieter
Member
posted 18 December 2007 09:41         Edit/Delete Message   Reply w/Quote
Thank you for the help; I will experiment with the new possibilities.

In this simple example it works fine but when I use different chaotic functions for different parameters it won't work as I only have the possibility to use "velocity:" for having polyphonic controller-values, right? As long as I have only one function for 'i' I have no problem but what will I do when I want for example 5 different random seeds for 5 different parameters changing with every voice??
Thanks

Pieter


[This message has been edited by Pieter (edited 18 December 2007).]

IP: Logged

SSC
Administrator
posted 18 December 2007 10:47         Edit/Delete Message   Reply w/Quote
One approach would be to put the random functions in the parameter fields (rather than in the Script) and to use !KeyDown to trigger a new value. For example:

code:

!KeyDown nextRandom


IP: Logged

Pieter
Member
posted 19 December 2007 04:52         Edit/Delete Message   Reply w/Quote
ooh... sorry about these RTFM questions. This is the most simple solution. I was sure that using the Parameter Fields would always change the global sound. I should experiment more!!
Thanks and... Happy Xmas!

Pieter


quote:
Originally posted by SSC:
One approach would be to put the random functions in the parameter fields (rather than in the Script) and to use !KeyDown to trigger a new value. For example:

code:

!KeyDown nextRandom



IP: Logged

SSC
Administrator
posted 19 December 2007 08:39         Edit/Delete Message   Reply w/Quote
quote:
Originally posted by Pieter:
I was sure that using the Parameter Fields would always change the global sound.[/B]

When you use a CapyTalk expression in a parameter field, there is a copy of the expression for each voice. For most expressions, (for example, a simple one like !modRatio), the copies are all the same so you wouldn't notice. But if the expression includes something that depends on the ?VoiceNumber (e.g. !KeyDown, !KeyPtich) or one that includes a random number generator, then you notice that the expressions are different.

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply

Contact Us | Symbolic Sound Home

This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.


Ultimate Bulletin Board 5.45c