fix test error

- add mock 'midin' and 'sysex'
- typo in sysex example
This commit is contained in:
nkymut
2025-01-25 01:12:38 +08:00
parent d06a75a2cd
commit 393d17a41b
3 changed files with 81 additions and 2 deletions
+14 -1
View File
@@ -11,7 +11,7 @@ import * as webaudio from '@strudel/webaudio';
import { mini, m } from '@strudel/mini/mini.mjs';
// import * as voicingHelpers from '@strudel/tonal/voicings.mjs';
// import euclid from '@strudel/core/euclid.mjs';
// import '@strudel/midi/midi.mjs';
//import '@strudel/midi/midi.mjs';
import * as tonalHelpers from '@strudel/tonal';
import '@strudel/xen/xen.mjs';
// import '@strudel/xen/tune.mjs';
@@ -122,6 +122,10 @@ strudel.Pattern.prototype.midi = function () {
return this;
};
strudel.Pattern.prototype.midin = function () {
return this;
};
strudel.Pattern.prototype._scope = function () {
return this;
};
@@ -164,6 +168,12 @@ const loadCsound = () => {};
const loadCSound = () => {};
const loadcsound = () => {};
const midin = () => {
return (ccNum) => strudel.ref(() => 0); // returns ref with default value 0
};
const sysex = ([id, data]) => {};
// TODO: refactor to evalScope
evalScope(
// Tone,
@@ -172,6 +182,7 @@ evalScope(
uiHelpersMocked,
webaudio,
tonalHelpers,
/*
toneHelpers,
voicingHelpers,
@@ -179,6 +190,8 @@ evalScope(
uiHelpers,
*/
{
midin,
sysex,
// gist,
// euclid,
csound: id,