1

This is my first post. I am trying to make a drum kit using a raspberry pi. The drum triggers are some peizoelectric sensors. I have used pygame inside python to play sounds. When the script detected gpio inputs, it played drum sounds. It was fine for the most part but due to latency issues, I took another approach and decided to use puredata.

I want python to detect gpio inputs and then send signals to puredata, which will play the desired sounds.

My question is, how can I get python to send simple signals to puredata??? I am running both python and pd on the same pi.

Also, what do you think of this approach i.e. using puredata directly from gpio inputs? Can having a microcontroller like arduino to send the signals as midi signals to pd affect anything??? Thank you in advance!

CDJB
  • 14,043
  • 5
  • 29
  • 55
Shaurya
  • 63
  • 5
  • There's some Puredata-GPIO notes over at http://pi.bek.no/pd_wiringPi_GPIO/ – AKX Apr 01 '20 at 16:16
  • Please refer to [how to ask?](https://stackoverflow.com/help/how-to-ask) in order to edit your question to follow the guidelines. In that way it will be easier for people to help you. Also, If you have any code with what you have tried and the error produced by such code it will be amazing! (If you are going to include code, please do it as text) Thanks! – EnriqueBet Apr 01 '20 at 23:08
  • Hi. The link that you provided only shows that gpio can be used with pure data. I am confused on how to use it. Is wiringpi an object box inside pd? Many posts say that we can comport to do this too, but I can't find instructions on how to use comport as well. – Shaurya Apr 02 '20 at 02:21

1 Answers1

1

I'm going back about a decade but I used Python to send data from the 3d modelling software Blender to PureData using the socket library.

This article might help a bit more with packaging up and sending across.

If you know what your components within PD are expecting as an input that will help you know how best translate your input triggers into packages to ship over socket to PD.

trunk8
  • 11
  • 2