Csound Csound-dev Csound-tekno Search About

[Csnd] stop csound

Date2022-05-10 07:34
Fromjacopo greco d'alceo
Subject[Csnd] stop csound
Hi,

in my livecoding, when I render an algorithmic score as .wav I call the score with the -o test.wav flag.
If I want to stop after some minutes of recording I need to call an instrument with the exitnow() opcode.
I just discovered that in this way, csound does not end writing the .wav file properly (e.g. Max doesn't want to read them - anyway all the others programs like Reaper does not have problem). Anyway, I understood that I'm forcing csound to stop.

I tried to make an instrument after some time that with turnoff for all my alwayson and schedule(.., 0, -1) instrument, but csound freezes.

Is there an opcode or a way I can properly clean exit from csound?
It's almost like pressing the stop button in CsoundQt, I tried for exemple to press the stop button and export a .wav file and the .wav is properly ended.

Thank you,

j

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2022-05-10 11:16
FromJohn ff
SubjectRe: [Csnd] stop csound
Platform?  Version?

On 10 May 2022, at 07:35, jacopo greco d'alceo <jacques.mascheroni@gmail.com> wrote:
Hi,

in my livecoding, when I render an algorithmic score as .wav I call the score with the -o test.wav flag.
If I want to stop after some minutes of recording I need to call an instrument with the exitnow() opcode.
I just discovered that in this way, csound does not end writing the .wav file properly (e.g. Max doesn't want to read them - anyway all the others programs like Reaper does not have problem). Anyway, I understood that I'm forcing csound to stop.

I tried to make an instrument after some time that with turnoff for all my alwayson and schedule(.., 0, -1) instrument, but csound freezes.

Is there an opcode or a way I can properly clean exit from csound?
It's almost like pressing the stop button in CsoundQt, I tried for exemple to press the stop button and export a .wav file and the .wav is properly ended.

Thank you,

j

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2022-05-10 11:45
Fromjacopo mascheroni
SubjectRe: [Csnd] stop csound
im sorry.. i always forgotĀ 

macOS 10.15.7
csound 6.17



On 10 May 2022, at 12:16, John ff <jpff@CODEMIST.CO.UK> wrote:

Platform?  Version?

On 10 May 2022, at 07:35, jacopo greco d'alceo <jacques.mascheroni@gmail.com> wrote:
Hi,

in my livecoding, when I render an algorithmic score as .wav I call the score with the -o test.wav flag.
If I want to stop after some minutes of recording I need to call an instrument with the exitnow() opcode.
I just discovered that in this way, csound does not end writing the .wav file properly (e.g. Max doesn't want to read them - anyway all the others programs like Reaper does not have problem). Anyway, I understood that I'm forcing csound to stop.

I tried to make an instrument after some time that with turnoff for all my alwayson and schedule(.., 0, -1) instrument, but csound freezes.

Is there an opcode or a way I can properly clean exit from csound?
It's almost like pressing the stop button in CsoundQt, I tried for exemple to press the stop button and export a .wav file and the .wav is properly ended.

Thank you,

j

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Date2022-05-10 14:07
FromVictor Lazzarini
SubjectRe: [Csnd] [EXTERNAL] [Csnd] stop csound
Try using the opcode

event("e", 0, 1)

when you want to stop (it's a k-rate opcode).
For example

instr 2
event("e", 0, 1)
endin

instr 1
a1 oscili 0dbfs,440
out a1
endin
schedule(1,0,-1)
schedule(2,5,1)


> On 10 May 2022, at 07:34, jacopo greco d'alceo  wrote:
> 
> *Warning*
> 
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
> 
> Hi,
> 
> in my livecoding, when I render an algorithmic score as .wav I call the score with the -o test.wav flag.
> If I want to stop after some minutes of recording I need to call an instrument with the exitnow() opcode.
> I just discovered that in this way, csound does not end writing the .wav file properly (e.g. Max doesn't want to read them - anyway all the others programs like Reaper does not have problem). Anyway, I understood that I'm forcing csound to stop.
> 
> I tried to make an instrument after some time that with turnoff for all my alwayson and schedule(.., 0, -1) instrument, but csound freezes.
> 
> Is there an opcode or a way I can properly clean exit from csound?
> It's almost like pressing the stop button in CsoundQt, I tried for exemple to press the stop button and export a .wav file and the .wav is properly ended.
> 
> Thank you,
> 
> j
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5d0d88ff36094ba3b42608da324f337a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637877613570815295%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=G5a821fitPadQgUfmRu8FNJG1%2Fcl3wpeu8BptSv%2F16g%3D&reserved=0
> Send bugs reports to
>        https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5d0d88ff36094ba3b42608da324f337a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637877613570815295%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=p1jgVrekoqYoxjZIn%2BuWifCKka44EUTGMuvRLsjkU4s%3D&reserved=0
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2022-05-10 15:25
Fromjacopo mascheroni
SubjectRe: [Csnd] [EXTERNAL] [Csnd] stop csound
Ohh, amazing!
It works like a charm.
Thank you very much!

On 10 May 2022, at 15:07, Victor Lazzarini <Victor.Lazzarini@MU.IE> wrote:

Try using the opcode

event("e", 0, 1)

when you want to stop (it's a k-rate opcode).
For example

instr 2
event("e", 0, 1)
endin

instr 1
a1 oscili 0dbfs,440
out a1
endin
schedule(1,0,-1)
schedule(2,5,1)


On 10 May 2022, at 07:34, jacopo greco d'alceo <jacques.mascheroni@GMAIL.COM> wrote:

*Warning*

This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.

Hi,

in my livecoding, when I render an algorithmic score as .wav I call the score with the -o test.wav flag.
If I want to stop after some minutes of recording I need to call an instrument with the exitnow() opcode.
I just discovered that in this way, csound does not end writing the .wav file properly (e.g. Max doesn't want to read them - anyway all the others programs like Reaper does not have problem). Anyway, I understood that I'm forcing csound to stop.

I tried to make an instrument after some time that with turnoff for all my alwayson and schedule(.., 0, -1) instrument, but csound freezes.

Is there an opcode or a way I can properly clean exit from csound?
It's almost like pressing the stop button in CsoundQt, I tried for exemple to press the stop button and export a .wav file and the .wav is properly ended.

Thank you,

j

Csound mailing list
Csound@listserv.heanet.ie
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flistserv.heanet.ie%2Fcgi-bin%2Fwa%3FA0%3DCSOUND&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5d0d88ff36094ba3b42608da324f337a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637877613570815295%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=G5a821fitPadQgUfmRu8FNJG1%2Fcl3wpeu8BptSv%2F16g%3D&amp;reserved=0
Send bugs reports to
      https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcsound%2Fcsound%2Fissues&amp;data=05%7C01%7CVictor.Lazzarini%40mu.ie%7C5d0d88ff36094ba3b42608da324f337a%7C1454f5ccbb354685bbd98621fd8055c9%7C0%7C0%7C637877613570815295%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=p1jgVrekoqYoxjZIn%2BuWifCKka44EUTGMuvRLsjkU4s%3D&amp;reserved=0
Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here