Csound Csound-dev Csound-tekno Search About

adsr issue

Date2015-06-07 13:10
FromMenno Knevel
Subjectadsr issue
Hi,

i have a few hardware synths, all equipped with an ADSR.
On all of these synths, when i set the slider of the Attack all the way down
and only the Decay a bit up, i get a snappy sound with a fast attack.
I would expect this behaviour using the adsr opcode. The example csd below
shows that when i set the A(ttack) to zero, no sound is produced at all? A
setting of .00001 is enough to make the tone alive. 
Is this correct behaviour?



; Select audio/midi flags here according to platform
; Audio out   Audio in
-odac           -iadc    ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o transeg.wav -W ;;; for file output any platform



sr = 48000
ksmps = 32
nchnls = 2

0dbfs = 1

instr 1

;kenv adsr 0.00001, .6, 0, 0     ; works
kenv adsr 0, .6, 0, 0      ; no sound
aenv interp kenv
a1 poscil aenv, 440, 1
outs a1, a1
endin



; Table #1, a sine wave.
f 1 0 16384 10 1

;i 1 0 2 2 2
;i 1 3 . 5 5
;i 1 6 . 1 1
;i 1 9 2 0 0
;i 1 12 . -20  -2
;i 1 15 . -2 2
i 1 0 2 0 -20
i 1 3 2 0 0
i 1 6 2 0 20
e








--
View this message in context: http://csound.1045644.n5.nabble.com/adsr-issue-tp5742038.html
Sent from the Csound - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
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-06-07 20:40
FromIain McCurdy
SubjectRe: adsr issue
AttachmentsNone  None  
I think this is probably correct behaviour as linsegs etc will behave the same way. It's a little annoying but when designing GUIcontrols I normally have the control start from zero and then add the 0.00001 buffer value later on.
I.

> Date: Sun, 7 Jun 2015 05:10:17 -0700
> From: magknevel@gmail.com
> To: csound-users@lists.sourceforge.net
> Subject: [Csnd] adsr issue
>
> Hi,
>
> i have a few hardware synths, all equipped with an ADSR.
> On all of these synths, when i set the slider of the Attack all the way down
> and only the Decay a bit up, i get a snappy sound with a fast attack.
> I would expect this behaviour using the adsr opcode. The example csd below
> shows that when i set the A(ttack) to zero, no sound is produced at all? A
> setting of .00001 is enough to make the tone alive.
> Is this correct behaviour?
>
> <CsoundSynthesizer>
> <CsOptions>
> ; Select audio/midi flags here according to platform
> ; Audio out Audio in
> -odac -iadc ;;;RT audio I/O
> ; For Non-realtime ouput leave only the line below:
> ; -o transeg.wav -W ;;; for file output any platform
> </CsOptions>
> <CsInstruments>
>
> sr = 48000
> ksmps = 32
> nchnls = 2
>
> 0dbfs = 1
>
> instr 1
>
> ;kenv adsr 0.00001, .6, 0, 0 ; works
> kenv adsr 0, .6, 0, 0 ; no sound
> aenv interp kenv
> a1 poscil aenv, 440, 1
> outs a1, a1
> endin
>
> </CsInstruments>
> <CsScore>
> ; Table #1, a sine wave.
> f 1 0 16384 10 1
>
> ;i 1 0 2 2 2
> ;i 1 3 . 5 5
> ;i 1 6 . 1 1
> ;i 1 9 2 0 0
> ;i 1 12 . -20 -2
> ;i 1 15 . -2 2
> i 1 0 2 0 -20
> i 1 3 2 0 0
> i 1 6 2 0 20
> e
> </CsScore>
> </CsoundSynthesizer>
>
>
>
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/adsr-issue-tp5742038.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> 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-06-10 17:53
FromSteven Yi
SubjectRe: adsr issue
I'd have thought 0 duration segments should be allowed to allow for
instantaneous changes. The code for segments could then just update
the running value to the 0-dur segment's value and move on from there
for calculations.

On Sun, Jun 7, 2015 at 3:40 PM, Iain McCurdy  wrote:
> I think this is probably correct behaviour as linsegs etc will behave the
> same way. It's a little annoying but when designing GUIcontrols I normally
> have the control start from zero and then add the 0.00001 buffer value later
> on.
> I.
>
>> Date: Sun, 7 Jun 2015 05:10:17 -0700
>> From: magknevel@gmail.com
>> To: csound-users@lists.sourceforge.net
>> Subject: [Csnd] adsr issue
>
>>
>> Hi,
>>
>> i have a few hardware synths, all equipped with an ADSR.
>> On all of these synths, when i set the slider of the Attack all the way
>> down
>> and only the Decay a bit up, i get a snappy sound with a fast attack.
>> I would expect this behaviour using the adsr opcode. The example csd below
>> shows that when i set the A(ttack) to zero, no sound is produced at all? A
>> setting of .00001 is enough to make the tone alive.
>> Is this correct behaviour?
>>
>> 
>> 
>> ; Select audio/midi flags here according to platform
>> ; Audio out Audio in
>> -odac -iadc ;;;RT audio I/O
>> ; For Non-realtime ouput leave only the line below:
>> ; -o transeg.wav -W ;;; for file output any platform
>> 
>> 
>>
>> sr = 48000
>> ksmps = 32
>> nchnls = 2
>>
>> 0dbfs = 1
>>
>> instr 1
>>
>> ;kenv adsr 0.00001, .6, 0, 0 ; works
>> kenv adsr 0, .6, 0, 0 ; no sound
>> aenv interp kenv
>> a1 poscil aenv, 440, 1
>> outs a1, a1
>> endin
>>
>> 
>> 
>> ; Table #1, a sine wave.
>> f 1 0 16384 10 1
>>
>> ;i 1 0 2 2 2
>> ;i 1 3 . 5 5
>> ;i 1 6 . 1 1
>> ;i 1 9 2 0 0
>> ;i 1 12 . -20 -2
>> ;i 1 15 . -2 2
>> i 1 0 2 0 -20
>> i 1 3 2 0 0
>> i 1 6 2 0 20
>> e
>> 
>> 
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://csound.1045644.n5.nabble.com/adsr-issue-tp5742038.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> 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
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> 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
>

------------------------------------------------------------------------------
_______________________________________________
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