Go Down

Topic: Demoing Simple Noise and Tones and Clicking (Read 681 times) previous topic - next topic

Jorh

http://www.youtube.com/watch?v=yH6FYub8fko

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:
Code: [Select]
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.

Onions

To make it sound even cooler / more random you could try
Code: [Select]
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.
My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) :D

cr0sh


To make it sound even cooler / more random you could try
Code: [Select]
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...

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Jorh

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. : (

Onions

@cr0sh:
The site says
Quote
"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 :)

@Jorh:
Quote
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...

Quote
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.
My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) :D

Go Up