Commit afbed979 authored by Simon Klüttermann's avatar Simon Klüttermann

q

parent 27d3a738
acsong.png

61 KB | W: | H:

acsong.png

61.9 KB | W: | H:

acsong.png
acsong.png
acsong.png
acsong.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -18,8 +18,11 @@ pm = pretty_midi.PrettyMIDI(initial_tempo=80)
# The instruments list from our PrettyMIDI instance starts empty
# print(pm.instruments)
np.random.seed(12)
inst = pretty_midi.Instrument(program=42, is_drum=False, name='my cello')
# inst = pretty_midi.Instrument(program=42, is_drum=False, name='my cello')
inst = pretty_midi.Instrument(program=15, is_drum=False, name='my cello')
pm.instruments.append(inst)
......@@ -163,6 +166,8 @@ sps=16000
duration_s=len(q)/sps
np.savez_compressed("data",q=q)
# Play the waveform out the speakers
sd.play(q, sps)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment