Variable
Static Public Summary | ||
public |
AddActions: * add actions for specifying relationship of newly adding node to its targetID 0 add the new group to the the head of the group specified by the add target ID. |
|
public |
EventEmitter: * |
|
public |
STATES: * |
|
public |
dateToTimetag(date) |
|
public |
layer: * |
|
public |
timetagToDate(ntpTimeTag: Array): Date: * timetagToDate(ntpTimeTag) |
Static Public
public AddActions: * source
import {AddActions} from 'supercolliderjs/src/server/osc/msg.js'
add actions for specifying relationship of newly adding node to its targetID 0 add the new group to the the head of the group specified by the add target ID. 1 add the new group to the the tail of the group specified by the add target ID. 2 add the new group just before the node specified by the add target ID. 3 add the new group just after the node specified by the add target ID. 4 the new node replaces the node specified by the add target ID. The target node is freed.
public EventEmitter: * source
public dateToTimetag: * source
import {dateToTimetag} from 'supercolliderjs/src/server/osc/utils.js'
dateToTimetag(date)
Convert a JavaScript Date to a NTP timetag array [secondsSince1970, fractionalSeconds].
toBuffer
already accepts Dates for timetags so you might not need this function. If you need to schedule bundles with finer than millisecond accuracy then you could use this to help assemble the NTP array.
public timetagToDate(ntpTimeTag: Array): Date: * source
import {timetagToDate} from 'supercolliderjs/src/server/osc/utils.js'
timetagToDate(ntpTimeTag)
Convert a timetag array to a JavaScript Date object in your local timezone.
Received OSC bundles converted with fromBuffer
will have a timetag array:
[secondsSince1970, fractionalSeconds]
This utility is useful for logging. Accuracy is reduced to milliseconds,
but the returned Date object also has fractionalSecondsInt
and fractionalSecondsFloat
set if you need full accuracy (0.00000000023283 second, or 2^32 per second)