A Kotlin/Android Raspberry Pi-based app serving as a convenient replacement for a commercial guitar pedal.
- Create to-do list
- Establish in Google Calendar a timeframe for working on the project
- Read about Puredata
- Read about Puredata guitar effects
- Watch Puredata tutorials on basic objects
- Create a Puredata effect
- Create basic ugly diagram of the project
- Read about other Raspberry Pi guitar pedal projects with Hifiberry
- Watch Pure Data tutorials on input devices and subpatches
- Watch Pure Data tutorials on various effects
- Read about how to install Puredata on Raspberry Pi and save the link in the "Resources" section
- Read about how to install Hifiberry DAC+ADC soundcard drivers on Raspberry Pi
- Read about UI/UX for mobile apps
- Think about what elements are necessary in the user interface
- Create wireframes for the UI
- Add the actual images and colors on top of the wireframes for an initial version of the UI
- Buy components
- Assemble the components
- Install Hifiberry DAC+ADC soundcard drivers on Raspberry Pi
- Install Pure Data on Raspberry Pi
- Check if the soundcard works by running a test script from Hifiberry (it generates a sine wave of 1000 Hz)
- Read about Kotlin Jetpack Compose
- Read about Kotlin Android Bluetooth connectivity
- Search articles explaining how to port a Kotlin/Android app to iOS
- Test whether the Puredata effect works with the guitar (Big Jack/small Jack adapter for the guitar cable plugged into the laptop)
- Create diagrams for the app structure
- Create a diagram of the physical cabling for the pedal, guitar and amp
- Re-read/refresh knowledge on design patterns
- Think of design patterns that could be used
- Run Pure Data on the Raspberry Pi and check if the guitar can be heard in-real-time with the headphones
- Install ElkAudioOS or HifiberryOS (if neither the adjusted sound card settings nor the cabling improve the sound quality)
- Implement a quick initial version of the app
- Finish a full initial version of the app
- Test it
- Create a demo video
- Update README.md
- Installing Pure Data on Raspberry Pi
- Pure Data documentation
- Pure Data documentation - PDF
- List of Pure Data objects
- Pure Data Reference Card
- Running Pure Data on a headless Raspberry Pi
- Pure Data Filters
- Pure Data Tutorial
- Pure Data error: "priority 6 scheduling failed; running at normal priority"
Solution:
1. Update Kernel
2. Create audio group: sudo groupadd audio
3. Add your user to audio group: sudo gpasswd -a <username> audio
4. Create group limits file for audio group: sudo nano /etc/security/limits.d/audio.conf
5. Add the following lines to audio.conf:
@audio - rtprio 95
@audio - memlock unlimited
#@audio - nice -19
6. Reboot
- Pure Data Guitar Pedal - Pure Data Example Project
- Sound Simulator - Pure Data Tutorial #1 - Simple Button + Message + Object patch
- Sound Simulator - Pure Data Tutorial #2 - Additive Synth, Overtone Generator
- Sound Simulator - Pure Data Tutorial #3 - Subtractive Synth, Low-Pass, High-Pass, Band-pass Filters
- Sound Simulator - Pure Data Tutorial #4 - Attack-Decay-Sustain-Release Envelope
- Pd for Airports
- Running a headless Raspberry Pi through SSH
- Updating the kernel for the Hifiberry DAC+ADC soundcard drivers (might not be necessary nowadays, the kernel most likely contains the necessary drivers)
- Hifiberry software configuration
- Playing test sounds
- Configuring Hifiberry for Linux 5.4 or higher kernel version
- Raspberry Pi Wi-Fi & Bluetooth Setup
- How To Set Up Bluetooth On Raspberry Pi
- bluetoothctl: list connected devices
- Recording audio on Raspberry Pi with Hifiberry
Run the mpv media player software from the terminal with the Youtube link as the first parameter and the --no-video option in case a monitor is not available:
mpv https://www.youtube.com/watch?v=u9bk2MrMGaA --no-video
- high-quality close-up image of a guitar at the top of the screen
- short appealing description
- start button
- logo at the bottom of the screen
This screen should allow the user to switch between different pedals by swiping left and/or right, turn them on/off and adjust sound settings. By sliding downwards, the user is led to the second screen.
- Wooden background
- An image of a pedal positioned in the center of the screen + input/output Jack wires
- The logo is positioned in the upper left corner of the screen
The second screen allows the user to build a pipeline i.e. a sequence of pedals, each taking as input either the guitar signal directly or the output of other pedals.
- Wooden background
- Jack ports positioned in the center of each side of the screen
- At the bottom of the screen, an up-arrow is placed which, if pressed, triggers a pop-up containing multiple options of pedals. The list of pedals can be scrolled horizontally.
- To place a pedal on the floor, drag it from the pop-up outwards
- To connect pedals to one another, drag cables from the previously-mentioned pop-up
This diagram is a mixture of a structural and behavioral UML diagram. Since the Jetpack Compose toolkit works based on functions/so-called "composables" rather than classes, a UML class diagram wouldn't make much sense, but aggregation/composition relationships are still used nonetheless. The double-arrowed relationship represents a swipe action prompted by the user.
- 1/4" Jack → 6.35 mm
- 1/8" Jack → 3.5 mm