FLOSS Manuals

 English |  Español |  Français |  Italiano |  Português |  Русский |  Shqip

chuck update

Event Reference

events

Event

event handler

  • .signal() signals first waiting shred
  • .broadcast() signals all shreds
Event e;

fun void hi( Event ee)
{	
    ee => now;
    <<<"success">>>;
}

spork ~ hi(e);

1::second => now;
e.signal();
1::second => now;

MidiIn

MIDI receiver

extends Event

  • .open (int, READ/WRITE) set port to receive
  • .recv (MidiMsg, READ) receives MIDI input (see MIDI tutorial)

MidiOut

MIDI sender

extends Event

  • .open (int, READ/WRITE) set port to send
  • .send (MidiMsg, WRITE) sends MIDI output (see MIDI tutorial)

MidiMsg

MIDI data holder

  • .data1 (int, READ/WRITE) first byte of data (member variable)
  • .data2 (int, READ/WRITE) second byte of data (member variable)
  • .data3 (int, READ/WRITE) third byte of data (member variable) (see MIDI tutorial)

OscRecv

Open Sound Control receiver

  • .port (int, READ/WRITE) set port to receive
  • .listen () starts object listening to port
  • .event (string(name), string(type), READ/WRITE) define string for event to receive (see events tutorial)

OscSend

Open Sound Control sender

  • .setHost (string(host), int(port), READ/WRITE) set port on the host to receive
  • .startMsg (string(name), string(type), READ/WRITE)  define string for event to send (see events tutorial)

OscEvent

Open Sound Control event

extends Event

  • .nextMsg (int, READ) the number of messages in queue
  • .getFloat (float, READ) gets float from message
  • .getInt (int, READ) gets int from message (see events tutorial)

KBHit

ascii keyboard event

extends Event

  • .getchar (int, READ) ascii value
  • .more (int, READ only) returns 1 if multiple keys have been pressed (see events tutorial)

Hid

HID receiver

extends Event

  • .openJoystick (int which), (WRITE only) open joystick number
  • .openMouse (int which), (WRITE only) open mouse number
  • .openKeyboard (int which), (WRITE only) open keyboard number
  • .openTiltSensor() opens the sudden motion sensor on Apple notebooks
  • .globalPollRate( dur period) (OSX only) sets the poll-rate for the sudden motion sensor.
  • .open( string name ) open a hid device by name.
  • .num () return joystick/mouse/keyboard number
  • .recv (HidMsg, READ only) writes the next message available for this device to the argument
  • .read( int, int, HidMsg ) (int) TODO; figure out what this does
  • .name () return device name (see events tutorial)

HidMsg

HID data holder

  • .isAxisMotion (int, READ only) non-zero if this message corresponds to movement of a joystick axis
  • .isButtonDown (int, READ only) non-zero if this message corresponds to button down or key down of any device type
  • .isButtonUp (int, READ only) non-zero if this message corresponds to button up or key up of any device type
  • .isMouseMotion (int, READ only) non-zero if this message corresponds to motion of a pointing device
  • .isHatMotion (int, READ only) non-zero if this message corresponds to motion of a joystick hat, point-of-view switch, or directional pad
  • .which (int, READ/WRITE) HID element number (member variable)
  • .axisPosition (float, READ/WRITE) position of joystick axis in the range [-1.0, 1.0] (member variable)
  • .deltaX (float, READ/WRITE) change in X axis of pointing device (member variable)
  • .deltaY (float, READ/WRITE) change in Y axis of pointing device (member variable)
  • .deviceNum (float, READ/WRITE) device number which produced this message (member variable)
  • .deviceType (float, READ/WRITE) device type which produced this message (member variable)
  • .type (int, READ/WRITE) message/HID element type (member variable)
  • .idata (int, READ/WRITE) data (member variable)
  • .fdata (int, READ/WRITE) data (member variable) (see events tutorial)

There has been error in communication with Booktype server. Not sure right now where is the problem.

You should refresh this page.