Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI rework #2

Merged
merged 5 commits into from
Apr 25, 2023
Merged

GUI rework #2

merged 5 commits into from
Apr 25, 2023

Conversation

Mangoshi
Copy link
Owner

Why?

Ever since adding FM/AM controls to the oscillators, the synthesizer window was too big for the browser viewport.
This resulted in the GUI keyboard and bottom controls being obscured, which obviously isn't ideal!

What's new?

  • Master output oscilloscope (shows exactly what you hear!).
  • LFO oscilloscope (a rough implementation, but an implementation nonetheless!).

What's changed?

  • The synth now fits within the browser viewport.
  • Spacing & styling are now more uniform across the entire synth.
  • Webaudio-knob sizes reduced to make more space.
  • Visualisation areas shrunk to match new knob sizes.
  • GUI keyboard is now shorter and slightly wider.
  • P5 canvas has been re-aligned with synth.
  • Oscilloscopes now match up with designated areas again.
  • Theme-changing functionality improved, allowing for a much nicer (and lighter) light theme.

# Updates
- Primary knobs & sliders are now smaller
- Scope/visualisations are now smaller
- GUI keyboard is now shorter but slightly wider
- Spacing & borders made more uniform across the synth

# To-Do
- Still have to fix P5 canvases
- Still have to work on theme functionality
# Styling
- Border radius styling is now uniform across the synth
- Background colours are now more uniform
- Dropdown menu styling improved
- Presets page spacing & colouring updated

# Theme Functionality
- Figured out how to switch in & out Tailwind CSS classes
- Had to use a safelist array in Tailwind config
- Light/dark mode toggle now toggles far more colours than before
# P5
- Now matches synth container again
- Scopes realigned with designated areas

# Oscilloscopes
- Each oscilloscope now connected to a gain node to reduce size
- Doubled the resolution of each oscilloscope
- Oscillator volumes offset these gains to decrease natural scaling
- Master oscilloscope added to FX scope
- Attempted to add LFO oscilloscope (and failed)

# Extra / Other
- Increased volume of OSC C setters by 6 to closer match OSC A & B
- Fixed newly discovered preset loading bug
- Bug: values of 0 wouldn't update due to incorrect if statement
# Updates
- Arpeggiator & master octave controls now theme properly
- Readouts now theme properly too
- Sadly required directly editing shadow root
- Using same logic as other jQuery bits didn't work
- Added colors property to each readout
- Auto-indented index.html
- Modulation is now visualized to some degree
- It's not great, but it's not terrible
- Uses similar logic to the other oscilloscopes
- But the Waveform object had to use maximum resolution
- And the signal had to be adjusted a lot to get it working
- This was due to the much lower frequencies LFOs oscillate at
- As well as the fact that each LFO parameter interferes with it

# Note:
- Might be a bit more CPU/RAM hungry now
- Due to the constant drawing of a waveform
- Must remember to add a settings toggle for visualisations!
@vercel
Copy link

vercel bot commented Apr 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ms24 ✅ Ready (Inspect) Visit Preview Apr 25, 2023 8:38pm

@Mangoshi Mangoshi merged commit 6adfe66 into master Apr 25, 2023
@Mangoshi Mangoshi added the enhancement New feature or request label Apr 25, 2023
@Mangoshi Mangoshi self-assigned this Apr 25, 2023
@Mangoshi Mangoshi deleted the gui-rework branch April 25, 2023 20:39
Mangoshi added a commit that referenced this pull request Apr 30, 2023
- Last update worked with title and description, but not image
- This is apparently because image only takes HTTP without :secure_url
- Testing with :secure_url now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant