X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=MooNote.java;fp=MooNote.java;h=6ea6c39b6b6bfb369d6feca755dc194846dc5f06;hp=20047887f107cd03093927f86c2fb8851b37fe27;hb=d7666fadd2f8baca8a03cacae836f2563fe4dd5d;hpb=0c65653da8aecee944e4814ab2efda6a2ad57a94 diff --git a/MooNote.java b/MooNote.java index 2004788..6ea6c39 100644 --- a/MooNote.java +++ b/MooNote.java @@ -1,6 +1,6 @@ import javax.sound.midi.*; -/* +/** * Functional representation of a MIDI note, which adds functionality to the existent MidiEvent class. * Also provides a reference to the corresponding NoteOff event. * @@ -12,7 +12,7 @@ public class MooNote extends MidiEvent { protected MidiEvent noteOffEvent; protected ShortMessage noteOnMsg, noteOffMsg; - /* + /** * Creates a MooNote from the given NoteOn event in the current track. * @param noteOnEvent the NoteOn event of the note */ @@ -21,7 +21,7 @@ public class MooNote extends MidiEvent { noteOnMsg = (ShortMessage)getMessage(); } - /* + /** * Creates a MooNote from the given NoteOn event in the current track and creates a reference to * the corresponding NoteOff event. * @param noteOnEvent the NoteOn event of the note @@ -34,7 +34,7 @@ public class MooNote extends MidiEvent { noteOffMsg = (ShortMessage)noteOffEvent.getMessage(); } - /* + /** * Creates a MooNote of the given pitch, velocity and duration in the current track. * @param track the track to which the MooNote was added * @param channel the channel of the note (1-16) @@ -54,7 +54,7 @@ public class MooNote extends MidiEvent { } catch (InvalidMidiDataException e) {} } - /* + /** * Sets the channel of the current note. * @param channel the channel of the note (1-16) */ @@ -65,7 +65,7 @@ public class MooNote extends MidiEvent { } catch (InvalidMidiDataException e) {} } - /* + /** * Sets the pitch of the current note. * @param pitch the pitch of the note (0-127) */ @@ -76,7 +76,7 @@ public class MooNote extends MidiEvent { } catch (InvalidMidiDataException e) {} } - /* + /** * Sets the velocity of the current note. * @param vel the velocity of the note (0-127) */ @@ -87,7 +87,7 @@ public class MooNote extends MidiEvent { } catch (InvalidMidiDataException e) {} } - /* + /** * Sets the duration of the current note (or rather moves the note off event). * @param n the duration of the note in ticks (96 per beat) */ @@ -95,7 +95,7 @@ public class MooNote extends MidiEvent { if (hasNoteOffEvent()) noteOffEvent.setTick(getTick() + ticks); } - /* + /** * Sets the timestamp of the current note. * @param tick the timestamp of the note in ticks (96 per beat) */ @@ -104,7 +104,7 @@ public class MooNote extends MidiEvent { super.setTick(tick); } - /* + /** * Returns the channel of the current note. * @return the channel of the note (1-16) */ @@ -112,7 +112,7 @@ public class MooNote extends MidiEvent { return noteOnMsg.getChannel(); } - /* + /** * Returns the pitch of the current note. * @return the pitch of the note (0-127) */ @@ -120,7 +120,7 @@ public class MooNote extends MidiEvent { return noteOnMsg.getData1(); } - /* + /** * Returns the velocity of the current note. * @return the velocity of the note (0-127) */ @@ -128,7 +128,7 @@ public class MooNote extends MidiEvent { return noteOnMsg.getData2(); } - /* + /** * Returns the duration of the current note. * @return the duration of the note (in ticks) */ @@ -137,7 +137,7 @@ public class MooNote extends MidiEvent { return (int)(getTick() - noteOffEvent.getTick()); } - /* + /** * Returns whether the NoteOff event was found. * @return the note off MidiEvent */