Package nl.tue.id.oocsi

# Class EventRecorder

java.lang.Object
nl.tue.id.oocsi.EventRecorder

    public class EventRecorder
    extends java.lang.Object

OOCSI looper is an event recorder client that listens on an OOCSI channel and records all incoming events on that channel. Later on, the OOCSI looper can play recorded event back through the same channel. The looper can also store recorded events to a file (in MIDI format) and load them back from file.

Author:
  matsfunk

- ## Field Summary

  Fields
  Modifier and Type | Field | Description
  --- | --- | ---
  `static int` | `PLAY_TO_CHANNEL` |
  `static int` | `PLAY_TO_SENDER` |

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `EventRecorder​(OOCSI oocsi, java.lang.String channelName)` |
  `EventRecorder​(OOCSI oocsi, java.lang.String channelName, int playBackBehavior)` |

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `void` | `loadSequence​(java.lang.String filename)` | loads the active sequence from a MIDI file with given file name
  `void` | `pause()` | pause play-back
  `void` | `play()` | plays back the active sequence from position 0
  `void` | `recordEvent​(java.lang.String track, java.lang.String message)` | record an event to the active sequence and track; needs record to be called before
  `void` | `resume()` | resume play-back
  `void` | `saveSequence​(java.lang.String filename)` | saves the active sequence in a MIDI file with given file name
  `boolean` | `startRecording()` | activate recording to a new sequence with a new single track; subsequent calls to recordEvent will record an event to that sequence and track
  `void` | `stop()` | stop play-back and reset current position to beginning of sequence (tick 0)
  `void` | `stopRecording()` | deactivate recording; subsequent calls to recordEvent will not anymore record an event to that sequence and track until recording is started again

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### PLAY_TO_CHANNEL

    public static final int PLAY_TO_CHANNEL
    See Also:
      Constant Field Values

  - ### PLAY_TO_SENDER

    public static final int PLAY_TO_SENDER
    See Also:
      Constant Field Values

- ## Constructor Details

  - ### EventRecorder

    public EventRecorder​(OOCSI oocsi, java.lang.String channelName)

  - ### EventRecorder

    public EventRecorder​(OOCSI oocsi, java.lang.String channelName, int playBackBehavior)

- ## Method Details

  - ### play

    public void play()
    plays back the active sequence from position 0

  - ### pause

    public void pause()
    pause play-back

  - ### resume

    public void resume()
    resume play-back

  - ### stop

    public void stop()
    stop play-back and reset current position to beginning of sequence (tick 0)

  - ### recordEvent

    public void recordEvent​(java.lang.String track, java.lang.String message)
    record an event to the active sequence and track; needs record to be called before
    Parameters:
      `track` -
      `message` -

  - ### startRecording

    public boolean startRecording()
    activate recording to a new sequence with a new single track; subsequent calls to recordEvent will record an event to that sequence and track
    Returns:

  - ### stopRecording

    public void stopRecording()
    deactivate recording; subsequent calls to recordEvent will not anymore record an event to that sequence and track until recording is started again

  - ### saveSequence

    public void saveSequence​(java.lang.String filename)
    saves the active sequence in a MIDI file with given file name
    Parameters:
      `filename` -

  - ### loadSequence

    public void loadSequence​(java.lang.String filename)
    loads the active sequence from a MIDI file with given file name
    Parameters:
      `filename` -