Most viewed recipes tagged "noise"http://code.activestate.com/recipes/tags/noise/views/2017-05-13T12:12:30-07:00ActiveState Code RecipesSimple White Noise Generator Using Standard Python In Linux. (Python)
2011-03-10T18:03:55-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577604-simple-white-noise-generator-using-standard-python/
<p style="color: grey">
Python
recipe 577604
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/noise/">noise</a>, <a href="/recipes/tags/program/">program</a>, <a href="/recipes/tags/signal/">signal</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/source/">source</a>).
</p>
<p>Simple White Noise Generator Using Standard Python In Linux - noise.py</p>
<p>This code is a stand alone program to generate a signal, at the earphone sockets, of white noise.</p>
<p>It needs /dev/dsp to work; if you haven't got it then install oss-compat from your distro's repository.
(NOTE:- /dev/audio could also be used but I decided to use /dev/dsp to show that this was within easy
reach of standard Python too.)</p>
<p>Ensure the audio system is NOT in use for this to work and all the levels are set up for your normal requirements.
In my case root level WAS NOT required but that does not mean that root level IS NOT required - so be aware.</p>
<p>All that is required to make this a piece of audio test equipment is a cable plugged into to the earphone
socket. The output level is fully controllable inside the code and the noise is generated in about 10 second
bursts</p>
<p>Assuming it is copied into the module(s) drawer just type:-</p>
<pre class="prettyprint"><code>>>> import noise[RETURN/ENTER]
</code></pre>
<p>And away you go...</p>
<p>This is Public Domain and you may do with it as you like.</p>
<p>Read the program for more information.
(There will be more to come in the future... :)</p>
<p>Enjoy finding simple solutions to often very difficult problems... ;o)</p>
<p>73...</p>
<p>Bazza, G0LCU...</p>
<p>Team AMIGA...</p>
Platform Independent White Noise Generator... (Python)
2012-11-25T10:10:45-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578350-platform-independent-white-noise-generator/
<p style="color: grey">
Python
recipe 578350
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/noise/">noise</a>, <a href="/recipes/tags/program/">program</a>, <a href="/recipes/tags/pyaudio/">pyaudio</a>, <a href="/recipes/tags/signal/">signal</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/source/">source</a>, <a href="/recipes/tags/windows/">windows</a>).
</p>
<p>This code is a derivative of the Pure Sinewave Generator and produces a continuous noise out of the speakers or headphone sockets.</p>
<p>It is for the hobbyist to be able to generate a pseudo-random noise signal for testing with.</p>
<p>It is issued as Public Domian and you may do with it as you please.</p>
<p>It is very easy to convert to Python 3.x.x but as OSX only has 2.7.x and lower ATM then these are what are used...</p>
<p>An installation of pyaudio IS needed for this to work; see the code for more information.</p>
<p>It is near platform independent but sadly the AMIGA is not included, but hey, I have already shown how generate sound for Classic AMIGAs.</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza, G0LCU...</p>
A white noise generator to sooth baby to sleep. (Bash)
2017-05-13T12:12:30-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/580801-a-white-noise-generator-to-sooth-baby-to-sleep/
<p style="color: grey">
Bash
recipe 580801
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/alarm/">alarm</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/baby_alarm/">baby_alarm</a>, <a href="/recipes/tags/cygwin/">cygwin</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/noise/">noise</a>, <a href="/recipes/tags/sleep/">sleep</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/whitenoise/">whitenoise</a>).
</p>
<p>This is a simple BASH, DASH and SH script to sooth a newborn baby to sleep for a laptop with a builtin mic. Develeoped around an Apple MacBook Pro.</p>
<p>Usage:- [./]shush.sh <time in seconds from 18 to 2700> [sensitivity [Hh|Mm|Ll]]<CR></p>
<p>If time is omitted it defaults to 2 bursts of 9 seconds each and if sensitivity is omitted defaults to [M]edium.</p>
<p>It uses Quicktime Player for Apple OSX 10.12.4 minimum /dev/dsp for CygWin and some Linux flavours and arecored for Linux ALSA machines for baby awake detector.</p>
<p>Upon the two arguments the white noise generator runs for approximately the time given in $1 in bursts of 9 seconds until the time limit is reached.
$2 is used to detect of baby is awake and reruns the noise generator again with a new noise waveform.</p>
<p>Enjoy...</p>