mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-25 12:38:35 +00:00
send actual osc parameters
This commit is contained in:
parent
7fca7e6bd9
commit
0b8919de61
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import OSC from './node_modules/osc-js/lib/osc.js';
|
import OSC from './node_modules/osc-js/lib/osc.js';
|
||||||
import { Pattern, isPattern } from '@strudel.cycles/core/strudel.mjs';
|
import { Pattern, isPattern } from '@strudel.cycles/core/strudel.mjs';
|
||||||
//import {OSC} from 'osc-js';
|
//import {OSC} from 'osc-js';
|
||||||
@ -7,16 +6,12 @@ const comm = new OSC();
|
|||||||
comm.open();
|
comm.open();
|
||||||
|
|
||||||
Pattern.prototype.osc = function () {
|
Pattern.prototype.osc = function () {
|
||||||
return this._withEvent((event) => {
|
return this._withEvent((event) => {
|
||||||
const onTrigger = (time, event) => {
|
const onTrigger = (time, event) => {
|
||||||
//const keyvals = Object.entries(event.value).flat();
|
const keyvals = Object.entries(event.value).flat();
|
||||||
//const message = new OSC.Message("/dirt/play", ...keyvals);
|
const message = new OSC.Message('/dirt/play', ...keyvals);
|
||||||
const message = new OSC.Message(
|
comm.send(message);
|
||||||
'/dirt/play',
|
};
|
||||||
...['_id_', '1', 'cps', 0.5625, 'cycle', 412.3333435058594, 'delta', 0.592592716217041, 'orbit', 0, 's', 'hh'],
|
return event.setContext({ ...event.context, onTrigger });
|
||||||
);
|
});
|
||||||
comm.send(message);
|
|
||||||
};
|
|
||||||
return event.setContext({ ...event.context, onTrigger });
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user