org.scijava.util
Class TunePlayer

java.lang.Object
  extended by org.scijava.util.TunePlayer

public class TunePlayer
extends Object

Any QBasic fans out there? ;-)

Author:
Curtis Rueden

Constructor Summary
TunePlayer()
           
TunePlayer(int sampleRate)
           
 
Method Summary
 void closeLine(SourceDataLine line)
           
 void downOctave()
           
 int getMillis()
          Gets the current note length in milliseconds, by the current tempo.
 int getNoteLength()
           
 int getOctave()
           
 int getSampleRate()
           
 int getTempo()
           
 int getTone(int step, char mod)
          Gets the value of the given tone for the current octave.
 SourceDataLine openLine()
           
 boolean play(String commandString)
           
 void setNoteLength(int noteLength)
           
 void setOctave(int octave)
           
 void setTempo(int tempo)
           
 int toMillis(int noteLen)
          Converts the given note length to milliseconds, by the current tempo.
 void upOctave()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TunePlayer

public TunePlayer()

TunePlayer

public TunePlayer(int sampleRate)
Method Detail

getSampleRate

public int getSampleRate()

getNoteLength

public int getNoteLength()

getTempo

public int getTempo()

getOctave

public int getOctave()

getTone

public int getTone(int step,
                   char mod)
Gets the value of the given tone for the current octave.


getMillis

public int getMillis()
Gets the current note length in milliseconds, by the current tempo.


toMillis

public int toMillis(int noteLen)
Converts the given note length to milliseconds, by the current tempo.


setNoteLength

public void setNoteLength(int noteLength)

setTempo

public void setTempo(int tempo)

setOctave

public void setOctave(int octave)

downOctave

public void downOctave()

upOctave

public void upOctave()

openLine

public SourceDataLine openLine()
                        throws LineUnavailableException
Throws:
LineUnavailableException

closeLine

public void closeLine(SourceDataLine line)

play

public boolean play(String commandString)


Copyright © 2009–2014 SciJava. All rights reserved.