问题
How I can get a wav from a musicxml file ? I tried this javascript package.
I am getting various errors, different for each file, but mostly
"Cannot read property 'score-partwise' of undefined"
. I can't seem to find anything else.
Do you know something reliable ?
回答1:
musicXML is a format that describes musical notation (scores). (not the actual soundwaves produced while playing something, like a wave recording in a *.wav file)
the xml can mostly be converted into MIDI notations, and given a MIDI synthesizer synthetic instruments can play the scores and this can generate the soundwaves found in a wav file.
almost all the converters out there go through this process XML->midi->wav
There is plenty of xml->midi converters. the quality of the wav file depends strongly on the midi->wav converter part.
I have only played the stuff, never actually produced files, but have never had any problems, using http://www.programfabriken.com/
回答2:
Just to quickly add this information here as well:
MusicXML are just the notes. To convert it to WAV, you'll need to actually "play" it.
As you need a font for displaying text, you need a way to make these notes play a sound. There are other ways, but what often is referred to as soundfonts had the best quality to me so far. As fonts contain a representation of each character, soundfonts contain a recording of each instrument played in a variation (normal, stacato, etc). As instruments and their players differ in sound, there also is quite a variety of soundfonts. If you want very good quality, I guess you'll have to buy a package like Logic Pro X by Apple, which currently contains a library of Over 2700 instrument and effect Patches
. Nevertheless, there are also quite some good free alternatives available. Here are some I found on a quick research:
- https://sites.google.com/site/soundfonts4u/
- http://www.backntracks.com/17-free-soundfont-sf2-sfz-drum-samples/
- http://www.synthfont.com/links_to_soundfonts.html
When you got hands on them, you'll just need a notation program which supports importing them, like the free MuseScore: https://musescore.org/en/handbook-sound-and-playback/soundfonts
But MuseScore seems to be a manual work. Maybe you can automize it, or you'd have to take a look for another program/library.
回答3:
Rosegarden 19.12 on Ubuntu 20.04 can import MusicXML and export MIDI. I just haven't gotten it to work on Ubuntu yet, likely due to: https://askubuntu.com/questions/510052/how-do-you-get-rosegarden-to-play-sound-when-playing-a-midi-in-it Then you can convert MIDI to anything with timidity + ffmpeg: Convert midi to mp3
来源:https://stackoverflow.com/questions/33775336/convert-musicxml-to-wav