Create tools for compiling waves

This commit is contained in:
Bartłomiej Pluta
2019-07-30 16:41:49 +02:00
parent a7de7f0279
commit aca6e6bb55
5 changed files with 172 additions and 204 deletions

View File

@@ -13,17 +13,15 @@ def pause(value, bpm):
time.sleep(60 * 4 / value / bpm)
def plot(note, config):
Y = sineForNote(note, config)
X = np.arange(len(Y))
plt.plot(X, Y)
def plot(wave):
X = np.arange(len(wave))
plt.plot(X, wave)
plt.show()
def play(notes, config):
compiled = compilePolyphony(notes, config)
sd.play(compiled)
time.sleep(len(compiled) / FS)
def play(wave):
sd.play(wave)
time.sleep(len(wave) / FS)
def compilePolyphony(notes, config):