Kyma Forum
  Kyma Support
  scripting question

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

next newest topic | next oldest topic
Author Topic:   scripting question
SamPellman
Member
posted 07 September 2006 22:57         Edit/Delete Message   Reply w/Quote
I'm trying to create an arpeggiator-like instrument that randomly selects intervals from an array in response to triggers from a RandomGlobalController. So far, so good.

I would like, however, to allow for the possibility that the gates for each pitch are longer than the period of the !BPM. This way I can have overlapping pitches, which give a nice shimmer to the cloud of pitches.

I've tried to write a script that can instantiate several overlapping events with a sort of "programmable voice allocation." (I've tried a different way to get at this problem by using the polyphony of a sequencer Sound, but experienced what seem to be latency-related problems).

So, with my not-nearly-yet-ripe CapyTalk intuitions, I've come up with the following godawful script, which really freaks my Kyma ("Unhandled exception: My subclass should have overridden one of my messages."

| x |
x := (!BPM / 60) inverse removeUnits.
0 to: 3 do: [ :i |
Tink
start: ( i * x ) s
gate: (1 bpm: !BPM dutyCycle: !Duty)
freq: (!KeyPitch12 hz * ((!rando * 12) of: #(1 1 {9/8} {9/8} {5/4} {4/3} {4/3} {3/2} {3/2} {5/3} {5/3} {15/8}))) ]

So, I'm ready now to roll down the window and ask for directions. Many thanks for any help you can give me.

Sam

IP: Logged

SSC
Administrator
posted 08 September 2006 08:57         Edit/Delete Message   Reply w/Quote
Hi Sam,
From the Script it looks like you are starting up 4 copies of the Input, spaced one beat apart. This is a perfectly reasonable idea but it won't work with a variable !BPM. If you know the tempo ahead of time, for example, 120, you could set x as:
x := 120 bpm s removeUnits.

Otherwise, if you'd prefer to keep !BPM variable, you could put a MIDIVoice on the Input to the Script and set its polyphony to 4 (the number of overlapping Sounds you have now).

Another approach is to use an AnalogSequencer with a length of 1 and your random expression in the Pitches field and Polyphony set to 4.

If you like one or another of these approaches but would like more details, please let us know.

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