Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 28, 2012, 03:56 PM   #1
wisecracker
macrumors newbie
 
Join Date: Sep 2012
DEMO Python 1KHz Pure Sinewave Audio Generator.

This is freebie text mode Python code to generate an audio signal at the speakers/headphone_sockets of MacBook Pros.

The signal is a 1KHz pure sinewave...

The full code is here:-

http://code.activestate.com/recipes/...in=lang-python

Enjoy finding simple solutions to often very difficult problems...

Bazza, G0LCU...
wisecracker is offline   0 Reply With Quote
Old Nov 5, 2012, 05:42 PM   #2
itsmrjon
macrumors regular
 
Join Date: Jun 2011
Location: Chicago
Quote:
Originally Posted by wisecracker View Post
This is freebie text mode Python code to generate an audio signal at the speakers/headphone_sockets of MacBook Pros.

The signal is a 1KHz pure sinewave...

The full code is here:-

http://code.activestate.com/recipes/...in=lang-python

Enjoy finding simple solutions to often very difficult problems...

Bazza, G0LCU...
Why wouldnt you just use scitools sound module? It's more readily available and the code is even shorter, just relies on numpy arrays

Code:
from scitools import sound
sound.play(sound.Nothing_Else_Matters())
Theres an example of the song 'nothing else matters'

seems like you took the more complicated route.
__________________
You can have your own opinions, but you can't have your own facts.
itsmrjon is offline   1 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:56 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC