Skip to content

Commit

Permalink
Module parameter range tweaks (#5)
Browse files Browse the repository at this point in the history
- Add more steps to ADSR knobs for more granular control
- Lower the LFO highest frequency from 44Hz to 2Hz
- Raise the VOL and OUT module max volume to 2db
  • Loading branch information
rihardsgravis authored Jan 21, 2021
1 parent bdf8180 commit c3b76bf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions modules/src/ADSR.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
</script>

<Faceplate title="ADSR" color="var(--color-5)" light>
<Knob size="s" label="attack" x={27} y={60} bind:value={state.attack} min={0} max={2} precision={2} />
<Knob size="s" label="decay" x={27} y={122} bind:value={state.decay} min={0} max={2} precision={2} />
<Knob size="s" label="sustain" x={27} y={186} bind:value={state.sustain} min={0} max={1} precision={2} />
<Knob size="s" label="release" x={27} y={250} bind:value={state.release} min={0} max={5} precision={2} />
<Knob size="s" label="attack" x={27} y={60} bind:value={state.attack} min={0} max={2} precision={2} steps={1200} />
<Knob size="s" label="decay" x={27} y={122} bind:value={state.decay} min={0} max={2} precision={2} steps={1200} />
<Knob size="s" label="sustain" x={27} y={186} bind:value={state.sustain} min={0} max={1} precision={2} steps={1000} />
<Knob size="s" label="release" x={27} y={250} bind:value={state.release} min={0} max={5} precision={2} steps={1000} />

<Patch label="gate" x={20} y={320} name="gate" input={bang} />
<Patch label="out" x={60} y={320} name="cv" output={envelope} />
Expand Down
6 changes: 4 additions & 2 deletions modules/src/LFO.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Faceplate, Knob, Patch, Switch } from '@patchcab/core';
const MIN = 0.01;
const MAX = 440;
const MAX = 20;
export let state = {
freq: 2,
Expand All @@ -20,10 +20,12 @@
$: node.frequency.value = state.freq;
$: node.type = state.type;
$: console.log(state.freq);
</script>

<Faceplate title="LFO" color="var(--color-2)" light>
<Knob label="frequency" x={20} y={60} bind:value={state.freq} min={MIN} max={MAX} precision={3} steps={800} />
<Knob label="frequency" x={20} y={60} bind:value={state.freq} min={MIN} max={MAX} precision={3} steps={1000} />

<Switch x={20} y={220} bind:value={state.type} label="sin" set="sine" />
<Switch x={60} y={220} bind:value={state.type} label="sqr" set="square" />
Expand Down
2 changes: 1 addition & 1 deletion modules/src/OUT.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Patch, Volume, Faceplate, Switch } from '@patchcab/core';
const MIN = -80;
const MAX = 1;
const MAX = 2;
let volume = MIN;
let on = false;
Expand Down
2 changes: 1 addition & 1 deletion modules/src/VOL.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { Patch, Volume, Faceplate, Switch } from '@patchcab/core';
const MIN = -80;
const MAX = 1;
const MAX = 2;
export let state = {
volume: MIN,
Expand Down

1 comment on commit c3b76bf

@vercel
Copy link

@vercel vercel bot commented on c3b76bf Jan 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.