Csound Csound-dev Csound-tekno Search About

[Csnd] Dismissing score event

Date2014-03-20 12:47
Fromhlolli
Subject[Csnd] Dismissing score event
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



--
View this message in context: http://csound.1045644.n5.nabble.com/Dismissing-score-event-tp5733376.html
Sent from the Csound - General mailing list archive at Nabble.com.


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"


Date2014-03-20 12:49
FromSteven Yi
SubjectRe: [Csnd] Dismissing score event
Perhaps using the maxalloc opcode would do the trick?

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
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Dismissing-score-event-tp5733376.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> 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"
>
>


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"


Date2014-03-20 12:57
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re:
AttachmentsNone  

Date2014-03-20 13:20
FromHlöðver Sigurðsson
SubjectRe: [Csnd] Dismissing score event
ah so close!

It allows instrument to be played x times but not again ever after the x number has been reach.

Any more clues?

thanks


2014-03-20 12:49 GMT+00:00 Steven Yi <stevenyi@gmail.com>:
Perhaps using the maxalloc opcode would do the trick?

http://www.csounds.com/manual/html/maxalloc.html

On Thu, Mar 20, 2014 at 8:47 AM, hlolli <hlolli@gmail.com> 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
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/Dismissing-score-event-tp5733376.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> 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"
>
>


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"





--
Hlöðver Sigurðsson

Date2014-03-20 13:23
FromSteven Yi
SubjectRe: [Csnd] Dismissing score event
Sorry, that sounds like what I understood the behavior you were
interested in. So, could you explain again? When the max number of
instances is hit, are you expecting that oldest note gets turned off
and the new note turns on?

On Thu, Mar 20, 2014 at 9:20 AM, Hlöðver Sigurðsson  wrote:
> ah so close!
>
> It allows instrument to be played x times but not again ever after the x
> number has been reach.
>
> Any more clues?
>
> thanks
>
>
> 2014-03-20 12:49 GMT+00:00 Steven Yi :
>
>> Perhaps using the maxalloc opcode would do the trick?
>>
>> 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
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> > http://csound.1045644.n5.nabble.com/Dismissing-score-event-tp5733376.html
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >
>> >
>> > 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"
>> >
>> >
>>
>>
>> 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"
>>
>>
>
>
>
> --
> Hlöðver Sigurðsson


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"



Date2014-03-20 13:29
FromHlöðver Sigurðsson
SubjectRe: [Csnd] Dismissing score event
Well, let's say I have note with 1 second envelope time. And I send noteon message 4 times in one second, but nothing would happen until this 1 second elapse and the note has stopped sounding. It would be like playing non-polyphonic keyboard with long release where you can press the key like crazy but nothing new happens until the release time is finished(well hope that is a good example).

so with 60 note events per second, only the 61th would send note on message given that the envelope time is 1 second.


2014-03-20 13:23 GMT+00:00 Steven Yi <stevenyi@gmail.com>:
Sorry, that sounds like what I understood the behavior you were
interested in. So, could you explain again? When the max number of
instances is hit, are you expecting that oldest note gets turned off
and the new note turns on?

On Thu, Mar 20, 2014 at 9:20 AM, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
> ah so close!
>
> It allows instrument to be played x times but not again ever after the x
> number has been reach.
>
> Any more clues?
>
> thanks
>
>
> 2014-03-20 12:49 GMT+00:00 Steven Yi <stevenyi@gmail.com>:
>
>> Perhaps using the maxalloc opcode would do the trick?
>>
>> http://www.csounds.com/manual/html/maxalloc.html
>>
>> On Thu, Mar 20, 2014 at 8:47 AM, hlolli <hlolli@gmail.com> 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
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> > http://csound.1045644.n5.nabble.com/Dismissing-score-event-tp5733376.html
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >
>> >
>> > 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"
>> >
>> >
>>
>>
>> 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"
>>
>>
>
>
>
> --
> Hlöðver Sigurðsson


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"





--
Hlöðver Sigurðsson

Date2014-03-20 14:44
FromHlöðver Sigurðsson
SubjectRe: [Csnd] Dismissing score event
I found another way to solve it, just gave each note a value with velocity parameter so I could recognize which note comes after who. I know it's very weird and unusual what I'm doing here. But it's probably part of being a beginner. Thanks anyway Steven!


2014-03-20 13:29 GMT+00:00 Hlöðver Sigurðsson <hlolli@gmail.com>:
Well, let's say I have note with 1 second envelope time. And I send noteon message 4 times in one second, but nothing would happen until this 1 second elapse and the note has stopped sounding. It would be like playing non-polyphonic keyboard with long release where you can press the key like crazy but nothing new happens until the release time is finished(well hope that is a good example).

so with 60 note events per second, only the 61th would send note on message given that the envelope time is 1 second.


2014-03-20 13:23 GMT+00:00 Steven Yi <stevenyi@gmail.com>:

Sorry, that sounds like what I understood the behavior you were
interested in. So, could you explain again? When the max number of
instances is hit, are you expecting that oldest note gets turned off
and the new note turns on?

On Thu, Mar 20, 2014 at 9:20 AM, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
> ah so close!
>
> It allows instrument to be played x times but not again ever after the x
> number has been reach.
>
> Any more clues?
>
> thanks
>
>
> 2014-03-20 12:49 GMT+00:00 Steven Yi <stevenyi@gmail.com>:
>
>> Perhaps using the maxalloc opcode would do the trick?
>>
>> http://www.csounds.com/manual/html/maxalloc.html
>>
>> On Thu, Mar 20, 2014 at 8:47 AM, hlolli <hlolli@gmail.com> 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
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> > http://csound.1045644.n5.nabble.com/Dismissing-score-event-tp5733376.html
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >
>> >
>> > 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"
>> >
>> >
>>
>>
>> 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"
>>
>>
>
>
>
> --
> Hlöðver Sigurðsson


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"





--
Hlöðver Sigurðsson



--
Hlöðver Sigurðsson

Date2014-03-20 18:22
FromTarmo Johannes
SubjectRe: [Csnd] Dismissing score event

Hi,
Dis I get you right that you send the event througj C++ API? I am sure there must better way to control the.situation there and not to bother Csound :)
Can you send the piece of code where you use trigher the events.
Tarmo

2014 3 20 16:44 kirjutas kuupäeval "Hlöðver Sigurðsson" <hlolli@gmail.com>:
I found another way to solve it, just gave each note a value with velocity parameter so I could recognize which note comes after who. I know it's very weird and unusual what I'm doing here. But it's probably part of being a beginner. Thanks anyway Steven!


2014-03-20 13:29 GMT+00:00 Hlöðver Sigurðsson <hlolli@gmail.com>:
Well, let's say I have note with 1 second envelope time. And I send noteon message 4 times in one second, but nothing would happen until this 1 second elapse and the note has stopped sounding. It would be like playing non-polyphonic keyboard with long release where you can press the key like crazy but nothing new happens until the release time is finished(well hope that is a good example).

so with 60 note events per second, only the 61th would send note on message given that the envelope time is 1 second.


2014-03-20 13:23 GMT+00:00 Steven Yi <stevenyi@gmail.com>:

Sorry, that sounds like what I understood the behavior you were
interested in. So, could you explain again? When the max number of
instances is hit, are you expecting that oldest note gets turned off
and the new note turns on?

On Thu, Mar 20, 2014 at 9:20 AM, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
> ah so close!
>
> It allows instrument to be played x times but not again ever after the x
> number has been reach.
>
> Any more clues?
>
> thanks
>
>
> 2014-03-20 12:49 GMT+00:00 Steven Yi <stevenyi@gmail.com>:
>
>> Perhaps using the maxalloc opcode would do the trick?
>>
>> http://www.csounds.com/manual/html/maxalloc.html
>>
>> On Thu, Mar 20, 2014 at 8:47 AM, hlolli <hlolli@gmail.com> 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
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> > http://csound.1045644.n5.nabble.com/Dismissing-score-event-tp5733376.html
>> > Sent from the Csound - General mailing list archive at Nabble.com.
>> >
>> >
>> > 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"
>> >
>> >
>>
>>
>> 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"
>>
>>
>
>
>
> --
> Hlöðver Sigurðsson


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"





--
Hlöðver Sigurðsson



--
Hlöðver Sigurðsson

Date2014-03-20 18:40
FromVictor Lazzarini
SubjectRe: [Csnd] Dismissing score event
you might also like to have a look at this ADSD envelope design 

http://www.csounds.com/udo/displayOpcode.php?opcode_id=131

it might be useful.

========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 20 Mar 2014, at 14:44, Hlöðver Sigurðsson  wrote:

> I found another way to solve it, just gave each note a value with velocity parameter so I could recognize which note comes after who. I know it's very weird and unusual what I'm doing here. But it's probably part of being a beginner. Thanks anyway Steven!
> 
> 
> 2014-03-20 13:29 GMT+00:00 Hlöðver Sigurðsson :
> Well, let's say I have note with 1 second envelope time. And I send noteon message 4 times in one second, but nothing would happen until this 1 second elapse and the note has stopped sounding. It would be like playing non-polyphonic keyboard with long release where you can press the key like crazy but nothing new happens until the release time is finished(well hope that is a good example).
> 
> so with 60 note events per second, only the 61th would send note on message given that the envelope time is 1 second.
> 
> 
> 2014-03-20 13:23 GMT+00:00 Steven Yi :
> 
> Sorry, that sounds like what I understood the behavior you were
> interested in. So, could you explain again? When the max number of
> instances is hit, are you expecting that oldest note gets turned off
> and the new note turns on?
> 
> On Thu, Mar 20, 2014 at 9:20 AM, Hlöðver Sigurðsson  wrote:
> > ah so close!
> >
> > It allows instrument to be played x times but not again ever after the x
> > number has been reach.
> >
> > Any more clues?
> >
> > thanks
> >
> >
> > 2014-03-20 12:49 GMT+00:00 Steven Yi :
> >
> >> Perhaps using the maxalloc opcode would do the trick?
> >>
> >> 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
> >> >
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >> > http://csound.1045644.n5.nabble.com/Dismissing-score-event-tp5733376.html
> >> > Sent from the Csound - General mailing list archive at Nabble.com.
> >> >
> >> >
> >> > 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"
> >> >
> >> >
> >>
> >>
> >> 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"
> >>
> >>
> >
> >
> >
> > --
> > Hlöðver Sigurðsson
> 
> 
> 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"
> 
> 
> 
> 
> 
> -- 
> Hlöðver Sigurðsson
> 
> 
> 
> -- 
> Hlöðver Sigurðsson



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"