Csound Csound-dev Csound-tekno Search About

[Csnd] ++SPAM++ Volume control problem...

Date2009-07-23 19:29
Fromxonox
Subject[Csnd] ++SPAM++ Volume control problem...
Attachmentstest.csd  
I'm still quite a newbie to csound but there's something i just don't 
understand going on when i work with csound.

Talking about stuff to help newcomers, this would make it much less 
scary to experiment.

I'm using Csound under Mac OS X 10.4.11 on a macbook pro.  Using the 
internal soundcard.

When trying out various things i sometimes come across some really loud 
bursts of sound.  It only happens with some situations.  Turning the 
volume down on my computer doesn't cut it.  I was testing out stuff in 
csound while keeping the lowest possible volume on my computer (which 
means one volume bar).

Then, all of a sudden...  Oh the pain...  It was so loud.  I removed my 
headphones and then realized other people in the room heard the noise.

How come csound seems to override the volume ?  When using other music 
software, i never have this happened.

I attached the csd file.  BEWARE when running it, in case it does the 
same on your system.  It only happens in realtime.  When i render to 
.wav file and play the file from another software, all is normal.

I know i used exagerated values in the instrument but i was just 
exploring and learning about the opcode.

Thank you

xonox / quikphix

Date2009-07-24 00:36
FromIain McCurdy
Subject[Csnd] ++SPAM++ RE: ++SPAM++ Volume control problem...
Physical models can become unstable given certain combinations of input values. In your example it's the value for damping that is creating the problem. You give it a value of 1 but you really shouldn't exceed about 0.3 or it will quickly explode: extremely large numbers of samples extremely out of range.

For this kind of work a hardware volume control, like a mixing desk slider, is useful for sneaking the volume up just incase something terrible lurks therein or for pulling it down quickly in case something scary leaps out at you. Look after your ears.

Iain

----------------------------------------
> Date: Thu, 23 Jul 2009 14:29:08 -0400
> From: xonox@quikphix.org
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] ++SPAM++ Volume control problem...
>
> I'm still quite a newbie to csound but there's something i just don't
> understand going on when i work with csound.
>
> Talking about stuff to help newcomers, this would make it much less
> scary to experiment.
>
> I'm using Csound under Mac OS X 10.4.11 on a macbook pro. Using the
> internal soundcard.
>
> When trying out various things i sometimes come across some really loud
> bursts of sound. It only happens with some situations. Turning the
> volume down on my computer doesn't cut it. I was testing out stuff in
> csound while keeping the lowest possible volume on my computer (which
> means one volume bar).
>
> Then, all of a sudden... Oh the pain... It was so loud. I removed my
> headphones and then realized other people in the room heard the noise.
>
> How come csound seems to override the volume ? When using other music
> software, i never have this happened.
>
> I attached the csd file. BEWARE when running it, in case it does the
> same on your system. It only happens in realtime. When i render to
> .wav file and play the file from another software, all is normal.
>
> I know i used exagerated values in the instrument but i was just
> exploring and learning about the opcode.
>
> Thank you
>
> xonox / quikphix
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

_________________________________________________________________
Windows Live™ Hotmail®: Search, add, and share the web’s latest sports videos. Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports

Date2009-07-24 01:30
Frompeiman khosravi
Subject[Csnd] ++SPAM++ Re: ++SPAM++ RE: ++SPAM++ Volume control problem...
also to add that if the sample coming out of csound is out-of-range, turning the physical volume down won't make the sound "less distorted" as the distortion is digitally present in the sound (clipping).

P

2009/7/24 Iain McCurdy <i_mccurdy@hotmail.com>

Physical models can become unstable given certain combinations of input values. In your example it's the value for damping that is creating the problem. You give it a value of 1 but you really shouldn't exceed about 0.3 or it will quickly explode: extremely large numbers of samples extremely out of range.

For this kind of work a hardware volume control, like a mixing desk slider, is useful for sneaking the volume up just incase something terrible lurks therein or for pulling it down quickly in case something scary leaps out at you. Look after your ears.

Iain

----------------------------------------
> Date: Thu, 23 Jul 2009 14:29:08 -0400
> From: xonox@quikphix.org
> To: csound@lists.bath.ac.uk
> Subject: [Csnd] ++SPAM++ Volume control problem...
>
> I'm still quite a newbie to csound but there's something i just don't
> understand going on when i work with csound.
>
> Talking about stuff to help newcomers, this would make it much less
> scary to experiment.
>
> I'm using Csound under Mac OS X 10.4.11 on a macbook pro. Using the
> internal soundcard.
>
> When trying out various things i sometimes come across some really loud
> bursts of sound. It only happens with some situations. Turning the
> volume down on my computer doesn't cut it. I was testing out stuff in
> csound while keeping the lowest possible volume on my computer (which
> means one volume bar).
>
> Then, all of a sudden... Oh the pain... It was so loud. I removed my
> headphones and then realized other people in the room heard the noise.
>
> How come csound seems to override the volume ? When using other music
> software, i never have this happened.
>
> I attached the csd file. BEWARE when running it, in case it does the
> same on your system. It only happens in realtime. When i render to
> .wav file and play the file from another software, all is normal.
>
> I know i used exagerated values in the instrument but i was just
> exploring and learning about the opcode.
>
> Thank you
>
> xonox / quikphix
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

_________________________________________________________________
Windows Live™ Hotmail®: Search, add, and share the web’s latest sports videos. Check it out.
http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports

Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2009-07-24 05:02
Fromxonox
Subject[Csnd] ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ RE: ++SPAM++ Volume control problem...
Yes, i saw csound telling me the output amplitude was "inf" or 
something.  So, you're right, the distortion is in the signal.

What i do not understand is that during that loud burst of noise, the 
volume control on my computer doesn't seem to do anything.  I can turn 
it up or down, the sound volume is the same : very very loud.

If i write the output of csound to a wav file and load the wav file in 
audacity, the playback seems to follow the computer's volume settings.  
If i use csound's realtime output, it gets much louder than anything 
else i can do in audacity or other audio software i use.

Otherwise, could i use some sort of limiting function in csound to 
prevent such loud noises when testing out new things ?

I guess the limit opcode could be useful, would it ?

At home, i use a small dj mixer for quick volume control.  When outside, 
i use the volume control built in my headphones, but it wasn't enough.  
Lowest volume in the computer and lowest volume in headphones were not 
enough.  When playing back music, i can barely hear anything.  Yet this 
burst of noise was heard across the room from my headphones.

Enough rambling now :)

Thanks a lot for the replies!

xonox / quikphix

peiman khosravi wrote:
> also to add that if the sample coming out of csound is out-of-range, 
> turning the physical volume down won't make the sound "less distorted" 
> as the distortion is digitally present in the sound (clipping).
>
> P
>
> 2009/7/24 Iain McCurdy  >
>
>
>     Physical models can become unstable given certain combinations of
>     input values. In your example it's the value for damping that is
>     creating the problem. You give it a value of 1 but you really
>     shouldn't exceed about 0.3 or it will quickly explode: extremely
>     large numbers of samples extremely out of range.
>
>     For this kind of work a hardware volume control, like a mixing
>     desk slider, is useful for sneaking the volume up just incase
>     something terrible lurks therein or for pulling it down quickly in
>     case something scary leaps out at you. Look after your ears.
>
>     Iain
>
>     ----------------------------------------
>     > Date: Thu, 23 Jul 2009 14:29:08 -0400
>     > From: xonox@quikphix.org 
>     > To: csound@lists.bath.ac.uk 
>     > Subject: [Csnd] ++SPAM++ Volume control problem...
>     >
>     > I'm still quite a newbie to csound but there's something i just
>     don't
>     > understand going on when i work with csound.
>     >
>     > Talking about stuff to help newcomers, this would make it much less
>     > scary to experiment.
>     >
>     > I'm using Csound under Mac OS X 10.4.11 on a macbook pro. Using the
>     > internal soundcard.
>     >
>     > When trying out various things i sometimes come across some
>     really loud
>     > bursts of sound. It only happens with some situations. Turning the
>     > volume down on my computer doesn't cut it. I was testing out
>     stuff in
>     > csound while keeping the lowest possible volume on my computer
>     (which
>     > means one volume bar).
>     >
>     > Then, all of a sudden... Oh the pain... It was so loud. I removed my
>     > headphones and then realized other people in the room heard the
>     noise.
>     >
>     > How come csound seems to override the volume ? When using other
>     music
>     > software, i never have this happened.
>     >
>     > I attached the csd file. BEWARE when running it, in case it does the
>     > same on your system. It only happens in realtime. When i render to
>     > .wav file and play the file from another software, all is normal.
>     >
>     > I know i used exagerated values in the instrument but i was just
>     > exploring and learning about the opcode.
>     >
>     > Thank you
>     >
>     > xonox / quikphix
>     >
>     > Send bugs reports to this list.
>     > To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe csound"
>
>     _________________________________________________________________
>     Windows Live™ Hotmail®: Search, add, and share the web’s latest
>     sports videos. Check it out.
>     http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports
>     
>
>     Send bugs reports to this list.
>     To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe csound"
>
>


Date2009-07-24 12:54
Frommark jamerson
Subject[Csnd] ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ RE: ++SPAM++ Volume control problem...
    I've recently been dealing with this sort of thing also.  I just got a new set of studio monitors, and I don't want to blow them, so I've developed the following method to ensure their safety.  When dealing with opcodes that are a little unpredictable, I will render to a .wav file first.  During rendering, I watch the csound amplitude output to make sure it is not out of range.  Then I can adjust settings/parameters until it is in range.  Then I preveiw the .wav file in an audio editor.  Most of the time an editor such as soundforge or audacity will clip the sound output at 0dbfs rather than play samples out of range.  This method is much safer for the monitors and the ears.   

                                                               Mark 



----- Original Message ----
From: xonox 
To: csound@lists.bath.ac.uk
Sent: Thursday, July 23, 2009 11:02:27 PM
Subject: [Csnd] ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ RE: ++SPAM++ Volume control problem...

Yes, i saw csound telling me the output amplitude was "inf" or something.  So, you're right, the distortion is in the signal.

What i do not understand is that during that loud burst of noise, the volume control on my computer doesn't seem to do anything.  I can turn it up or down, the sound volume is the same : very very loud.

If i write the output of csound to a wav file and load the wav file in audacity, the playback seems to follow the computer's volume settings.  If i use csound's realtime output, it gets much louder than anything else i can do in audacity or other audio software i use.

Otherwise, could i use some sort of limiting function in csound to prevent such loud noises when testing out new things ?

I guess the limit opcode could be useful, would it ?

At home, i use a small dj mixer for quick volume control.  When outside, i use the volume control built in my headphones, but it wasn't enough.  Lowest volume in the computer and lowest volume in headphones were not enough.  When playing back music, i can barely hear anything.  Yet this burst of noise was heard across the room from my headphones.

Enough rambling now :)

Thanks a lot for the replies!

xonox / quikphix

peiman khosravi wrote:
> also to add that if the sample coming out of csound is out-of-range, turning the physical volume down won't make the sound "less distorted" as the distortion is digitally present in the sound (clipping).
> 
> P
> 
> 2009/7/24 Iain McCurdy >
> 
> 
>     Physical models can become unstable given certain combinations of
>     input values. In your example it's the value for damping that is
>     creating the problem. You give it a value of 1 but you really
>     shouldn't exceed about 0.3 or it will quickly explode: extremely
>     large numbers of samples extremely out of range.
> 
>     For this kind of work a hardware volume control, like a mixing
>     desk slider, is useful for sneaking the volume up just incase
>     something terrible lurks therein or for pulling it down quickly in
>     case something scary leaps out at you. Look after your ears.
> 
>     Iain
> 
>     ----------------------------------------
>     > Date: Thu, 23 Jul 2009 14:29:08 -0400
>     > From: xonox@quikphix.org 
>     > To: csound@lists.bath.ac.uk 
>     > Subject: [Csnd] ++SPAM++ Volume control problem...
>     >
>     > I'm still quite a newbie to csound but there's something i just
>     don't
>     > understand going on when i work with csound.
>     >
>     > Talking about stuff to help newcomers, this would make it much less
>     > scary to experiment.
>     >
>     > I'm using Csound under Mac OS X 10.4.11 on a macbook pro. Using the
>     > internal soundcard.
>     >
>     > When trying out various things i sometimes come across some
>     really loud
>     > bursts of sound. It only happens with some situations. Turning the
>     > volume down on my computer doesn't cut it. I was testing out
>     stuff in
>     > csound while keeping the lowest possible volume on my computer
>     (which
>     > means one volume bar).
>     >
>     > Then, all of a sudden... Oh the pain... It was so loud. I removed my
>     > headphones and then realized other people in the room heard the
>     noise.
>     >
>     > How come csound seems to override the volume ? When using other
>     music
>     > software, i never have this happened.
>     >
>     > I attached the csd file. BEWARE when running it, in case it does the
>     > same on your system. It only happens in realtime. When i render to
>     > .wav file and play the file from another software, all is normal.
>     >
>     > I know i used exagerated values in the instrument but i was just
>     > exploring and learning about the opcode.
>     >
>     > Thank you
>     >
>     > xonox / quikphix
>     >
>     > Send bugs reports to this list.
>     > To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe csound"
> 
>     _________________________________________________________________
>     Windows Live™ Hotmail®: Search, add, and share the web’s latest
>     sports videos. Check it out.
>     http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports
>     
> 
>     Send bugs reports to this list.
>     To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe csound"
> 
> 



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"






Date2009-07-25 00:22
Frompeiman khosravi
Subject[Csnd] ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ RE: ++SPAM++ Volume control problem...
But I thought that the out-of-range samples will be clipped anyway at 0db, Csound or audacity. Is this not correct?

2009/7/24 mark jamerson <bass_pilot@yahoo.com>


   I've recently been dealing with this sort of thing also.  I just got a new set of studio monitors, and I don't want to blow them, so I've developed the following method to ensure their safety.  When dealing with opcodes that are a little unpredictable, I will render to a .wav file first.  During rendering, I watch the csound amplitude output to make sure it is not out of range.  Then I can adjust settings/parameters until it is in range.  Then I preveiw the .wav file in an audio editor.  Most of the time an editor such as soundforge or audacity will clip the sound output at 0dbfs rather than play samples out of range.  This method is much safer for the monitors and the ears.

                                                              Mark



----- Original Message ----
From: xonox <xonox@quikphix.org>
To: csound@lists.bath.ac.uk
Sent: Thursday, July 23, 2009 11:02:27 PM
Subject: [Csnd] ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ RE: ++SPAM++ Volume control problem...

Yes, i saw csound telling me the output amplitude was "inf" or something.  So, you're right, the distortion is in the signal.

What i do not understand is that during that loud burst of noise, the volume control on my computer doesn't seem to do anything.  I can turn it up or down, the sound volume is the same : very very loud.

If i write the output of csound to a wav file and load the wav file in audacity, the playback seems to follow the computer's volume settings.  If i use csound's realtime output, it gets much louder than anything else i can do in audacity or other audio software i use.

Otherwise, could i use some sort of limiting function in csound to prevent such loud noises when testing out new things ?

I guess the limit opcode could be useful, would it ?

At home, i use a small dj mixer for quick volume control.  When outside, i use the volume control built in my headphones, but it wasn't enough.  Lowest volume in the computer and lowest volume in headphones were not enough.  When playing back music, i can barely hear anything.  Yet this burst of noise was heard across the room from my headphones.

Enough rambling now :)

Thanks a lot for the replies!

xonox / quikphix

peiman khosravi wrote:
> also to add that if the sample coming out of csound is out-of-range, turning the physical volume down won't make the sound "less distorted" as the distortion is digitally present in the sound (clipping).
>
> P
>
> 2009/7/24 Iain McCurdy <i_mccurdy@hotmail.com <mailto:i_mccurdy@hotmail.com>>
>
>
>     Physical models can become unstable given certain combinations of
>     input values. In your example it's the value for damping that is
>     creating the problem. You give it a value of 1 but you really
>     shouldn't exceed about 0.3 or it will quickly explode: extremely
>     large numbers of samples extremely out of range.
>
>     For this kind of work a hardware volume control, like a mixing
>     desk slider, is useful for sneaking the volume up just incase
>     something terrible lurks therein or for pulling it down quickly in
>     case something scary leaps out at you. Look after your ears.
>
>     Iain
>
>     ----------------------------------------
>     > Date: Thu, 23 Jul 2009 14:29:08 -0400
>     > From: xonox@quikphix.org <mailto:xonox@quikphix.org>
>     > To: csound@lists.bath.ac.uk <mailto:csound@lists.bath.ac.uk>
>     > Subject: [Csnd] ++SPAM++ Volume control problem...
>     >
>     > I'm still quite a newbie to csound but there's something i just
>     don't
>     > understand going on when i work with csound.
>     >
>     > Talking about stuff to help newcomers, this would make it much less
>     > scary to experiment.
>     >
>     > I'm using Csound under Mac OS X 10.4.11 on a macbook pro. Using the
>     > internal soundcard.
>     >
>     > When trying out various things i sometimes come across some
>     really loud
>     > bursts of sound. It only happens with some situations. Turning the
>     > volume down on my computer doesn't cut it. I was testing out
>     stuff in
>     > csound while keeping the lowest possible volume on my computer
>     (which
>     > means one volume bar).
>     >
>     > Then, all of a sudden... Oh the pain... It was so loud. I removed my
>     > headphones and then realized other people in the room heard the
>     noise.
>     >
>     > How come csound seems to override the volume ? When using other
>     music
>     > software, i never have this happened.
>     >
>     > I attached the csd file. BEWARE when running it, in case it does the
>     > same on your system. It only happens in realtime. When i render to
>     > .wav file and play the file from another software, all is normal.
>     >
>     > I know i used exagerated values in the instrument but i was just
>     > exploring and learning about the opcode.
>     >
>     > Thank you
>     >
>     > xonox / quikphix
>     >
>     > Send bugs reports to this list.
>     > To unsubscribe, send email sympa@lists.bath.ac.uk
>     <mailto:sympa@lists.bath.ac.uk> with body "unsubscribe csound"
>
>     _________________________________________________________________
>     Windows Live™ Hotmail®: Search, add, and share the web’s latest
>     sports videos. Check it out.
>     http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports
>     <http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports>
>
>     Send bugs reports to this list.
>     To unsubscribe, send email sympa@lists.bath.ac.uk
>     <mailto:sympa@lists.bath.ac.uk> with body "unsubscribe csound"
>
>



Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"






Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2009-07-26 03:59
Fromxonox
Subject[Csnd] ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ RE: ++SPAM++ Volume control problem...
I am confused...  I thought it was not possible to go over 0db in the 
digital domain, otherwise you'd just get distortion in the audio without 
hearing it any louder...

Otherwise, would the clip opcode prevent the super loud, out of range 
sounds from being too loud in csound ?

If i am missing something basic, someone tell me.  I'm no csound expert...

Have a nice day!

xonox / quikphix

peiman khosravi wrote:
> But I thought that the out-of-range samples will be clipped anyway at 
> 0db, Csound or audacity. Is this not correct?
>
> 2009/7/24 mark jamerson  >
>
>
>
>        I've recently been dealing with this sort of thing also.  I
>     just got a new set of studio monitors, and I don't want to blow
>     them, so I've developed the following method to ensure their
>     safety.  When dealing with opcodes that are a little
>     unpredictable, I will render to a .wav file first.  During
>     rendering, I watch the csound amplitude output to make sure it is
>     not out of range.  Then I can adjust settings/parameters until it
>     is in range.  Then I preveiw the .wav file in an audio editor.
>      Most of the time an editor such as soundforge or audacity will
>     clip the sound output at 0dbfs rather than play samples out of
>     range.  This method is much safer for the monitors and the ears.
>
>                                                                   Mark
>
>
>
>     ----- Original Message ----
>     From: xonox >
>     To: csound@lists.bath.ac.uk 
>     Sent: Thursday, July 23, 2009 11:02:27 PM
>     Subject: [Csnd] ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ RE: ++SPAM++
>     Volume control problem...
>
>     Yes, i saw csound telling me the output amplitude was "inf" or
>     something.  So, you're right, the distortion is in the signal.
>
>     What i do not understand is that during that loud burst of noise,
>     the volume control on my computer doesn't seem to do anything.  I
>     can turn it up or down, the sound volume is the same : very very loud.
>
>     If i write the output of csound to a wav file and load the wav
>     file in audacity, the playback seems to follow the computer's
>     volume settings.  If i use csound's realtime output, it gets much
>     louder than anything else i can do in audacity or other audio
>     software i use.
>
>     Otherwise, could i use some sort of limiting function in csound to
>     prevent such loud noises when testing out new things ?
>
>     I guess the limit opcode could be useful, would it ?
>
>     At home, i use a small dj mixer for quick volume control.  When
>     outside, i use the volume control built in my headphones, but it
>     wasn't enough.  Lowest volume in the computer and lowest volume in
>     headphones were not enough.  When playing back music, i can barely
>     hear anything.  Yet this burst of noise was heard across the room
>     from my headphones.
>
>     Enough rambling now :)
>
>     Thanks a lot for the replies!
>
>     xonox / quikphix
>
>     peiman khosravi wrote:
>     > also to add that if the sample coming out of csound is
>     out-of-range, turning the physical volume down won't make the
>     sound "less distorted" as the distortion is digitally present in
>     the sound (clipping).
>     >
>     > P
>     >
>     > 2009/7/24 Iain McCurdy            >>
>     >
>     >
>     >     Physical models can become unstable given certain
>     combinations of
>     >     input values. In your example it's the value for damping that is
>     >     creating the problem. You give it a value of 1 but you really
>     >     shouldn't exceed about 0.3 or it will quickly explode: extremely
>     >     large numbers of samples extremely out of range.
>     >
>     >     For this kind of work a hardware volume control, like a mixing
>     >     desk slider, is useful for sneaking the volume up just incase
>     >     something terrible lurks therein or for pulling it down
>     quickly in
>     >     case something scary leaps out at you. Look after your ears.
>     >
>     >     Iain
>     >
>     >     ----------------------------------------
>     >     > Date: Thu, 23 Jul 2009 14:29:08 -0400
>     >     > From: xonox@quikphix.org 
>     >
>     >     > To: csound@lists.bath.ac.uk
>           >
>     >     > Subject: [Csnd] ++SPAM++ Volume control problem...
>     >     >
>     >     > I'm still quite a newbie to csound but there's something i
>     just
>     >     don't
>     >     > understand going on when i work with csound.
>     >     >
>     >     > Talking about stuff to help newcomers, this would make it
>     much less
>     >     > scary to experiment.
>     >     >
>     >     > I'm using Csound under Mac OS X 10.4.11 on a macbook pro.
>     Using the
>     >     > internal soundcard.
>     >     >
>     >     > When trying out various things i sometimes come across some
>     >     really loud
>     >     > bursts of sound. It only happens with some situations.
>     Turning the
>     >     > volume down on my computer doesn't cut it. I was testing out
>     >     stuff in
>     >     > csound while keeping the lowest possible volume on my computer
>     >     (which
>     >     > means one volume bar).
>     >     >
>     >     > Then, all of a sudden... Oh the pain... It was so loud. I
>     removed my
>     >     > headphones and then realized other people in the room
>     heard the
>     >     noise.
>     >     >
>     >     > How come csound seems to override the volume ? When using
>     other
>     >     music
>     >     > software, i never have this happened.
>     >     >
>     >     > I attached the csd file. BEWARE when running it, in case
>     it does the
>     >     > same on your system. It only happens in realtime. When i
>     render to
>     >     > .wav file and play the file from another software, all is
>     normal.
>     >     >
>     >     > I know i used exagerated values in the instrument but i
>     was just
>     >     > exploring and learning about the opcode.
>     >     >
>     >     > Thank you
>     >     >
>     >     > xonox / quikphix
>     >     >
>     >     > Send bugs reports to this list.
>     >     > To unsubscribe, send email sympa@lists.bath.ac.uk
>     
>     >          > with body "unsubscribe csound"
>     >
>     >    
>     _________________________________________________________________
>     >     Windows Live™ Hotmail®: Search, add, and share the web’s latest
>     >     sports videos. Check it out.
>     >    
>     http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports
>     
>     >    
>          >
>     >
>     >     Send bugs reports to this list.
>     >     To unsubscribe, send email sympa@lists.bath.ac.uk
>     
>     >          > with body "unsubscribe csound"
>     >
>     >
>
>
>
>     Send bugs reports to this list.
>     To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe csound"
>
>
>
>
>
>
>     Send bugs reports to this list.
>     To unsubscribe, send email sympa@lists.bath.ac.uk
>      with body "unsubscribe csound"
>
>


Date2009-07-26 12:38
Frompeiman khosravi
Subject[Csnd] ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ RE: ++SPAM++ Volume control problem...

Indeed. The digital representation has a limited range (depending on the number of bytes used to represent the amplitude of the signal). If you go above this range the signal is flattened and held on the upper limit sample-value. So 'clipping' is not an added feature in audacity but exists as an inevitable digital factor. So in Csound the number of samples out of range simply refer to the number of output samples that have been clipped in the output and lost.

Also to note that loudness does not correspond simply with amplitude. There are factors like frequency distribution in the signal (spectral envelop) that define the actual perception of loudness. So the digital representation of a waveform does not necessarily describe the loudness of the perceived signal.

You can damage the speakers and ears using audacity or protools as well as csound (despite clipping in all cases). This depends on the levels set on your mixer (and I guess the length of time for which the offensive sample values are held, i.e. if its a very quick burst or it lasts for 10 seconds). Damaging your ears depends on how far you're sitting from the speakers too. One can go deaf (tap tap tap tap on wood) with a perfectly represented digital signal that doesn't clip at all!

The best way to avoid this is by having a db meter in the room that detects the actual amplitude of the signal coming out of the speakers and if above a certain threshold (this is a subjective value I understand) it turns of the system. Don't take any risks, if trying the instrument for the first time after changing some values then turn down the fader do begin with.         

Best
Peiman 

2009/7/26 xonox <xonox@quikphix.org>
I am confused...  I thought it was not possible to go over 0db in the digital domain, otherwise you'd just get distortion in the audio without hearing it any louder...

Otherwise, would the clip opcode prevent the super loud, out of range sounds from being too loud in csound ?

If i am missing something basic, someone tell me.  I'm no csound expert...

Have a nice day!

xonox / quikphix

peiman khosravi wrote:
But I thought that the out-of-range samples will be clipped anyway at 0db, Csound or audacity. Is this not correct?

2009/7/24 mark jamerson <bass_pilot@yahoo.com <mailto:bass_pilot@yahoo.com>>



      I've recently been dealing with this sort of thing also.  I
   just got a new set of studio monitors, and I don't want to blow
   them, so I've developed the following method to ensure their
   safety.  When dealing with opcodes that are a little
   unpredictable, I will render to a .wav file first.  During
   rendering, I watch the csound amplitude output to make sure it is
   not out of range.  Then I can adjust settings/parameters until it
   is in range.  Then I preveiw the .wav file in an audio editor.
    Most of the time an editor such as soundforge or audacity will
   clip the sound output at 0dbfs rather than play samples out of
   range.  This method is much safer for the monitors and the ears.

                                                                 Mark



   ----- Original Message ----
   From: xonox <xonox@quikphix.org <mailto:xonox@quikphix.org>>
   To: csound@lists.bath.ac.uk <mailto:csound@lists.bath.ac.uk>
   Sent: Thursday, July 23, 2009 11:02:27 PM
   Subject: [Csnd] ++SPAM++ Re: ++SPAM++ Re: ++SPAM++ RE: ++SPAM++
   Volume control problem...

   Yes, i saw csound telling me the output amplitude was "inf" or
   something.  So, you're right, the distortion is in the signal.

   What i do not understand is that during that loud burst of noise,
   the volume control on my computer doesn't seem to do anything.  I
   can turn it up or down, the sound volume is the same : very very loud.

   If i write the output of csound to a wav file and load the wav
   file in audacity, the playback seems to follow the computer's
   volume settings.  If i use csound's realtime output, it gets much
   louder than anything else i can do in audacity or other audio
   software i use.

   Otherwise, could i use some sort of limiting function in csound to
   prevent such loud noises when testing out new things ?

   I guess the limit opcode could be useful, would it ?

   At home, i use a small dj mixer for quick volume control.  When
   outside, i use the volume control built in my headphones, but it
   wasn't enough.  Lowest volume in the computer and lowest volume in
   headphones were not enough.  When playing back music, i can barely
   hear anything.  Yet this burst of noise was heard across the room
   from my headphones.

   Enough rambling now :)

   Thanks a lot for the replies!

   xonox / quikphix

   peiman khosravi wrote:
   > also to add that if the sample coming out of csound is
   out-of-range, turning the physical volume down won't make the
   sound "less distorted" as the distortion is digitally present in
   the sound (clipping).
   >
   > P
   >
   > 2009/7/24 Iain McCurdy <i_mccurdy@hotmail.com
   <mailto:i_mccurdy@hotmail.com> <mailto:i_mccurdy@hotmail.com
   <mailto:i_mccurdy@hotmail.com>>>
   >
   >
   >     Physical models can become unstable given certain
   combinations of
   >     input values. In your example it's the value for damping that is
   >     creating the problem. You give it a value of 1 but you really
   >     shouldn't exceed about 0.3 or it will quickly explode: extremely
   >     large numbers of samples extremely out of range.
   >
   >     For this kind of work a hardware volume control, like a mixing
   >     desk slider, is useful for sneaking the volume up just incase
   >     something terrible lurks therein or for pulling it down
   quickly in
   >     case something scary leaps out at you. Look after your ears.
   >
   >     Iain
   >
   >     ----------------------------------------
   >     > Date: Thu, 23 Jul 2009 14:29:08 -0400
   >     > From: xonox@quikphix.org <mailto:xonox@quikphix.org>
   <mailto:xonox@quikphix.org <mailto:xonox@quikphix.org>>
   >     > To: csound@lists.bath.ac.uk
   <mailto:csound@lists.bath.ac.uk> <mailto:csound@lists.bath.ac.uk
   <mailto:csound@lists.bath.ac.uk>>
   >     > Subject: [Csnd] ++SPAM++ Volume control problem...
   >     >
   >     > I'm still quite a newbie to csound but there's something i
   just
   >     don't
   >     > understand going on when i work with csound.
   >     >
   >     > Talking about stuff to help newcomers, this would make it
   much less
   >     > scary to experiment.
   >     >
   >     > I'm using Csound under Mac OS X 10.4.11 on a macbook pro.
   Using the
   >     > internal soundcard.
   >     >
   >     > When trying out various things i sometimes come across some
   >     really loud
   >     > bursts of sound. It only happens with some situations.
   Turning the
   >     > volume down on my computer doesn't cut it. I was testing out
   >     stuff in
   >     > csound while keeping the lowest possible volume on my computer
   >     (which
   >     > means one volume bar).
   >     >
   >     > Then, all of a sudden... Oh the pain... It was so loud. I
   removed my
   >     > headphones and then realized other people in the room
   heard the
   >     noise.
   >     >
   >     > How come csound seems to override the volume ? When using
   other
   >     music
   >     > software, i never have this happened.
   >     >
   >     > I attached the csd file. BEWARE when running it, in case
   it does the
   >     > same on your system. It only happens in realtime. When i
   render to
   >     > .wav file and play the file from another software, all is
   normal.
   >     >
   >     > I know i used exagerated values in the instrument but i
   was just
   >     > exploring and learning about the opcode.
   >     >
   >     > Thank you
   >     >
   >     > xonox / quikphix
   >     >
   >     > Send bugs reports to this list.
   >     > To unsubscribe, send email sympa@lists.bath.ac.uk
   <mailto:sympa@lists.bath.ac.uk>
   >     <mailto:sympa@lists.bath.ac.uk
   <mailto:sympa@lists.bath.ac.uk>> with body "unsubscribe csound"
   >
   >        _________________________________________________________________
   >     Windows Live™ Hotmail®: Search, add, and share the web’s latest
   >     sports videos. Check it out.
   >        http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports
   <http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports>
   >        <http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports
   <http://www.windowslive.com/Online/Hotmail/Campaign/QuickAdd?ocid=TXT_TAGLM_WL_QA_HM_sports_videos_072009&cat=sports>>
   >
   >     Send bugs reports to this list.
   >     To unsubscribe, send email sympa@lists.bath.ac.uk
   <mailto:sympa@lists.bath.ac.uk>
   >     <mailto:sympa@lists.bath.ac.uk
   <mailto:sympa@lists.bath.ac.uk>> with body "unsubscribe csound"
   >
   >



   Send bugs reports to this list.
   To unsubscribe, send email sympa@lists.bath.ac.uk
   <mailto:sympa@lists.bath.ac.uk> with body "unsubscribe csound"






   Send bugs reports to this list.
   To unsubscribe, send email sympa@lists.bath.ac.uk
   <mailto:sympa@lists.bath.ac.uk> with body "unsubscribe csound"





Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"