> MIDI > Input / Output > Reading and Reusing MIDI file data | |||||
Reading and Reusing MIDI file dataIt can be useful to create musical material in other programs (such as sequencers) and bring it into jMusic.This class shows how parts from various MIDI files can be brought together in a jMusic score. This score can then itself be saved as a MIDI file - perhaps to find it's way back to a sequencer of other program. Here is an example of the output from the class Click here to view the source file Let's have a closer look.
Above is the whole file, apart from the composition method (shown below). Starting from the bottom the Play.midi(s); line does all the work of interest to this tutorial. It plays the score "s" via the JavaSound General MIDI sound set - as simple as that. The rest of the code is dedicated to building a score of 3 parts each with one phrase.
|
|||||