Popular recipes tagged "demo" but not "macbook_pro"http://code.activestate.com/recipes/tags/demo-macbook_pro/2017-01-20T22:17:23-08:00ActiveState Code RecipesA pseudo-echo, (or printf), function for any Python version. (Python) 2017-01-20T22:17:23-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/580750-a-pseudo-echo-or-printf-function-for-any-python-ve/ <p style="color: grey"> Python recipe 580750 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/echo/">echo</a>, <a href="/recipes/tags/fs_uae/">fs_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/printf/">printf</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>). </p> <p>A simple example of having a pseudo-echo using sys.stdout.write...</p> <p>This gives exactly the same results from Python Versions, 1.4.0, 2.0.1, 2.5.6, 2.6.9, 3.4.3 and 3.5.2 on various platforms including the classic AMIGA A1200.</p> <p>Enjoy finding simple solutions to often very difficult problems...</p> <p>Bazza.</p> Design by contract on python vanilla (Python) 2013-11-05T20:50:30-08:00Alan Cristhian Ruizhttp://code.activestate.com/recipes/users/4186199/http://code.activestate.com/recipes/578767-design-by-contract-on-python-vanilla/ <p style="color: grey"> Python recipe 578767 by <a href="/recipes/users/4186199/">Alan Cristhian Ruiz</a> (<a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/design_pattern/">design_pattern</a>, <a href="/recipes/tags/productivity/">productivity</a>). Revision 2. </p> <p>The code below is an example that shows that we can do design by contract in python without any non-standard module.</p> DEMO - Generate A Crude 1KHz Sinewave Using A BASH Script. (Bash) 2013-03-01T19:41:47-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578477-demo-generate-a-crude-1khz-sinewave-using-a-bash-s/ <p style="color: grey"> Bash recipe 578477 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/bash/">bash</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/shell/">shell</a>, <a href="/recipes/tags/sinewave/">sinewave</a>, <a href="/recipes/tags/sound/">sound</a>). </p> <p>A very simple crude sinewave generator using a BASH script inside a Linux Terminal.</p> <p>The file required is generated inside the code and requires /dev/audio to work.</p> <p>Ensure you have this device, if not the download oss-compat from your OS's repository...</p> <p>It lasts for about 8 seconds before exiting and saves a 65536 byte file to your working directory/drawer/folder as sinewave.raw.</p> <p>Use an oscilloscope to check the waveform generated...</p> <p>It is entirely Public Domain and you may do with it as you please...</p> <p>Enjoy finding simple solutions to often very difficult problems... ;o)</p> <p>Bazza, G0LCU...</p> For AMIGA-Heads Only. Poking A HW, (Memory), Address On A Classic AMIGA, Inside Text Mode Python. (Python) 2012-09-09T19:25:00-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578255-for-amiga-heads-only-poking-a-hw-memory-address-on/ <p style="color: grey"> Python recipe 578255 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/hardware/">hardware</a>, <a href="/recipes/tags/memory/">memory</a>, <a href="/recipes/tags/poke/">poke</a>, <a href="/recipes/tags/winuae/">winuae</a>). </p> <p>For AMIGA-Heads Only...</p> <p>This code is purely for a minimum of a stock Classic AMIGA A1200(HD), E-UAE, and WinUAE running AMIGA OS3.0x to 3.1x. It will NOT work on any other platform!</p> <p>(It MIGHT work on AMIGA OS3.5x and 3.9x with Python 2.4.6, but totally untested and I hold no responsibility for the outcome when trying it.)</p> <p>It is a DEMO to poke a byte inside _ANY_ memory address inside the standard CPU 68EC020 16MB boundary.</p> <p>This is not a function nor a class but just a DEMO to show how to write directly to HW, (or memory), addresses.</p> <p>POKING memory or hardware addresses is not recommended for novices without studying the machine first, and, this code will ignore any _ENFORCER_hits_.</p> <p>I experimented with this several years ago and have decided to finally release it. I do await the flak!</p> <p>It works from Python Versions 1.4.0 to 2.0.1 for the classic AMIGA.</p> <p>This is issued as Public Domain and you may do with it as you please.</p> <p>Ensure that the T: Volume exists on the running machine.</p> <p>See inside the code and text below it also as to how it works...</p> <p>Bazza, G0LCU...</p> Flash_N_Fade Using Standard Text Mode Python For Linux And Windows... (Python) 2012-07-15T18:38:43-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578216-flash_n_fade-using-standard-text-mode-python-for-l/ <p style="color: grey"> Python recipe 578216 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/fade/">fade</a>, <a href="/recipes/tags/flash/">flash</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/windows/">windows</a>). </p> <p>This DEMO shows how to fade text in shades of grey and also flash with inverse_flash along with simultaneous differing frequency beeps.</p> <p>There are 2 code snippets that WILL need to be separated before use. One is a Linux version and the other a Windows 32 bit version. There is an AMIGA version but that is for much later.</p> <p>There are NO notes inside the code so you will have to see the code as to how it works. It is SOOO simple that notes are/were unnecessary...</p> <p>Bazza, G0LCU...</p> For AMIGA-Heads Only. Peeking A Memory Address On A Classic AMIGA, Inside Text Mode Python. (Python) 2012-07-03T17:00:20-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578189-for-amiga-heads-only-peeking-a-memory-address-on-a/ <p style="color: grey"> Python recipe 578189 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/peek/">peek</a>, <a href="/recipes/tags/peeking/">peeking</a>, <a href="/recipes/tags/winuae/">winuae</a>). </p> <p>For AMIGA-Heads Only...</p> <p>This code is purely for a minimum of a stock Classic AMIGA A1200(HD), E-UAE, and WinUAE running AMIGA OS3.0x to 3.1x. It will NOT work on any other platform!</p> <p>(It MIGHT work on AMIGA OS3.5x and 3.9x with Python 2.4.6, but totally untested and I hold no responsibility for the outcome when trying it.)</p> <p>It is a DEMO to peek a byte inside _ANY_ memory address inside the standard CPU 68EC020 16MB boundary.</p> <p>I experimented with this several years ago and have decided to finally release it. I do await the flak!</p> <p>It works from Python Versions 1.4.0 to 2.0.1 for the classic AMIGA.</p> <p>Ensure that the T: Volume exists on the running machine.</p> <p>See inside the code and text below it also as to how it works...</p> <p>Bazza, G0LCU...</p> Metronome For Beginner Musicians... (Python) 2012-05-18T19:30:04-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578139-metronome-for-beginner-musicians/ <p style="color: grey"> Python recipe 578139 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/linux/">linux</a>, <a href="/recipes/tags/metronome/">metronome</a>, <a href="/recipes/tags/music_accessory/">music_accessory</a>, <a href="/recipes/tags/sound/">sound</a>). Revision 2. </p> <p>This DEMO code is a simple metronome for the Linux platform. It is for newcomers to playing musical instruments as a timing unit for practicing with.</p> <p>It is issued as Public Domain and you may do with it as you please...</p> <p>The device /dev/dsp IS required for this to work. If your machine lacks this then install oss-compat from you distro's repository.</p> <p>It exploits a flaw in the default /dev/dsp device inside linux...</p> <p>The part of the code the uses Ctrl-C to exit a loop has a flaw. This is not a bug. I will let the big guns explain what is happening if they want to in the comments section.</p> <p>Enjoy finding simple solutions to often very difficult pronblems...</p> <p>Bazza, G0LCU...</p> Forwards Compatibility; Generating A Function On The Fly... (Python) 2012-06-06T17:16:27-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578160-forwards-compatibility-generating-a-function-on-th/ <p style="color: grey"> Python recipe 578160 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/function/">function</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>). </p> <p>This code auto-generates a function that converts a string to bytes only in Python Versions 3.x.x. The function will NOT be generated in Python Versions 1.4.0 to 2.7.x. See the code for all the versions tested on. Inside the code are commented-out lines to show a practical usage for this and WILL be used in future /dev/audio or /dev/dsp access that I may develop...</p> <p>See the notes right at the bottom and read all the notes inside the code...</p> <p>This is NOT Public Domain like all my other stuff but is MIT licenced...</p> <p>Enjoy finding simple solutions to often very difficult problems...</p> <p>Bazza, G0LCU...</p> Markov Encryption Demonstration 2 (Python) 2012-03-14T17:39:17-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578076-markov-encryption-demonstration-2/ <p style="color: grey"> Python recipe 578076 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/demonstration/">demonstration</a>, <a href="/recipes/tags/encode/">encode</a>, <a href="/recipes/tags/encoding/">encoding</a>, <a href="/recipes/tags/encrypt/">encrypt</a>, <a href="/recipes/tags/encryption/">encryption</a>). </p> <p>This program is meant to act as an example of how to use ME with data that needs to be obfuscated. The functionality provided via the GUI demonstrates both the ability to encrypt and decrypt all text that the UTF-8 encoding can handle. Explanations come later.</p> Markov Encryption Demonstration 1 (Python) 2012-03-16T18:59:06-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578062-markov-encryption-demonstration-1/ <p style="color: grey"> Python recipe 578062 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/demonstration/">demonstration</a>, <a href="/recipes/tags/encode/">encode</a>, <a href="/recipes/tags/encoding/">encoding</a>, <a href="/recipes/tags/encrypt/">encrypt</a>, <a href="/recipes/tags/encryption/">encryption</a>). </p> <p>This is a simple GUI program that shows Markov Encryption at work. It is built to be interactive and has all needed code embedded within itself. This version of ME library is not very efficient and represents an early attempt at developing and easily testing the code. Certain limits are built into the program, and the code is not meant to be robust at this stage. This program is a proof-of-concept design meant to ensure that the work being done was viable for future use and that the encryption process could be carried out both ways, both in encoding plaintext and decoding ciphertext.</p> Amplitude Modulation - Tremolo, Was:- An Audio/Sound Snippet For Linux... ;o) (Python) 2012-01-21T14:18:28-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578013-amplitude-modulation-tremolo-was-an-audiosound-sni/ <p style="color: grey"> Python recipe 578013 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/amplitude/">amplitude</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/mod/">mod</a>, <a href="/recipes/tags/modulation/">modulation</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/tremolo/">tremolo</a>). Revision 2. </p> <p>This IS for the big guns as well as the amatuer...</p> <p>I am always being told that too many comments inside any code is bad and that professional coders are clever enough to work out what a program does without comments...</p> <p>So here goes! This snippet of code hits /dev/dsp in Linux and has no comments as to what it does. Make sure that /dev/dsp is available in your Linux install - if not then install oss.compat from your repository.</p> <p>It needs Python 2.6 minimum, but may well work on a much earlier version</p> <p>Don't run the code first but have a go at working out what it does and see if you are correct... ;o)</p> <p>You can email me if you think you are/were correct:- <a href="http://wisecracker_at_tesco.net" rel="nofollow">wisecracker_at_tesco.net</a></p> <p>Bear in mind I don't think this has ever been done before by hitting the /dev/dsp __directly__.</p> <p>NOTE:- NO imports are required at all!!!</p> <p>It runs for about 7 seconds before exiting...</p> <p>Another BIG PLUS for Linux.</p> <p>(I have a feeling poeple on here might like this, possibly even vote it up. ;)</p> <p>Answer now at the bottom of this page...</p> <p>Enjoy...</p> <p>Bazza, G0LCU...</p> Morse Code (Python) 2012-01-12T23:45:12-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578012-morse-code/ <p style="color: grey"> Python recipe 578012 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/demonstration/">demonstration</a>, <a href="/recipes/tags/example/">example</a>, <a href="/recipes/tags/experiment/">experiment</a>, <a href="/recipes/tags/morse/">morse</a>, <a href="/recipes/tags/morse_code/">morse_code</a>, <a href="/recipes/tags/program/">program</a>, <a href="/recipes/tags/sound/">sound</a>). Revision 3. </p> <p>After seeing another recipe recently that helps people with Morse Code, I was inspired to clean up the following code just a bit to make it worthy for the rest of the world. After being executed, it waits for lines of text to be entered, compiles each one in turn into timing codes, and plays them back with a simple execution</p> Simple Morse Code Practice Oscillator. (Python) 2012-01-09T22:49:05-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578010-simple-morse-code-practice-oscillator/ <p style="color: grey"> Python recipe 578010 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/code/">code</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/morse/">morse</a>, <a href="/recipes/tags/morse_code/">morse_code</a>, <a href="/recipes/tags/morse_practice_oscillator/">morse_practice_oscillator</a>, <a href="/recipes/tags/sound/">sound</a>). Revision 2. </p> <p>This is not for the big guns, but for the Amateur coder AND radio enthusiast.</p> <p>It is a DEMO Morse Code Practice Oscillator that will allow the user to practice sending Morse code using the "o" and "p" keys as a PSEUDO-paddle key. It is set to around 8 WPM, (Words Per Minute). The code allows "O" and "P" to be used at around 12 WPM, when "Caps Lock" is turned on. Read the code for more informtion.</p> <p>It is for at least standard text mode Python 2.5.2 to 2.7.2 using PCLinuxOS 2009 and Debian 6.0.0. It may well work at a much earlier version. I do have a version for Python 3.x.x but that will be uploaded elsewhere.</p> <p>It is written in such a way that youngsters can understand what is going on.</p> <p>Enjoy finding simple solutions to often very difficult problems... ;o)</p> <p>Bazza, G0LCU...</p> Simple Morse Code Generator And Tutor. (Python) 2012-01-09T22:51:12-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578009-simple-morse-code-generator-and-tutor/ <p style="color: grey"> Python recipe 578009 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/code/">code</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/morse/">morse</a>, <a href="/recipes/tags/morse_code/">morse_code</a>, <a href="/recipes/tags/sound/">sound</a>). Revision 2. </p> <p>This is not for the big guns, but for the Amateur coder AND radio enthusiast.</p> <p>It is a DEMO Morse Code Generator and tutor that will generate the tones required for the original standard letters A to Z and numbers 0 to 9. Puctuation is NOT included but hey it is SOOOO simple to modify the code that I will let you, (the ones interested), do that for yourselves... ;o) Read the code for more informaton.</p> <p>It is for at least standard text mode Python 2.5.2 to 2.7.2 using PCLinuxOS 2009 and Debian 6.0.0. It may well work at a much earlier version. I do have a version for Python 3.x.x but that will be uploaded elsewhere.</p> <p>As it stands it _sends_ at around 8 WPM, (Words Per Minute).</p> <p>It is written in such a way that youngsters can understand what is going on.</p> <p>Enjoy finding simple solutions to often very difficult problems... ;o)</p> <p>Bazza, G0LCU...</p> Yet Another Python Generator... (Python) 2011-12-19T08:14:55-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577990-yet-another-python-generator/ <p style="color: grey"> Python recipe 577990 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/signal/">signal</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/source/">source</a>, <a href="/recipes/tags/sweep/">sweep</a>). </p> <p>Aha, but not what big guns were expecting...</p> <p>LF Audio Sweep Generator.</p> <p>Another kids level project to do for yourselves...</p> <p>This is a Python DEMO to show the power of the sound card using Linux to generate an Audio Sweep Signal from 4KHz down to 100Hz and back again.</p> <p>Written in such a way that anyone can understand how it works... This is for Linux and Python 2.x.x. Read the code for much more information, and...... A Python 3.x.x version is here:-</p> <p><a href="http://www.linuxformat.com/forums/viewtopic.php?t=14411" rel="nofollow">http://www.linuxformat.com/forums/viewtopic.php?t=14411</a></p> <p>Enjoy finding simple solutions to often VERY difficult problems...</p> <p>Bazza, G0LCU...</p> For AMIGA-Heads Only. Generating An Audio Signal In Text Mode Python. (Python) 2011-11-30T21:23:20-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577971-for-amiga-heads-only-generating-an-audio-signal-in/ <p style="color: grey"> Python recipe 577971 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/winuae/">winuae</a>). </p> <p>This DEMO is not for the big guns. It is aimed at those who still use a minimum of an ancient classic AMIGA A1200(HD), E-UAE, WinUAE, of which there are still a lot of us about...</p> <p>No comments about the use of "eval()" as Python Version 1.4.0 does not have "int()" and this is designed to work on all versions of Python available for the above platform. See the code for minimum requirements and much more information.</p> <p>MANY THANKS to Irmen de Jong for porting early versions of Python to the classic AMIGA to give we lowly users a taste of what was/is to come.</p> <p>This code will probably make the professionals cough a little, but, boy what fun it is to see how powerful Python can be on an open platform like the AMIGA.</p> <p>Written in such a way that anyone can understand how it works...</p> <p>I really don't care how you vote this as it is for those, including professionals, who enjoy messing with AMIGA variants purely for fun and relaxation, and, to......</p> <p>Enjoy finding simple solutions to often VERY difficult problems... ;o)</p> <p>Bazza, G0LCU...</p> A DEMO Frequency Counter With A Difference - Text Mode Python. (Python) 2011-11-21T18:00:43-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577955-a-demo-frequency-counter-with-a-difference-text-mo/ <p style="color: grey"> Python recipe 577955 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/audio/">audio</a>, <a href="/recipes/tags/counter/">counter</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/frequency/">frequency</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/sound/">sound</a>). </p> <p>Hi experts...</p> <p>I think that this is a first... ;o)</p> <p>Another kids level project to do for yourselves...</p> <p>This is yet another Python DEMO to show the power of the sound card using Linux as an audio frequency counter.</p> <p>It is a kids level project that uses the sound card as an input through the microphone socket to measure up to &gt;3500Hz from a symmetrical waveform, sine square or triangle. See the comments inside the code for more details...</p> <p>The only external hardware required is a test lead; oh my, this is technical stuff... ;o)</p> <p>This is for Python 2.x.x, (probably even down to 1.5.2) but it would be just as easy to make it work on 3.x.x. I've already done it......</p> <p>......But I'll let the big guns do that for you...</p> <p>Enjoy finding simple solutions to often VERY difficult problems...</p> <p>Be aware of word wrapping etc...</p> <p>Bazza, G0LCU...</p> Another Extremely Unusual Text Mode Python Upload... (Python) 2011-12-04T11:55:44-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577973-another-extremely-unusual-text-mode-python-upload/ <p style="color: grey"> Python recipe 577973 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/linux/">linux</a>, <a href="/recipes/tags/sound/">sound</a>). Revision 2. </p> <p>DC, (Direct Current), Input For Text Mode Python 3.x.x.</p> <p>A kids level project to do for yourselves...</p> <p>This is a Python DEMO to show the power of the sound card using Linux to accept a DC, (Direct Current), input. It is a kids level project that uses the sound card microphone input as a detector for an audio VCO output.</p> <p>Written in such a way that anyone can understand how it works...</p> <p>The DEMO circuits inside the code are SOOO simple a dexterous 10 year old could make it in less than a couple of hours and have it up and running so as to start using it... The DEMO code is a simple, slow, positive logic, TTL level Logic Probe.</p> <p>(My own VCO circuit is almost as simple but has 5 transistors.)</p> <p>This is for Linux and Python 3.x.x. Read the code for much more information, and......</p> <p>Enjoy finding simple solutions to often VERY difficult problems...</p> <p>Bazza, G0LCU...</p> And Now For Something COMPLETELY Different Using Text Mode Python... (Python) 2011-10-26T19:24:32-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577924-and-now-for-something-completely-different-using-t/ <p style="color: grey"> Python recipe 577924 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/linux/">linux</a>, <a href="/recipes/tags/sound/">sound</a>). </p> <p>Hi experts...</p> <p>A kids level project to do for yourselves...</p> <p>This is a Python DEMO to show the power of the sound card using Linux for a specific usage that I need(ed). It is a kids level project that uses the sound card as a variable DC Voltage reference for projects like stabilised linear PSUs. Why linear? Relatively clean RF wise...</p> <p>The TEST circuit is inside the code and is SOOO simple a dexterous 10 year old could make it in less than an hour and have it up and running to start using...</p> <p>My own circuit is just as simple, isolated, and, gives me MUCH more voltage range than the one inside the code... How did I do it? ;o)</p> <p>This is for Python 2.x.x, (probably even down to 1.5.2) but it would be just as easy to make it work on 3.x.x. I'll let the big guns do that...</p> <p>Enjoy finding simple solutions to often VERY difficult problems...</p> <p>Be aware of word wrapping etc...</p> <p>Bazza, G0LCU...</p> Simple 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>&gt;&gt;&gt; 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>