Class TunePlayer


  • public class TunePlayer
    extends Object
    Any QBasic fans out there? ;-)
    Author:
    Curtis Rueden
    • 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()
      • play

        public boolean play​(String commandString)