openpiano.settings
Class MidiSettings

java.lang.Object
  extended by openpiano.settings.MidiSettings

public class MidiSettings
extends Object

Class for global MIDI file settings

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

Constructor Summary
MidiSettings(String md5Hash)
          Constructs a new MIDI file setting
MidiSettings(String md5Hash, int keyboardTrack, int bpmFactor, Boolean awaitNotes, Boolean markKeys)
          Constructs a new MIDI file setting
 
Method Summary
 void addMidiTrackSetting(MidiTrackSettings midiTrackSetting)
          Adds custom settings for a track of a MIDI file
 int getBeatsPerMinuteFactor()
          Returns the speed factor for beats per minute
 int getKeyboardTrack()
          Returns the track played by the keyboard
 String getMD5Hash()
          Returns the hash sum of the MIDI file
 LinkedList<MidiTrackSettings> getMidiTrackSettings()
          Returns a list of all track settings
 Boolean isAwaitNotesOn()
          Return true if the await notes function is selected
 Boolean isMarkKeysOn()
          Return true if the mark keys function is selected
 void setAwaitNotesOn(Boolean awaitNotes)
          Sets the status of the await notes function
 void setBeatsPerMinuteFactor(int bpmFactor)
          Sets the speed factor for beats per minute
 void setKeyboardTrack(int keyboardTrack)
          Sets the track played by the keyboard
 void setMarkKeysOn(Boolean markKeys)
          Sets the status of the mark keys function
 void setMD5Hash(String md5Hash)
          Sets the hash sum to identify the MIDI file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidiSettings

public MidiSettings(String md5Hash)
Constructs a new MIDI file setting

Parameters:
md5Hash - the hash sum to identify the MIDI file

MidiSettings

public MidiSettings(String md5Hash,
                    int keyboardTrack,
                    int bpmFactor,
                    Boolean awaitNotes,
                    Boolean markKeys)
Constructs a new MIDI file setting

Parameters:
md5Hash - the hash sum to identify the MIDI file
keyboardTrack - the track played by the keyboard
bpmFactor - the speed factor for beats per minute
awaitNotes - true if await notes function is selected
markKeys - true if mark keys function is selected
Method Detail

getMD5Hash

public String getMD5Hash()
Returns the hash sum of the MIDI file

Returns:
the hash sum of the MIDI file

getKeyboardTrack

public int getKeyboardTrack()
Returns the track played by the keyboard

Returns:
the track played by the keyboard

getBeatsPerMinuteFactor

public int getBeatsPerMinuteFactor()
Returns the speed factor for beats per minute

Returns:
the speed factor for beats per minute

isAwaitNotesOn

public Boolean isAwaitNotesOn()
Return true if the await notes function is selected

Returns:
true if the await notes function is selected

isMarkKeysOn

public Boolean isMarkKeysOn()
Return true if the mark keys function is selected

Returns:
true if the mark keys function is selected

setMD5Hash

public void setMD5Hash(String md5Hash)
Sets the hash sum to identify the MIDI file

Parameters:
md5Hash - the hash sum to identify the MIDI file

setKeyboardTrack

public void setKeyboardTrack(int keyboardTrack)
Sets the track played by the keyboard

Parameters:
keyboardTrack - the track played by the keyboard

setBeatsPerMinuteFactor

public void setBeatsPerMinuteFactor(int bpmFactor)
Sets the speed factor for beats per minute

Parameters:
bpmFactor - the speed factor for beats per minute

setAwaitNotesOn

public void setAwaitNotesOn(Boolean awaitNotes)
Sets the status of the await notes function

Parameters:
awaitNotes - true if the await notes function should be enabled

setMarkKeysOn

public void setMarkKeysOn(Boolean markKeys)
Sets the status of the mark keys function

Parameters:
markKeys - true if the mark keys function should be enabled

addMidiTrackSetting

public void addMidiTrackSetting(MidiTrackSettings midiTrackSetting)
Adds custom settings for a track of a MIDI file

Parameters:
midiTrackSetting - the settings for the track

getMidiTrackSettings

public LinkedList<MidiTrackSettings> getMidiTrackSettings()
Returns a list of all track settings

Returns:
the list of all track settings