mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-26 13:08:28 +00:00
codeformat
This commit is contained in:
parent
b98ebc696d
commit
43523b73c4
@ -1622,7 +1622,6 @@ export const ar = register('ar', (t, pat) => {
|
|||||||
*/
|
*/
|
||||||
export const { midichan } = registerControl('midichan');
|
export const { midichan } = registerControl('midichan');
|
||||||
|
|
||||||
|
|
||||||
export const { midimap } = registerControl('midimap');
|
export const { midimap } = registerControl('midimap');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -180,6 +180,8 @@ function normalize(value = 0, min = 0, max = 1, exp = 1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function mapCC(mapping, value) {
|
function mapCC(mapping, value) {
|
||||||
|
console.log('mapping', mapping);
|
||||||
|
console.log('value', value);
|
||||||
return Object.keys(value)
|
return Object.keys(value)
|
||||||
.filter((key) => !!mapping[getControlName(key)])
|
.filter((key) => !!mapping[getControlName(key)])
|
||||||
.map((key) => {
|
.map((key) => {
|
||||||
@ -340,6 +342,7 @@ Pattern.prototype.midi = function (output) {
|
|||||||
velocity = gain * velocity;
|
velocity = gain * velocity;
|
||||||
// if midimap is set, send a cc messages from defined controls
|
// if midimap is set, send a cc messages from defined controls
|
||||||
if (midicontrolMap.has(midimap)) {
|
if (midicontrolMap.has(midimap)) {
|
||||||
|
console.log('midimap', midimap);
|
||||||
const ccs = mapCC(midicontrolMap.get(midimap), hap.value);
|
const ccs = mapCC(midicontrolMap.get(midimap), hap.value);
|
||||||
ccs.forEach(({ ccn, ccv }) => sendCC(ccn, ccv, device, midichan, timeOffsetString));
|
ccs.forEach(({ ccn, ccv }) => sendCC(ccn, ccv, device, midichan, timeOffsetString));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user