add shared tunes test

This commit is contained in:
Felix Roos 2022-11-03 16:18:29 +01:00
parent f829f35cfa
commit ed44f4ed0c
4 changed files with 6375 additions and 0 deletions

View file

@ -65,6 +65,7 @@ const toneHelpersMocked = {
Chorus: MockedNode,
Freeverb: MockedNode,
Gain: MockedNode,
Reverb: MockedNode,
vol: mockNode,
out: id,
osc: id,
@ -116,17 +117,40 @@ strudel.Pattern.prototype.adsr = function () {
strudel.Pattern.prototype.out = function () {
return this;
};
strudel.Pattern.prototype.soundfont = function () {
return this;
};
// tune mock
strudel.Pattern.prototype.tune = function () {
return this;
};
strudel.Pattern.prototype.midi = function () {
return this;
};
const uiHelpersMocked = {
backgroundImage: id,
};
prebake({ isMock: true });
const canvasCtx = {
clearRect: () => {},
fillText: () => {},
fillRect: () => {},
canvas: {
width: 100,
height: 100,
},
};
const audioCtx = {
currentTime: 1,
};
const getDrawContext = () => canvasCtx;
const getAudioContext = () => audioCtx;
const loadSoundfont = () => {};
// TODO: refactor to evalScope
evalScope(
// Tone,
@ -146,6 +170,9 @@ evalScope(
// gist,
// euclid,
mini,
getDrawContext,
getAudioContext,
loadSoundfont,
// Tone,
},
);
@ -197,3 +224,7 @@ export const testCycles = {
hyperpop: 10,
festivalOfFingers3: 16,
};
// fixed: https://strudel.tidalcycles.org/?DBp75NUfSxIn (missing .note())
// bug: https://strudel.tidalcycles.org/?xHaKTd1kTpCn + https://strudel.tidalcycles.org/?o5LLePbx8kiQ