Csound Csound-dev Csound-tekno Search About

[Csnd] turning a real-time midi instrument off..?

Date2009-08-17 18:43
FromJason Timm
Subject[Csnd] turning a real-time midi instrument off..?
I have a midi controller that sends "drum-notes" that, when played polyphonically, don't finish the trigger with a note off - resulting in stuck notes. Is there a way to tell a real-time midi instrument to turn itself off after the amp envelope has finished its cycle?

J.

Date2009-08-17 19:03
FromMichael Gogins
Subject[Csnd] Re: turning a real-time midi instrument off..?
Set p3 to the duration you want. Or use the turnoff opcode.

hope this helps,
Mike

On 8/17/09, Jason Timm  wrote:
> I have a midi controller that sends "drum-notes" that, when played
> polyphonically, don't finish the trigger with a note off - resulting in
> stuck notes. Is there a way to tell a real-time midi instrument to turn
> itself off after the amp envelope has finished its cycle?
> J.
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"

Date2009-08-17 22:10
FromJason Timm
Subject[Csnd] Re: Re: turning a real-time midi instrument off..?
Attachmentsoverlap.csd  
Def points in the right direction. What I may need to know is, if I use a conditional, how do I query the duration the instrument's been active?

Here's relevant code:

J.

On Mon, Aug 17, 2009 at 2:03 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
Set p3 to the duration you want. Or use the turnoff opcode.

hope this helps,
Mike

On 8/17/09, Jason Timm <jasontimm07@gmail.com> wrote:
> I have a midi controller that sends "drum-notes" that, when played
> polyphonically, don't finish the trigger with a note off - resulting in
> stuck notes. Is there a way to tell a real-time midi instrument to turn
> itself off after the amp envelope has finished its cycle?
> J.
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"


--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2009-08-17 23:33
FromMike Moser-Booth
Subject[Csnd] Re: Re: Re: turning a real-time midi instrument off..?
You can use timout to set a duration for the instrument and have it turnoff after a certain amount of time.

instr 1

kcps init 0

kvel init 0

timout 0, 2, KeepPlaying

turnoff

KeepPlaying:

midinoteoncps kcps, kvel

kamp expseg .001, .001, 1, 1, .001

asig oscil kamp*kvel, kcps, gitri


outs asig, asig

endin


.mmb


Jason Timm wrote:
Def points in the right direction. What I may need to know is, if I use a conditional, how do I query the duration the instrument's been active?

Here's relevant code:

J.

On Mon, Aug 17, 2009 at 2:03 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
Set p3 to the duration you want. Or use the turnoff opcode.

hope this helps,
Mike

On 8/17/09, Jason Timm <jasontimm07@gmail.com> wrote:
> I have a midi controller that sends "drum-notes" that, when played
> polyphonically, don't finish the trigger with a note off - resulting in
> stuck notes. Is there a way to tell a real-time midi instrument to turn
> itself off after the amp envelope has finished its cycle?
> J.
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"


--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2009-08-18 01:19
FromJason Timm
Subject[Csnd] Re: Re: Re: Re: turning a real-time midi instrument off..?
Works a charm!

Much appreciated.
J.

On Mon, Aug 17, 2009 at 6:33 PM, Mike Moser-Booth <mmoserbooth@gmail.com> wrote:
You can use timout to set a duration for the instrument and have it turnoff after a certain amount of time.

instr 1

kcps init 0

kvel init 0

timout 0, 2, KeepPlaying

turnoff

KeepPlaying:

midinoteoncps kcps, kvel

kamp expseg .001, .001, 1, 1, .001

asig oscil kamp*kvel, kcps, gitri


outs asig, asig

endin


.mmb


Jason Timm wrote:
Def points in the right direction. What I may need to know is, if I use a conditional, how do I query the duration the instrument's been active?

Here's relevant code:

J.

On Mon, Aug 17, 2009 at 2:03 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
Set p3 to the duration you want. Or use the turnoff opcode.

hope this helps,
Mike

On 8/17/09, Jason Timm <jasontimm07@gmail.com> wrote:
> I have a midi controller that sends "drum-notes" that, when played
> polyphonically, don't finish the trigger with a note off - resulting in
> stuck notes. Is there a way to tell a real-time midi instrument to turn
> itself off after the amp envelope has finished its cycle?
> J.
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"


--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"