[Csnd] turnoff,turnoff2 and "named instrument"
Date | 2011-12-17 11:21 |
From | Giorgio Zucco |
Subject | [Csnd] turnoff,turnoff2 and "named instrument" |
Hi,I'm making a gui for a live performance in which I make a great use of connect opcode, I would like a simple On / Off button to activate the GUI with turnoff,for example : gkOnOff,ihOnOff FLbutton "On/Off",1,0,22,100,30,630,320,0,1,0,-1 the ending code : 0,1,0,-1 not take as an argument named instrument but numbers,some other ideas?thanks! Giorgio -- View this message in context: http://csound.1045644.n5.nabble.com/turnoff-turnoff2-and-named-instrument-tp5082456p5082456.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-17 11:46 |
From | joachim heintz |
Subject | Re: [Csnd] turnoff,turnoff2 and "named instrument" |
hi giorgio - why do you need a named instrument here? as far as i understand your code, you set gkOnOff to 1 or 0. if you receive this in instr 1, you can turn on or off any instrument here. it might be necessary to get the number of a named instrument via the opcode nstrnum. best - joachim Am 17.12.2011 12:21, schrieb Giorgio Zucco: > Hi,I'm making a gui for a live performance in which I make a great use of > connect opcode, I would like a simple On / Off button to activate the GUI > with turnoff,for example : > > gkOnOff,ihOnOff FLbutton "On/Off",1,0,22,100,30,630,320,0,1,0,-1 > > the ending code : 0,1,0,-1 not take as an argument named instrument but > numbers,some other ideas?thanks! > > Giorgio > > -- > View this message in context: http://csound.1045644.n5.nabble.com/turnoff-turnoff2-and-named-instrument-tp5082456p5082456.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > > Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-17 12:06 |
From | Iain McCurdy |
Subject | RE: [Csnd] turnoff,turnoff2 and "named instrument" |
Hi Giorgio, If you need to use named instruments you can ignore FLbutton's score event generation mechanism and instead sense the value it outputs and use this to turn a names instrument on or off. e.g. <CsoundSynthesizer> <CsOptions> -odac </CsOptions> <CsInstruments> sr = 44100 ksmps = 1 nchnls = 1 0dbfs = 1 FLpanel "",130, 50, 0, 0 gkOnOff,ihOnOff FLbutton "On/Off",1,0,22,120,25,5,5,-1 FLrun alwayson "CheckOnOff" instr CheckOnOff insno nstrnum "NamedInstrument" ktrig changed gkOnOff if ktrig==1 then if gkOnOff==1 then event "i","NamedInstrument",0,-1 else turnoff2 insno,0,0 endif endif endin instr NamedInstrument a1 oscils 0.2,500,0 out a1 endin </CsInstruments> <CsScore> f 0 3600 </CsScore> </CsoundSynthesizer> > Date: Sat, 17 Dec 2011 03:21:19 -0800 > From: giorgiobrx@libero.it > To: csound@lists.bath.ac.uk > Subject: [Csnd] turnoff,turnoff2 and "named instrument" > > Hi,I'm making a gui for a live performance in which I make a great use of > connect opcode, I would like a simple On / Off button to activate the GUI > with turnoff,for example : > > gkOnOff,ihOnOff FLbutton "On/Off",1,0,22,100,30,630,320,0,1,0,-1 > > the ending code : 0,1,0,-1 not take as an argument named instrument but > numbers,some other ideas?thanks! > > Giorgio > > -- > View this message in context: http://csound.1045644.n5.nabble.com/turnoff-turnoff2-and-named-instrument-tp5082456p5082456.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > |
Date | 2011-12-17 12:31 |
From | Giorgio Zucco |
Subject | [Csnd] RE: turnoff,turnoff2 and "named instrument" |
Hi Joachim and Iain,thanks for the code suggested, I tried to integrate it into the gui which I attach,it works but in some cases generates this error: PERF ERROR in instr 2: diskin2: not initialised I have to figure out what is wrong, for me it is very convenient to use the named instrument, thanks! Giorgio http://csound.1045644.n5.nabble.com/file/n5082554/gui_live_electronics.csd gui_live_electronics.csd http://csound.1045644.n5.nabble.com/file/n5082554/Small_Handbell.h Small_Handbell.h -- View this message in context: http://csound.1045644.n5.nabble.com/turnoff-turnoff2-and-named-instrument-tp5082456p5082554.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |
Date | 2011-12-17 12:39 |
From | Giorgio Zucco |
Subject | [Csnd] RE: turnoff,turnoff2 and "named instrument" |
small correction to activate the effects, unfortunately continues to generate error CsInstruments> |
Date | 2011-12-17 13:00 |
From | Iain McCurdy |
Subject | RE: [Csnd] RE: turnoff,turnoff2 and "named instrument" |
ah, this is because the instr number of the instrument that turnoff2 turns off is higher than the instrument number within which it is contained. There are two options: use instead turnoff in the diskin instrument and forget about turnoff2, or swap the order in which the two instruments appear in the orchestra. hope this helps, Iain > Date: Sat, 17 Dec 2011 04:31:09 -0800 > From: giorgiobrx@libero.it > To: csound@lists.bath.ac.uk > Subject: [Csnd] RE: turnoff,turnoff2 and "named instrument" > > Hi Joachim and Iain,thanks for the code suggested, I tried to integrate it > into the gui which I attach,it works but in some cases generates this > error: > > PERF ERROR in instr 2: diskin2: not initialised > > I have to figure out what is wrong, for me it is very convenient to use the > named instrument, thanks! > > Giorgio > > http://csound.1045644.n5.nabble.com/file/n5082554/gui_live_electronics.csd > gui_live_electronics.csd > > http://csound.1045644.n5.nabble.com/file/n5082554/Small_Handbell.h > Small_Handbell.h > > -- > View this message in context: http://csound.1045644.n5.nabble.com/turnoff-turnoff2-and-named-instrument-tp5082456p5082554.html > Sent from the Csound - General mailing list archive at Nabble.com. > > > Send bugs reports to the Sourceforge bug tracker > https://sourceforge.net/tracker/?group_id=81968&atid=564599 > Discussions of bugs and features can be posted here > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > |
Date | 2011-12-18 12:03 |
From | Tito Latini |
Subject | Re: [Csnd] turnoff,turnoff2 and "named instrument" |
Attachments | None |
Date | 2011-12-19 20:55 |
From | Giorgio Zucco |
Subject | [Csnd] Re: turnoff,turnoff2 and "named instrument" |
thank you very much everyone, I have tried the idea of Tito Latini is looks really good solution, bye Giorgio -- View this message in context: http://csound.1045644.n5.nabble.com/turnoff-turnoff2-and-named-instrument-tp5082456p5087262.html Sent from the Csound - General mailing list archive at Nabble.com. Send bugs reports to the Sourceforge bug tracker https://sourceforge.net/tracker/?group_id=81968&atid=564599 Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" |