Skip to content

Commit

Permalink
Few small random fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ameobea committed Feb 2, 2025
1 parent 6fa1d47 commit 87efa95
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 11 deletions.
1 change: 1 addition & 0 deletions engine/wavetable/src/fm/effects/soft_clipper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub enum SoftClipperAlgorithm {
/// f(x,a) = x*(abs(x) + a)/(x^2 + (a-1)*abs(x) + 1)
///
/// From: https://www.musicdsp.org/en/latest/Effects/41-waveshaper.html
/// Backup: https://web.archive.org/web/20240624055545/https://www.musicdsp.org/en/latest/Effects/41-waveshaper.html
///
/// By: Bram de Jong
BramWaveShaper = 4,
Expand Down
1 change: 1 addition & 0 deletions src/controls/adsr2/adsr2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ class StepHandle {
this.inst.steps.splice(ourIndex, 1);
this.destroy();
this.inst.sortAndUpdateMarks();
this.inst.onUpdated();
}

constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/faustEditor/CodeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const CodeEditor: React.FC<CodeEditorProps> = ({ value, onChange, mode, height }
value={value}
style={{ border: '1px solid #555' }}
setOptions={{ useWorker: false }}
height={`${height ?? 500}`}
height={`${height ?? '500px'}`}
/>
);

Expand Down
12 changes: 11 additions & 1 deletion src/filterDesigner/FilterDesigner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,17 @@ const ConfigureFilterGroup: React.FC<ConfigureFilterGroupProps> = ({
const group = state.filterGroups[groupIx];
// can't delete all filters
if (group.length === 1) {
return state;
if (state.filterGroups.length === 1) {
return state;
}

disconnectFilterChain(group.map(g => g.filter));
const newState = {
...state,
filterGroups: state.filterGroups.filter((_, ix) => ix !== groupIx),
};
updateConnectables?.(newState);
return newState;
}

disconnectFilterChain(group.map(g => g.filter));
Expand Down
16 changes: 8 additions & 8 deletions src/graphEditor/nodes/CustomAudio/Subgraph/SubgraphPortalNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ const maybeInitSubgraphConnectablesWatcher = () => {
// If we previously had a node patched through that has since been disconnected, replace
// the node with a dummy node
if (!(registeredOutputs[subgraphPortName]?.node instanceof DummyNode)) {
console.log('Unpatching tx connectables node from subgraph portal', {
subgraphPortName,
txSubgraphNode,
});
// console.log('Unpatching tx connectables node from subgraph portal', {
// subgraphPortName,
// txSubgraphNode,
// });
txSubgraphNode.registeredOutputs.update(inputs => {
const newInputs = { ...inputs };
newInputs[subgraphPortName] = {
Expand Down Expand Up @@ -141,10 +141,10 @@ const maybeInitSubgraphConnectablesWatcher = () => {
continue;
}

console.log('Patching tx connectables node into subgraph portal', {
subgraphPortName,
wantedTxConnectables: wantedTxConnectable,
});
// console.log('Patching tx connectables node into subgraph portal', {
// subgraphPortName,
// wantedTxConnectables: wantedTxConnectable,
// });
txSubgraphNode.registeredOutputs.update(inputs => ({
...inputs,
[subgraphPortName]: { type: wantedTxConnectable.type, node: wantedTxConnectable.node },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
label: `input_${i}_gain`,
min: -1,
max: 1,
step: 0.01,
initial: param.manualControl.offset.value,
});
settings.push(spacer());
Expand Down
2 changes: 1 addition & 1 deletion src/midiEditor/CollapsedMIDIEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</button>
<EditableInstanceName
left={PIANO_KEYBOARD_WIDTH + 2}
left={24}
name={inst.name}
setName={newName => parentInstance.uiManager.renameInstance(inst.name, newName)}
/>
Expand Down
1 change: 1 addition & 0 deletions src/midiEditor/EditableInstanceName.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
margin-top: -3px;
position: var(--position, absolute);
user-select: none;
z-index: 1;
}
.name-wrapper,
Expand Down

0 comments on commit 87efa95

Please sign in to comment.