Csound Csound-dev Csound-tekno Search About

Increasing volume leads to reduction of dynamic range???

Date2016-03-24 20:01
FromAnton Kholomiov
SubjectIncreasing volume leads to reduction of dynamic range???
Is that possible?  When i try to increase the volume (signal constant multiplier)
the output decreases in dynamic range. I don't understand how that happens.
Can you suggest how to increase the volume in the output of Csound.

I try to use Csound for background music as a prerecorded drone generator
and I'd like to make sound louder. Right now it's too quiet and we need to 
set high gain values on mixing console to amplify the signal. 

When I multiply the signal it reduces in dynamic range. It looks like there is something that
compresses the signal. Is it csound or my soundcard? I'm using laptop.

Anton

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

Date2016-03-24 22:25
Fromthorin kerr
SubjectRe: Increasing volume leads to reduction of dynamic range???
Maybe you have very low frequencies, or a DC offset?

On Fri, Mar 25, 2016 at 6:01 AM, Anton Kholomiov <anton.kholomiov@gmail.com> wrote:
Is that possible?  When i try to increase the volume (signal constant multiplier)
the output decreases in dynamic range. I don't understand how that happens.
Can you suggest how to increase the volume in the output of Csound.

I try to use Csound for background music as a prerecorded drone generator
and I'd like to make sound louder. Right now it's too quiet and we need to 
set high gain values on mixing console to amplify the signal. 

When I multiply the signal it reduces in dynamic range. It looks like there is something that
compresses the signal. Is it csound or my soundcard? I'm using laptop.

Anton

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

Date2016-03-25 05:45
FromAnton Kholomiov
SubjectRe: Increasing volume leads to reduction of dynamic range???
@Partev Since the sound is synthesized I don't think there is much noise going on, 
or you mean it can come from cables, connections?

@Thorin It can be, I'll check it out. So the low frequency can become a DC I guess.


2016-03-25 1:25 GMT+03:00 thorin kerr <thorin.kerr@gmail.com>:
Maybe you have very low frequencies, or a DC offset?

On Fri, Mar 25, 2016 at 6:01 AM, Anton Kholomiov <anton.kholomiov@gmail.com> wrote:
Is that possible?  When i try to increase the volume (signal constant multiplier)
the output decreases in dynamic range. I don't understand how that happens.
Can you suggest how to increase the volume in the output of Csound.

I try to use Csound for background music as a prerecorded drone generator
and I'd like to make sound louder. Right now it's too quiet and we need to 
set high gain values on mixing console to amplify the signal. 

When I multiply the signal it reduces in dynamic range. It looks like there is something that
compresses the signal. Is it csound or my soundcard? I'm using laptop.

Anton

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

Date2016-03-25 09:26
FromAnton Kholomiov
SubjectRe: Increasing volume leads to reduction of dynamic range???
Maybe it has something to do with 0dbfs. I set it to 1. What happens with values that are higher than 0dbfs?

2016-03-25 8:45 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
@Partev Since the sound is synthesized I don't think there is much noise going on, 
or you mean it can come from cables, connections?

@Thorin It can be, I'll check it out. So the low frequency can become a DC I guess.


2016-03-25 1:25 GMT+03:00 thorin kerr <thorin.kerr@gmail.com>:
Maybe you have very low frequencies, or a DC offset?

On Fri, Mar 25, 2016 at 6:01 AM, Anton Kholomiov <anton.kholomiov@gmail.com> wrote:
Is that possible?  When i try to increase the volume (signal constant multiplier)
the output decreases in dynamic range. I don't understand how that happens.
Can you suggest how to increase the volume in the output of Csound.

I try to use Csound for background music as a prerecorded drone generator
and I'd like to make sound louder. Right now it's too quiet and we need to 
set high gain values on mixing console to amplify the signal. 

When I multiply the signal it reduces in dynamic range. It looks like there is something that
compresses the signal. Is it csound or my soundcard? I'm using laptop.

Anton

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

Date2016-03-25 09:42
FromRory Walsh
SubjectRe: Increasing volume leads to reduction of dynamic range???

You will get samples out of range.

On 25 Mar 2016 10:27, "Anton Kholomiov" <anton.kholomiov@gmail.com> wrote:
Maybe it has something to do with 0dbfs. I set it to 1. What happens with values that are higher than 0dbfs?

2016-03-25 8:45 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com>:
@Partev Since the sound is synthesized I don't think there is much noise going on, 
or you mean it can come from cables, connections?

@Thorin It can be, I'll check it out. So the low frequency can become a DC I guess.


2016-03-25 1:25 GMT+03:00 thorin kerr <thorin.kerr@gmail.com>:
Maybe you have very low frequencies, or a DC offset?

On Fri, Mar 25, 2016 at 6:01 AM, Anton Kholomiov <anton.kholomiov@gmail.com> wrote:
Is that possible?  When i try to increase the volume (signal constant multiplier)
the output decreases in dynamic range. I don't understand how that happens.
Can you suggest how to increase the volume in the output of Csound.

I try to use Csound for background music as a prerecorded drone generator
and I'd like to make sound louder. Right now it's too quiet and we need to 
set high gain values on mixing console to amplify the signal. 

When I multiply the signal it reduces in dynamic range. It looks like there is something that
compresses the signal. Is it csound or my soundcard? I'm using laptop.

Anton

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

Date2016-03-25 10:10
FromRichard
SubjectRe: Increasing volume leads to reduction of dynamic range???
This discussion seems to be getting a bit muddled. Changing gain will 
not change dynamic range at all (but, as noted, one may become more 
aware of low-level noise). To increase the dynamic range of a signal, 
the distance (difference) between quiet sounds and loud sounds has to be 
"expanded" (which of course is what an expander/gate effect does, the 
latter somewhat crudely but often usefully). A compressor does the opposite.

Suffice it also to say, an increased dynamic range implies the sample 
size is sufficient to represent it - i.e. 24bit or floats rather than 16 
or 8.


Richard Dobson


On 25/03/2016 09:42, Rory Walsh wrote:
> You will get samples out of range.
>
> On 25 Mar 2016 10:27, "Anton Kholomiov"  > wrote:
>
>     Maybe it has something to do with 0dbfs. I set it to 1. What happens
>     with values that are higher than 0dbfs?
>
>     2016-03-25 8:45 GMT+03:00 Anton Kholomiov      >:
>
>         @Partev Since the sound is synthesized I don't think there is
>         much noise going on,
>         or you mean it can come from cables, connections?
>
>         @Thorin It can be, I'll check it out. So the low frequency can
>         become a DC I guess.
>
>
>         2016-03-25 1:25 GMT+03:00 thorin kerr          >:
>
>             Maybe you have very low frequencies, or a DC offset?
>
>             On Fri, Mar 25, 2016 at 6:01 AM, Anton Kholomiov
>                          > wrote:
>
>                 Is that possible?  When i try to increase the volume
>                 (signal constant multiplier)
>                 the output decreases in dynamic range. I don't
>                 understand how that happens.
>                 Can you suggest how to increase the volume in the output
>                 of Csound.
>
>                 I try to use Csound for background music as a
>                 prerecorded drone generator
>                 and I'd like to make sound louder. Right now it's too
>                 quiet and we need to
>                 set high gain values on mixing console to amplify the
>                 signal.
>
>                 When I multiply the signal it reduces in dynamic range.
>                 It looks like there is something that
>                 compresses the signal. Is it csound or my soundcard? I'm
>                 using laptop.
>
>                 Anton

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

Date2016-03-25 10:51
FromAnton Kholomiov
SubjectRe: Increasing volume leads to reduction of dynamic range???
@Richard 

My tasks is to raise the audio output when sending to `dac` and keep the same dynamic range (DR). 
When I try to raise the multiplier I find that volume increases but DR shrinks. I guess it's some sort of limiting
is going on and I'm trying to understand it. Maybe it happens because I've set the 0dbfs to 1 and the 
master signal of my csd is much higher than that.

You've mentioned the bit-depth to represent the desired DR. Bit-depth is about saving to audio-files.
How does it relates to live output (Sending to sound card) ?

PS: I often find that output of csouns very quiet (but I'm also aware that it can be quite huge).
Is there some guide in the manual how to treat the volumes/amplitudes in csound. 

@Rory 

Samples out of range.. How does the dac interprets them?Are they turncated or they are equal to mod of highest value? 

2016-03-25 13:10 GMT+03:00 Richard <richard@rwdobson.com>:
This discussion seems to be getting a bit muddled. Changing gain will not change dynamic range at all (but, as noted, one may become more aware of low-level noise). To increase the dynamic range of a signal, the distance (difference) between quiet sounds and loud sounds has to be "expanded" (which of course is what an expander/gate effect does, the latter somewhat crudely but often usefully). A compressor does the opposite.

Suffice it also to say, an increased dynamic range implies the sample size is sufficient to represent it - i.e. 24bit or floats rather than 16 or 8.


Richard Dobson


On 25/03/2016 09:42, Rory Walsh wrote:
You will get samples out of range.

On 25 Mar 2016 10:27, "Anton Kholomiov" <anton.kholomiov@gmail.com
<mailto:anton.kholomiov@gmail.com>> wrote:

    Maybe it has something to do with 0dbfs. I set it to 1. What happens
    with values that are higher than 0dbfs?

    2016-03-25 8:45 GMT+03:00 Anton Kholomiov <anton.kholomiov@gmail.com
    <mailto:anton.kholomiov@gmail.com>>:

        @Partev Since the sound is synthesized I don't think there is
        much noise going on,
        or you mean it can come from cables, connections?

        @Thorin It can be, I'll check it out. So the low frequency can
        become a DC I guess.


        2016-03-25 1:25 GMT+03:00 thorin kerr <thorin.kerr@gmail.com
        <mailto:thorin.kerr@gmail.com>>:

            Maybe you have very low frequencies, or a DC offset?

            On Fri, Mar 25, 2016 at 6:01 AM, Anton Kholomiov
            <anton.kholomiov@gmail.com
            <mailto:anton.kholomiov@gmail.com>> wrote:

                Is that possible?  When i try to increase the volume
                (signal constant multiplier)
                the output decreases in dynamic range. I don't
                understand how that happens.
                Can you suggest how to increase the volume in the output
                of Csound.

                I try to use Csound for background music as a
                prerecorded drone generator
                and I'd like to make sound louder. Right now it's too
                quiet and we need to
                set high gain values on mixing console to amplify the
                signal.

                When I multiply the signal it reduces in dynamic range.
                It looks like there is something that
                compresses the signal. Is it csound or my soundcard? I'm
                using laptop.

                Anton

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

Date2016-03-25 11:05
FromRory Walsh
SubjectRe: Increasing volume leads to reduction of dynamic range???

You've mentioned the bit-depth to represent the desired DR. Bit-depth is about saving to audio-files.
How does it relates to live output (Sending to sound card) ?


Bit-depth is about the resolution of each sample being processing by a system, regardless of whether they are being saved to a file, or fed to speakers. The greater the bit-depth resolution the greater the SNR, the greater the SNR, the greater the dynamic range.    


Samples out of range.. How does the dac interprets them?Are they turncated or they are equal to mod of highest value? 


I don't think there is any 'interpretation' going on. I assume that if a sample comes in which is out of range, the dac will convert it to the max each time causing clipping in the signal?
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

Date2016-03-25 16:04
FromJoe Knapka
SubjectRe: Increasing volume leads to reduction of dynamic range???
On Fri, Mar 25, 2016 at 4:51 AM, Anton Kholomiov <anton.kholomiov@gmail.com> wrote:
@Richard 

You've mentioned the bit-depth to represent the desired DR. Bit-depth is about saving to audio-files.
How does it relates to live output (Sending to sound card) ?


This issue of the relationship between sample resolution and dynamic range confused me at first, too, when I was reading the Csound Book.

To take an extreme example, if you are using 8-bit samples, you can represent positive amplitude values of 1 .. 127. That is a factor of about 100 between the quietest non-silent sample and the loudest sample, or only about 20dB of dynamic range. If you try to make the signal louder, say by converting to 16-bit samples and multiplying each sample by 100, then your quietest samples will have amplitude 100 and your loudest samples will have amplitude 12700, which is still a factor of ~100 and a dynamic range of ~20dB. You need to do more with a low-resolution signal than just make it louder, if you want to increase the contrast between the loud and soft parts. I surmise from previous discussion that this is what an expander does :-)

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

Date2016-03-25 16:17
FromRory Walsh
SubjectRe: Increasing volume leads to reduction of dynamic range???
 
if you are using 8-bit samples, you can represent positive amplitude values of 1 .. 127.

I'm pretty sure that's not written in the Csound book ;) 
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

Date2016-03-25 17:29
FromJoe Knapka
SubjectRe: Increasing volume leads to reduction of dynamic range???
I am probably misremembering. Are you saying my understanding is wrong, or that the Csound Book doesn't discuss this?

On Fri, Mar 25, 2016 at 10:17 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
 
if you are using 8-bit samples, you can represent positive amplitude values of 1 .. 127.

I'm pretty sure that's not written in the Csound book ;) 
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



--
It is always best to think of reality as perfectly normal.  Since the beginning, not one unusual thing has ever happened. - Less Wrong
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

Date2016-03-25 19:22
FromRory Walsh
SubjectRe: Increasing volume leads to reduction of dynamic range???

Sorry, I assumed that was a typo. 8bits give you 256 possibilities, 2 to the power of 8. 128 numbers can be represented with 7 bits.

On 25 Mar 2016 18:39, "Joe Knapka" <jknapka@kneuro.net> wrote:
I am probably misremembering. Are you saying my understanding is wrong, or that the Csound Book doesn't discuss this?

On Fri, Mar 25, 2016 at 10:17 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
 
if you are using 8-bit samples, you can represent positive amplitude values of 1 .. 127.

I'm pretty sure that's not written in the Csound book ;) 
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



--
It is always best to think of reality as perfectly normal.  Since the beginning, not one unusual thing has ever happened. - Less Wrong
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

Date2016-03-25 19:24
FromPeter Burgess
SubjectRe: Increasing volume leads to reduction of dynamic range???
would an 8bit audio output not be signed?

On Fri, Mar 25, 2016 at 7:22 PM, Rory Walsh  wrote:
> Sorry, I assumed that was a typo. 8bits give you 256 possibilities, 2 to the
> power of 8. 128 numbers can be represented with 7 bits.
>
> On 25 Mar 2016 18:39, "Joe Knapka"  wrote:
>>
>> I am probably misremembering. Are you saying my understanding is wrong, or
>> that the Csound Book doesn't discuss this?
>>
>> On Fri, Mar 25, 2016 at 10:17 AM, Rory Walsh  wrote:
>>>
>>>
>>>>
>>>> if you are using 8-bit samples, you can represent positive amplitude
>>>> values of 1 .. 127.
>>>
>>>
>>> I'm pretty sure that's not written in the Csound book ;)
>>> 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
>>
>>
>>
>>
>> --
>> It is always best to think of reality as perfectly normal.  Since the
>> beginning, not one unusual thing has ever happened. - Less Wrong
>> 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


Date2016-03-25 20:07
FromJoe Knapka
SubjectRe: Increasing volume leads to reduction of dynamic range???
Yes, I was thinking it would be -127 to +127 (leaving out the fact that a signed byte can also represent -128... I was just trying for a very simple example). If you're talking about pure sine waves centered at 0, 8 bit samples can represent only 127 amplitudes. 


On Fri, Mar 25, 2016 at 1:24 PM, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
would an 8bit audio output not be signed?

On Fri, Mar 25, 2016 at 7:22 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
> Sorry, I assumed that was a typo. 8bits give you 256 possibilities, 2 to the
> power of 8. 128 numbers can be represented with 7 bits.
>
> On 25 Mar 2016 18:39, "Joe Knapka" <jknapka@kneuro.net> wrote:
>>
>> I am probably misremembering. Are you saying my understanding is wrong, or
>> that the Csound Book doesn't discuss this?
>>
>> On Fri, Mar 25, 2016 at 10:17 AM, Rory Walsh <rorywalsh@ear.ie> wrote:
>>>
>>>
>>>>
>>>> if you are using 8-bit samples, you can represent positive amplitude
>>>> values of 1 .. 127.
>>>
>>>
>>> I'm pretty sure that's not written in the Csound book ;)
>>> 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
>>
>>
>>
>>
>> --
>> It is always best to think of reality as perfectly normal.  Since the
>> beginning, not one unusual thing has ever happened. - Less Wrong
>> 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



--
http://algorythmradio.com
https://soundcloud.com/algorythmradio

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




--
It is always best to think of reality as perfectly normal.  Since the beginning, not one unusual thing has ever happened. - Less Wrong
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