Drops, Rain and Sleep ... and the Prop using PropBasic
Christof Eb.
Posts: 1,201
Droplet-Prop might be the name of a Project idea, that I have in mind.
It is said, that rain sound helps to find some sleep. Or helps to concentrate. So the first question: What is your opinion, does it help?
It is interesting, that the generation of rain sound is well covered in the Internet. But I could not find any source code. An interesting article:
http://hal.archives-ouvertes.fr/docs/00/82/74/53/PDF/soundParticles_HAL.pdf
Has anyone already made a soundgenerator, which can produce "Cirped Impact Atoms"?
I am thinking of an implementation with PropBasic.
Any comments?
Christof
#####################################################################################################################################################
Edit:
The idea to generate rain resulted into a contest: http://forums.parallax.com/showthread.php/148601-Contest-Make-it-rain!
Please find enclosed Droplet_Prop_G. The binary works for demo-board.
* Noise with two different frequency- ranges.
* Cirped impacts
* Constant frequency impacts
* Impacts with decaying noise.
All done in PropBasic, which is fast enough without using assembler, because it can generate Cog-code. :-)
Have fun, Christof
It is said, that rain sound helps to find some sleep. Or helps to concentrate. So the first question: What is your opinion, does it help?
It is interesting, that the generation of rain sound is well covered in the Internet. But I could not find any source code. An interesting article:
http://hal.archives-ouvertes.fr/docs/00/82/74/53/PDF/soundParticles_HAL.pdf
Has anyone already made a soundgenerator, which can produce "Cirped Impact Atoms"?
I am thinking of an implementation with PropBasic.
Any comments?
Christof
#####################################################################################################################################################
Edit:
The idea to generate rain resulted into a contest: http://forums.parallax.com/showthread.php/148601-Contest-Make-it-rain!
Please find enclosed Droplet_Prop_G. The binary works for demo-board.
* Noise with two different frequency- ranges.
* Cirped impacts
* Constant frequency impacts
* Impacts with decaying noise.
All done in PropBasic, which is fast enough without using assembler, because it can generate Cog-code. :-)
Have fun, Christof
Comments
You might try searching among Foley sound effects. Theses are things like breaking a stick of celery to fake the sound of a bone being broken. You would surprised as to how many of us are fully conditioned to accept Foley sound effects as the real thing.
It is easier to use a Foley than to read that Phd material that might eventually work if you can get up to speed with what is being said.
http://www.ehow.com/how_8749800_make-rain-sound-effects-foley.html
Once you do a .wav recording, you could easily loop the file. And if you still want to be creative but don't want to try rolling peas around in a box... just try frying some bacon and record that. Yep! that really does sound like rain.
And of course there are free archives. http://www.soundjay.com/rain-sound-effect.html
Edited to add: if you're willing to just play back wav files see Kye's KISS wav player driver. It worked great for me when I used it to make a dog in the kitchen alarm:
http://obexclassic.parallax.com/objects/567/
I don't recall if it directly supports seamless looping. There may be a version in the new obex, but I didn't look.
OTOH, I once did a crackling fire effect. That was generated algorithmically with a PIC, so there were no repeating loops. I would imagine the same could be done with raindrop sounds.
-Phil
First off, my opinion is that rain does help you sleep except of course if you are outdoors or have a leaky roof.
Since it's raining here now I certainly have no need for this but do you know that Forth has it built-in?............................................Sure! just hook up a speaker and type DROP DROP DROP
BTW, I have "stacks" more where they came from!
Next, I tried to duplicate that curve with a FIR filter, using TFilter. This is the result:
The TFilter coefficients were then used to create a PASM-based FIR filter using my online FIR2PASM utility, which you can read about here. I tested the filter using the Spin filter test program available there, and this is the result, showing good agreement with TFilter's graph:
The resulting filter is then excited with white noise form a random number generator, using the attached program. The output sounds a little bit like heavy rain, but it lacks much of the longer-period ambiance of individual droplet sounds.
-Phil
I was contemplating that if you were listening to rain falling on flat surface all around you then you have relatively few drops falling nearby and more and more further away. That is the low frequency stuff is nearer and the high frequency stuff is further away.
Now, for any given "ring" around you the frequency of drops in that ring goes up linearly with distance from you. But the amplitude goes down as the inverse square law.
So your spectrum is what I had in mind already.
What's missing in this simple idea is the very distinctive sounds that can be made out of rain drops hitting different surfaces and objects. The "ting" on that tin roof, the "plunk" into a lake and so on. What about the regular beat of drips overflowing your guttering and so on.
I think the key to achieving these kinds of effects is using pure synthesis.
If you could analyze the spectral pattern of a single raindrop hitting a roof, you could synthesize many dozens of raindrops concurrently and get something close to the real thing. You'd want to add some "random" values to the parameters of each raindrop being synthesized for varied effect.
Thanks for sharing.
I am thinking of using cogsid for single varying drops. Good idea? I have not found sound source examples for a SID, but what I have read gives some encourage. Perhaps multible Sidcogs? And feed that into a short delay loop with random varying feedback length to get many drops.
. . . Oh, I should have few days off. . .
Good night Christof
I'm using just the shaded part, as it better simulates a drop hitting a hard surface. The full waveform sounds more like a drop hitting standing water. The waveform is actuated at random times with random frequencies. There's an enforced refractory time after each drop so they don't occur too close together.
Attached is the code.
-Phil
Intro screen to Ghouls'n Ghosts on the C64
Fascinating. Thanks for sharing.
Fascinating. Thanks for sharing.
great!!!
I have read that you can produce pink noise by adding random numbers with different sample rates instead of filtering.
I had some time today to try something. Unfortunately, it did not work up to now. I did not find the bug for hours. . .
Christof
BTW, the noise output of the programs I've posted so far is not faithful to the presumptive filtering. That's because I overlooked the fact that the FIR filter was causing overflow. If I preattenuate the white noise, then reamplify it after filtering, it sounds like Smile. Go figure.
-Phil
Christof