[Csnd] adsr, madsr and 0dbfs

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

[Csnd] adsr, madsr and 0dbfs

AndreaS
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
[hidden email]
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

madsr_test_01.csd (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] adsr, madsr and 0dbfs

Victor Lazzarini
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 <[hidden email]> 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
> [hidden email]
> 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
> <madsr_test_01.csd>

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] adsr, madsr and 0dbfs

AndreaS
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 <[hidden email]> 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
>> [hidden email]
>> 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
>> <madsr_test_01.csd>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] adsr, madsr and 0dbfs

Victor Lazzarini
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 <[hidden email]> 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 <[hidden email]> 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
>>> [hidden email]
>>> 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
>>> <madsr_test_01.csd>
>> Csound mailing list
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] adsr, madsr and 0dbfs

AndreaS
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 <[hidden email]> 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 <[hidden email]> 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
>>>> [hidden email]
>>>> 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
>>>> <madsr_test_01.csd>
>>> Csound mailing list
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
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
Loading...