Skip to content

Add GTK GUI with real-time pot control#70

Open
ChrisX101010 wants to merge 2 commits intotorvalds:mainfrom
ChrisX101010:add-gtk-gui
Open

Add GTK GUI with real-time pot control#70
ChrisX101010 wants to merge 2 commits intotorvalds:mainfrom
ChrisX101010:add-gtk-gui

Conversation

@ChrisX101010
Copy link
Copy Markdown

Adds a GTK-based GUI addressing #60.

Features:

  • Guitar pedal style interface with 4 rotary knobs
  • Real-time pot control using --control= interface (ea71138)
  • All 9 effects supported (reads from Makefile)
  • Smooth mouse drag and scroll wheel for knobs
  • Keyboard shortcuts: Tab (select), ←→ (±5), ↑↓ (±1), Space (play), 1-9 (effect), R (reset)
  • Works with aplay (~100ms latency) or ffplay fallback

Requirements:

sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0

Usage:

python3 gui.py

Closes #60

- Guitar pedal style interface with rotary knobs
- Real-time pot control via pXYY commands
- Reads effects dynamically from Makefile
- Uses aplay -B 100 for ~100ms latency
- Smooth knob dragging, keyboard shortcuts

Closes torvalds#60
@sinderoth
Copy link
Copy Markdown

I'm not sure if this is something wanted in this repo, but it helped me while experimenting with some effects locally, so thanks!

There's a minor issue: if you press play with an effect and then change the effect, the start/stop controls don't sync correctly and stops working as expected.

Also this is surely a personal preference, but I changed the knob dragging from horizontal to vertical: dragging up increases the value, dragging down decreases it. This matches the behavior in GarageBand and feels more natural to me.

@ChrisX101010
Copy link
Copy Markdown
Author

I'm not sure if this is something wanted in this repo, but it helped me while experimenting with some effects locally, so thanks!

There's a minor issue: if you press play with an effect and then change the effect, the start/stop controls don't sync correctly and stops working as expected.

Also this is surely a personal preference, but I changed the knob dragging from horizontal to vertical: dragging up increases the value, dragging down decreases it. This matches the behavior in GarageBand and feels more natural to me.

You are most welcome, sir! I am glad it helped someone at least, it is still a prototype and as you said experiment, the issue for the audio automatically stopping after switching is due to the convert.c file, I had a similar issue with my TUI Linus originally approved I can make, I think it is the same issue here too and I can fix it, but yeah please feel free to commit any changes and the scroll bar regarding tuning is a cooler concept for a GUI imho, so yeah. Feel free to share the code and I will work on fixing these issues for the weekend and let's get it working! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add qt/gtk based GUI

2 participants