Quantcast

Button and ADSR

classic Classic list List threaded Threaded
6 messages Options
Gpp
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Button and ADSR

Gpp
Hello,

I am trying to trigger a ADSR envelope
kadsr_osc1 adsr i(gkADSR_osc1), i(gkDSRA_osc1), i(gkSRAD_osc1), i(gkDSRA_osc1)
using the "button" object.
The item "voice" is set as "event", the item "latch" is selected and in the box event i have written "i1 0 -1".

Do you have idea why it doesn't work?

Thank you

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Qutecsound-users] Button and ADSR

Jim Aikin
On 3/19/2014 11:57 AM, Gpp wrote:

> Hello,
>
> I am trying to trigger a ADSR envelope
> kadsr_osc1 adsr i(gkADSR_osc1), i(gkDSRA_osc1), i(gkSRAD_osc1),
> i(gkDSRA_osc1)
> using the "button" object.
> The item "voice" is set as "event", the item "latch" is selected and in the
> box event i have written "i1 0 -1".
>
> Do you have idea why it doesn't work?

It's hard to be sure without seeing your .csd file. Could you attach it
to a reply message? The button is going to start a new note event for
instr 1, and with the -1 p3, I'm guessing the note will stay on
indefinitely. I haven't actually tried using the button widget for this,
so I'm not certain.

If your adsr is in instr 1, it should start at the beginning of the note
event. Whether subsequent button presses will start new instances of
instr 1, I don't know. Maybe.

If you're trying to restart an envelope _within_ a running instrument
each time you press the button, then you need to use the reinit opcode
to reset the adsr, because it's not going to restart otherwise.

--JA


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Qutecsound-users] Button and ADSR

Tarmo Johannes

Hi, event with negative p3 works, but I think adsr requires determined duration. Try chancging it to madsr and see if it helps. How do you switsh the note out? Another button?
Cheers, tarmo

19.03.2014 23:23 kirjutas kuupƤeval "Jim Aikin" <[hidden email]>:
On 3/19/2014 11:57 AM, Gpp wrote:
> Hello,
>
> I am trying to trigger a ADSR envelope
> kadsr_osc1 adsr i(gkADSR_osc1), i(gkDSRA_osc1), i(gkSRAD_osc1),
> i(gkDSRA_osc1)
> using the "button" object.
> The item "voice" is set as "event", the item "latch" is selected and in the
> box event i have written "i1 0 -1".
>
> Do you have idea why it doesn't work?

It's hard to be sure without seeing your .csd file. Could you attach it
to a reply message? The button is going to start a new note event for
instr 1, and with the -1 p3, I'm guessing the note will stay on
indefinitely. I haven't actually tried using the button widget for this,
so I'm not certain.

If your adsr is in instr 1, it should start at the beginning of the note
event. Whether subsequent button presses will start new instances of
instr 1, I don't know. Maybe.

If you're trying to restart an envelope _within_ a running instrument
each time you press the button, then you need to use the reinit opcode
to reset the adsr, because it's not going to restart otherwise.

--JA


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Qutecsound-users] Button and ADSR

Jim Aikin
On 3/19/2014 2:34 PM, Tarmo Johannes wrote:
>
> Hi, event with negative p3 works, but I think adsr requires determined
> duration.
>

I suspect it will just hang at its sustain level until the note event
ends. Whether it will automatically add xtratim to the note, I'd have to
check ... it may work like linsegr and expsegr in that regard.

No, it doesn't. If the manual is accurate, adsr subtracts its attack,
decay, and release times from the value of p3, and sustains for whatever
amount of time is left over. From this, I suspect that possibly it won't
work at all with a negative p3. (I haven't checked.)

--JA


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users
Gpp
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Qutecsound-users] Button and ADSR

Gpp
Thank you.
The main issue is that once triggered the note doesn't stop, while I thought its duration would have been the sum of Attack - Decay - Sustain - Release. I have tried with madsr as well but it still needs an extra button's pushing in order to stop the note.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Qutecsound-users] Button and ADSR

Jim Aikin
On 3/24/2014 9:54 AM, Gpp wrote:
> Thank you.
> The main issue is that once triggered the note doesn't stop, while I thought
> its duration would have been the sum of Attack - Decay - Sustain - Release.
> I have tried with madsr as well but it still needs an extra button's pushing
> in order to stop the note.

That's correct. The sustain parameter of an ADSR is not a time value,
it's a level value, and by definition the envelope sustains at that
level until some condition is met. With a note that has a negative p3,
that condition will never be met.

If you want the note to stop after some specific time, an ADSR is not
the right envelope. Look at linseg. It takes a series of values that
alternate between times and levels. If the last level is 0, the envelope
will end. However, the _note_ will still be active -- you just won't
hear anything (assuming the linseg is controlling amplitude). If you
need to shut off the note, you'll still have to do something slightly
different.

--JA


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Qutecsound-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qutecsound-users
Loading...