Crackled Audio from PD on Raspberry Pi 4
I'm running a Raspberry Pi 4 with "Raspberry Pi OS (32-bit) Lite [August 2020 / 2020-08-20 / Kernel 5.4]" headless and the latest version of Purr-Data, set up the Raspberry using this guide , did the Alsa no audio (glitch) issue Pi 4
fix to get audio working through the 3.5 mm jack.
I'm interfacing the Raspberry Pi through the macOS terminal and with VNC Viewer through ethernet.
I get the following error as soon a starting Purr-Data,
error: audio I/O stuck... closing audio
I open up a patch and turn off and turn on the DSP signals and get the following error
error: audio I/O stuck... closing audio error: audio I/O dropout
Even though if I play sample .wav or bang a sinewave, the audio does get played but it gets glitchy as in the audio sound is crackled.
has anyone experienced it before? any knowledge on how to overcome it?
[key] ... resolve problem with OS repeating key numbers alternately.
[key] on my computer can send streams of key numbers that cannot be stopped with [change].
Pressing key numbers 3 and 4 and 5 at the same time can (not always) send 3 4 5 4 5 4 5 4 5......until released.
[key-debounce] key-debounce.zip creates a separate [change] in [bonkers] for each key...... from 0 up to 300 (probably excessive), which is reset by the [keyup] number for that key.
This should be useful if you are trying to make a virtual keyboard.
Vanilla only.
Here is a basic virtual polyphonic keyboard for testing...... virtual-keyboard.zip (requires synth or soft synth....... sends midi from Pd to the device you set in Pd settings).
Maybe someone will find a better solution?
David.
pd~ subprocess on rpi
@francis666 No, but you might need to run Pd in background, and I have seen that with -nogui you need to delay the start of dsp (by maybe a second or two).
Although not specifically for [pd~] there is more here..... https://guitarextended.wordpress.com/2012/08/28/running-pd-on-a-headless-raspberry-pi/
..... which also helps as you then have access to the Pd terminal.
David.
how does zexy "date" object work on raspi?
I'm going through old threads of mine and realising I never came back with an update to this.
In a nutshell, the answer to my question is that in order for the zexy "date" object to get the date the Raspberry Pi either needs to be connected to a network or needs to have a Real Time Clock (RTC). These are very cheap:
https://thepihut.com/products/mini-rtc-module-for-raspberry-pi
You need to follow the instructions for getting the Pi to get the RTC calibrated and working, but I had success the first time around with these: https://thepihut.com/blogs/raspberry-pi-tutorials/17209332-adding-a-real-time-clock-to-your-raspberry-pi
With that up and running the zexy "date" object appears to work great even when the Pi isn't connected to a network.
newbie: can i do this?
@emens 1. https://guitarextended.wordpress.com/2012/11/03/make-python-and-pure-data-communicate-on-the-raspberry-pi/
- Yes.
- Yes. The vst instruments can be CHOSEN...... a decision as to which one you want to control. But the objects [vst~ myplugin] will need to match the vst executable (32/64bit) and the Pd version bits and the os. I know that it works for 32bit.
[vst~plugin] has been built for 64bit........ https://forum.pdpatchrepo.info/topic/11953/vstplugin-v0-1-0-released
You will need [vst~_help] for the 32-bit [vst~]....... https://forum.pdpatchrepo.info/topic/9319/how-to-use-vst-object/2
You should look at this........ https://forum.pdpatchrepo.info/topic/11096/making-an-audio-vst-for-raspberry-pi
This...... https://forum.pdpatchrepo.info/topic/11605/loading-3rd-party-plug-in-problems
You can open (SET) just the vst that you name in python but you will need to understand dynamic patching for that........ unless the new [vst~plugin] can call different vst's.
Not sure what you want to achieve. Some want to use Python to create pretty graphics, but the vst plugins already are much prettier than anything you can easily create in Pd.
If you want to save and recall presets then you can do that in Pd.
David.
Pd working headless on a raspberry pi in 2018
Hey everybody,
I'd like to get pure data working on my raspberry pi to run headless, open a patch, accept audio input, and send it on out to the worth.
I have a sabrent usb audio device, It works fine if I open a gui and load pd within it. Upon loading the gui Pd takes the sound card, is happy, and a very simple patch of adc->dac puts the audio out.
I can't get it working headless. I've followed every internet advice. I know this isn't the fault of pure data but of Linus Torvalds/the Linux community, but I'd like to plug in the raspberry pi, get it going headless on say, ring mod into some delay, and just go from there. But will this ever be possible? Please help.
I wiped the microsd card today, installed raspberry stretch, and that's what it runs on now.
Thank you.
A dying soul.
how do i close ofelia render window?
@youaresound Yes, that's a RPi specific issue.
I think it happens because OF doesn't use X11 windowing system on the RPi as a default.
https://forum.openframeworks.cc/t/program-window-on-raspberry-pi-doesnt-behave-like-windows-on-other-platforms
However, I think there's a solution to make it use X11 by recompiling OF using different setting.
https://forum.openframeworks.cc/t/raspberry-x11-window
I will try this later and see if I can fix it.
Scalar keyboard for Purr Data
I would like to share my little keyboard abstraction.
Visualizes MIDI notes in and sends out MIDI out from computer keyboard (polyphonic) and mouse. Tested and fully functional on Windows 10 with Purr Data 2.5.1 but sadly the overlapping scalars where very glitchy in vanilla so I did not bother fixing it.
how to control 40-pin extended GPIO on rasberry Pi 3
@davidborrao Use the help file for comport (right click the object..... then help) and click [devices( to get a list of available ports on the RPI.
But I have misled you..... comport can be used to send and receive data on the gpio serial port pins.
What you want could be done in python. The pin states can be retrieved with digitalRead([pin] ...https://learn.sparkfun.com/tutorials/raspberry-gpio
and you would have to write some code to send the info through a local port to a [netreceive] object in your patch.....
There is some help with that here....... https://guitarextended.wordpress.com/2012/11/03/make-python-and-pure-data-communicate-on-the-raspberry-pi/
There is just a chance though that you could make this work......... http://nyu-waverlylabs.org/rpi-gpio/ by compiling it for your rpi. There is a readme in the download about compiling.
If that works it would give you direct read and write access to the pins without Python, and be by far the easiest solution.
David.
Getting Pure data to work on Raspbian Jessie (giving pure data permission to access device?)
@alexandros Thanks for your reply. I'm using extended as the PD file i am using requires a number of externals for it to work. PD-L2ORK would be great, but after a number of attempts, I can’t seem to get it working on raspbian Jessie, using step 3 on http://l2ork.music.vt.edu/main/make-your-own-l2ork/software/raspberry-pi/ (since I am not running it headless as I have a screen mouse and keyboard for the pi) the install seems to run smoothly but then after there is no trace of the program anywhere on my raspberry pi, just the download file sitting there. So I ended up settling for extended instead.
I should have the udev rules, since I installed teensyduino using the script here https://github.com/cmcmurrough/cse2100/blob/master/teensy/install_teensyduino.sh which also installs the udev rules.
Might the problems be with identifying/permissions for the correct output? In my case this is a USB to the teensy. I’m a newbie to both raspberry pi and PD, so don’t know if I need to/ how to pre-configure these (if I need to that is).
Thanks