[Csnd] How many active instruments
Date | 2012-03-09 12:39 |
From | john ffitch |
Subject | [Csnd] How many active instruments |
I have been looking into providing more information and control over polyphony. At present we have a prealloc opcode to control startup times and maxalloc to limit new instances. I have written an opcode that says how many active instances there are of an opcode or all opcodes. Is this actually useful? It seems to me that we also need a way of ending the oldest instance of an instrument; I think I know how to do this but is it useful? Or do we have this already and I have missed it? ==John ffitch |
Date | 2012-03-09 12:43 |
From | Oeyvind Brandtsegg |
Subject | Re: [Csnd] How many active instruments |
Hi John, I think turnoff2 can end the oldest instance of an instrument, I seems useful, but I've never actually tried it. Oeyvind 2012/3/9 john ffitch |
Date | 2012-08-07 02:57 |
From | Louis Cohen |
Subject | Re: [Csnd] How many active instruments |
I use active and turnoff2 all the time. I have used turnoff2 within a loop to turn off several or all instances of an instrument. I ran into a problem with turnoff2 some time ago; the answer was that the instrument that executes turnoff2 must occur after all instruments being turned off. It would be nice if this restriction did not exist. I have needed to know and control the total number of all active instruments and to my knowledge there is no opcode for this. Instead, I have used a series of "active" opcodes reporting and adding up the number of active instruments of each unique instrument that could be running - awkward but for at least possible. I think an opcode that returns the total number of all active instruments could be useful. Also, I was unaware of "maxalloc", which provides another way for me to control how busy a csd may get. The documentation for maxalloc indicates that the count is an i-variable. the example suggests that execution of maxalloc occur before the first instrument. I can see a use for this value to vary during the execution of the instrument. In that case maxalloc would need to be executed within an active instrument, and count would need to be a k-variable. Would that be possible? -Lou On Mar 9, 2012, at 7:43 AM, Oeyvind Brandtsegg wrote: > Hi John, > I think turnoff2 can end the oldest instance of an instrument, > I seems useful, but I've never actually tried it. > Oeyvind > > 2012/3/9 john ffitch |
Date | 2012-08-07 07:13 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] How many active instruments |
> > I have needed to know and control the total number of all active > instruments and to my knowledge there is no opcode for this. Instead, > I have used a series of "active" opcodes reporting and adding up the > number of active instruments of each unique instrument that could be > running - awkward but for at least possible. > Are you saying that "kk active 0" does not work? > I think an opcode that returns the total number of all active > instruments could be useful. I thought we had that ==John ff |
Date | 2012-08-08 02:33 |
From | Louis Cohen |
Subject | Re: [Csnd] How many active instruments |
On Aug 7, 2012, at 2:13 AM, jpff@cs.bath.ac.uk wrote: >> >> I have needed to know and control the total number of all active >> instruments and to my knowledge there is no opcode for this. Instead, >> I have used a series of "active" opcodes reporting and adding up the >> number of active instruments of each unique instrument that could be >> running - awkward but for at least possible. >> > > > Are you saying that "kk active 0" does not work? I'm saying that "kk active 0" is an opcode I never thought of using. the manual does not mention the possibility that kinsnum or insnum could be zero, nor what would be returned if either of those variables was set to zero. so I've been doing it the hard way. > >> I think an opcode that returns the total number of all active >> instruments could be useful. > > I thought we had that > > ==John ff > > > > > 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 | 2012-08-08 09:52 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] How many active instruments |
OK Lou; seems like a documentation failure. WIll attend to it. ==John > > On Aug 7, 2012, at 2:13 AM, jpff@cs.bath.ac.uk wrote: > >>> >>> I have needed to know and control the total number of all active >>> instruments and to my knowledge there is no opcode for this. Instead, >>> I have used a series of "active" opcodes reporting and adding up the >>> number of active instruments of each unique instrument that could be >>> running - awkward but for at least possible. >>> >> >> >> Are you saying that "kk active 0" does not work? > > I'm saying that "kk active 0" is an opcode I never thought of using. > the manual does not mention the possibility that kinsnum or insnum > could be zero, nor what would be returned if either of those variables > was set to zero. so I've been doing it the hard way. > >> >>> I think an opcode that returns the total number of all active >>> instruments could be useful. >> >> I thought we had that >> >> ==John ff >> >> >> >> >> 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" > > > > |