mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-22 19:18:31 +00:00
add 1 to channel selection
This commit is contained in:
parent
25b2eb5783
commit
9aec18b3a0
@ -389,7 +389,7 @@ const generic_params = [
|
|||||||
*
|
*
|
||||||
* @param {number | Pattern} channels pattern the output channels
|
* @param {number | Pattern} channels pattern the output channels
|
||||||
* @example
|
* @example
|
||||||
* note("e a d b g").channels("2:3")
|
* note("e a d b g").channels("3:4")
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
['channels', 'ch'],
|
['channels', 'ch'],
|
||||||
|
|||||||
@ -103,8 +103,8 @@ export const connectToDestination = (input, channels = [0, 1]) => {
|
|||||||
numberOfOutputs: stereoMix.channelCount,
|
numberOfOutputs: stereoMix.channelCount,
|
||||||
});
|
});
|
||||||
stereoMix.connect(splitter);
|
stereoMix.connect(splitter);
|
||||||
channels.map((ch, i) => {
|
channels.forEach((ch, i) => {
|
||||||
splitter.connect(channelMerger, i % stereoMix.channelCount, ch);
|
splitter.connect(channelMerger, i % stereoMix.channelCount, clamp(ch, 0, ctx.destination.channelCount - 1));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -290,7 +290,7 @@ export const superdough = async (value, deadline, hapDuration) => {
|
|||||||
bpsustain = 1,
|
bpsustain = 1,
|
||||||
bprelease = 0.01,
|
bprelease = 0.01,
|
||||||
bandq = 1,
|
bandq = 1,
|
||||||
channels = [0, 1],
|
channels = [1, 2],
|
||||||
//phaser
|
//phaser
|
||||||
phaser,
|
phaser,
|
||||||
phaserdepth = 0.75,
|
phaserdepth = 0.75,
|
||||||
@ -323,7 +323,8 @@ export const superdough = async (value, deadline, hapDuration) => {
|
|||||||
compressorRelease,
|
compressorRelease,
|
||||||
} = value;
|
} = value;
|
||||||
|
|
||||||
channels = Array.isArray(channels) ? channels : [channels];
|
//music programs/audio gear usually labels channels 0,1 as 1,2 so imitate that behavior
|
||||||
|
channels = (Array.isArray(channels) ? channels : [channels]).map((ch) => ch - 1);
|
||||||
|
|
||||||
gain *= velocity; // legacy fix for velocity
|
gain *= velocity; // legacy fix for velocity
|
||||||
let toDisconnect = []; // audio nodes that will be disconnected when the source has ended
|
let toDisconnect = []; // audio nodes that will be disconnected when the source has ended
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user