public class BeatModel extends java.lang.Object implements BeatModelInterface, javax.sound.midi.MetaEventListener
Modifier and Type | Field and Description |
---|---|
(package private) java.util.ArrayList<BeatObserver> |
beatObservers |
(package private) int |
bpm |
(package private) java.util.ArrayList<BPMObserver> |
bpmObservers |
(package private) javax.sound.midi.Sequence |
sequence |
(package private) javax.sound.midi.Sequencer |
sequencer |
(package private) javax.sound.midi.Track |
track |
Constructor and Description |
---|
BeatModel() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
beatEvent() |
void |
buildTrackAndStart() |
int |
getBPM() |
void |
initialize() |
javax.sound.midi.MidiEvent |
makeEvent(int comd,
int chan,
int one,
int two,
int tick) |
void |
makeTracks(int[] list) |
void |
meta(javax.sound.midi.MetaMessage message) |
void |
notifyBeatObservers() |
void |
notifyBPMObservers() |
void |
off() |
void |
on() |
void |
registerObserver(BeatObserver o) |
void |
registerObserver(BPMObserver o) |
void |
removeObserver(BeatObserver o) |
void |
removeObserver(BPMObserver o) |
void |
setBPM(int bpm) |
void |
setUpMidi() |
javax.sound.midi.Sequencer sequencer
java.util.ArrayList<BeatObserver> beatObservers
java.util.ArrayList<BPMObserver> bpmObservers
int bpm
javax.sound.midi.Sequence sequence
javax.sound.midi.Track track
public BeatModel()
public void initialize()
initialize
in interface BeatModelInterface
public void on()
on
in interface BeatModelInterface
public void off()
off
in interface BeatModelInterface
public void setBPM(int bpm)
setBPM
in interface BeatModelInterface
public int getBPM()
getBPM
in interface BeatModelInterface
void beatEvent()
public void registerObserver(BeatObserver o)
registerObserver
in interface BeatModelInterface
public void notifyBeatObservers()
public void registerObserver(BPMObserver o)
registerObserver
in interface BeatModelInterface
public void notifyBPMObservers()
public void removeObserver(BeatObserver o)
removeObserver
in interface BeatModelInterface
public void removeObserver(BPMObserver o)
removeObserver
in interface BeatModelInterface
public void meta(javax.sound.midi.MetaMessage message)
meta
in interface javax.sound.midi.MetaEventListener
public void setUpMidi()
public void buildTrackAndStart()
public void makeTracks(int[] list)
public javax.sound.midi.MidiEvent makeEvent(int comd, int chan, int one, int two, int tick)