Giter Site home page Giter Site logo

piloopdrumbox's People

Contributors

pj-verweij avatar roberthofman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

piloopdrumbox's Issues

LEDs not colored correctly

Hi,
I've set everything up using the same components as you and wired everything up according to button_pad.py.
As far as I can tell the program runs correctly, the LCD is showing the correct things and everything sounds correct.

But, the LEDs aren't lit correctly at all. When I start the program, all the LEDs turn yellow and then just start blinking. Here is a video showing what is happening:
video
I checked all the connections twice, made sure all the solder points are good but the issue persists. Do you have any idea what might be causing this?

I am getting these errors when running the script, not sure if this is the cause?

/home/pi/piloopdrumbox/resources/Button_pad.py:73: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. GPIO.setup(self.btnRowPins[row], GPIO.IN, pull_up_down=GPIO.PUD_UP) /home/pi/piloopdrumbox/resources/Button_pad.py:78: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. GPIO.setup(self.colorPins[row][color], GPIO.OUT, initial=GPIO.LOW) priority 6 scheduling failed; running at normal priority priority 8 scheduling failed.

Thank you for your help!

NeoTrellis Pad not recognized?

First, thank you for providing your code and the cad files. I'm in the process of setting this up on a Raspberry Pi Zero WH.

I'm using the same hardware as you, only the Pad is different as I couldn't get a hold of the one you are using (I'm using Adafruit NeoTrellis RGB: https://www.berrybase.de/neu/adafruit-neotrellis-rgb-treiber-pcb-f-252-r-4x4-keypad?c=2434).
It comes diodes/LEDs already installed.

I'm having some trouble getting you script to work and it would be great if you could offer some help.

I'm pretty sure I've installed all the necessary modules and libraries. My LCD is working and my 4x4 pad input is properly recognised when testing with a test script from the NeoTrellis install instructions.

When I run main.py via python3, the output looks like this:

/home/pi/piloopdrumbox/resources/Button_pad.py:73: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  GPIO.setup(self.btnRowPins[row], GPIO.IN, pull_up_down=GPIO.PUD_UP)
/home/pi/piloopdrumbox/resources/Button_pad.py:78: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  GPIO.setup(self.colorPins[row][color], GPIO.OUT, initial=GPIO.LOW)
priority 6 scheduling failed; running at normal priority
priority 8 scheduling failed.
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...
connecting to port 4000
watchdog: signaling pd...

It continues indefinitely with the "watchog: signaling pd..." statement.

Button presses do not seem to be recognised at all, nor are the two bottom rows lit as shown in your video.
I'm assuming the code is written in a specific way to only work with the model of Pad you are using and mine is not recognised properly. Is there a way to get this to work with my pad? Otherwise I guess I will have to find the one you are using.

Could you offer some help?

I've attached a file of my wiring.

Thank you
wiring_piloopbox
!

Better communication with external process

piloopdrumbox/main.py

Lines 11 to 44 in 56b01d7

def read_output(pipe, q):
"""
reads output from `pipe`, when line has been read, puts
line on Queue `q`
"""
while True:
l = pipe.readline()
q.put(l)
# Perform a git pull to get the latest version on boot
print("Checking for updates...")
dir = '~/piloopdrumbox'
g = git.cmd.Git(dir)
g.pull()
#PD_PATH = "/Applications/Pd-0.51-1.app/Contents/Resources/bin/" #mac
PD_PATH = "" #pi
PORT_SEND_TO_PD = 3000
PORT_RECEIVE_FROM_PD = 4000
# Set up the GPIO library and Pins and send the PD_to_py info
buttons = Button_pad(PD_PATH, PORT_SEND_TO_PD)
buttons.setup_buttons() #Initialize the Pins of leds/buttons
# start the socket
print("setting up socket...")
args = ["sudo", "pdreceive", str(PORT_RECEIVE_FROM_PD)]
proc = subprocess.Popen(args, stdout=subprocess.PIPE)
# Queue for storing output lines
proc_q = queue.Queue()
proc_t = threading.Thread(target=read_output, args=(proc.stdout, proc_q))
proc_t.daemon = True
proc_t.start()
time.sleep(1)

What I suspect to be a better solution is to use the build in .communicate of subproccess.Popen. Instead of only stdoud, give the entire pipe to your thread. And pull information by means of pipe.communicate().

So in your case it would be something like:

def read_output(pipe, q):
    while True:
        stdout, stderr = pipe.communicate()
        q.put(stdout)
        sleep(1)

...
proc_t = threading.Thread(target=read_output, args=(proc, proc_q))
...

Though I am not sure what your running program will return and whether dupplicate informatie will be returned... Have to see some more information

Drumbox hardware and rpi hats

Hey! I thought this project was super cool. I was contemplating building a midi controller with my RPi for a couple of days now but looking at this I realized quite quickly that a multichannel looper like this would be much better for my uses.

What kind of beatpad hardware did you get, where did you get it from and did you use any RPi hats to do this?

Edit: I watched the first bit on my phone and got super excited and forgot to watch the rest. You've already integrated a keyboard into this so you're able to accept midi inputs from other devices. Would I be able to plug a guitar into this raw and have it do the same, or would I need a ADC in between?

Does this also support output to a DAW like Ableton?

So how do I connect all the wires

Would love to build this thing but for now have only programmed on the Pi. I have no idea how I should connect all the wires.

Also, will there be a "save" option in the future?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.