public void play ( Tune tune ) throws IllegalStateException { if ( m_isStarted ) { try { m_tune = tune ; Sequence sequence = m_converter . toMidiSequence ( m_tune ) ; seq . setSequence ( sequence ) ; seq . setTempoInBPM ( m_tempo ) ; seq . start ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } else throw new IllegalStateException ( "The player hasn't been started yet !" ) ; }
Plays the given tune .