Kyma Forum
  Kyma Support
  looping Midi Script

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

next newest topic | next oldest topic
Author Topic:   looping Midi Script
garth paine
Member
posted 04 January 2014 17:00         Edit/Delete Message   Reply w/Quote
Hi everyone - I would like to repeat this MIDI script

| pat pat3 pat2 pat1 |

pat := EventCollection events: (Array
with: (Note frequency: 3 d durationInBeats: 1)
with: (Note frequency: 3 f durationInBeats: 1)
with: (Note frequency: 3 a sharp durationInBeats: 1)
with: (Note frequency: 3 b sharp durationInBeats: 1)).

pat1 :=
pat
randomizeUsing: (Random new seed: 92)
totalBeats: 64
quantizeTo: 0.5
maxSpacing: 1.

pat2 :=
pat
randomizeUsing: (Random new seed: 456)
totalBeats: 64
quantizeTo: 0.333
maxSpacing: 1.

pat3 :=
pat
randomizeUsing: (Random new seed: 32)
totalBeats: 64
quantizeTo: 0.333
maxSpacing: 1.5.


(EventSequence events: (Array with: pat1 with: (pat2 trsp: 2) with: pat2 with: (pat1 trsp: 5) with: pat3)) playOnVoice: self bpm: 20.


I had thought of doing this by changing the last line as follows

8 timesRepeat: [ (EventSequence events: (Array with: pat1 with: (pat2 trsp: 2) with: pat2 with: (pat1 trsp: 5) with: pat3)) playOnVoice: self bpm: 20.].

But I am not convinced this is working - could the collective wisdom give me some guidance on this - thanks

Cheers, Garth

IP: Logged

SSC
Administrator
posted 04 January 2014 17:15         Edit/Delete Message   Reply w/Quote
Hi Garth,

You could give this a try (basically doing the repeat8 on the collection before you pass it to the EventSequence):

| seq8 |

seq8 := OrderedCollection new.
8 timesRepeat: [seq8 addAll: (Array with: pat1 with: (pat2 trsp: 2) with: pat2 with: (pat1 trsp: 5) with: pat3)].

(EventSequence events: seq8 asArray) playOnVoice: self bpm: 20.

IP: Logged

garth paine
Member
posted 04 January 2014 18:39         Edit/Delete Message   Reply w/Quote
Thanks - I tried that, but it gives me a very different quality of sound output - much more staccato as if the envelope is being cut off.

Is there any reason the other approach should not work?

Cheers, Garth

IP: Logged

SSC
Administrator
posted 05 January 2014 12:29         Edit/Delete Message   Reply w/Quote
Hi Garth,

I wonder if there is some slight difference between the Scripts? When I try it, the result just sounds like the sequence being played very slowly. Here is the full script that you could try copying and pasting into the Script field of your MIDIVoice just to make sure:

code:

| pat pat3 pat2 pat1 seq8 |
pat := EventCollection events: (Array
with: (Note frequency: 3 d durationInBeats: 1)
with: (Note frequency: 3 f durationInBeats: 1)
with: (Note frequency: 3 a sharp durationInBeats: 1)
with: (Note frequency: 3 b sharp durationInBeats: 1)).
pat1 :=
pat
randomizeUsing: (Random new seed: 92)
totalBeats: 64
quantizeTo: 0.5
maxSpacing: 1.
pat2 :=
pat
randomizeUsing: (Random new seed: 456)
totalBeats: 64
quantizeTo: 0.333
maxSpacing: 1.
pat3 :=
pat
randomizeUsing: (Random new seed: 32)
totalBeats: 64
quantizeTo: 0.333
maxSpacing: 1.5.
seq8 := OrderedCollection new.
8 timesRepeat: [seq8 addAll: (Array with: pat1 with: (pat2 trsp: 2) with: pat2 with: (pat1 trsp: 5) with: pat3)].
(EventSequence events: seq8 asArray) playOnVoice: self bpm: 20.


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