Demoing Simple Noise and Tones and Clicking

If you're wondering why I taped it, I'm too poor to afford tools at the moment. Or, rather, I just got my first job and I'm saving up money in case of an emergency. I'm basking in not being broke. I'll fix that after christmas rolls around.

Here's that program to generate the noise:

byte aaaaa = 1; //avr-gcc hotfix
void setup()
{
	aaaaa++; //avr-gcc hotfix
	randomSeed(analogRead(1)); //initialize random number generator with an unpredictable seed
        pinMode(9, OUTPUT);
}
void loop()
{
		if(random(2) == 0) digitalWrite(9,LOW);
                else digitalWrite(9,HIGH);
                delay(1);
}

The mention of avr-gcc is because I read somewhere there was a problem with delay due to some odd memory issue and this is how one would fix it.

Anyways, that's basically all I can do at the moment with nothing else but some disassembled children's toys and an arduino. I am working on playing with some PWM virtual DAC stuff so that I can do some more sophisticated tones. I'm going to try some basic FM synthesis in the future.

To make it sound even cooler / more random you could try

delay(random(1,20));

(Changing the values to whatever sounds coolest.

I read somewhere that a reverse biased p-n junction creates white noise, or something along those lines. I can't see how it would work, (so maybe I rememered it wrong), but apparently it does...

Onions.

Onions:
To make it sound even cooler / more random you could try

delay(random(1,20));

(Changing the values to whatever sounds coolest.

I read somewhere that a reverse biased p-n junction creates white noise, or something along those lines. I can't see how it would work, (so maybe I rememered it wrong), but apparently it does...

Onions.

You may be thinking of something like this:

http://robseward.com/itp/adv_tech/random_generator/

If you ever need true random numbers (vs pseudo-random) - such as for cryptography - this is one way to get them...

:slight_smile:

I've read that page before.

Luckily, our ears don't care how random the noise is.

I'm thinking before I delve into FM soft synth I'll do a little serial drum machine. For simplicity it'll use noise and square waves to sound like some lo-fi chiptune drums. Serial because I can't really use push buttons because I don't have a breadboard. I do have several pushbuttuns due to me disassembling random electronics. A Zhu Zhu pet has 2 push buttons. It also has one on the nose that's more like rubber bubble type keyboard and a couple of switches used for sensing the little grooves that activate specific noises on the play sets. And of course that speaker I'm using. All the resistors are surface mount, though. : (

@cr0sh:
The site says

"This circuit uses avalanche noise in a reverse-biased PN junction, the emitter-base junction of the first transistor. The second transistor amplifies it. The first two ALS04 inverters are biased into a linear region where they act like op amps, and they amplify it further. The third inverter amplifies it some more..."

Which basically boils down to a reversed PN junction creating random noise, which is amplified. That sounds simple :slight_smile:

@Jorh:

Luckily, our ears don't care how random the noise is.

True, a project like yours doesn't need true randomness, but then there's no harm in having some anyway...

Serial because I can't really use push buttons because I don't have a breadboard. I do have several pushbuttuns due to me disassembling random electronics

If you have a soldering iron and some loose wires, you could solder the terminals together and get away without a breadboard. If you don't have a soldering iron and some wires, you're missing out on fun!

Onions.

@jorh is randomSeed(analogRead(1)); //initialize random number generator with an unpredictable seed
actually being used in this for something?

i've commented it out and had the same results, not trying to point out a flaw (if there is one), just wanna make sure im not missing something

--mubot

the random function of the Arduino will generate always the same sequence of numbers when started.
(this is good for repeatability of certain code e.g. tests)

Suppose reandom() could generate only 10 numbers 0..9
then it would always 7 5 3 4 2 1 0 9 6 8 7 5 3 4 2 1 0 9 6 8 etc.
By setting the seed to e.g 5 it would generate 3 4 2 1 0 9 6 8 7 5 3 4 2 1 0 9 6.
So the same sequence but it would start at another position.

i just read that on the site, maybe i shoulda did that b4 posting! lol

but thanks for the reply!!!