Csound Csound-dev Csound-tekno Search About

Stable volume bandpass filtered white noise

Date2017-07-24 19:13
From"Jeanette C."
SubjectStable volume bandpass filtered white noise
Hey hey,
I'm trying to build an instrument based on bandpassed white noise. The problem 
is, that butterbp's output volume greatly varies with the bandwidth and I 
haven't been able to work out a relationship between bandwidth and volume 
variation.

I have tried to control the output with balance, but that too generates 
unpredictable and uncontrollable output of its own kind. The volume fluctuates 
while the tone is playing, even though both white noise and the balancing sine 
oscillator have a fixed volume.

Can any one suggest a way to generate a bandpassed signal with predictable 
volume or a scale function to counter the effects of changing bandwidth?

Thanks and best wishes,

Jeanette

--------
* website: http://juliencoder.de - for summer is a state of sound
* SoundCloud: https://soundcloud.com/jeanette_c

you made me realize..not to compromise
the fact that you and i should meet... <3
(Britney Spears)

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

Date2017-07-24 19:37
Fromjoachim heintz
SubjectRe: Stable volume bandpass filtered white noise
hi jeanette -

can you try to adjust the [ihp] optional input parameter?  per default 
it is 10 (hz), maybe you try bigger or smaller values.

best -
	joachim


On 24/07/17 20:13, Jeanette C. wrote:
> Hey hey,
> I'm trying to build an instrument based on bandpassed white noise. The
> problem is, that butterbp's output volume greatly varies with the
> bandwidth and I haven't been able to work out a relationship between
> bandwidth and volume variation.
>
> I have tried to control the output with balance, but that too generates
> unpredictable and uncontrollable output of its own kind. The volume
> fluctuates while the tone is playing, even though both white noise and
> the balancing sine oscillator have a fixed volume.
>
> Can any one suggest a way to generate a bandpassed signal with
> predictable volume or a scale function to counter the effects of
> changing bandwidth?
>
> Thanks and best wishes,
>
> Jeanette
>
> --------
> * website: http://juliencoder.de - for summer is a state of sound
> * SoundCloud: https://soundcloud.com/jeanette_c
>
> you made me realize..not to compromise
> the fact that you and i should meet... <3
> (Britney Spears)
>
> 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

Date2017-07-24 21:17
From"Jeanette C."
SubjectRe: Stable volume bandpass filtered white noise
Jul 24 2017, joachim heintz has written:
...
> can you try to adjust the [ihp] optional input parameter?  per default it is 
> 10 (hz), maybe you try bigger or smaller values.
Thanks for the tip, Joachim. It does make it a little better, but there
are still fluctuations, resulting in both quieter than average and
louder than average moments, even leading to distortion. Here's the
basic code:
kaenv linseg 0, .2, 1, p3-.5, 1, .3, 0
anoise rand 1
a1 oscil kaenv, cpspch(p4), 1
afilt1 butterbp anoise, cpspch(p4), 1
aout balance afilt1, a1, .01
aout = aout * .75
out aout

I'm basically trying to mimic Yoshimi's/ZynAddSubFX's SubSynth engine,
which works with filtered white noise.

Best wishes,

Jeanette
>
> best -
> 	joachim
>
>
> On 24/07/17 20:13, Jeanette C. wrote:
>> Hey hey,
>> I'm trying to build an instrument based on bandpassed white noise. The
>> problem is, that butterbp's output volume greatly varies with the
>> bandwidth and I haven't been able to work out a relationship between
>> bandwidth and volume variation.
>> 
>> I have tried to control the output with balance, but that too generates
>> unpredictable and uncontrollable output of its own kind. The volume
>> fluctuates while the tone is playing, even though both white noise and
>> the balancing sine oscillator have a fixed volume.
>> 
>> Can any one suggest a way to generate a bandpassed signal with
>> predictable volume or a scale function to counter the effects of
>> changing bandwidth?
>> 
>> Thanks and best wishes,
>> 
>> Jeanette
>> 
>> --------
>> * website: http://juliencoder.de - for summer is a state of sound
>> * SoundCloud: https://soundcloud.com/jeanette_c
>> 
>> you made me realize..not to compromise
>> the fact that you and i should meet... <3
>> (Britney Spears)
>> 
>> 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
>

--------
* website: http://juliencoder.de - for summer is a state of sound
* SoundCloud: https://soundcloud.com/jeanette_c

you made me realize..not to compromise
the fact that you and i should meet... <3
(Britney Spears)

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

Date2017-07-25 16:31
Fromjoachim heintz
SubjectRe: Stable volume bandpass filtered white noise
yes, i see (and hear) what you mean.
i don't know about the facts behind (filter implementations and the way 
balance works), but i have two more tips:

1) for generating white noise, tell the rand opcode to generate a 31-bit 
random series (third input set to anything except zero).  if you don't 
do this, a 16-bit series is used, and we hear repetitions after 65536 
samples (so after ~1.5 seconds at sr=44100).

2) it might give you a better result to have a series of filters with 
not that narrow bandwidth, instead of one filter with extremely narrow 
bandwidth.  i tried this:

instr Noise
kaenv linseg 0, .2, .3, p3-.5, .3, .3, 0
anoise rand 1, 2, 1
a1 poscil 1, 1000
afilt1 butterbp anoise, 1000, 10
afilt2 butterbp afilt1, 1000, 10
aout balance afilt2, a1, 1
out aout*kaenv, aout*kaenv
endin
schedule("Noise",0,10)

and the irregularities seem to derive mostly from rms fluctuations of 
the noise itself.

cheers -
	joachim


On 24/07/17 22:17, Jeanette C. wrote:
> Jul 24 2017, joachim heintz has written:
> ...
>> can you try to adjust the [ihp] optional input parameter?  per default
>> it is 10 (hz), maybe you try bigger or smaller values.
> Thanks for the tip, Joachim. It does make it a little better, but there
> are still fluctuations, resulting in both quieter than average and
> louder than average moments, even leading to distortion. Here's the
> basic code:
> kaenv linseg 0, .2, 1, p3-.5, 1, .3, 0
> anoise rand 1
> a1 oscil kaenv, cpspch(p4), 1
> afilt1 butterbp anoise, cpspch(p4), 1
> aout balance afilt1, a1, .01
> aout = aout * .75
> out aout
>
> I'm basically trying to mimic Yoshimi's/ZynAddSubFX's SubSynth engine,
> which works with filtered white noise.
>
> Best wishes,
>
> Jeanette
>>
>> best -
>>     joachim
>>
>>
>> On 24/07/17 20:13, Jeanette C. wrote:
>>> Hey hey,
>>> I'm trying to build an instrument based on bandpassed white noise. The
>>> problem is, that butterbp's output volume greatly varies with the
>>> bandwidth and I haven't been able to work out a relationship between
>>> bandwidth and volume variation.
>>>
>>> I have tried to control the output with balance, but that too generates
>>> unpredictable and uncontrollable output of its own kind. The volume
>>> fluctuates while the tone is playing, even though both white noise and
>>> the balancing sine oscillator have a fixed volume.
>>>
>>> Can any one suggest a way to generate a bandpassed signal with
>>> predictable volume or a scale function to counter the effects of
>>> changing bandwidth?
>>>
>>> Thanks and best wishes,
>>>
>>> Jeanette
>>>
>>> --------
>>> * website: http://juliencoder.de - for summer is a state of sound
>>> * SoundCloud: https://soundcloud.com/jeanette_c
>>>
>>> you made me realize..not to compromise
>>> the fact that you and i should meet... <3
>>> (Britney Spears)
>>>
>>> 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
>>
>
> --------
> * website: http://juliencoder.de - for summer is a state of sound
> * SoundCloud: https://soundcloud.com/jeanette_c
>
> you made me realize..not to compromise
> the fact that you and i should meet... <3
> (Britney Spears)
>
> 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

Date2017-07-25 18:52
From"Jeanette C."
SubjectRe: Stable volume bandpass filtered white noise
Jul 25 2017, joachim heintz has written:
...
> 2) it might give you a better result to have a series of filters with not 
> that narrow bandwidth, instead of one filter with extremely narrow bandwidth. 
> i tried this:
...
Hey Joachim,
thanks! This one did it. The sound is done. And it's very much to my
liking. :)

Best wishes,

Jeanette

--------
* website: http://juliencoder.de - for summer is a state of sound
* SoundCloud: https://soundcloud.com/jeanette_c

I believe
We all have one true love
Somewhere in this world <3
(Britney Spears)

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