19 Commits

Author SHA1 Message Date
b850440287 improved text placement 2025-07-29 14:10:14 +02:00
7ac026f35f initial help patch 2025-07-22 15:27:16 +02:00
7cb4180d97 Merge pull request 'setting viewMode directly from Max' (#16) from viewMode-max into main
Reviewed-on: #16
2025-07-21 16:15:52 +02:00
51767ff058 setting viewMode directly from Max 2025-07-21 16:14:12 +02:00
Eveline-97
fe68764e7d fix aligning 2025-07-02 14:29:59 +02:00
Eveline-97
40d0927a0e streamline layout patch 2025-07-02 12:16:30 +02:00
Eveline-97
92b7545e90 match Max layout to jweb 2025-07-02 12:07:53 +02:00
Eveline-97
4912b398dd Merge remote-tracking branch 'refs/remotes/origin/main'
merge
2025-07-01 16:34:50 +02:00
Eveline-97
02d5c6e914 cleanup modulator table 2025-07-01 16:34:27 +02:00
13f3a18c4c Merge pull request 'bpatcher-embed' (#15) from bpatcher-embed into main
Reviewed-on: #15
2025-07-01 16:32:05 +02:00
f21220e7b2 Merge branch 'main' into bpatcher-embed 2025-07-01 16:31:40 +02:00
fe165b77e5 working saving for bpatcher 2025-07-01 16:30:08 +02:00
Eveline-97
a7b0de9e66 navigation bar 2025-07-01 16:15:41 +02:00
43d37f215f Merge branch 'main' into bpatcher-embed 2025-07-01 16:12:51 +02:00
Eveline-97
c1a0a4d919 basic design 2025-07-01 15:04:49 +02:00
e2f33b8ba7 Merge pull request 'properly saving on adding rows, changing enum length, changing enum params' (#14) from hotfix into main
Reviewed-on: #14
2025-07-01 09:54:22 +02:00
64da80b742 WIP 2025-07-01 09:25:27 +02:00
0b7dbbb775 Merge branch 'main' into bpatcher-embed 2025-06-30 12:00:29 +02:00
541ab6d459 created initial bpatcher file and maxhelp 2025-06-30 11:44:03 +02:00
7 changed files with 5240 additions and 2880 deletions

1540
ModEnum.maxhelp Normal file

File diff suppressed because it is too large Load Diff

3345
ModEnum.maxpat Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,14 @@
* { * {
--locked-color: #5fadbf; --locked-color: #5fadbf;
--unlocked-color: #ff5153; --unlocked-color: #ff5153;
} }
:root { :root {
--background: ivory; --background: white;
--active: royalblue; --active: royalblue;
--nonactive: lightsteelblue; --nonactive: rgb(205, 205, 205);
--alert: red; --alert: red;
--textcolor: #737373; --textcolor: black;
} }
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@@ -21,49 +21,143 @@ body {
font-family: "Poppins", sans-serif; font-family: "Poppins", sans-serif;
} }
html, body { html,
width: 100%; body {
height: 100%; width: 100%;
margin: 0px; height: 100%;
border: 0; margin: 0px;
overflow-x: hidden; /* no horizontal scrollbar*/ border: 0;
overflow-y: scroll; overflow-x: scroll;
display: block; /* No floating content on sides */ overflow-y: scroll;
display: block;
/* No floating content on sides */
} }
ul { /*navigation*/
list-style-type: none; .header {
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
align-items: center;
margin: 1em;
border-bottom: 1px solid var(--active);
}
.header button {
border: 1px solid var(--active);
color: var(--active);
background-color: white;
padding: 4px;
text-align: center;
display: inline-block;
padding: 0.5em;
margin: 4px;
font-size: 0.9em;
min-width: 4.5em;
}
td button {
background-color: white;
color: var(--active);
border: 1px solid var(--active);
}
/* :::::::::::::: SELECTING MODULATORS/ENUMERATORS */
.header button.highlighted-button {
color: var(--active);
border: 1px solid var(--active);
}
.header button.unhighlighted-button {
color: var(--nonactive);
border: 1px solid var(--nonactive);
}
/* table */
table {
margin: 1em;
padding: 0em;
border-collapse: collapse;
background-color: lightsteelblue;
}
/* points datacells should have a min-width*/
.enum-count {
min-width: 5.6em;
}
th {
padding: 0.4em 0.3em;
text-align: left;
}
thead {
color: white;
background-color: var(--active);
}
tr,
td {
margin: 0em;
}
td:last-child {
white-space: nowrap;
overflow: hidden;
padding: 0;
}
/* input types */
/* dropdown list */
select {
width: 100%;
}
/*
option, select>* {
font-size: 0.8em !important;
padding: 0em !important;
margin: 0em !important;
min-height: 0em !important;
}
*/
option {
background-color: var(--active);
}
option:not(:checked) {
background-color: white;
}
/* input */
input,
select {
border: 1px solid var(--active);
color: var(--active);
margin: 0; margin: 0;
padding: 0; padding: 0;
overflow: hidden; line-height: 1.5em;
background-color: #333333; height: 1.5em;
box-sizing: border-box;
} }
li { input {
float: left; padding-left: 5px;
} /*slight padding on left*/
table {
overflow: scroll;
} }
input[type=number] { input[type=number] {
width: 50px; width: 50px;
margin: 0;
padding: 0;
} }
input[type=text] { input[type=text] {
width: 60px; width: 60px;
margin: 0;
padding: 0;
font-weight: bold; font-weight: bold;
} }
.timeInput { .timeInput {
width: 80px; width: 80px;
margin: 0;
padding: 0;
} }
#matrix { #matrix {
@@ -80,223 +174,205 @@ input[type=text] {
.numbox-clicked { .numbox-clicked {
user-select: none; user-select: none;
border : solid; border: solid;
font-size: 12vw; font-size: 12vw;
} }
.param-input-label { .param-input-label {
width: 93%; width: 93%;
font-size: 5vw; font-size: 5vw;
} }
.lfo-input-label { .lfo-input-label {
width: 40%; width: 40%;
font-size: 5vw; font-size: 5vw;
} }
/* The switch - the box around the slider */ /* The switch - the box around the slider */
.switch { .switch {
position: relative; position: relative;
display: inline-block; display: inline-block;
width: 30px; width: 30px;
height: 17px; height: 17px;
} }
/* Hide default HTML checkbox */ /* Hide default HTML checkbox */
.switch input { .switch input {
opacity: 0; opacity: 0;
width: 0; width: 0;
height: 0; height: 0;
} }
/* The slider */ /* The slider */
.slider { input[type="range"] {
position: absolute; appearance: none;
cursor: pointer; -webkit-appearance: none;
top: 0; height: 8px;
left: 0; border-radius: 6px;
right: 0; background-color: white;
bottom: 0; outline: none;
background-color: #ccc; opacity: 0.7;
-webkit-transition: .4s; -webkit-transition: .2s;
transition: .4s; transition: opacity .2s;
overflow: hidden;
} }
.slider:before { /*slider knob*/
position: absolute; input[type="range"]::-webkit-slider-runnable-track {
content: ""; -webkit-appearance: none;
height: 13px; color: var(--active);
width: 13px; margin-top: -1px;
left: 2px;
bottom: 2px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
} }
input:checked + .slider { input[type="range"]::-webkit-slider-thumb {
background-color: #2196F3; -webkit-appearance: none;
appearance: none;
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--active);
box-shadow: -80px 0 0 80px var(--active);
} }
input:focus + .slider { input[type="range"]::-moz-range-progress {
box-shadow: 0 0 1px #2196F3; background-color: var(--active);
}
input:checked + .slider:before {
-webkit-transform: translateX(13px);
-ms-transform: translateX(13px);
transform: translateX(13px);
}
/* Rounded sliders */
.slider.round {
border-radius: 17px;
}
.slider.round:before {
border-radius: 50%;
} }
h5 { h5 {
margin: 0; margin: 0;
padding: 0; padding: 0;
}
.enum-count {
background-color: aquamarine;
} }
.label { .label {
background-color: aliceblue; background-color: aliceblue;
padding: 0 4px 0 4px; padding: 0 4px 0 4px;
margin: 0 2px 0 2px; margin: 0 2px 0 2px;
border-color: #333333; border-color: #333333;
border-width: 1px; border-width: 1px;
} }
.base-val { .base-val {
background-color: lightgray; border: none;
border-color: #333333; color: white;
border-width: 1px; text-align: center;
width: 50px; font-size: 0.9em;
margin-left: 2px; width: 50px;
margin-top: 1px; margin: 0;
padding: 0;
} }
.linked { .linked {
color: red; color: red;
border-width: 1px; border-width: 1px;
width: 50px; width: 50px;
font-size: small; font-size: small;
margin-left: 2px; margin-left: 2px;
margin-top: 5px; margin-top: 5px;
display: none;
/*hide*/
} }
@keyframes pulse-animation { @keyframes pulse-animation {
0% { 0% {
color: black; color: black;
} }
100% {
color: red; 100% {
} color: red;
}
} }
#pulse { #pulse {
animation: pulse-animation 0.2s normal; animation: pulse-animation 0.2s normal;
}
/* :::::::::::::: SELECTING MODULATORS/ENUMERATORS */
.highlighted-button {
background-color: gray;
} }
.unhighlighted-button {
background-color: white;
}
/* :::::::::::::: LOCK CSS */ /* :::::::::::::: LOCK CSS */
.locked-component { .locked-component {
pointer-events: none; pointer-events: none;
background-color: #333333; background-color: #333333;
color : white; color: white;
}
.header {
display: flex;
width: 100%;
flex-direction: flex;
} }
/* Locked */ /* Locked */
.lock { .lock {
margin-top: 14px; margin-top: 14px;
width: 24px; width: 24px;
height: 21px; height: 21px;
border: 3px solid var(--locked-color); border: 3px solid var(--locked-color);
border-radius: 5px; border-radius: 5px;
position: relative; position: relative;
cursor: pointer; cursor: pointer;
-webkit-transition: all 0.1s ease-in-out; -webkit-transition: all 0.1s ease-in-out;
transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out;
} }
.lock:after { .lock:after {
content: ""; content: "";
display: block; display: block;
background: var(--locked-color); background: var(--locked-color);
width: 3px; width: 3px;
height: 7px; height: 7px;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
margin: -3.5px 0 0 -2px; margin: -3.5px 0 0 -2px;
-webkit-transition: all 0.1s ease-in-out; -webkit-transition: all 0.1s ease-in-out;
transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out;
} }
.lock:before { .lock:before {
content: ""; content: "";
display: block; display: block;
width: 10px; width: 10px;
height: 10px; height: 10px;
bottom: 100%; bottom: 100%;
position: absolute; position: absolute;
left: 50%; left: 50%;
margin-left: -8px; margin-left: -8px;
border: 3px solid var(--locked-color); border: 3px solid var(--locked-color);
border-top-right-radius: 50%; border-top-right-radius: 50%;
border-top-left-radius: 50%; border-top-left-radius: 50%;
border-bottom: 0; border-bottom: 0;
-webkit-transition: all 0.1s ease-in-out; -webkit-transition: all 0.1s ease-in-out;
transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out;
} }
/* Locked Hover */ /* Locked Hover */
.lock:hover:before { .lock:hover:before {
height: 12px; height: 12px;
} }
/* Unlocked */ /* Unlocked */
.unlocked { .unlocked {
transform: rotate(10deg); transform: rotate(10deg);
} }
.unlocked:before { .unlocked:before {
bottom: 130%; bottom: 130%;
left: 31%; left: 31%;
margin-left: -11.5px; margin-left: -11.5px;
transform: rotate(-45deg); transform: rotate(-45deg);
} }
.unlocked, .unlocked,
.unlocked:before { .unlocked:before {
border-color: var(--unlocked-color); border-color: var(--unlocked-color);
} }
.unlocked:after { .unlocked:after {
background: var(--unlocked-color); background: var(--unlocked-color);
} }
/* Unlocked Hover */ /* Unlocked Hover */
.unlocked:hover { .unlocked:hover {
transform: rotate(3deg); transform: rotate(3deg);
} }
.unlocked:hover:before { .unlocked:hover:before {
height: 10px; height: 10px;
left: 40%; left: 40%;
bottom: 124%; bottom: 124%;
transform: rotate(-30deg); transform: rotate(-30deg);
} }

View File

@@ -7,23 +7,21 @@
--> -->
<head> <head>
<link rel="stylesheet" href="./lfogui.css"> <meta charset="utf-8">
<link rel="stylesheet" href="./lfogui.css">
</head> </head>
<body> <body>
<div id="lfo-container"></div> <div id="lfo-container"></div>
<script src="./react.js"></script> <script src="./react.js"></script>
<script src="./react-dom.js"></script> <script src="./react-dom.js"></script>
<script src="./moment.js"></script> <script src="./moment.js"></script>
<script src="./common.js"></script> <script src="./common.js"></script>
<script src="./enums.js"></script> <script src="./enums.js"></script>
<script src="./modulators.js"></script> <script src="./modulators.js"></script>
<script src="./lfogui.js"> <script src="./lfogui.js"></script>
</script>
</body> </body>
</html> </html>

View File

@@ -30,7 +30,7 @@ const LockModes = Object.freeze({
var modPhases = Array(MAXLFOS).fill(0); var modPhases = Array(MAXLFOS).fill(0);
var firstUpdateTime = Date.now(); var firstUpdateTime = Date.now();
const MODULATORLABELS = ["inst", "type", "shape", "param", "timebase", "min", "max", "phase", "center"]; const MODULATORLABELS = ["inst", "type", "shape", "param", "timebase", "min", "max", "phase", "center", "result", "", ""];
const ENUMERATORLABELS = ["inst", "parameter", "# points"]; const ENUMERATORLABELS = ["inst", "parameter", "# points"];
@@ -84,7 +84,7 @@ function MasterLfoHandler() {
return content return content
} }
let toggleEnabledText = enabled ? "Hide" : "Show"; let toggleEnabledText = enabled ? `Hide \u{25BE}` : `Show \u{25B8}`;
/// MODULATOR ARRAYS /// MODULATOR ARRAYS
let userDefinedWavesBase = []; let userDefinedWavesBase = [];
@@ -282,6 +282,11 @@ function MasterLfoHandler() {
setTicks(event.detail); setTicks(event.detail);
} }
function handleChangeViewMode(event){
setEnabled(true);
setViewMode(event.detail);
}
function setNN(event) { function setNN(event) {
for (let i = 0; i < MAXLFOS; i++) { for (let i = 0; i < MAXLFOS; i++) {
@@ -352,6 +357,7 @@ function MasterLfoHandler() {
window.addEventListener('userFunction', handleChangeUserFunction); window.addEventListener('userFunction', handleChangeUserFunction);
window.addEventListener('userDefinedType', handleChangeUserDefinedType); window.addEventListener('userDefinedType', handleChangeUserDefinedType);
window.addEventListener('maxTicks', handleMaxTicks); window.addEventListener('maxTicks', handleMaxTicks);
window.addEventListener('viewMode', handleChangeViewMode);
return () => { return () => {
window.removeEventListener('loadDict', handleLoad); window.removeEventListener('loadDict', handleLoad);
@@ -366,6 +372,7 @@ function MasterLfoHandler() {
window.removeEventListener('userFunction', handleChangeUserFunction); window.removeEventListener('userFunction', handleChangeUserFunction);
window.removeEventListener('userDefinedType', handleChangeUserDefinedType); window.removeEventListener('userDefinedType', handleChangeUserDefinedType);
window.removeEventListener('maxTicks', handleMaxTicks); window.removeEventListener('maxTicks', handleMaxTicks);
window.removeEventListener('viewMode', handleChangeViewMode);
}; };
}, [...allModArrays, ...allEnumArrays, ...allEnumMats, userDefinedWaves, userDefinedFunctions, userDefinedTypes, modCenterVals, render, beatsInMeasure, ticks]); }, [...allModArrays, ...allEnumArrays, ...allEnumMats, userDefinedWaves, userDefinedFunctions, userDefinedTypes, modCenterVals, render, beatsInMeasure, ticks]);
@@ -576,9 +583,11 @@ function MasterLfoHandler() {
return e('div', null, return e('div', null,
e('div', { className: 'header' }, e('div', { className: 'header' },
displayIfEnabled(e('button', { onClick: () => setViewMode(ViewModes.MOD), className: modButtonClass}, 'Modulators')), e('div', {className: 'nav'},
displayIfEnabled(e('button', { onClick: () => setViewMode(ViewModes.ENUM), className: enumButtonClass }, 'Enumerators')), displayIfEnabled(e('button', { onClick: () => setViewMode(ViewModes.MOD), className: modButtonClass}, 'Modulators')),
e('button', { onClick: toggleEnabled, }, toggleEnabledText), displayIfEnabled(e('button', { onClick: () => setViewMode(ViewModes.ENUM), className: enumButtonClass }, 'Enumerators'))
),
e('button', { onClick: toggleEnabled, id: 'hide-button'}, toggleEnabledText),
//allows lock mode //allows lock mode
//e('span', { className: lockClass, onClick: toggleLockMode }, null) //e('span', { className: lockClass, onClick: toggleLockMode }, null)
@@ -586,7 +595,7 @@ function MasterLfoHandler() {
displayIfEnabled( displayIfEnabled(
e('table', { id: 'table' }, e('table', { id: 'table' },
e('thead', null, e('tr', { id: 'headers' }, ...labels.map(x => e('th', null, x)))), e('thead', null, e('tr', { id: 'headers' }, ...labels.map(x => e('th', {id: x == '# points' ? 'points' : x}, x)))),
e('tbody', null, ...grid) e('tbody', null, ...grid)
)) ))
); );
@@ -626,6 +635,10 @@ if (!DEBUG) {
window.dispatchEvent(new CustomEvent('userWave', { 'detail': data })); window.dispatchEvent(new CustomEvent('userWave', { 'detail': data }));
}); });
window.max.bindInlet("viewMode", (mode) => {
window.dispatchEvent(new CustomEvent('viewMode', { 'detail': parseInt(mode) }));
});
window.max.bindInlet("userFunction", (index, ...points) => { window.max.bindInlet("userFunction", (index, ...points) => {
//list of 101 points between 0-100 //list of 101 points between 0-100
let data = { points, index }; let data = { points, index };

File diff suppressed because one or more lines are too long