Csound Csound-dev Csound-tekno Search About

Noise generators

Date2005-12-06 19:14
FromNicolas =?iso-8859-1?Q?Castagn=E9?=
SubjectNoise generators
Noise generators
Hi all,

A very, very simple newbee questions today !

I was wondering why CSound 5 features so many noise generator with linear distributions :
        noise,  rand,  randh,  randi,  rnd31, 
        random,  randomh,  randomi, 
        trirand,  unirand,  (and noise, after all)

What are the core differences ?
Are some of them deprecated ?

I did not find explanation in the doc...

Thx in advance !

Nicolas


PS : btw, thx very much for your kind replies to my previous messages. Mmmhhh, CSound community seems to be really kind & helpful, indeed !

-- 
-------------------------------------------------------------------
Dr Nicolas CASTAGNE

ACROE-ICA,
46 av. Félix Viallet
38 000 Grenoble
http://acroe.imag.fr

Tel : (33) 4 76 57 46 60
-------------------------------------------------------------------

Date2005-12-06 21:32
Fromluis jure
SubjectRe: Noise generators
el 2005-12-06 Nicolas Castagné escribió:

> I was wondering why CSound 5 features so many 
> noise generator with linear distributions :
> 	noise,  rand,  randh,  randi,  rnd31, 
> 	random,  randomh,  randomi, 
> 	trirand,  unirand,  (and noise, after all)
> 
> What are the core differences ?
> Are some of them deprecated ?

i think the manual pages describe them quite well. in some cases
differences are minor, but each one is in some way unique, i think.
differences should be clear reading the manual carefully.

look for the type of output each one generates (unipolar, bipolar, within a
user-defined range), and the type of arguments each one receives, etc.

for example, those ending with "h" (randh, randomh) generate random values
at a certain rate you specify, and then hold that value until the next
random value is generated. 

in a similar way, those ending with "i" (randi, randomi) also generate
random values at a certain rate, but interpolate to the next random value,
rather that hold it.

and so on and so forth...

look again at the manual pages, and all this should be clear:

http://www.csounds.com/manual/html/rand.html
http://www.csounds.com/manual/html/randh.html
http://www.csounds.com/manual/html/randi.html
http://www.csounds.com/manual/html/random.html
http://www.csounds.com/manual/html/randomh.html
http://www.csounds.com/manual/html/randomi.html
etc...

Date2005-12-07 05:42
FromRichard M. Otero
SubjectRe: Noise generators
Also, I believe it is the practice of the developers to never make 
changes to the language that could break previously-written orchestras. 
  Or at least that's been the understanding I've gained from reading the 
dev stuff that leaks on to this list from time to time.

So if someone creates the opcode superdupernoisegen, which includes all 
the features and options from every previous noise generator opcode, 
the historical opcodes will not be removed from the language.

I hope to be corrected if I've made any false assumptions.

-Rich

On Dec 6, 2005, at 4:32 PM, luis jure wrote:

> el 2005-12-06 Nicolas Castagné escribió:
>
>> I was wondering why CSound 5 features so many
>> noise generator with linear distributions :
>> 	noise,  rand,  randh,  randi,  rnd31,
>> 	random,  randomh,  randomi,
>> 	trirand,  unirand,  (and noise, after all)
>>
>> What are the core differences ?
>> Are some of them deprecated ?
>
> i think the manual pages describe them quite well. in some cases
> differences are minor, but each one is in some way unique, i think.
> differences should be clear reading the manual carefully.
>
> look for the type of output each one generates (unipolar, bipolar, 
> within a
> user-defined range), and the type of arguments each one receives, etc.
>
> for example, those ending with "h" (randh, randomh) generate random 
> values
> at a certain rate you specify, and then hold that value until the next
> random value is generated.
>
> in a similar way, those ending with "i" (randi, randomi) also generate
> random values at a certain rate, but interpolate to the next random 
> value,
> rather that hold it.
>
> and so on and so forth...
>
> look again at the manual pages, and all this should be clear:
>
> http://www.csounds.com/manual/html/rand.html
> http://www.csounds.com/manual/html/randh.html
> http://www.csounds.com/manual/html/randi.html
> http://www.csounds.com/manual/html/random.html
> http://www.csounds.com/manual/html/randomh.html
> http://www.csounds.com/manual/html/randomi.html
> etc...
>
>
> --
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk
>

Date2005-12-07 08:18
FromIstvan Varga
SubjectRe: Noise generators
AttachmentsNone  

Date2005-12-07 10:19
FromNicolas =?iso-8859-1?Q?Castagn=E9?=
SubjectRe: Noise generators
Thx all for your replies.

Let me be a bit more precise.

I do understand the differences between the 
various white noise random generators.

Though, I still cannot figure out which of the 
'linear distribution' random noise generator is 
the most "recent" or "generic".
I am really convinced that backward compatibility 
is a true need, but I suppose that new patches 
should preferably use the 'newest generic' Opcode.

For example,
- http://www.csounds.com/manual/html/linrand.html
- http://www.csounds.com/manual/html/trirand.html 
(which, indeed, is said in the doc to be a random 
generator with a linear distribution, not a 
triangular distribution)
- http://www.csounds.com/manual/html/random.html
- http://www.csounds.com/manual/html/unirand.html
- http://www.csounds.com/manual/html/rand.html
are quite similar.

But which one, if any, is the most "generic, 
recent, should be used firstly in new patches, 
and presented firstly in a lesson on CSound" ?

I would say it is random, provided the random 
routines runs with a precision of 32 bits... But 
I am not sure !


In case I am right (which is not an evidence !), 
as a remark, it would useful to coin the old 
Opcodes as deprecated in the documentation one 
day.

Thx,
All the best,

NC


>el 2005-12-06 Nicolas Castagné escribió:
>
>>  I was wondering why CSound 5 features so many
>>  noise generator with linear distributions :
>>	noise,  rand,  randh,  randi,  rnd31,
>>	random,  randomh,  randomi,
>>	trirand,  unirand,  (and noise, after all)
>>
>>  What are the core differences ?
>>  Are some of them deprecated ?
>
>i think the manual pages describe them quite well. in some cases
>differences are minor, but each one is in some way unique, i think.
>differences should be clear reading the manual carefully.
>
>look for the type of output each one generates (unipolar, bipolar, within a
>user-defined range), and the type of arguments each one receives, etc.
>
>for example, those ending with "h" (randh, randomh) generate random values
>at a certain rate you specify, and then hold that value until the next
>random value is generated.
>
>in a similar way, those ending with "i" (randi, randomi) also generate
>random values at a certain rate, but interpolate to the next random value,
>rather that hold it.
>
>and so on and so forth...
>
>look again at the manual pages, and all this should be clear:
>
>http://www.csounds.com/manual/html/rand.html
>http://www.csounds.com/manual/html/randh.html
>http://www.csounds.com/manual/html/randi.html
>http://www.csounds.com/manual/html/random.html
>http://www.csounds.com/manual/html/randomh.html
>http://www.csounds.com/manual/html/randomi.html
>etc...
>
>
>--
>Send bugs reports to this list.
>To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk


-- 
-------------------------------------------------------------------
Dr Nicolas CASTAGNE

ACROE-ICA,
46 av. Félix Viallet
38 000 Grenoble
http://acroe.imag.fr

Tel : (33) 4 76 57 46 60
-------------------------------------------------------------------

Date2005-12-07 12:58
FromIstvan Varga
SubjectRe: Noise generators
AttachmentsNone