mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-22 19:18:31 +00:00
cleaning up
This commit is contained in:
parent
4001cc9531
commit
a9d8e7ca82
@ -6,3 +6,4 @@ This program is free software: you can redistribute it and/or modify it under th
|
|||||||
|
|
||||||
export * from './midibridge.mjs';
|
export * from './midibridge.mjs';
|
||||||
export * from './utils.mjs';
|
export * from './utils.mjs';
|
||||||
|
export * from './oscbridge.mjs';
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { logger, parseNumeral, Pattern } from '@strudel.cycles/core';
|
import { parseNumeral, Pattern } from '@strudel.cycles/core';
|
||||||
import { Invoke } from './utils.mjs';
|
import { Invoke } from './utils.mjs';
|
||||||
|
|
||||||
Pattern.prototype.osc = function () {
|
Pattern.prototype.osc = function () {
|
||||||
@ -11,9 +11,9 @@ Pattern.prototype.osc = function () {
|
|||||||
controls.n && (controls.n = parseNumeral(controls.n));
|
controls.n && (controls.n = parseNumeral(controls.n));
|
||||||
controls.note && (controls.note = parseNumeral(controls.note));
|
controls.note && (controls.note = parseNumeral(controls.note));
|
||||||
|
|
||||||
const messagesfromjs = [];
|
|
||||||
const params = [];
|
const params = [];
|
||||||
const offset = Math.round((time - currentTime) * 1000 - 48);
|
|
||||||
|
const timestamp = Math.round(Date.now() + (time - currentTime) * 1000);
|
||||||
|
|
||||||
Object.keys(controls).forEach((key) => {
|
Object.keys(controls).forEach((key) => {
|
||||||
const val = controls[key];
|
const val = controls[key];
|
||||||
@ -29,10 +29,10 @@ Pattern.prototype.osc = function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const messagesfromjs = [];
|
||||||
if (params.length) {
|
if (params.length) {
|
||||||
messagesfromjs.push({ target: '/dirt/play', offset, params });
|
messagesfromjs.push({ target: '/dirt/play', timestamp, params });
|
||||||
}
|
}
|
||||||
console.log(messagesfromjs);
|
|
||||||
|
|
||||||
if (messagesfromjs.length) {
|
if (messagesfromjs.length) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@strudel/desktopbridge",
|
"name": "@strudel/desktopbridge",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "send midi messages between the JS and Tauri (Rust) sides of the Studel desktop app",
|
"description": "tools/shims for communicating between the JS and Tauri (Rust) sides of the Studel desktop app",
|
||||||
"main": "index.mjs",
|
"main": "index.mjs",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user