##// END OF EJS Templates
Make examples in docstring produce a less annoying sound.
David Österberg -
Show More
@@ -54,12 +54,11 b' class Audio(DisplayObject):'
54 import numpy as np
54 import numpy as np
55 framerate = 44100
55 framerate = 44100
56 t = np.linspace(0,5,framerate*5)
56 t = np.linspace(0,5,framerate*5)
57 data = np.sin(2*np.pi*440*np.sin(10*t**2))
57 data = np.sin(2*np.pi*220*t) + np.sin(2*np.pi*224*t))
58 Audio(data,rate=framerate)
58 Audio(data,rate=framerate)
59
59
60 Audio("http://www.nch.com.au/acm/8k16bitpcm.wav")
60 Audio("http://www.nch.com.au/acm/8k16bitpcm.wav")
61 Audio(url="http://media.bradsucks.net/albums/ooi-128/01_-_Brad_Sucks_-_Dropping_out_of_School.mp3")
61 Audio(url="http://www.w3schools.com/html/horse.ogg")
62 Audio(url="http://www.w3schools.com/html/horse.ogg", embed=True)
63
62
64 Audio('/path/to/sound.wav')
63 Audio('/path/to/sound.wav')
65 Audio(filename='/path/to/sound.ogg')
64 Audio(filename='/path/to/sound.ogg')
General Comments 0
You need to be logged in to leave comments. Login now