1 import javax.sound.midi.*;
4 * Functional representation of a MIDI track.
6 * @author Andersson, Andreen, Lanneskog, Pehrson
10 public class MooTrack {
12 private Collection notes;
14 private int instrument;
20 * Creates an empty MooTrack.
27 * Sets the MIDI channel of the current track.
28 * @param chan the number of the MIDI channel (1-16)
30 public void setChannel(int chan) {
35 * Sets the MIDI instrument of the current track.
36 * @param instr the number of the MIDI instrument (0-127)
38 public void setInstrument(int instr) {
43 * Returns the number of notes in the current track.
44 * @return the number of notes
46 public void getNumberOfNotes() {
51 * Adds the given note to the current track.
52 * @param note the MooNote to add
54 public void addNote(MooNote note) {
59 * Deletes the given note to the current track.
60 * @param note the MooNote to delete
62 public void deleteNote(MooNote note) {
67 * Returns the note of the given index.
68 * @param note the index of the note
70 public MooNote getNote(int note) {
75 * Makes the current track solo.
76 * @param set if the track should be solo
78 public void solo(boolean set) {
83 * Mutes the current track.
84 * @param set if the track should be muted
86 public void mute(boolean set) {
91 * Checks if the current track is solo.
92 * @return if the track is solo
95 public boolean isSolo() {
100 * Checks if the current track is muted.
101 * @return if the track is muted
103 public boolean isMute() {