| Hello--
I'm trying to use multiple timout calls within the same orchestra, and am
frustrated by the somewhat inconsistent results and cryptic documentation.
The sco/orc pair below is very simplified from what I am hoping to do: given
a simple one line call in the score, trigger the playback of a given sound
twice at random times within the p3. I've taken out the creation of the
random start points and the reading of the existing file, just to focus on
getting timout to work.
The documentation specifies that timout (timout istart, idur, label) will
occur at istart, last for idur and accomplish the event(s) at the label.
What I have below is the most logical use of timout (without reinit, and
rireturn) I've figured out so far (timout with the reinit and rireturn work
best when the dur in timout is repeatable and not random--if someone has a
solution for a non-periodic use of timout, I'd love to see it!). I see how
timout can be reinitialized at endin, but still think that istart restting
to 0 is somewhat odd. Also, the call to the last event appears to continue
beyond 13 secs. extending itself to the full p3.
Thanks for the help and advice!
Grant.
gcovell@c-bridge.com
===
;;score:
f10 0 8192 10 1
i1 0 14 1
e
;; end of score
;;orchestra:
sr = 44100
kr = 441
ksmps = 100
nchnls = 2
instr 1
timout 0, 3, end ;; ends at 3
timout 3, 2, do ;; start at 3, end at 5, reset to 0
timout 0, 5, end ;; start at 5 end at 10
timout 5, 2, do ;; start at 10 end at 12, reset to 0
timout 0, 1, end ;; start at 12 and at 13
do:
asig oscil 5000, 400, 10
outs asig, asig
end:
endin
;; end of orchestra |