Class: SocketSend

SocketSend

Send an lfo frame as a socket message to a node.source.SocketReceive instance.

Experimental

Constructor

new SocketSend()

Source:
Example
const eventIn = new lfo.source.EventIn({
  frameType: 'vector',
  frameSize: 2,
  frameRate: 1,
});

const socketSend = new lfo.sink.SocketSend({
  port: 3000
});

eventIn.connect(socketSend);

eventIn.init().then(() => {
  eventIn.start();

  let time = 0;

  (function createFrame() {
    eventIn.process(time, [Math.random(), Math.random()], { test: true });
    time += 1;

    setTimeout(createFrame, 1000);
  }());
});