Show More
@@ -18,8 +18,12 b' class Audio(DisplayObject):' | |||
|
18 | 18 | Parameters |
|
19 | 19 | ---------- |
|
20 | 20 | data : numpy array, list, unicode, str or bytes |
|
21 |
Can be |
|
|
21 | Can be one of | |
|
22 | ||
|
22 | 23 | * Numpy 1d array containing the desired waveform (mono) |
|
24 | * Numpy 2d array containing waveforms for each channel. | |
|
25 | Shape=(NCHAN, NSAMPLES). For the standard channel order, see | |
|
26 | http://msdn.microsoft.com/en-us/library/windows/hardware/dn653308(v=vs.85).aspx | |
|
23 | 27 | * List of float or integer representing the waveform (mono) |
|
24 | 28 | * String containing the filename |
|
25 | 29 | * Bytestring containing raw PCM data or |
@@ -58,6 +62,11 b' class Audio(DisplayObject):' | |||
|
58 | 62 | data = np.sin(2*np.pi*220*t) + np.sin(2*np.pi*224*t)) |
|
59 | 63 | Audio(data,rate=framerate) |
|
60 | 64 | |
|
65 | # Can also do stereo or more channels | |
|
66 | dataleft = np.sin(2*np.pi*220*t) | |
|
67 | dataright = np.sin(2*np.pi*224*t) | |
|
68 | Audio([dataleft, dataright],rate=framerate) | |
|
69 | ||
|
61 | 70 | Audio("http://www.nch.com.au/acm/8k16bitpcm.wav") # From URL |
|
62 | 71 | Audio(url="http://www.w3schools.com/html/horse.ogg") |
|
63 | 72 |
General Comments 0
You need to be logged in to leave comments.
Login now