项目作者: roberthofman

项目描述 :
Raspberry pi + drum pad + loop station
高级语言: Python
项目地址: git://github.com/roberthofman/piloopdrumbox.git
创建时间: 2020-11-16T20:38:48Z
项目社区:https://github.com/roberthofman/piloopdrumbox

开源协议:

下载


Pi-loop-drumbox!

Welcome to my repo for the ultimate Raspberry pi + drum pad + loop station.
For updates on the build log see the wiki.
For a demo, see the video.

Install requirements

PureData

To install puredata: sudo apt-get install puredata. PD version used: 0.51-1.
No extensions are required.
In order to get the soundcard working and avoiding the
ALSA input error (snd_pcm_open): No such file or directory
error, you need to make sure that the USB-soundcard is the only audio device and has index 0. Disable the Pi’s jack input via this file: /etc/modprobe.d/alsa-blacklist.conf and add the following line: blacklist snd_bcm2835.
Then, reconfigure the index of audio devices: /lib/modprobe.d/aliases.conf and change the index of options snd-usb-audio index=0.
Check if the only audio device is the USB-soundcard through cat /proc/asound/cards, which should give the index 0 to the soundcard.
Finally, change the /etc/security/limits.conf, by adding these lines to the end of the file:

  1. @audio - rtprio 99
  2. @audio - memlock unlimited

This should solve the priority errors.

Python

The Python code is based on Python3.
Make sure you have installed the packages to work with GPIO pins:
sudo apt-get install python-rpi.gpio
You’ll need a couple of python libraries:

  • python-rpi.gpio
  • i2c–tools
  • smbus

You’ll need to wire up the GPIO pins to the correct pin numbers, which are coded in Button_pad.py. I followed this guide.
I used an I2C driver by DenisFromHR.

Drum sounds

I added a couple drum sounds. You can add additional .wav files following the number sintax in the folder.