A library for state synchronization between SuperCollider and Node.js using the Flux design pattern. State flows from a primary state store in Node.js to a replica in SuperCollider which can dispatch actions back to the Node.js store.
Intended for use with a primary state store in Node.js implemented with Redux. Provides StateStore
, a replica state store in SuperCollider which leverages the API quark to receive state changes and the JSON converter in supercolliderjs to dispatch actions back to Node.js.
The Node.js class SCStoreController
forwards state updates to a replica running in sclang and receives actions dispatched from it using a separate OSC channel.
When actions are dispatched from sclang to the replica StateStore
instance, they are passed up to the primary Node.js store via OSC, any reducers written in Node.js can update the state which will then be forwarded back to the replica. The primary / replica design promotes all state changes written as reducers in Redux, centralizing the state in the Node.js process.
All SuperCollider code is included in a quark inside the quarks/supercollider-redux
directory.
ReduxEventStreamPlayer
: This is a subclass ofEventStreamPlayer
which will dispatch actions each time an event from the stream is played. Very useful for modifying other state based on the playback of a Pattern, for example.SCReduxTempoClockController
- A wrapper for TempoClock which will take a tempo from the Redux store.
SCStoreController
- Sends initial state to SuperCollider StateStore
- Forwards subsequent state changes to it
- Creates an
OSCActionListener
to listen for actions
OSCActionListener
- Listens for actions on OSC port and dispatches to store