mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-11 13:48:40 +00:00
format
This commit is contained in:
parent
59bdfd2cb8
commit
099d321dbd
@ -441,6 +441,11 @@ export function resetGlobalEffects() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let activeSoundSources = new Map();
|
let activeSoundSources = new Map();
|
||||||
|
//music programs/audio gear usually increments inputs/outputs from 1, we need to subtract 1 from the input because the webaudio API channels start at 0
|
||||||
|
|
||||||
|
function mapChannelNumbers(channels) {
|
||||||
|
return (Array.isArray(channels) ? channels : [value.channels]).map((ch) => ch - 1);
|
||||||
|
}
|
||||||
|
|
||||||
export const superdough = async (value, t, hapDuration) => {
|
export const superdough = async (value, t, hapDuration) => {
|
||||||
const ac = getAudioContext();
|
const ac = getAudioContext();
|
||||||
@ -539,14 +544,10 @@ export const superdough = async (value, t, hapDuration) => {
|
|||||||
compressorRelease,
|
compressorRelease,
|
||||||
} = value;
|
} = value;
|
||||||
|
|
||||||
//music programs/audio gear usually increments inputs/outputs from 1, we need to subtract 1 from the input because the webaudio API channels start at 0
|
const orbitChannels = mapChannelNumbers(
|
||||||
const orbitChannels = (
|
multiChannelOrbits && orbit > 0 ? [orbit * 2 - 1, orbit * 2] : getDefaultValue('channels'),
|
||||||
multiChannelOrbits && orbit > 0 ? [orbit * 2 - 1, orbit * 2] : getDefaultValue('channels')
|
);
|
||||||
).map((ch) => ch - 1);
|
const channels = value.channels != null ? mapChannelNumbers(value.channels) : orbitChannels;
|
||||||
const channels =
|
|
||||||
value.channels != null
|
|
||||||
? (Array.isArray(value.channels) ? value.channels : [value.channels]).map((ch) => ch - 1)
|
|
||||||
: orbitChannels;
|
|
||||||
|
|
||||||
gain = applyGainCurve(nanFallback(gain, 1));
|
gain = applyGainCurve(nanFallback(gain, 1));
|
||||||
postgain = applyGainCurve(postgain);
|
postgain = applyGainCurve(postgain);
|
||||||
|
|||||||
@ -168,8 +168,13 @@ export function SettingsTab({ started }) {
|
|||||||
label="Multi Channel Orbits"
|
label="Multi Channel Orbits"
|
||||||
onChange={(cbEvent) => {
|
onChange={(cbEvent) => {
|
||||||
const val = cbEvent.target.checked;
|
const val = cbEvent.target.checked;
|
||||||
|
confirmDialog(RELOAD_MSG).then((r) => {
|
||||||
|
if (r == true) {
|
||||||
settingsMap.setKey('multiChannelOrbits', val);
|
settingsMap.setKey('multiChannelOrbits', val);
|
||||||
setMultiChannelOrbits(val);
|
setMultiChannelOrbits(val);
|
||||||
|
return window.location.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
value={multiChannelOrbits}
|
value={multiChannelOrbits}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user