Simple 1KHz Audio Function Generator Using Standard Python In Linu

Category: Python - Miscellaneous

Simple 1KHz Audio Function Generator Using Standard Python In Linux - afg.py

This code is a stand alone program to generate a signal, at the earphone sockets, of 1KHz.
It is a basic audio signal generator and can be used as a starter test signal source for amateur electronics
enthusiasts testgear suite(s).

It needs /dev/audio to work; if you haven't got it then install oss-compat from your distro's repository.

Ensure the audio system is NOT in use for this to work.

Sine, Square, Triangle, Sawtooth+, Sawtooth-, Pulse+ and Pulse- signals are generated in 10 second bursts.
The waveforms generated are unfiltered and therefore not "pure", but hey, an audio function generator
signal source, for free, without external hardware, AND, using standard Python, what more do you want... :)
An oscilloscope will show the waveforms generated at the earphone socket.

Noise is not included but that is SO easy that I left it out FTTB.
(This will be a future upload. ;o)

All that is required to make this a piece of audio test equipment is a cable plugged into to the earphone
socket.

Assuming it is copied into the module(s) drawer just type:-

>>> import afg[RETURN/ENTER]


And away you go...

This is Public Domain and you may do with it as you like.

Read the program for more information.
(There will be more to come in the future... :) Date: 18 April, 2012


Audio - Demo - Function - Generator - Linux - Program - Signal - Sound - Source

Homepage: http://code.activestate.com/recipes/577592-simple-1khz-audio-function-generator-using-standar/?in=lang-python

Developer: Barry Walker

License: Freeware

Operating System: Windows

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

Perl Audio Converter (PAC) is a tool for converting multiple audio types from one format to another.

developer Developer: Philip Lyons
license License: GNU General Public License (GPL)
operating systems Operating System: Linux


AC3Filter is a high quality free audio decoder and processor filter.

developer Developer: ac3filter.net
license License: GNU General Public License (GPL)
operating systems Operating System: All 32-bit MS Windows (95/98/NT/2000/XP)


FLAC is a free lossless compressed audio format which supports streaming and archival.

developer Developer: flac
license License: BSD License
operating systems Operating System: All 32-bit MS Windows (95/98/NT/2000/XP), All BSD Platforms (FreeBSD/NetBSD/OpenBSD/Apple Mac OS X), All POSIX (Linux/BSD/UNIX-like OSes), OS Portable (Source code to work with many OS platforms)


We offer services of memory card repair software to recover corrupted pictures, video files from inaccessible picture card.

developer Developer: Card recovery
license License: GNU General Public License (GPL)
operating systems Operating System: Not Available


VESPA is an open source one file PHP script to read all MP3 files of a certain web directory and enables navigation through its sub-directories.

developer Developer: Dieter Willinger
license License: GNU General Public License version 3.0 (GPLv3)
operating systems Operating System: Linux, Windows, Mac


Highest quality hard disk data recovery service to rescue file deletion problems in less cost and resource required.

developer Developer: images recovery
license License: GNU General Public License (GPL)
operating systems Operating System: Not Available


Buy instant memory card data retrieval software that assists in restoring all inaccessible or erased files and folders from all commonly used multimedia memory cards.

developer Developer: Card recovery
license License: GNU General Public License (GPL)
operating systems Operating System: Not Available


it is an enhanced property

* initialize attribute in class definition scope

* easily keep the attribute behaviors in sub classes.

developer Developer: ilon asolot
license License: Freeware
operating systems Operating System: Windows


This very simple DEMO code records a few seconds of your voice from a microphone, (internal mic' on a laptop), and
replays your voice immedaiately after recording.

developer Developer: Barry Walker
license License: Freeware
operating systems Operating System: Windows