Csound Csound-dev Csound-tekno Search About

turnoff

Date2015-05-02 10:18
FromEduardo Moguillansky
Subjectturnoff
Hi, all

I am a bit confused by the following code. I would expect that when the 
last note is turned off, the performance should end and csound should 
return. But it doesn't. Here is a variation of the turnoff example, 
where I expected to exit right away. The note stops as expected, but 
csound stays idle until the expected end of the score, even if the note 
has been turned off beforehand.

What could I do to make csound stop performance after the last note has 
been turned off? Or do I need to keep track of these notes myself and 
call something like exitnow?

thanks!
Eduardo





; Select audio/midi flags here according to platform

; Audio out Audio in

-odac -iadc ;;;RT audio I/O

; For Non-realtime ouput leave only the line below:

; -o turnoff.wav -W ;;; for file output any platform






; Initialize the global variables.

sr = 44100

ksmps = 64

nchnls = 2


; Instrument #1.

instr 1

k1 expon 440, p3/10,880 ; begin gliss and continue

if k1 < 800 kgoto contin ; until Nyquist detected

turnoff ; then quit


contin:

a1 oscil 10000, k1, 1

outs a1, a1

endin








; Table #1: an ordinary sine wave.

f 1 0 32768 10 1


; Play Instrument #1 for 4 seconds.

i 1 0 4

e









------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-05-02 10:55
FromVictor Lazzarini
SubjectRe: turnoff
try 

event_i "e", 0


Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 2 May 2015, at 10:18, Eduardo Moguillansky  wrote:
> 
> Hi, all
> 
> I am a bit confused by the following code. I would expect that when the 
> last note is turned off, the performance should end and csound should 
> return. But it doesn't. Here is a variation of the turnoff example, 
> where I expected to exit right away. The note stops as expected, but 
> csound stays idle until the expected end of the score, even if the note 
> has been turned off beforehand.
> 
> What could I do to make csound stop performance after the last note has 
> been turned off? Or do I need to keep track of these notes myself and 
> call something like exitnow?
> 
> thanks!
> Eduardo
> 
> 
> 
> 
> 
> ; Select audio/midi flags here according to platform
> 
> ; Audio out Audio in
> 
> -odac -iadc ;;;RT audio I/O
> 
> ; For Non-realtime ouput leave only the line below:
> 
> ; -o turnoff.wav -W ;;; for file output any platform
> 
> 
> 
> 
> 
> 
> ; Initialize the global variables.
> 
> sr = 44100
> 
> ksmps = 64
> 
> nchnls = 2
> 
> 
> ; Instrument #1.
> 
> instr 1
> 
> k1 expon 440, p3/10,880 ; begin gliss and continue
> 
> if k1 < 800 kgoto contin ; until Nyquist detected
> 
> turnoff ; then quit
> 
> 
> contin:
> 
> a1 oscil 10000, k1, 1
> 
> outs a1, a1
> 
> endin
> 
> 
> 
> 
> 
> 
> 
> 
> ; Table #1: an ordinary sine wave.
> 
> f 1 0 32768 10 1
> 
> 
> ; Play Instrument #1 for 4 seconds.
> 
> i 1 0 4
> 
> e
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-05-02 12:57
Fromjoachim heintz
SubjectRe: turnoff
i think you mean
event "e", 0, 0
(instead of event_i).

interesting trick — i always used event to call another instrument, 
which only contains the line:
exitnow

but sending an old "e" event is much nicer.

	joachim


Am 02.05.2015 um 11:55 schrieb Victor Lazzarini:
> try
>
> event_i "e", 0
>
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
>> On 2 May 2015, at 10:18, Eduardo Moguillansky  wrote:
>>
>> Hi, all
>>
>> I am a bit confused by the following code. I would expect that when the
>> last note is turned off, the performance should end and csound should
>> return. But it doesn't. Here is a variation of the turnoff example,
>> where I expected to exit right away. The note stops as expected, but
>> csound stays idle until the expected end of the score, even if the note
>> has been turned off beforehand.
>>
>> What could I do to make csound stop performance after the last note has
>> been turned off? Or do I need to keep track of these notes myself and
>> call something like exitnow?
>>
>> thanks!
>> Eduardo
>>
>> 
>>
>> 
>>
>> ; Select audio/midi flags here according to platform
>>
>> ; Audio out Audio in
>>
>> -odac -iadc ;;;RT audio I/O
>>
>> ; For Non-realtime ouput leave only the line below:
>>
>> ; -o turnoff.wav -W ;;; for file output any platform
>>
>> 
>>
>> 
>>
>>
>> ; Initialize the global variables.
>>
>> sr = 44100
>>
>> ksmps = 64
>>
>> nchnls = 2
>>
>>
>> ; Instrument #1.
>>
>> instr 1
>>
>> k1 expon 440, p3/10,880 ; begin gliss and continue
>>
>> if k1 < 800 kgoto contin ; until Nyquist detected
>>
>> turnoff ; then quit
>>
>>
>> contin:
>>
>> a1 oscil 10000, k1, 1
>>
>> outs a1, a1
>>
>> endin
>>
>>
>>
>> 
>>
>> 
>>
>>
>> ; Table #1: an ordinary sine wave.
>>
>> f 1 0 32768 10 1
>>
>>
>> ; Play Instrument #1 for 4 seconds.
>>
>> i 1 0 4
>>
>> e
>>
>>
>> 
>>
>> 
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>> _______________________________________________
>> Csound-users mailing list
>> Csound-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-users
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here