| Rory Walsh escreveu:
> Is there an opcode that when called will stop a csound performance? For
> example if you had a generative instrument that you wanted to stop once
> a random opcode produces a 99 or something like that? A trivial example
> I know, but do you get the picture?
>
> Rory.
We talked about this recently (yesterday?). This is the summary of what
I recall (well, they are trivial examples, but anyway...):
0) There is the opcode `exitnow'; one can use it inside a conditional
block, like:
if gkquit > .5 then
exitnow
endif
1) One can create an `e' score event with the opcode `event_i':
event_i "e", 0, 0, 0.1
2) One can use a FLTK button to create an `e' score event (one can
change it to call a kind of ``coda'' instrument):
--------------------------------------------------------------------
iASCIIe = 101 ; 'e' as ASCII
iASCIIi = 105 ; 'i' as ASCII
FLpanel "Running CSound",380,500,50,50
gkquit, iquit FLbutton "Quit", 1, 0, 1, 340, 25, 20, 450, iASCIIe, 0, 0
FLpanelEnd
FLrun
instr 1
endin
f0 3600
--------------------------------------------------------------------
3) Opcodes like `turnoff', `turnoff2' and `ihold' can be used for more
control of performance.
Regards,
Hudson
--
'-------------------------------------------------------------------.
Hudson Lacerda
*Não deixe seu voto sumir! http://www.votoseguro.org/
*Apóie o Manifesto: http://www.votoseguro.com/alertaprofessores/
== THE WAR IN IRAQ COSTS ==
http://nationalpriorities.org/index.php?option=com_wrapper&Itemid=182
.-------------------------------------------------------------------'
--
_______________________________________________________
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora!
http://br.mobile.yahoo.com/mailalertas/
|