openpiano.notes
Class Notes

java.lang.Object
  extended by openpiano.notes.Notes

public class Notes
extends Object

The Notes class is the central class to manage blocks

Version:
1.0, 07/30/08
Author:
Sascha Westermann

Constructor Summary
Notes(Controller controller, Settings settings)
          Constructs a new Notes object for a 88 key piano without any pre-loaded notes
 
Method Summary
 void sendKey(int key, int velocity)
          Sends a piano key to a the corresponding block, if available
 void setNotes(MidiLoader midiLoader)
          Sets new notes to handle
 void setTick(long currentTick, Boolean isSliding)
          Sets the actual tick and performs updates to blocks
 void showLines()
          Shows the lines behind the piano keys
 void showNotes()
          Shows the notes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Notes

public Notes(Controller controller,
             Settings settings)
Constructs a new Notes object for a 88 key piano without any pre-loaded notes

Parameters:
controller - the main controller of the application
Method Detail

sendKey

public void sendKey(int key,
                    int velocity)
Sends a piano key to a the corresponding block, if available

Parameters:
key - the affected key
velocity - the velocity of the key, a velocity of 0 means release key

setNotes

public void setNotes(MidiLoader midiLoader)
Sets new notes to handle

Parameters:
midiLoader - a MidiLoader object handling a MIDI file

setTick

public void setTick(long currentTick,
                    Boolean isSliding)
Sets the actual tick and performs updates to blocks

Parameters:
currentTick - the actual tick in the MIDI file
isSliding - true if the user is using the slider

showLines

public void showLines()
Shows the lines behind the piano keys


showNotes

public void showNotes()
Shows the notes