Csound Csound-dev Csound-tekno Search About

To kill an instrument's parent?

Date2015-05-10 14:06
FromForrest Curo
SubjectTo kill an instrument's parent?
AttachmentsNone  None  
Due to some flaw in my usb midi interface, I occasionally get persistent duplicate notes.

When midi triggers a new note, of course I can write an instrument that will use 'event' to make a fractional-numbered instrument that generates the appropriate sound, basing the fraction on the midi key that was pressed. Every time a key is pressed, the instrument it triggers can check for instances numbered with the same fraction, then turnoff2 any such instrument --

but of course a midi-triggered note needs to persist if we're going to receive the midi noteoff for its key. So it shouldn't just make a fractional successor and disappear.

I don't think that there's any way to give a note directly triggered by a midi keyboard a fractional number, or to renumber an existing instrument. (?!)

We can target a fractional instrument, but how to take aim at it's parent instance?

The only kludge for this I can think of is to have every new note make and remember a serial number, by which to turn itself off when that serial number is somehow broadcast later.

Any less-clumsy approach?

Date2015-05-10 20:30
FromTarmo Johannes
SubjectRe: To kill an instrument's parent?
Hi,

I did not get exactly what you are afrter, nut perhaps

opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful 
for you? So you can have some conditions and control in the main instrument 
triggered by MIDI key, genreate sound via subisnstr that run exactyl as long 
as the main instrument is extivy.

best!
tarmo



On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> Due to some flaw in my usb midi interface, I occasionally get persistent
> duplicate notes.
> 
> When midi triggers a new note, of course I can write an instrument that
> will use 'event' to make a fractional-numbered instrument that generates
> the appropriate sound, basing the fraction on the midi key that was
> pressed. Every time a key is pressed, the instrument it triggers can check
> for instances numbered with the same fraction, then turnoff2 any such
> instrument --
> 
> but of course a midi-triggered note needs to persist if we're going to
> receive the midi noteoff for its key. So it shouldn't just make a
> fractional successor and disappear.
> 
> I don't think that there's any way to give a note directly triggered by a
> midi keyboard a fractional number, or to renumber an existing instrument.
> (?!)
> 
> We can target a fractional instrument, but how to take aim at it's parent
> instance?
> 
> The only kludge for this I can think of is to have every new note make and
> remember a serial number, by which to turn itself off when that serial
> number is somehow broadcast later.
> 
> Any less-clumsy approach?


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-05-11 15:11
FromForrest Curo
SubjectRe: To kill an instrument's parent?
AttachmentsNone  None  
No, you missed the object of the question.. (though that looks like a nice opcode, thanks!)

1) Midi triggers instrument 1 with (say) key 60
2) Instrument 1 starts instrument 1.060 to play the note.
3) The midi noteoff for note 60 gets lost and is never received.
4) Midi again triggers instrument 1 with note 60, but the original instance of instrument 1 is still going.
5) Instrument 1 checks with
active 1.060
& reports, this is already going. Turnoff2 can kill that specific note

but the first instance of instrument 1 won't know it's just hanging around taking up space.

Maybe it won't matter -- or maybe both instances will end the next time key 60 is raised (?) but some way to pull the duplicate instrument-instance itself would be tidier.


On Sun, May 10, 2015 at 12:30 PM, Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
Hi,

I did not get exactly what you are afrter, nut perhaps

opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful
for you? So you can have some conditions and control in the main instrument
triggered by MIDI key, genreate sound via subisnstr that run exactyl as long
as the main instrument is extivy.

best!
tarmo



On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> Due to some flaw in my usb midi interface, I occasionally get persistent
> duplicate notes.
>
> When midi triggers a new note, of course I can write an instrument that
> will use 'event' to make a fractional-numbered instrument that generates
> the appropriate sound, basing the fraction on the midi key that was
> pressed. Every time a key is pressed, the instrument it triggers can check
> for instances numbered with the same fraction, then turnoff2 any such
> instrument --
>
> but of course a midi-triggered note needs to persist if we're going to
> receive the midi noteoff for its key. So it shouldn't just make a
> fractional successor and disappear.
>
> I don't think that there's any way to give a note directly triggered by a
> midi keyboard a fractional number, or to renumber an existing instrument.
> (?!)
>
> We can target a fractional instrument, but how to take aim at it's parent
> instance?
>
> The only kludge for this I can think of is to have every new note make and
> remember a serial number, by which to turn itself off when that serial
> number is somehow broadcast later.
>
> Any less-clumsy approach?


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Date2015-05-11 15:24
FromJustin Smith
SubjectRe: To kill an instrument's parent?
AttachmentsNone  None  
why would instrument 1 stay running instead of explicitly exiting early after triggering 1.060 ?

On Mon, May 11, 2015 at 7:11 AM, Forrest Curo <treegestalt@gmail.com> wrote:
No, you missed the object of the question.. (though that looks like a nice opcode, thanks!)

1) Midi triggers instrument 1 with (say) key 60
2) Instrument 1 starts instrument 1.060 to play the note.
3) The midi noteoff for note 60 gets lost and is never received.
4) Midi again triggers instrument 1 with note 60, but the original instance of instrument 1 is still going.
5) Instrument 1 checks with
active 1.060
& reports, this is already going. Turnoff2 can kill that specific note

but the first instance of instrument 1 won't know it's just hanging around taking up space.

Maybe it won't matter -- or maybe both instances will end the next time key 60 is raised (?) but some way to pull the duplicate instrument-instance itself would be tidier.


On Sun, May 10, 2015 at 12:30 PM, Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
Hi,

I did not get exactly what you are afrter, nut perhaps

opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful
for you? So you can have some conditions and control in the main instrument
triggered by MIDI key, genreate sound via subisnstr that run exactyl as long
as the main instrument is extivy.

best!
tarmo



On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> Due to some flaw in my usb midi interface, I occasionally get persistent
> duplicate notes.
>
> When midi triggers a new note, of course I can write an instrument that
> will use 'event' to make a fractional-numbered instrument that generates
> the appropriate sound, basing the fraction on the midi key that was
> pressed. Every time a key is pressed, the instrument it triggers can check
> for instances numbered with the same fraction, then turnoff2 any such
> instrument --
>
> but of course a midi-triggered note needs to persist if we're going to
> receive the midi noteoff for its key. So it shouldn't just make a
> fractional successor and disappear.
>
> I don't think that there's any way to give a note directly triggered by a
> midi keyboard a fractional number, or to renumber an existing instrument.
> (?!)
>
> We can target a fractional instrument, but how to take aim at it's parent
> instance?
>
> The only kludge for this I can think of is to have every new note make and
> remember a serial number, by which to turn itself off when that serial
> number is somehow broadcast later.
>
> Any less-clumsy approach?


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



Date2015-05-11 16:20
FromForrest Curo
SubjectRe: To kill an instrument's parent?
AttachmentsNone  None  
Ah. If that instance of instrument 1 did not continue running, what would detect (when things work normally) the noteoff?

On Mon, May 11, 2015 at 7:24 AM, Justin Smith <noisesmith@gmail.com> wrote:
why would instrument 1 stay running instead of explicitly exiting early after triggering 1.060 ?

On Mon, May 11, 2015 at 7:11 AM, Forrest Curo <treegestalt@gmail.com> wrote:
No, you missed the object of the question.. (though that looks like a nice opcode, thanks!)

1) Midi triggers instrument 1 with (say) key 60
2) Instrument 1 starts instrument 1.060 to play the note.
3) The midi noteoff for note 60 gets lost and is never received.
4) Midi again triggers instrument 1 with note 60, but the original instance of instrument 1 is still going.
5) Instrument 1 checks with
active 1.060
& reports, this is already going. Turnoff2 can kill that specific note

but the first instance of instrument 1 won't know it's just hanging around taking up space.

Maybe it won't matter -- or maybe both instances will end the next time key 60 is raised (?) but some way to pull the duplicate instrument-instance itself would be tidier.


On Sun, May 10, 2015 at 12:30 PM, Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
Hi,

I did not get exactly what you are afrter, nut perhaps

opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful
for you? So you can have some conditions and control in the main instrument
triggered by MIDI key, genreate sound via subisnstr that run exactyl as long
as the main instrument is extivy.

best!
tarmo



On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> Due to some flaw in my usb midi interface, I occasionally get persistent
> duplicate notes.
>
> When midi triggers a new note, of course I can write an instrument that
> will use 'event' to make a fractional-numbered instrument that generates
> the appropriate sound, basing the fraction on the midi key that was
> pressed. Every time a key is pressed, the instrument it triggers can check
> for instances numbered with the same fraction, then turnoff2 any such
> instrument --
>
> but of course a midi-triggered note needs to persist if we're going to
> receive the midi noteoff for its key. So it shouldn't just make a
> fractional successor and disappear.
>
> I don't think that there's any way to give a note directly triggered by a
> midi keyboard a fractional number, or to renumber an existing instrument.
> (?!)
>
> We can target a fractional instrument, but how to take aim at it's parent
> instance?
>
> The only kludge for this I can think of is to have every new note make and
> remember a serial number, by which to turn itself off when that serial
> number is somehow broadcast later.
>
> Any less-clumsy approach?


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



Date2015-05-11 16:31
FromVictor Lazzarini
SubjectRe: To kill an instrument's parent?
What you do is to use a table or array with 128 points. When you receive a note on, you set
the corresponding array or table position to 1. If  you get a new note on,
check the array to see if the note is already on, if so you can send a turnoff2 or event with negative matching p1 to 
kill the instance, and then you can re-send another one to start it again. You could potentially just send
a new event with the same matching p1 and the note will be tied.

I think it might make more sense to use different instruments for receiving and parsing MIDI and
actually playing. Say, noteon received with instr 1 and then  you start  playing instr 11 with 
"i 11. 0 -1”.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 11 May 2015, at 15:11, Forrest Curo  wrote:
> 
> No, you missed the object of the question.. (though that looks like a nice opcode, thanks!)
> 
> 1) Midi triggers instrument 1 with (say) key 60
> 2) Instrument 1 starts instrument 1.060 to play the note.
> 3) The midi noteoff for note 60 gets lost and is never received.
> 4) Midi again triggers instrument 1 with note 60, but the original instance of instrument 1 is still going.
> 5) Instrument 1 checks with 
> active 1.060
> & reports, this is already going. Turnoff2 can kill that specific note
> 
> but the first instance of instrument 1 won't know it's just hanging around taking up space.
> 
> Maybe it won't matter -- or maybe both instances will end the next time key 60 is raised (?) but some way to pull the duplicate instrument-instance itself would be tidier.
> 
> 
> On Sun, May 10, 2015 at 12:30 PM, Tarmo Johannes  wrote:
> Hi,
> 
> I did not get exactly what you are afrter, nut perhaps
> 
> opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful
> for you? So you can have some conditions and control in the main instrument
> triggered by MIDI key, genreate sound via subisnstr that run exactyl as long
> as the main instrument is extivy.
> 
> best!
> tarmo
> 
> 
> 
> On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> > Due to some flaw in my usb midi interface, I occasionally get persistent
> > duplicate notes.
> >
> > When midi triggers a new note, of course I can write an instrument that
> > will use 'event' to make a fractional-numbered instrument that generates
> > the appropriate sound, basing the fraction on the midi key that was
> > pressed. Every time a key is pressed, the instrument it triggers can check
> > for instances numbered with the same fraction, then turnoff2 any such
> > instrument --
> >
> > but of course a midi-triggered note needs to persist if we're going to
> > receive the midi noteoff for its key. So it shouldn't just make a
> > fractional successor and disappear.
> >
> > I don't think that there's any way to give a note directly triggered by a
> > midi keyboard a fractional number, or to renumber an existing instrument.
> > (?!)
> >
> > We can target a fractional instrument, but how to take aim at it's parent
> > instance?
> >
> > The only kludge for this I can think of is to have every new note make and
> > remember a serial number, by which to turn itself off when that serial
> > number is somehow broadcast later.
> >
> > Any less-clumsy approach?
> 
> 
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> 
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-05-11 18:15
FromForrest Curo
SubjectRe: To kill an instrument's parent?
AttachmentsNone  None  
Okay, so we kill or swap out the duplicate instance of i 11.<notenum> -- but does the duplicate instance of i 1 poof out when we finally get the noteoff corresponding to both i 1's?

Maybe killing the longest-running 'i 1' keeps our bookkeeping straight -- but if that was triggered by a different midi key, does that key's subsequent noteoff get lost?

On Mon, May 11, 2015 at 8:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
What you do is to use a table or array with 128 points. When you receive a note on, you set
the corresponding array or table position to 1. If  you get a new note on,
check the array to see if the note is already on, if so you can send a turnoff2 or event with negative matching p1 to
kill the instance, and then you can re-send another one to start it again. You could potentially just send
a new event with the same matching p1 and the note will be tied.

I think it might make more sense to use different instruments for receiving and parsing MIDI and
actually playing. Say, noteon received with instr 1 and then  you start  playing instr 11 with
"i 11.<note_number> 0 -1”.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 11 May 2015, at 15:11, Forrest Curo <treegestalt@gmail.com> wrote:
>
> No, you missed the object of the question.. (though that looks like a nice opcode, thanks!)
>
> 1) Midi triggers instrument 1 with (say) key 60
> 2) Instrument 1 starts instrument 1.060 to play the note.
> 3) The midi noteoff for note 60 gets lost and is never received.
> 4) Midi again triggers instrument 1 with note 60, but the original instance of instrument 1 is still going.
> 5) Instrument 1 checks with
> active 1.060
> & reports, this is already going. Turnoff2 can kill that specific note
>
> but the first instance of instrument 1 won't know it's just hanging around taking up space.
>
> Maybe it won't matter -- or maybe both instances will end the next time key 60 is raised (?) but some way to pull the duplicate instrument-instance itself would be tidier.
>
>
> On Sun, May 10, 2015 at 12:30 PM, Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
> Hi,
>
> I did not get exactly what you are afrter, nut perhaps
>
> opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful
> for you? So you can have some conditions and control in the main instrument
> triggered by MIDI key, genreate sound via subisnstr that run exactyl as long
> as the main instrument is extivy.
>
> best!
> tarmo
>
>
>
> On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> > Due to some flaw in my usb midi interface, I occasionally get persistent
> > duplicate notes.
> >
> > When midi triggers a new note, of course I can write an instrument that
> > will use 'event' to make a fractional-numbered instrument that generates
> > the appropriate sound, basing the fraction on the midi key that was
> > pressed. Every time a key is pressed, the instrument it triggers can check
> > for instances numbered with the same fraction, then turnoff2 any such
> > instrument --
> >
> > but of course a midi-triggered note needs to persist if we're going to
> > receive the midi noteoff for its key. So it shouldn't just make a
> > fractional successor and disappear.
> >
> > I don't think that there's any way to give a note directly triggered by a
> > midi keyboard a fractional number, or to renumber an existing instrument.
> > (?!)
> >
> > We can target a fractional instrument, but how to take aim at it's parent
> > instance?
> >
> > The only kludge for this I can think of is to have every new note make and
> > remember a serial number, by which to turn itself off when that serial
> > number is somehow broadcast later.
> >
> > Any less-clumsy approach?
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Date2015-05-11 18:33
FromVictor Lazzarini
SubjectRe: To kill an instrument's parent?
AttachmentsNone  None  
You only need one copy of i 1, and the midiin opcode. Use massign 0,0 to stop the triggering of instruments and manage everything yourself. I can send you an example tomorrow.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 11 May 2015, at 18:15, Forrest Curo <treegestalt@gmail.com> wrote:

Okay, so we kill or swap out the duplicate instance of i 11.<notenum> -- but does the duplicate instance of i 1 poof out when we finally get the noteoff corresponding to both i 1's?

Maybe killing the longest-running 'i 1' keeps our bookkeeping straight -- but if that was triggered by a different midi key, does that key's subsequent noteoff get lost?

On Mon, May 11, 2015 at 8:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
What you do is to use a table or array with 128 points. When you receive a note on, you set
the corresponding array or table position to 1. If  you get a new note on,
check the array to see if the note is already on, if so you can send a turnoff2 or event with negative matching p1 to
kill the instance, and then you can re-send another one to start it again. You could potentially just send
a new event with the same matching p1 and the note will be tied.

I think it might make more sense to use different instruments for receiving and parsing MIDI and
actually playing. Say, noteon received with instr 1 and then  you start  playing instr 11 with
"i 11.<note_number> 0 -1”.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 11 May 2015, at 15:11, Forrest Curo <treegestalt@gmail.com> wrote:
>
> No, you missed the object of the question.. (though that looks like a nice opcode, thanks!)
>
> 1) Midi triggers instrument 1 with (say) key 60
> 2) Instrument 1 starts instrument 1.060 to play the note.
> 3) The midi noteoff for note 60 gets lost and is never received.
> 4) Midi again triggers instrument 1 with note 60, but the original instance of instrument 1 is still going.
> 5) Instrument 1 checks with
> active 1.060
> & reports, this is already going. Turnoff2 can kill that specific note
>
> but the first instance of instrument 1 won't know it's just hanging around taking up space.
>
> Maybe it won't matter -- or maybe both instances will end the next time key 60 is raised (?) but some way to pull the duplicate instrument-instance itself would be tidier.
>
>
> On Sun, May 10, 2015 at 12:30 PM, Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
> Hi,
>
> I did not get exactly what you are afrter, nut perhaps
>
> opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful
> for you? So you can have some conditions and control in the main instrument
> triggered by MIDI key, genreate sound via subisnstr that run exactyl as long
> as the main instrument is extivy.
>
> best!
> tarmo
>
>
>
> On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> > Due to some flaw in my usb midi interface, I occasionally get persistent
> > duplicate notes.
> >
> > When midi triggers a new note, of course I can write an instrument that
> > will use 'event' to make a fractional-numbered instrument that generates
> > the appropriate sound, basing the fraction on the midi key that was
> > pressed. Every time a key is pressed, the instrument it triggers can check
> > for instances numbered with the same fraction, then turnoff2 any such
> > instrument --
> >
> > but of course a midi-triggered note needs to persist if we're going to
> > receive the midi noteoff for its key. So it shouldn't just make a
> > fractional successor and disappear.
> >
> > I don't think that there's any way to give a note directly triggered by a
> > midi keyboard a fractional number, or to renumber an existing instrument.
> > (?!)
> >
> > We can target a fractional instrument, but how to take aim at it's parent
> > instance?
> >
> > The only kludge for this I can think of is to have every new note make and
> > remember a serial number, by which to turn itself off when that serial
> > number is somehow broadcast later.
> >
> > Any less-clumsy approach?
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-05-11 19:05
FromVictor Lazzarini
SubjectRe: To kill an instrument's parent?
AttachmentsNone  None  
Take a look at this manual example: it does what I am suggesting


Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 11 May 2015, at 18:33, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:

You only need one copy of i 1, and the midiin opcode. Use massign 0,0 to stop the triggering of instruments and manage everything yourself. I can send you an example tomorrow.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 11 May 2015, at 18:15, Forrest Curo <treegestalt@gmail.com> wrote:

Okay, so we kill or swap out the duplicate instance of i 11.<notenum> -- but does the duplicate instance of i 1 poof out when we finally get the noteoff corresponding to both i 1's?

Maybe killing the longest-running 'i 1' keeps our bookkeeping straight -- but if that was triggered by a different midi key, does that key's subsequent noteoff get lost?

On Mon, May 11, 2015 at 8:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
What you do is to use a table or array with 128 points. When you receive a note on, you set
the corresponding array or table position to 1. If  you get a new note on,
check the array to see if the note is already on, if so you can send a turnoff2 or event with negative matching p1 to
kill the instance, and then you can re-send another one to start it again. You could potentially just send
a new event with the same matching p1 and the note will be tied.

I think it might make more sense to use different instruments for receiving and parsing MIDI and
actually playing. Say, noteon received with instr 1 and then  you start  playing instr 11 with
"i 11.<note_number> 0 -1”.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 11 May 2015, at 15:11, Forrest Curo <treegestalt@gmail.com> wrote:
>
> No, you missed the object of the question.. (though that looks like a nice opcode, thanks!)
>
> 1) Midi triggers instrument 1 with (say) key 60
> 2) Instrument 1 starts instrument 1.060 to play the note.
> 3) The midi noteoff for note 60 gets lost and is never received.
> 4) Midi again triggers instrument 1 with note 60, but the original instance of instrument 1 is still going.
> 5) Instrument 1 checks with
> active 1.060
> & reports, this is already going. Turnoff2 can kill that specific note
>
> but the first instance of instrument 1 won't know it's just hanging around taking up space.
>
> Maybe it won't matter -- or maybe both instances will end the next time key 60 is raised (?) but some way to pull the duplicate instrument-instance itself would be tidier.
>
>
> On Sun, May 10, 2015 at 12:30 PM, Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
> Hi,
>
> I did not get exactly what you are afrter, nut perhaps
>
> opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful
> for you? So you can have some conditions and control in the main instrument
> triggered by MIDI key, genreate sound via subisnstr that run exactyl as long
> as the main instrument is extivy.
>
> best!
> tarmo
>
>
>
> On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> > Due to some flaw in my usb midi interface, I occasionally get persistent
> > duplicate notes.
> >
> > When midi triggers a new note, of course I can write an instrument that
> > will use 'event' to make a fractional-numbered instrument that generates
> > the appropriate sound, basing the fraction on the midi key that was
> > pressed. Every time a key is pressed, the instrument it triggers can check
> > for instances numbered with the same fraction, then turnoff2 any such
> > instrument --
> >
> > but of course a midi-triggered note needs to persist if we're going to
> > receive the midi noteoff for its key. So it shouldn't just make a
> > fractional successor and disappear.
> >
> > I don't think that there's any way to give a note directly triggered by a
> > midi keyboard a fractional number, or to renumber an existing instrument.
> > (?!)
> >
> > We can target a fractional instrument, but how to take aim at it's parent
> > instance?
> >
> > The only kludge for this I can think of is to have every new note make and
> > remember a serial number, by which to turn itself off when that serial
> > number is somehow broadcast later.
> >
> > Any less-clumsy approach?
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-05-11 20:50
FromForrest Curo
SubjectRe: To kill an instrument's parent?
AttachmentsNone  None  
Okay, now it's making sense; thanks!

On Mon, May 11, 2015 at 10:33 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
You only need one copy of i 1, and the midiin opcode. Use massign 0,0 to stop the triggering of instruments and manage everything yourself. I can send you an example tomorrow.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 11 May 2015, at 18:15, Forrest Curo <treegestalt@gmail.com> wrote:

Okay, so we kill or swap out the duplicate instance of i 11.<notenum> -- but does the duplicate instance of i 1 poof out when we finally get the noteoff corresponding to both i 1's?

Maybe killing the longest-running 'i 1' keeps our bookkeeping straight -- but if that was triggered by a different midi key, does that key's subsequent noteoff get lost?

On Mon, May 11, 2015 at 8:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
What you do is to use a table or array with 128 points. When you receive a note on, you set
the corresponding array or table position to 1. If  you get a new note on,
check the array to see if the note is already on, if so you can send a turnoff2 or event with negative matching p1 to
kill the instance, and then you can re-send another one to start it again. You could potentially just send
a new event with the same matching p1 and the note will be tied.

I think it might make more sense to use different instruments for receiving and parsing MIDI and
actually playing. Say, noteon received with instr 1 and then  you start  playing instr 11 with
"i 11.<note_number> 0 -1”.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 11 May 2015, at 15:11, Forrest Curo <treegestalt@gmail.com> wrote:
>
> No, you missed the object of the question.. (though that looks like a nice opcode, thanks!)
>
> 1) Midi triggers instrument 1 with (say) key 60
> 2) Instrument 1 starts instrument 1.060 to play the note.
> 3) The midi noteoff for note 60 gets lost and is never received.
> 4) Midi again triggers instrument 1 with note 60, but the original instance of instrument 1 is still going.
> 5) Instrument 1 checks with
> active 1.060
> & reports, this is already going. Turnoff2 can kill that specific note
>
> but the first instance of instrument 1 won't know it's just hanging around taking up space.
>
> Maybe it won't matter -- or maybe both instances will end the next time key 60 is raised (?) but some way to pull the duplicate instrument-instance itself would be tidier.
>
>
> On Sun, May 10, 2015 at 12:30 PM, Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
> Hi,
>
> I did not get exactly what you are afrter, nut perhaps
>
> opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful
> for you? So you can have some conditions and control in the main instrument
> triggered by MIDI key, genreate sound via subisnstr that run exactyl as long
> as the main instrument is extivy.
>
> best!
> tarmo
>
>
>
> On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> > Due to some flaw in my usb midi interface, I occasionally get persistent
> > duplicate notes.
> >
> > When midi triggers a new note, of course I can write an instrument that
> > will use 'event' to make a fractional-numbered instrument that generates
> > the appropriate sound, basing the fraction on the midi key that was
> > pressed. Every time a key is pressed, the instrument it triggers can check
> > for instances numbered with the same fraction, then turnoff2 any such
> > instrument --
> >
> > but of course a midi-triggered note needs to persist if we're going to
> > receive the midi noteoff for its key. So it shouldn't just make a
> > fractional successor and disappear.
> >
> > I don't think that there's any way to give a note directly triggered by a
> > midi keyboard a fractional number, or to renumber an existing instrument.
> > (?!)
> >
> > We can target a fractional instrument, but how to take aim at it's parent
> > instance?
> >
> > The only kludge for this I can think of is to have every new note make and
> > remember a serial number, by which to turn itself off when that serial
> > number is somehow broadcast later.
> >
> > Any less-clumsy approach?
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



Date2015-05-13 05:21
FromForrest Curo
SubjectRe: To kill an instrument's parent?
AttachmentsNone  None  
I think the following will do ( with massign 0,0):

kp = 2 + knote/1000
kplaying active kp
if ((kvel == 0)||(kplaying >0)) then
    kp = -kp
endif
event "i", kp, 0, -2, kvel, kquot, kmod

[where instr 2.<notenumber> is the instrument making the actual sound, knote the midi note number, kvel the velocity, kquot & kmod the note's octave and scale degree.]

On Mon, May 11, 2015 at 12:50 PM, Forrest Curo <treegestalt@gmail.com> wrote:
Okay, now it's making sense; thanks!

On Mon, May 11, 2015 at 10:33 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
You only need one copy of i 1, and the midiin opcode. Use massign 0,0 to stop the triggering of instruments and manage everything yourself. I can send you an example tomorrow.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 11 May 2015, at 18:15, Forrest Curo <treegestalt@gmail.com> wrote:

Okay, so we kill or swap out the duplicate instance of i 11.<notenum> -- but does the duplicate instance of i 1 poof out when we finally get the noteoff corresponding to both i 1's?

Maybe killing the longest-running 'i 1' keeps our bookkeeping straight -- but if that was triggered by a different midi key, does that key's subsequent noteoff get lost?

On Mon, May 11, 2015 at 8:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
What you do is to use a table or array with 128 points. When you receive a note on, you set
the corresponding array or table position to 1. If  you get a new note on,
check the array to see if the note is already on, if so you can send a turnoff2 or event with negative matching p1 to
kill the instance, and then you can re-send another one to start it again. You could potentially just send
a new event with the same matching p1 and the note will be tied.

I think it might make more sense to use different instruments for receiving and parsing MIDI and
actually playing. Say, noteon received with instr 1 and then  you start  playing instr 11 with
"i 11.<note_number> 0 -1”.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 11 May 2015, at 15:11, Forrest Curo <treegestalt@gmail.com> wrote:
>
> No, you missed the object of the question.. (though that looks like a nice opcode, thanks!)
>
> 1) Midi triggers instrument 1 with (say) key 60
> 2) Instrument 1 starts instrument 1.060 to play the note.
> 3) The midi noteoff for note 60 gets lost and is never received.
> 4) Midi again triggers instrument 1 with note 60, but the original instance of instrument 1 is still going.
> 5) Instrument 1 checks with
> active 1.060
> & reports, this is already going. Turnoff2 can kill that specific note
>
> but the first instance of instrument 1 won't know it's just hanging around taking up space.
>
> Maybe it won't matter -- or maybe both instances will end the next time key 60 is raised (?) but some way to pull the duplicate instrument-instance itself would be tidier.
>
>
> On Sun, May 10, 2015 at 12:30 PM, Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
> Hi,
>
> I did not get exactly what you are afrter, nut perhaps
>
> opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful
> for you? So you can have some conditions and control in the main instrument
> triggered by MIDI key, genreate sound via subisnstr that run exactyl as long
> as the main instrument is extivy.
>
> best!
> tarmo
>
>
>
> On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> > Due to some flaw in my usb midi interface, I occasionally get persistent
> > duplicate notes.
> >
> > When midi triggers a new note, of course I can write an instrument that
> > will use 'event' to make a fractional-numbered instrument that generates
> > the appropriate sound, basing the fraction on the midi key that was
> > pressed. Every time a key is pressed, the instrument it triggers can check
> > for instances numbered with the same fraction, then turnoff2 any such
> > instrument --
> >
> > but of course a midi-triggered note needs to persist if we're going to
> > receive the midi noteoff for its key. So it shouldn't just make a
> > fractional successor and disappear.
> >
> > I don't think that there's any way to give a note directly triggered by a
> > midi keyboard a fractional number, or to renumber an existing instrument.
> > (?!)
> >
> > We can target a fractional instrument, but how to take aim at it's parent
> > instance?
> >
> > The only kludge for this I can think of is to have every new note make and
> > remember a serial number, by which to turn itself off when that serial
> > number is somehow broadcast later.
> >
> > Any less-clumsy approach?
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here




Date2015-05-13 05:47
FromForrest Curo
SubjectRe: To kill an instrument's parent?
AttachmentsNone  None  
No, that was elegant but wouldn't work.

kp = 2 + knote/1000
kplaying active kp
if (kvel ==0 ) then
     event "i", -kp, 0, -2, kvel, kquot, kmod
elseif (kplaying >0) then
     event "i", -kp, 0, -2, kvel, kquot, kmod
     event "i", kp, 0, -2, kvel, kquot, kmod
endif

On Tue, May 12, 2015 at 9:21 PM, Forrest Curo <treegestalt@gmail.com> wrote:
I think the following will do ( with massign 0,0):

kp = 2 + knote/1000
kplaying active kp
if ((kvel == 0)||(kplaying >0)) then
    kp = -kp
endif
event "i", kp, 0, -2, kvel, kquot, kmod

[where instr 2.<notenumber> is the instrument making the actual sound, knote the midi note number, kvel the velocity, kquot & kmod the note's octave and scale degree.]

On Mon, May 11, 2015 at 12:50 PM, Forrest Curo <treegestalt@gmail.com> wrote:
Okay, now it's making sense; thanks!

On Mon, May 11, 2015 at 10:33 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
You only need one copy of i 1, and the midiin opcode. Use massign 0,0 to stop the triggering of instruments and manage everything yourself. I can send you an example tomorrow.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 11 May 2015, at 18:15, Forrest Curo <treegestalt@gmail.com> wrote:

Okay, so we kill or swap out the duplicate instance of i 11.<notenum> -- but does the duplicate instance of i 1 poof out when we finally get the noteoff corresponding to both i 1's?

Maybe killing the longest-running 'i 1' keeps our bookkeeping straight -- but if that was triggered by a different midi key, does that key's subsequent noteoff get lost?

On Mon, May 11, 2015 at 8:31 AM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
What you do is to use a table or array with 128 points. When you receive a note on, you set
the corresponding array or table position to 1. If  you get a new note on,
check the array to see if the note is already on, if so you can send a turnoff2 or event with negative matching p1 to
kill the instance, and then you can re-send another one to start it again. You could potentially just send
a new event with the same matching p1 and the note will be tied.

I think it might make more sense to use different instruments for receiving and parsing MIDI and
actually playing. Say, noteon received with instr 1 and then  you start  playing instr 11 with
"i 11.<note_number> 0 -1”.

========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 11 May 2015, at 15:11, Forrest Curo <treegestalt@gmail.com> wrote:
>
> No, you missed the object of the question.. (though that looks like a nice opcode, thanks!)
>
> 1) Midi triggers instrument 1 with (say) key 60
> 2) Instrument 1 starts instrument 1.060 to play the note.
> 3) The midi noteoff for note 60 gets lost and is never received.
> 4) Midi again triggers instrument 1 with note 60, but the original instance of instrument 1 is still going.
> 5) Instrument 1 checks with
> active 1.060
> & reports, this is already going. Turnoff2 can kill that specific note
>
> but the first instance of instrument 1 won't know it's just hanging around taking up space.
>
> Maybe it won't matter -- or maybe both instances will end the next time key 60 is raised (?) but some way to pull the duplicate instrument-instance itself would be tidier.
>
>
> On Sun, May 10, 2015 at 12:30 PM, Tarmo Johannes <tarmo.johannes@otsakool.edu.ee> wrote:
> Hi,
>
> I did not get exactly what you are afrter, nut perhaps
>
> opcode subinstr http://www.csounds.com/manual/html/subinstr.html  is useful
> for you? So you can have some conditions and control in the main instrument
> triggered by MIDI key, genreate sound via subisnstr that run exactyl as long
> as the main instrument is extivy.
>
> best!
> tarmo
>
>
>
> On Sunday 10 May 2015 06:06:59 Forrest Curo wrote:
> > Due to some flaw in my usb midi interface, I occasionally get persistent
> > duplicate notes.
> >
> > When midi triggers a new note, of course I can write an instrument that
> > will use 'event' to make a fractional-numbered instrument that generates
> > the appropriate sound, basing the fraction on the midi key that was
> > pressed. Every time a key is pressed, the instrument it triggers can check
> > for instances numbered with the same fraction, then turnoff2 any such
> > instrument --
> >
> > but of course a midi-triggered note needs to persist if we're going to
> > receive the midi noteoff for its key. So it shouldn't just make a
> > fractional successor and disappear.
> >
> > I don't think that there's any way to give a note directly triggered by a
> > midi keyboard a fractional number, or to renumber an existing instrument.
> > (?!)
> >
> > We can target a fractional instrument, but how to take aim at it's parent
> > instance?
> >
> > The only kludge for this I can think of is to have every new note make and
> > remember a serial number, by which to turn itself off when that serial
> > number is somehow broadcast later.
> >
> > Any less-clumsy approach?
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
       https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here