[Csnd] polyphonic synths and overall amplitude..
Date | 2012-06-07 22:05 |
From | Rory 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. |
Date | 2012-06-08 00:08 |
From | peiman khosravi |
Subject | Re: [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 |
Date | 2012-06-08 01:27 |
From | Rory Walsh |
Subject | Re: [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 |
Date | 2012-06-08 20:27 |
From | Oeyvind Brandtsegg |
Subject | Re: [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 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 |
Date | 2012-06-08 21:14 |
From | Michael Gogins |
Subject | Re: [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 |