Skip to content

Instantly share code, notes, and snippets.

@ayota
Last active September 21, 2016 00:47
Show Gist options
  • Save ayota/d83822ac04225c052e4cdeb1c5d696fa to your computer and use it in GitHub Desktop.
Save ayota/d83822ac04225c052e4cdeb1c5d696fa to your computer and use it in GitHub Desktop.
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)
@ekim1394
Copy link

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)
``

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment