toys
Class RhythmStream

java.lang.Object
  extended by java.awt.event.WindowAdapter
      extended by toys.RhythmStream
All Implemented Interfaces:
WindowFocusListener, WindowListener, WindowStateListener, EventListener, RhythmListener

public class RhythmStream
extends WindowAdapter
implements RhythmListener

Stream rhythm events to stdout.


Field Summary
private  int beats
          Count of beats in one takt.
private  List count
          We listen to all picks until closed.
 
Constructor Summary
RhythmStream(int per)
          Constructs a new rhythm stremer.
 
Method Summary
 void beat(RhythmEvent re)
          Any rhythm event dumps the time stamp to stdout.
static void main(String[] arg)
          Create a fram with a rhythm button in it.
 void windowClosing(WindowEvent we)
          On closing, we try to deduce the rhythm to notes.
 
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

private List count
We listen to all picks until closed.


beats

private int beats
Count of beats in one takt.

Constructor Detail

RhythmStream

public RhythmStream(int per)
Constructs a new rhythm stremer.

Method Detail

windowClosing

public void windowClosing(WindowEvent we)
On closing, we try to deduce the rhythm to notes.

Specified by:
windowClosing in interface WindowListener
Overrides:
windowClosing in class WindowAdapter

beat

public void beat(RhythmEvent re)
Any rhythm event dumps the time stamp to stdout.

Specified by:
beat in interface RhythmListener

main

public static void main(String[] arg)
Create a fram with a rhythm button in it.