From dd6162bf0e19ecda7653e5db9ccac7306c44dc25 2013-10-13 19:57:11 From: David Österberg Date: 2013-10-13 19:57:11 Subject: [PATCH] Make examples in docstring produce a less annoying sound. --- diff --git a/IPython/lib/display.py b/IPython/lib/display.py index bcce88d..0670e09 100644 --- a/IPython/lib/display.py +++ b/IPython/lib/display.py @@ -54,12 +54,11 @@ class Audio(DisplayObject): import numpy as np framerate = 44100 t = np.linspace(0,5,framerate*5) - data = np.sin(2*np.pi*440*np.sin(10*t**2)) + data = np.sin(2*np.pi*220*t) + np.sin(2*np.pi*224*t)) Audio(data,rate=framerate) Audio("http://www.nch.com.au/acm/8k16bitpcm.wav") - Audio(url="http://media.bradsucks.net/albums/ooi-128/01_-_Brad_Sucks_-_Dropping_out_of_School.mp3") - Audio(url="http://www.w3schools.com/html/horse.ogg", embed=True) + Audio(url="http://www.w3schools.com/html/horse.ogg") Audio('/path/to/sound.wav') Audio(filename='/path/to/sound.ogg')