Csound Csound-dev Csound-tekno Search About

[Csnd] polyphonic synths and overall amplitude..

Date2012-06-07 22:05
FromRory Walsh
Subject[Csnd] polyphonic synths and overall amplitude..
I'm just playing around with a MIDI keyboard and some Csound synths
and I'm wondering what the best way to tackle volume with polyphonic
synths is. I've so far tried the following:

1) use the active opcode within my instrument to know how many active
instances are playing so I can scale accordingly.

instr 1
i1 active 1
kenv madsr .01, .3, .5, .2
a1 oscili p5*(1/i1), p4, 1
outs a1*kenv, a1*kenv
endin

If I do this each successive note becomes quieter, which doesn't sound right.

2) send an accumulated audio through via a global variable to a master
instrument that scales accordingly using the active opcode.

gaSigL init 0
gaSigR init 0

instr 1
kenv madsr .01, .3, .5, .2
a1 oscili p5, p4, 1
gaSigL = gaSigL+(a1*kenv)
gaSigR = gaSigR+(a1*kenv)
endin

instr 1000
k1 active 1
outs gaSigL*(1/k1), gaSigR*(1/k1),
gaSigL = 0
gaSigR = 0
endin

This works better but gives me clicks when the instrument is released.
Adding a tonek helps but it's still not right.

instr 1000
k1 active 1
k1 tonek k1, 10
outs gaSigL*(1/k1), gaSigR*(1/k1),
gaSigL = 0
gaSigR = 0
endin

I'm sure there is a standard trick I'm missing. How are the notes on a
typical synth scaled to avoid clipping. I can't imagine they divide
each note's velocity by 10 just to give them to themselves enough
headroom?! I look forward to your suggestions.

Rory.

Date2012-06-08 00:08
Frompeiman khosravi
SubjectRe: [Csnd] polyphonic synths and overall amplitude..
Rory I've had to deal with a number of student projects that used
Logic Pro synths (unfortunate as it is) and it doesn't look like any
of the synths deal with this issue! I suspect the best way would be to
have some sort of compressor in place before the output is sent to
dac. But my gut feeling is that as always the best thing would be to
get to know the instruments' limits through practice and then use with
care.

P

On 7 June 2012 22:05, Rory Walsh  wrote:
> I'm just playing around with a MIDI keyboard and some Csound synths
> and I'm wondering what the best way to tackle volume with polyphonic
> synths is. I've so far tried the following:
>
> 1) use the active opcode within my instrument to know how many active
> instances are playing so I can scale accordingly.
>
> instr 1
> i1 active 1
> kenv madsr .01, .3, .5, .2
> a1 oscili p5*(1/i1), p4, 1
> outs a1*kenv, a1*kenv
> endin
>
> If I do this each successive note becomes quieter, which doesn't sound right.
>
> 2) send an accumulated audio through via a global variable to a master
> instrument that scales accordingly using the active opcode.
>
> gaSigL init 0
> gaSigR init 0
>
> instr 1
> kenv madsr .01, .3, .5, .2
> a1 oscili p5, p4, 1
> gaSigL = gaSigL+(a1*kenv)
> gaSigR = gaSigR+(a1*kenv)
> endin
>
> instr 1000
> k1 active 1
> outs gaSigL*(1/k1), gaSigR*(1/k1),
> gaSigL = 0
> gaSigR = 0
> endin
>
> This works better but gives me clicks when the instrument is released.
> Adding a tonek helps but it's still not right.
>
> instr 1000
> k1 active 1
> k1 tonek k1, 10
> outs gaSigL*(1/k1), gaSigR*(1/k1),
> gaSigL = 0
> gaSigR = 0
> endin
>
> I'm sure there is a standard trick I'm missing. How are the notes on a
> typical synth scaled to avoid clipping. I can't imagine they divide
> each note's velocity by 10 just to give them to themselves enough
> headroom?! I look forward to your suggestions.
>
> Rory.
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2012-06-08 01:27
FromRory Walsh
SubjectRe: [Csnd] polyphonic synths and overall amplitude..
Thanks Peiman, I'm surprised. I thought they would have some clever
tricks up their sleeves. The compressor might be a good option.
Cheers.

On 8 June 2012 00:08, peiman khosravi  wrote:
> Rory I've had to deal with a number of student projects that used
> Logic Pro synths (unfortunate as it is) and it doesn't look like any
> of the synths deal with this issue! I suspect the best way would be to
> have some sort of compressor in place before the output is sent to
> dac. But my gut feeling is that as always the best thing would be to
> get to know the instruments' limits through practice and then use with
> care.
>
> P
>
> On 7 June 2012 22:05, Rory Walsh  wrote:
>> I'm just playing around with a MIDI keyboard and some Csound synths
>> and I'm wondering what the best way to tackle volume with polyphonic
>> synths is. I've so far tried the following:
>>
>> 1) use the active opcode within my instrument to know how many active
>> instances are playing so I can scale accordingly.
>>
>> instr 1
>> i1 active 1
>> kenv madsr .01, .3, .5, .2
>> a1 oscili p5*(1/i1), p4, 1
>> outs a1*kenv, a1*kenv
>> endin
>>
>> If I do this each successive note becomes quieter, which doesn't sound right.
>>
>> 2) send an accumulated audio through via a global variable to a master
>> instrument that scales accordingly using the active opcode.
>>
>> gaSigL init 0
>> gaSigR init 0
>>
>> instr 1
>> kenv madsr .01, .3, .5, .2
>> a1 oscili p5, p4, 1
>> gaSigL = gaSigL+(a1*kenv)
>> gaSigR = gaSigR+(a1*kenv)
>> endin
>>
>> instr 1000
>> k1 active 1
>> outs gaSigL*(1/k1), gaSigR*(1/k1),
>> gaSigL = 0
>> gaSigR = 0
>> endin
>>
>> This works better but gives me clicks when the instrument is released.
>> Adding a tonek helps but it's still not right.
>>
>> instr 1000
>> k1 active 1
>> k1 tonek k1, 10
>> outs gaSigL*(1/k1), gaSigR*(1/k1),
>> gaSigL = 0
>> gaSigR = 0
>> endin
>>
>> I'm sure there is a standard trick I'm missing. How are the notes on a
>> typical synth scaled to avoid clipping. I can't imagine they divide
>> each note's velocity by 10 just to give them to themselves enough
>> headroom?! I look forward to your suggestions.
>>
>> Rory.
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Date2012-06-08 20:27
FromOeyvind Brandtsegg
SubjectRe: [Csnd] polyphonic synths and overall amplitude..
Hi Rory,

I would think that the most natural method is to leave it as is,
after all acoustic instruments would work the same way (i.e. independently, no polyphonic adjustments), wouldn't they?

best,
Oeyvind


2012/6/8 Rory Walsh <rorywalsh@ear.ie>
Thanks Peiman, I'm surprised. I thought they would have some clever
tricks up their sleeves. The compressor might be a good option.
Cheers.

On 8 June 2012 00:08, peiman khosravi <peimankhosravi@gmail.com> wrote:
> Rory I've had to deal with a number of student projects that used
> Logic Pro synths (unfortunate as it is) and it doesn't look like any
> of the synths deal with this issue! I suspect the best way would be to
> have some sort of compressor in place before the output is sent to
> dac. But my gut feeling is that as always the best thing would be to
> get to know the instruments' limits through practice and then use with
> care.
>
> P
>
> On 7 June 2012 22:05, Rory Walsh <rorywalsh@ear.ie> wrote:
>> I'm just playing around with a MIDI keyboard and some Csound synths
>> and I'm wondering what the best way to tackle volume with polyphonic
>> synths is. I've so far tried the following:
>>
>> 1) use the active opcode within my instrument to know how many active
>> instances are playing so I can scale accordingly.
>>
>> instr 1
>> i1 active 1
>> kenv madsr .01, .3, .5, .2
>> a1 oscili p5*(1/i1), p4, 1
>> outs a1*kenv, a1*kenv
>> endin
>>
>> If I do this each successive note becomes quieter, which doesn't sound right.
>>
>> 2) send an accumulated audio through via a global variable to a master
>> instrument that scales accordingly using the active opcode.
>>
>> gaSigL init 0
>> gaSigR init 0
>>
>> instr 1
>> kenv madsr .01, .3, .5, .2
>> a1 oscili p5, p4, 1
>> gaSigL = gaSigL+(a1*kenv)
>> gaSigR = gaSigR+(a1*kenv)
>> endin
>>
>> instr 1000
>> k1 active 1
>> outs gaSigL*(1/k1), gaSigR*(1/k1),
>> gaSigL = 0
>> gaSigR = 0
>> endin
>>
>> This works better but gives me clicks when the instrument is released.
>> Adding a tonek helps but it's still not right.
>>
>> instr 1000
>> k1 active 1
>> k1 tonek k1, 10
>> outs gaSigL*(1/k1), gaSigR*(1/k1),
>> gaSigL = 0
>> gaSigR = 0
>> endin
>>
>> I'm sure there is a standard trick I'm missing. How are the notes on a
>> typical synth scaled to avoid clipping. I can't imagine they divide
>> each note's velocity by 10 just to give them to themselves enough
>> headroom?! I look forward to your suggestions.
>>
>> Rory.
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>


Send bugs reports to the Sourceforge bug tracker
           https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp

Date2012-06-08 21:14
FromMichael Gogins
SubjectRe: [Csnd] polyphonic synths and overall amplitude..
On a piano, the player would tend to compensate by pressing each note
of a chord less hard than a single note in a solo run.

On an organ, a chord of several notes would have to be louder than a
single note. A chord of four notes would have about four times as much
energy (that's NOT the same as loudness!) as one note. Four times the
energy is about 6 dB (that's NOT four times as loud, only about half
again as loud).

A synthesizer might be expected to behave like a piano, in which case
the energy of the notes in a chord would have to be divided by the
number of notes in the chord (NOT the loudness or the amplitude! the
energy! the amplitude would have to be divided by the square root of
the energy). If the synthesizer were being played by a pianist,
something like this would be done by the player. If you are feeding
the synthesizer notes all of the same "level" whatever that is and you
wanted it to sound more like a piano, you would have to do the
division in code.

Or, a synthesizer might be expected to behave like an organ, in which
case you can leave it alone...

Hmmm....

Mike


On Fri, Jun 8, 2012 at 3:27 PM, Oeyvind Brandtsegg
 wrote:
> Hi Rory,
>
> I would think that the most natural method is to leave it as is,
> after all acoustic instruments would work the same way (i.e. independently,
> no polyphonic adjustments), wouldn't they?
>
> best,
> Oeyvind
>
>
> 2012/6/8 Rory Walsh 
>>
>> Thanks Peiman, I'm surprised. I thought they would have some clever
>> tricks up their sleeves. The compressor might be a good option.
>> Cheers.
>>
>> On 8 June 2012 00:08, peiman khosravi  wrote:
>> > Rory I've had to deal with a number of student projects that used
>> > Logic Pro synths (unfortunate as it is) and it doesn't look like any
>> > of the synths deal with this issue! I suspect the best way would be to
>> > have some sort of compressor in place before the output is sent to
>> > dac. But my gut feeling is that as always the best thing would be to
>> > get to know the instruments' limits through practice and then use with
>> > care.
>> >
>> > P
>> >
>> > On 7 June 2012 22:05, Rory Walsh  wrote:
>> >> I'm just playing around with a MIDI keyboard and some Csound synths
>> >> and I'm wondering what the best way to tackle volume with polyphonic
>> >> synths is. I've so far tried the following:
>> >>
>> >> 1) use the active opcode within my instrument to know how many active
>> >> instances are playing so I can scale accordingly.
>> >>
>> >> instr 1
>> >> i1 active 1
>> >> kenv madsr .01, .3, .5, .2
>> >> a1 oscili p5*(1/i1), p4, 1
>> >> outs a1*kenv, a1*kenv
>> >> endin
>> >>
>> >> If I do this each successive note becomes quieter, which doesn't sound
>> >> right.
>> >>
>> >> 2) send an accumulated audio through via a global variable to a master
>> >> instrument that scales accordingly using the active opcode.
>> >>
>> >> gaSigL init 0
>> >> gaSigR init 0
>> >>
>> >> instr 1
>> >> kenv madsr .01, .3, .5, .2
>> >> a1 oscili p5, p4, 1
>> >> gaSigL = gaSigL+(a1*kenv)
>> >> gaSigR = gaSigR+(a1*kenv)
>> >> endin
>> >>
>> >> instr 1000
>> >> k1 active 1
>> >> outs gaSigL*(1/k1), gaSigR*(1/k1),
>> >> gaSigL = 0
>> >> gaSigR = 0
>> >> endin
>> >>
>> >> This works better but gives me clicks when the instrument is released.
>> >> Adding a tonek helps but it's still not right.
>> >>
>> >> instr 1000
>> >> k1 active 1
>> >> k1 tonek k1, 10
>> >> outs gaSigL*(1/k1), gaSigR*(1/k1),
>> >> gaSigL = 0
>> >> gaSigR = 0
>> >> endin
>> >>
>> >> I'm sure there is a standard trick I'm missing. How are the notes on a
>> >> typical synth scaled to avoid clipping. I can't imagine they divide
>> >> each note's velocity by 10 just to give them to themselves enough
>> >> headroom?! I look forward to your suggestions.
>> >>
>> >> Rory.
>> >>
>> >>
>> >> Send bugs reports to the Sourceforge bug tracker
>> >>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> Discussions of bugs and features can be posted here
>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> "unsubscribe csound"
>> >>
>> >
>> >
>> > Send bugs reports to the Sourceforge bug tracker
>> >            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> > Discussions of bugs and features can be posted here
>> > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> > csound"
>> >
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
>
> --
>
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
>
> http://flyndresang.no/
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://soundcloud.com/t-emp



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