Merge pull request #237 from tidalcycles/tidal-drum-machines

Tidal drum machines
This commit is contained in:
Felix Roos 2022-11-01 00:36:14 +01:00 committed by GitHub
commit 3741ffbb59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 4889 additions and 2297 deletions

View file

@ -246,6 +246,7 @@ export const webaudioOutput = async (hap, deadline, hapDuration) => {
let {
freq,
s,
bank,
sf,
clip = 0, // if 1, samples will be cut off when the hap ends
n = 0,
@ -281,6 +282,9 @@ export const webaudioOutput = async (hap, deadline, hapDuration) => {
gain *= velocity; // legacy fix for velocity
// the chain will hold all audio nodes that connect to each other
const chain = [];
if (bank && s) {
s = `${bank}_${s}`;
}
if (typeof s === 'string') {
[s, n] = splitSN(s, n);
}