How do I save audio output in Python using the music21 module? I have read the entire [user's guide](http://music21.readthedocs.org/en/latest/usersGuide/index.html] of said module, but I couldn't find any information about saving output as an audio file that can be recognised by windows without any additional software (MIDI for example).
If s
is your Stream
, just call:
fp = s.write('midi', fp='pathToWhereYouWantToWriteIt')
or to hear it immediately
s.show('midi')
Somewhere in this User's Guide Chapter 8, there is some important information about opening and saving file in many formats: http://web.mit.edu/music21/doc/usersGuide/usersGuide_08_installingMusicXML.html
if you have made your own music called 'stream1', you can easily save it as MIDI file like this:
stream1.write("midi", "blah.mid")
I am still new to this, but I think that's simpler than having to open file, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With