sutgeorge / MobilePedalPi

A Kotlin/Android Raspberry Pi-based application serving as a convenient replacement for a commercial guitar pedal (in progress).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MobilePedalPi

A Kotlin/Android Raspberry Pi-based app serving as a convenient replacement for a commercial guitar pedal.

Chronological to-do list

  • 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

Resources

Project management

Pure Data

 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

Raspberry Pi/Hifiberry

Kotlin Multiplatform

Playing Youtube audio with Hifiberry and Raspberry Pi

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

Setup diagram

MobilePedalPi setup diagram

Raspberry Pi+Hifiberry setup

Raspberry Pi+Hifiberry setup

UI/UX elements needed

Starting screen

  • 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

Pedal switch screen (first 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

Pedal pipelines screen (second 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

Starting screen

First screen

Second screen

Wireframe diagrams with images

Starting screen

First screen

Second screen

Project diagram

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.

App diagram

Cabling

Cabling diagram

Cabling diagram

Some remarks

  • 1/4" Jack → 6.35 mm
  • 1/8" Jack → 3.5 mm

Other projects

About

A Kotlin/Android Raspberry Pi-based application serving as a convenient replacement for a commercial guitar pedal (in progress).


Languages

Language:Kotlin 99.6%Language:Shell 0.4%