show NONE for new item

This commit is contained in:
Kieran McAuliffe 2024-07-22 16:19:03 +02:00
parent 6e1da9fb59
commit 863c24900a
4 changed files with 10 additions and 9 deletions

View File

@ -51,7 +51,7 @@ function enumerate(name, inval, count, keys, vals){
});
}
window.max.outlet(name + " " + output);
if (name !== "NONE")
window.max.outlet(name + " " + output);
}

View File

@ -47,7 +47,7 @@
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 493.0, 444.0, 161.0, 35.0 ],
"text" : "\"harmoniclarity 0.572005391276114\""
"text" : "\"harmoniclarity 0.1955362124045653\""
}
}
@ -81,7 +81,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 1054.0, 325.0, 150.0, 60.0 ],
"patching_rect" : [ 1039.0, 50.0, 150.0, 60.0 ],
"text" : "You can use the `phase` control to phase offset two LFOs of the same frequency"
}
@ -143,7 +143,7 @@
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 115.0, 201.0, 197.0, 47.0 ],
"text" : "This parameter is defined in the modulators, and when sent will act as the center value for that LFO"
"text" : "This parameter is defined in the modulators, and when sent will act as the low value for that LFO"
}
}
@ -301,7 +301,7 @@
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 438.52631402015686, 108.0, 611.105266809463501, 325.0 ],
"patching_rect" : [ 438.52631402015686, 115.0, 643.105266809463501, 318.0 ],
"rendermode" : 0,
"url" : "file://lfogui.html"
}

View File

@ -48,7 +48,7 @@ function MasterLfoHandler(){
const [modCenterVals, setModCenterVals] = React.useState({});
const [shapeArr, setShapeArr] = React.useState(Array(MAXLFOS).fill('Sine'));
const [djParamArr, setDjParamArr] = React.useState(Array(MAXLFOS).fill('attenuation'));
const [djParamArr, setDjParamArr] = React.useState(Array(MAXLFOS).fill('NONE'));
const [freqArr, setFreqArr] = React.useState(Array(MAXLFOS).fill('1'));
const [ampArr, setAmpArr] = React.useState(Array(MAXLFOS).fill('1'));

View File

@ -3,7 +3,7 @@
/////////////////////////
var SHAPETYPES = ["Sine", "SawUp", "SawDown", "Tri", "Square"];
const MODPARAMOPTIONS = ["stream", "pulse_length", "eventfulness", "event_length", "metriclarity",
const MODPARAMOPTIONS = ["NONE", "stream", "pulse_length", "eventfulness", "event_length", "metriclarity",
"harmoniclarity", "melodic_cohesion", "melody_scope", "tonic_pitch", "pitch_center", "pitch_range", "dynamics",
"attenuation", "chordal_weight", "tonality-profile", "ostinato-buffer", "ostinato", "meter", "scale"];
@ -54,7 +54,8 @@ function operateModulators(visibleArr, paramNames, centers, freqs, amps, waveTyp
center = centers[name];
}
let output = operateModulator(center, freqs[i], amps[i], waveTypes[i], phaseArr, i, name, time);
window.dispatchEvent(new CustomEvent('enum', {'detail' : [name, output]}));
if (name !== "NONE")
window.dispatchEvent(new CustomEvent('enum', {'detail' : [name, output]}));
}
}
}