Guitar Amplifier and effects made with Raspberry Pi and reused Vox amplifier case
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
image_50438145.JPGBen's build in a boxJPEG Image - 1.69 MB - 08/12/2022 at 20:39 |
|
|
image_67188993.JPGMCP3008 wiringJPEG Image - 1.94 MB - 08/12/2022 at 20:39 |
|
|
image_67160321.JPGMCP3008 wiringJPEG Image - 1.74 MB - 08/12/2022 at 20:39 |
|
|
IMG_4982.movphoto of ben's buildquicktime - 31.41 MB - 08/12/2022 at 20:27 |
|
|
IMG_4844.HEICphoto of ben's buildheic - 1.98 MB - 08/12/2022 at 20:27 |
|
OK, I've got a button working, and recording working, but when I try to do playback I get: terminated by signal SIGSEGV (Address boundary error)
I think the problem may be that I am somehow starting the pedalmaster main program at the same time and they are conflicting. So maybe not my code.
Here's the code, and I have button wired up to GPIO pin 2.
# Looper. This is test code that:
# on GPIO connected button press: starts a recording
# second press: stops listening and plays a loop of the recording
# third press: stops looping and returns to initial state
#!/usr/bin/env python3
from gpiozero import Button
from signal import pause
import pyo
import os
s = pyo.Server().boot()
s.start()
audio = pyo.Input()
loop_file = os.path.dirname(os.path.abspath(__file__))+'/myloop.wav'
times_clicked = 0
def looper_func(key):
global times_clicked, rec, looper, audio, loop_file
if times_clicked == 0:
print("Recording")
rec = pyo.Record(audio, filename=loop_file, fileformat=0, sampletype=1).out()
if times_clicked == 1:
print("Looping")
rec.stop()
looper = pyo.SfPlayer(loop_file, loop=True).out()
if times_clicked == 2:
print("Waiting")
looper.stop()
times_clicked = (times_clicked+1)%3
print(times_clicked)
switch = Button(2)
switch.when_pressed = looper_func
pause()
While trying to make this work, I came up with a lot of ideas and most of them didn't work. I made a lot of test programs and in the event that any of them might help, I've uploaded them all to the github repository.
I'm working on the looper. Step one is to try to get a program where I can:
I've managed to do that here:
https://github.com/dsagman/guitarpedal/blob/main/keypress.py
It was trickier than I expected. There's some oddities with the callbacks and pyo objects and the audio player not working if it was outside of the callback function. No idea why. But it works on my linux machine and now I need to get it working on the raspberry pi.
Next steps are to get it working as part of the existing pedal program and to wire it up to a button attached to a GPIO pin. I'm hoping to get an LED that blinks while recording, steady while looping, and then off when not active.
Maybe easy. maybe not so easy.
Overly long video on every code line.
I've downloaded the OBS software for recording my computer screen and audio input. I'm going to try and do a code review video, but, as always, there's another tool to learn and figure out. That said, OBS seems quite good. Fingers crossed. Including the one I electrocuted the other day.
I had done a lot of the work here with my guitar teacher, Ben McMunn, who I've now figured out how to add to the project. Ben is building his own version using a raspberry pi 2. I'm going to try and get him to upload his photos here.
I just figured out how to make the chatroom public. I hadn't realized it is private.
Updated the Python code to fix for the fact that I wired all the pot backwards. Updated code on Github.
Also, working on making a looper effect. I've got a button working, but now have to figure out how to record the audio and play it back in a loop!
I've also posted the current version of the slides here. The links to github and slides and demo video are all here as well.
I've made an overly long video going through every line of the code.
Create an account to leave a comment. Already have an account? Log In.
I don't have the skills to code up amp sims, but the amp is basically directly connected to the pi, so anything that will run on the pi can be output to through the amp and use the input of the guitar.
Guitar teacher here! This thing took on a life of its own...Mine is in the works!
Become a member to follow this project and never miss any updates
Does / can your project run guitar amp sims, cabinet impulses, through the class D power amp?
Great project by the way.