Quoting Steven Yi : > Perhaps using the maxalloc opcode would do the trick? > ... and for more flexibility the active opcode and some global variable would allow dynamic changes in polyphony ==John ff > http://www.csounds.com/manual/html/maxalloc.html > > On Thu, Mar 20, 2014 at 8:47 AM, hlolli wrote: >> Just a quick question. How would you go about dismissing score event if note >> is already active. I've been scratching my head this morning. I have this >> midi file overloaded with repeted midi events because it came originally >> from c++ video and because of my low c++ knowledge I have new midi event for >> every frame(60 events per second!). Anyway I thought it would be possible to >> have workaround in csound, that if instrument is already active then the >> orchestra should dismiss the score event(I have the midi file now in score, >> and I know it would take 1000 years to hand-delte every score event). >> >> This is my attempt, it at least slowed down the rate: >> >> instr 1 ;TRIGGERS INSTRUMENT 5 >> ktrig metro 2 >> if (p1 == 1) && (ktrig == 1) then >> schedkwhen 1, 1, 0, 5, 0, p3, p4, 1 >> elseif (p1 != 1) then >> mute 5 >> endif >> endin >> >> instr 2; THIS ONE 4 >> ktrig metro 2 >> if (p1 == 2) && (ktrig == 1) then >> schedkwhen 1, 1, 0, 4, 0, p3, p4, 1 >> elseif (p1 != 2) then >> mute 4 >> endif >> endin >> >> instr 3; ETC... >> ktrig metro 2 >> if (p1 == 3) && (ktrig == 1) then >> schedkwhen 1, 1, 0, 6, 0, p3, p4, 1 >> elseif (p1 != 3) then >> mute 6 >> endif >> endin >> Send bugs reports to the Sourceforge bug trackers csound6: https://sourceforge.net/p/csound/tickets/ csound5: https://sourceforge.net/p/csound/bugs/ Discussions of bugs and features can be posted here To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"