mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-24 12:08:28 +00:00
update webmidi + remove tone piano
This commit is contained in:
parent
854692f975
commit
a677b94297
1005
package-lock.json
generated
1005
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -44,7 +44,6 @@
|
|||||||
"c8": "^7.12.0",
|
"c8": "^7.12.0",
|
||||||
"events": "^3.3.0",
|
"events": "^3.3.0",
|
||||||
"gh-pages": "^4.0.0",
|
"gh-pages": "^4.0.0",
|
||||||
"happy-dom": "^6.0.4",
|
|
||||||
"jsdoc": "^3.6.10",
|
"jsdoc": "^3.6.10",
|
||||||
"jsdoc-json": "^2.0.2",
|
"jsdoc-json": "^2.0.2",
|
||||||
"jsdoc-to-markdown": "^7.1.1",
|
"jsdoc-to-markdown": "^7.1.1",
|
||||||
|
|||||||
@ -23,6 +23,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strudel.cycles/tone": "^0.2.0",
|
"@strudel.cycles/tone": "^0.2.0",
|
||||||
"tone": "^14.7.77",
|
"tone": "^14.7.77",
|
||||||
"webmidi": "^2.5.2"
|
"webmidi": "^3.0.21"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strudel.cycles/core": "^0.2.0",
|
"@strudel.cycles/core": "^0.2.0",
|
||||||
"@tonaljs/tonal": "^4.6.5",
|
"@tonaljs/tonal": "^4.6.5",
|
||||||
"webmidi": "^3.0.15"
|
"webmidi": "^3.0.21"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,6 @@
|
|||||||
"homepage": "https://github.com/tidalcycles/strudel#readme",
|
"homepage": "https://github.com/tidalcycles/strudel#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@strudel.cycles/core": "^0.2.0",
|
"@strudel.cycles/core": "^0.2.0",
|
||||||
"@tonejs/piano": "^0.2.1",
|
|
||||||
"chord-voicings": "^0.0.1",
|
"chord-voicings": "^0.0.1",
|
||||||
"tone": "^14.7.77"
|
"tone": "^14.7.77"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,8 +30,6 @@ const {
|
|||||||
getDestination,
|
getDestination,
|
||||||
Players,
|
Players,
|
||||||
} = Tone;
|
} = Tone;
|
||||||
import * as tonePiano from '@tonejs/piano';
|
|
||||||
const { Piano } = tonePiano;
|
|
||||||
import { getPlayableNoteValue } from '@strudel.cycles/core/util.mjs';
|
import { getPlayableNoteValue } from '@strudel.cycles/core/util.mjs';
|
||||||
|
|
||||||
// "balanced" | "interactive" | "playback";
|
// "balanced" | "interactive" | "playback";
|
||||||
@ -61,10 +59,6 @@ Pattern.prototype.tone = function (instrument) {
|
|||||||
instrument.triggerAttack(note, time);
|
instrument.triggerAttack(note, time);
|
||||||
} else if (instrument instanceof NoiseSynth) {
|
} else if (instrument instanceof NoiseSynth) {
|
||||||
instrument.triggerAttackRelease(hap.duration.valueOf(), time); // noise has no value
|
instrument.triggerAttackRelease(hap.duration.valueOf(), time); // noise has no value
|
||||||
} else if (instrument instanceof Piano) {
|
|
||||||
note = getPlayableNoteValue(hap);
|
|
||||||
instrument.keyDown({ note, time, velocity });
|
|
||||||
instrument.keyUp({ note, time: time + hap.duration.valueOf(), velocity });
|
|
||||||
} else if (instrument instanceof Sampler) {
|
} else if (instrument instanceof Sampler) {
|
||||||
note = getPlayableNoteValue(hap);
|
note = getPlayableNoteValue(hap);
|
||||||
instrument.triggerAttackRelease(note, hap.duration.valueOf(), time, velocity);
|
instrument.triggerAttackRelease(note, hap.duration.valueOf(), time, velocity);
|
||||||
@ -110,11 +104,6 @@ export const players = (options, baseUrl = '') => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
export const synth = (options) => new Synth(options);
|
export const synth = (options) => new Synth(options);
|
||||||
export const piano = async (options = { velocities: 1 }) => {
|
|
||||||
const p = new Piano(options);
|
|
||||||
await p.load();
|
|
||||||
return p;
|
|
||||||
};
|
|
||||||
|
|
||||||
// effect helpers
|
// effect helpers
|
||||||
export const vol = (v) => new Gain(v);
|
export const vol = (v) => new Gain(v);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user