Csound Csound-dev Csound-tekno Search About

adsr, madsr and 0dbfs

Date2017-07-14 10:26
FromAndrea Strappa
Subjectadsr, madsr and 0dbfs
Attachmentsmadsr_test_01.csd  
Hi list,

this is probably an old question, I'm sorry, but:

with adsr or madsr opcodes, if I set 0dbfs = 1 the listening is correct.

Instead if I set 0dbfs = 32767 or other value, the peak beetwen attack 
and delay remains 1, I suppose.

Should not this peak be always rescaled every time to 0dbfs, 
automatically by adsr and madsr opcodes?

I attach a little test file.

Andrea S.



Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-07-14 10:31
FromVictor Lazzarini
SubjectRe: adsr, madsr and 0dbfs
No, this was always the behaviour (max amp = 1), so it cannot be changed. Your code needs
a separate multiply by 0dbfs (it is up to the user to do these things).
========================
Prof. 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 14 Jul 2017, at 10:26, Andrea Strappa  wrote:
> 
> Hi list,
> 
> this is probably an old question, I'm sorry, but:
> 
> with adsr or madsr opcodes, if I set 0dbfs = 1 the listening is correct.
> 
> Instead if I set 0dbfs = 32767 or other value, the peak beetwen attack and delay remains 1, I suppose.
> 
> Should not this peak be always rescaled every time to 0dbfs, automatically by adsr and madsr opcodes?
> 
> I attach a little test file.
> 
> Andrea S.
> 
> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>       https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
> 

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-07-14 11:21
FromAndrea Strappa
SubjectRe: adsr, madsr and 0dbfs
someting like that...

instr 1

ifrq = p4

iamp = p5

kenv madsr .5, .5, iamp/0dbfs, .5

asig poscil kenv*0dbfs, cpsmidinn(ifrq)

outs asig, asig

endin


Il 14/07/2017 11:31, Victor Lazzarini ha scritto:
> No, this was always the behaviour (max amp = 1), so it cannot be changed. Your code needs
> a separate multiply by 0dbfs (it is up to the user to do these things).
> ========================
> Prof. 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 14 Jul 2017, at 10:26, Andrea Strappa  wrote:
>>
>> Hi list,
>>
>> this is probably an old question, I'm sorry, but:
>>
>> with adsr or madsr opcodes, if I set 0dbfs = 1 the listening is correct.
>>
>> Instead if I set 0dbfs = 32767 or other value, the peak beetwen attack and delay remains 1, I suppose.
>>
>> Should not this peak be always rescaled every time to 0dbfs, automatically by adsr and madsr opcodes?
>>
>> I attach a little test file.
>>
>> Andrea S.
>>
>>
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-07-14 11:26
FromVictor Lazzarini
SubjectRe: adsr, madsr and 0dbfs
if you like. It’s up to you to design the instrument in any way you’d like.
I would have used p4 as the max amp, and set sus to whatever fraction of
that might be (e.g. .7).

instr 1
kenv madsr .5,.5,.7,.5
asig poscil p4*kenv, cpsmidinn(p5)
outs asig, asig
endin

========================
Prof. 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 14 Jul 2017, at 11:21, Andrea Strappa  wrote:
> 
> someting like that...
> 
> instr 1
> 
> ifrq = p4
> 
> iamp = p5
> 
> kenv madsr .5, .5, iamp/0dbfs, .5
> 
> asig poscil kenv*0dbfs, cpsmidinn(ifrq)
> 
> outs asig, asig
> 
> endin
> 
> 
> Il 14/07/2017 11:31, Victor Lazzarini ha scritto:
>> No, this was always the behaviour (max amp = 1), so it cannot be changed. Your code needs
>> a separate multiply by 0dbfs (it is up to the user to do these things).
>> ========================
>> Prof. 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 14 Jul 2017, at 10:26, Andrea Strappa  wrote:
>>> 
>>> Hi list,
>>> 
>>> this is probably an old question, I'm sorry, but:
>>> 
>>> with adsr or madsr opcodes, if I set 0dbfs = 1 the listening is correct.
>>> 
>>> Instead if I set 0dbfs = 32767 or other value, the peak beetwen attack and delay remains 1, I suppose.
>>> 
>>> Should not this peak be always rescaled every time to 0dbfs, automatically by adsr and madsr opcodes?
>>> 
>>> I attach a little test file.
>>> 
>>> Andrea S.
>>> 
>>> 
>>> 
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>       https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>> 
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>       https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2017-07-14 12:21
FromAndrea Strappa
SubjectRe: adsr, madsr and 0dbfs
Ok, thank you, Victor. It's better define sustain argument with 0 to 1 
value.

Andrea S.


Il 14/07/2017 12:26, Victor Lazzarini ha scritto:
> if you like. It’s up to you to design the instrument in any way you’d like.
> I would have used p4 as the max amp, and set sus to whatever fraction of
> that might be (e.g. .7).
>
> instr 1
> kenv madsr .5,.5,.7,.5
> asig poscil p4*kenv, cpsmidinn(p5)
> outs asig, asig
> endin
>
> ========================
> Prof. 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 14 Jul 2017, at 11:21, Andrea Strappa  wrote:
>>
>> someting like that...
>>
>> instr 1
>>
>> ifrq = p4
>>
>> iamp = p5
>>
>> kenv madsr .5, .5, iamp/0dbfs, .5
>>
>> asig poscil kenv*0dbfs, cpsmidinn(ifrq)
>>
>> outs asig, asig
>>
>> endin
>>
>>
>> Il 14/07/2017 11:31, Victor Lazzarini ha scritto:
>>> No, this was always the behaviour (max amp = 1), so it cannot be changed. Your code needs
>>> a separate multiply by 0dbfs (it is up to the user to do these things).
>>> ========================
>>> Prof. 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 14 Jul 2017, at 10:26, Andrea Strappa  wrote:
>>>>
>>>> Hi list,
>>>>
>>>> this is probably an old question, I'm sorry, but:
>>>>
>>>> with adsr or madsr opcodes, if I set 0dbfs = 1 the listening is correct.
>>>>
>>>> Instead if I set 0dbfs = 32767 or other value, the peak beetwen attack and delay remains 1, I suppose.
>>>>
>>>> Should not this peak be always rescaled every time to 0dbfs, automatically by adsr and madsr opcodes?
>>>>
>>>> I attach a little test file.
>>>>
>>>> Andrea S.
>>>>
>>>>
>>>>
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>        https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>>> 
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>          https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here