Project Guitar and Linux
Guitar and Linux
see also Trac Wiki
Chordsplay
Chordsplay is my application to play along my favorite songs with the guitar. It scans a given directory for mp3 files with metadata to search for chords and lyrics of these songs. The list of these songs can be filtered and shuffled to play them while the lyrics and chords are displayed.
Install
Hi Res
Solution for adapting font size to high dpi displays: abandoning conda and use native python and pip. With conda fonts look very small and thin (especially the song list) because it doesn't include necessary compile options for smooth fonts
Performance
Try these after connect to the sqlite database
pragma journal_mode = WAL; pragma synchronous = normal; pragma temp_store = memory; pragma mmap_size = 30000000000;
Separate Linux and Guitar Amps
Old style: Just play the music with chordsplay over the linux amp and play along with the external amp.
- External Amp and Guitar can be connected wirelessly
- No earphones because audio mixing happens in the air ;)
Fender Mustang Micro Amp
The linux notebook or pc can connect to the Mustang Micro amp via bluetooth with normal gnome interface. Chordsplay can send the music and the micro amp mixes in the optionally distorted guitar and sends it to headphone or usb-c outputs.
The following items are pre pipewire stuff, basically no longer needed:
Using Pulse Audio
- The small amp is plugged into the guitar
- Connect the amp via bluetooth to linux audio
- Chordsplay can send the music to the amp via A2DP protocol
pacat -r --latency-msec=1 -d 'alsa_output.usb-0ccd_USB_Audio-00.analog-surround-51.monitor' | \ pacat -p --latency-msec=1 -d 'bluez_sink.84_17_15_15_F0_20.a2dp_sink'
- Use headphones plugged into the fender amp to hear mixed chordsplay and guitar
- USB-C out of the amp can be connected to linux for using the linux amp and for recording, e.g. with audacity
- use pacat to do the connections
pacat -r --latency-msec=1 -d 'alsa_input.usb-FMIC_Fender_Mustang_Micro_396234823131-00.iec958-stereo' | \ pacat -p --latency-msec=1 -d 'alsa_output.usb-0ccd_USB_Audio-00.analog-surround-51'
Unfortunately it is not possible to use normal bluetooth headphones or earpods in this scenario. They have a too long delay. Maybe aptx-ll would be a solution for playing completely wireless?
Script to connect the Fender Mustang Micro to Job4 monitor
Bluetooth is such a pita...
fender_mac='84:17:15:15:F0:20' fender_sink="bluez_sink.${fender_mac//:/_}.a2dp_sink" fender_source="alsa_output.usb-0ccd_USB_Audio-00.analog-surround-51.monitor" echo -e "power on\nquit" | bluetoothctl while ! echo -e "show\nquit" | bluetoothctl | grep 'Powered: yes'; do echo "Wait for power on" sleep 1 done echo -e "connect $fender_mac\nquit" | bluetoothctl try=0 while ! pactl list sinks short | fgrep "$fender_sink"; do echo "Wait for $fender_sink" try=$((try+1)) if [ $try -gt 5 ]; then echo -e "connect $fender_mac\nquit" | bluetoothctl echo "Restart device?" fi sleep 1 done echo "Connect $fender_source to $fender_sink. Ctrl-C to end" pacat -r --latency-msec=1 -d "$fender_source" | \ pacat -p --latency-msec=1 -d "$fender_sink"