-
-
Notifications
You must be signed in to change notification settings - Fork 111
Control surface
As of version 0.8.0, you can connect buttons and/or a rotary encoder to your Raspberry Pi to control mt32-pi
.
Controls are enabled by setting the scheme
option in the [control]
section of configuration file. Only one of the following schemes may be enabled at a time.
Currently, two "simple" control schemes are implemented. An MT-32-style 10-button scheme is planned, which may or may not make use of a GPIO port expander. The following schemes will eventually gain additional actions through combinations or long-presses. A menu system and other interactive controls are also planned for future versions.
4 buttons via GPIO:
Control | Action |
---|---|
Button 1 | Switch synthesizer |
Button 2 | Switch MT-32 ROM or SoundFont |
Button 3 | Decrease volume |
Button 4 | Increase volume |
2 buttons and a rotary encoder via GPIO:
Control | Action |
---|---|
Button 1 | Switch synthesizer |
Button 2 | Switch MT-32 ROM or SoundFont |
Encoder counter-clockwise | Decrease volume |
Encoder clockwise | Increase volume |
Encoder button | Not yet used (shows a test message) |
β Note: No pull-up resistors are required for the buttons or encoder pins; the Raspberry Pi's internal pull-up resistors are enabled.
The rotary encoder has an additional option, encoder_type
. When configured properly, one click of the encoder should increase or decrease the volume by exactly 1.
The default value of full
assumes that one detent ("click") performs a full cycle of the Gray code.
- If four clicks are needed for a single movement, try
encoder_type = quarter
. - If two clicks are needed for a single movement, try
encoder_type = half
.
A typical rotary encoder will have the following pinout:
- If your encoder looks different, consult its datasheet.
- If clockwise/counter-clockwise actions are reversed, swap the
CLK
andDAT
pins.
Β© Dale Whinham 2020-2022. Released under the GNU General Public License v3.0.