Skip to content

Instantly share code, notes, and snippets.

@gpirrotta
Last active October 15, 2022 17:17
Show Gist options
  • Save gpirrotta/28acbfd7676f35d7d6dd306f87ef26cb to your computer and use it in GitHub Desktop.
Save gpirrotta/28acbfd7676f35d7d6dd306f87ef26cb to your computer and use it in GitHub Desktop.
Violin-piano data sonification
from music21 import converter,instrument
s = converter.parse('../sounds/cad-piano.mid')
for p in s.parts:
p.insert(0, instrument.Violin())
s.write('midi', '../sounds/cad-violino.mid')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment