Hi.
Are there any plans to implement parsing voices, exporting them to
MIDI or displaying them in the generated scores?
On Nov 21 2010, 3:36 pm, iubito <
iub...@gmail.com> wrote:
> I've just commited in SVN trunk a major change in abc.notation
> package.
>
> Music is not in Tune.java, it has its own .java file.
> Music no more extends Vector, it contains a collection ofVoiceVoiceextends Vector and contains the datas (music elements).
>
> /!\ Your code may not compile /!\
> the fixes should be easy :
> 1) replace : import abc.notation.Tune.Music;
> by : import abc.notation.Music;
> 2) replace : Tune.Music myMusic = myTune.getMusic();
> by : Music myMusic = myTune.getMusic();
> 3) replace : for (int i = 0; i<myMusic.size(); i++) { ...
> myMusic.elementAt(i)... }
> by :Voicevoice= myMusic.getVoice(1);
> for (int i = 0; i<voice.size(); i++) { ...voice.elementAt(i)... }
>
> to iterate over all voices, use myMusic.getVoices().iterator();
>
> To make it clear, here is the structure of a Tune
> Tune :
> - title(s)
> - composer
> - ... other textual infos
> - defaultPart (if no P:x instruction it's the only Part of the Tune,
> else it contains the data before P:A)
> - parts
> - getMusicForGraphicalRendition() <- optimised for printing/displaying
> - getMusic() <- a bit raw...
> - getMusicForAudioRendition() <- will (todo job) be optimised for
> audio converting (MIDI)
>
> Part :
> - label
> - music
>
> Music :
> - voices
> - addElement(voiceNumber, musicElement)
> - someVoicemethods kept for compatibility, which apply on firstvoice
> - append(Music) <- used by Tune.getMusic...() to append parts
>
> Voices (extends Vector) :
> - vector of music element
> - instrument, volume and other MIDI-like infos
> - addElement(musicElement)
> - getLowest/getHighest/... useful methods manipulating music elements
>
> There is also a concept of Bar which is not yet used but will help to
> know what is in bar number 2 onvoice1 andvoice2 for example.
>
> This is just in the music model. Parser doesn't parse voices in ABC,
> MusicXML and MIDI doesn't export them, or badly. JTune printsvoice1
> thenvoice2, there is some new job to there :-)