Last active
September 21, 2016 00:47
-
-
Save ayota/d83822ac04225c052e4cdeb1c5d696fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import scikits.audiolab | |
import scipy | |
f = 440 | |
fs = 11025 #22050 | |
T = 0.1 | |
x = scipy.cos((2*scipy.pi*f/fs)*scipy.arange(fs*T)) | |
for y in range(0,1000): | |
scikits.audiolab.play(x*y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
num = np.random.rand(1,3) #initialize
sheet_music = np.vstack(num)
for i in range (0,8): #number of notes in sheet_music
notes = np.random.rand(1,3)
i += 1
sheet_music = np.append(sheet_music, notes, axis=0)
``