|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectopenpiano.notes.Blocks
public class Blocks
The Blocks class is a data-structure to handle single notes
| Constructor Summary | |
|---|---|
Blocks(Controller controller,
Settings settings,
int keys,
int tracks)
Constructs a data structure for single notes |
|
| Method Summary | |
|---|---|
void |
addNote(MidiNote midiNote,
int key,
int track,
float refTicks,
Boolean flatnote,
float position)
Adds a single note/block to the list |
int |
getNumKeys()
Returns the number of used keys |
int |
getNumTracks()
Return the number of used tracks |
void |
handleKeyPressed(LinkedList<Boolean> isVisualOn,
LinkedList<Boolean> isAudioOn)
Handles the keys pressed by the user according to the available notes |
void |
handleLateCleanup()
Handle the blocks marked for late cleanup |
void |
setAwaitNotes(Boolean awaitNotes)
Set the status of the await notes function |
void |
setCurrentPosition(float position)
Sets the current position in the 3D environment |
void |
setCurrentTick(long tick)
Sets the current tick |
void |
setKeyPressed(int key)
Set a key on all tracks to status pressed |
void |
setKeyReleased(int key)
Sets a key on all tracks to status released |
void |
setLastVisibleTick(long tick)
Sets the distance of visible ticks |
void |
setMarkKeys(Boolean markKeys)
Sets the status of the mark key function |
void |
setReverse(Boolean reverse)
Sets the reverse status |
void |
showBlocks(int key,
int track,
Boolean useable,
Boolean audio,
Boolean visual,
Boolean markKeys)
Draw the blocks |
void |
updateBlocks(int key,
int track,
Boolean audio,
Boolean visual)
Updates the pointer to the current block |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Blocks(Controller controller,
Settings settings,
int keys,
int tracks)
controller - the main controller of the applicationsettings - the settings objectkeys - the amount of keys of the pianotracks - the amount of tracks in the MIDI file| Method Detail |
|---|
public void addNote(MidiNote midiNote,
int key,
int track,
float refTicks,
Boolean flatnote,
float position)
midiNote - the note according to the MIDI filekey - the key as defined by the notetrack - the track according to the MIDI filerefTicks - a reference for the displayed sizeflatnote - true if note is a flat noteposition - the position in 3d space according to the start tick of the notepublic int getNumKeys()
public int getNumTracks()
public void handleKeyPressed(LinkedList<Boolean> isVisualOn,
LinkedList<Boolean> isAudioOn)
isVisualOn - List of tracks, true if the track's video function is selectedisAudioOn - List of tracks, true if the track's audio function is selectedpublic void handleLateCleanup()
public void setAwaitNotes(Boolean awaitNotes)
awaitNotes - true if await notes function should be enabledpublic void setKeyPressed(int key)
key - the relevant keypublic void setKeyReleased(int key)
key - the relevant keypublic void setCurrentPosition(float position)
position - the current positionpublic void setCurrentTick(long tick)
tick - the current tickpublic void setLastVisibleTick(long tick)
tick - the visible tickspublic void setMarkKeys(Boolean markKeys)
markKeys - true if mark keys function should be enabledpublic void setReverse(Boolean reverse)
reverse - true to set the reverse status
public void showBlocks(int key,
int track,
Boolean useable,
Boolean audio,
Boolean visual,
Boolean markKeys)
key - the relevant keytrack - the relevant trackuseable - true if corresponding key is playableaudio - true if audio function is selectedvisual - true if video function is selectedmarkKeys - true if mark keys function is selected
public void updateBlocks(int key,
int track,
Boolean audio,
Boolean visual)
key - the relevant keytrack - the relevant trackaudio - true if audio function is selectedvisual - true if video function is selected
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||