Raspberry Pi and Pure Data

I just got a Pi 3 and managed to get pure data (vanilla) up and running over the weekend. It is working really well.
I never used a pi before, and after seeing the critter and gittari organelle I really wanted a small machine to run my pure data creations on.
:slight_smile:
Anyone else out there trying this?

2 Likes

it’s a neat piece of kit for sure!

haven’t had time to really dive into it yet.
but I’m using my PI v2 headless, it has a wifi dongle so I just log into it via ssh from my computer and do commandline things. the v3 has wifi built-in? that is very nice.

(made a very basic little thing here:


maybe it’s of use to you, it simply creates a sync signal for TE PO-XX or Korg Volcas from incoming USB-MIDI clock)

edit: how is the built-in audio DAC/jack? the audio port on the PI-2 is very lo-fi, not really useful for audio things - but can of course use USB-audio devices…

1 Like

hell yeah! iam using it a lot after selling my organelle and thinking 'bout a cheaper way to do so…

iam using a 10€ usb sound card and this is a nice set!

…the Beatstep gives an excellent controller for that PD Synth and Organelle Patches.

iam streaming all that content to my Ipad. VNC



2 Likes

The audio out is quite noisy on the pi3.
I’ll have to try the sync thing with my electribe 2s and see what happens.

I have 3 RPi now, 1 in my workshop as an internet radio, it is an old v1 model B running MPD with the adafruit pitft, then I have a model 3 in my living room running retropie for oldschool gaming fun and another card for general messing about, then I have the Fuze https://www.fuze.co.uk/product/fuze-rpi-c1/keyboard with a model 3 it has a decent GPIO board with some analog outs, I plan on using it for prototyping and just messing about with.

On my old model B I actually had PD and PD extended working, it was not too bad IIRC, I have not tried it on my model 3 yet as I have an Axoloti and Patchblocks but I might install it someday.

Definitely check out SonicPi, in case you did not know it is a live music coding app based around Ruby and Super Collider, I have found it to be very interesting and much more powerful than expected, you can set up quite complex musical structures, you can even use your own samples with it. Well worth spending a few hours fiddling with it, I found it easiest to load the examples and edit them, got some cool stuff happening in next to no time. It also has a built in audio recorder to capture your jams. Highly recommended!

Another excellent app is SEQ24, it is a midi sequencer designed to be simple to use like the old hardware sequencers like MMT8, Q80 etc but it take things a bit further, you can do all manner of time signatures, each track can have its own length and signature, and tracks are mapped to the keyboard for easy pattern mute jamming, very stable and reliable and the timing seems excellent. It can support multiple midi interfaces and even works well with those cheapo chinese USB-Midi cables.

Audacity also runs fine on the pi.

Sadly the analog output on the 3 is still just as bad as ever, I use either a cheap USB audio adapter (£3 on ebay) or my Roland UA-11 mk2

I am trying to find a tracker for the pi next, seen a couple but not tried any yet - anyone tried a tracker on the pi?

2 Likes

Very interesting thread.

I bought myself a raspberry (2 I think) last summer and managed to get it up and running in quite basic way. Never done anything in Linux before so lots of new/different/confusing stuff. But anyway, I managed to get my display running (5" touch, adafruit), so I at least could see its status. Then I managed to get an remote wifi connectivity with my Win 7 laptop by following an instruction that someone had in his blog. Then my SD card somehow broke, and when trying to get a new one up and running my laptop suddenly isn´t really enjoying seeing SD-cards any longer. Tried with two different card readers as well as different cards, with no difference as far as I could see. Now I don´t remember the exact issues, but some searching on internet pretty much confirmed that Win 7 could be very finicky in this aspect as it were the exact same error messages I got.

Have since then been on hiatus long time. And when trying again a couple of months or so ago, I´m now afraid that I might have blown my display as it were just a white screen.

Would be nice to have an prepared distro(build?) where it already is assigned to primarily being headless with wifi remote connection. So I could just log in to it remotely. But it seems to be so much to learn/understand though to even get close…

What OS are you using?
I´d like to use one that is very basic but stable, and then having my raspberry to be used primarily for MIDI.

Any suggestions of websites, where to learn more in regard to the abovementioned problems and intended use?

Interesting thread, indeed.I’ve been running EigenD headless on a PI2 to control my A4 and Axoloti from my Eigenharp. Just a linaro distro (Raspbuntu I think it was called) auto-loading EigenD on startup. I don’t know my way around Linux either, but with some googling and help from Technobear (who ported EigenD to the PI2) I got things working.

1 Like

Hi Guys, and @miketheman

yeah! after some research in different Off-topic threads i stumbled over Kano OS…gives you a stable Rasbpian distro, no hard terminal coding for the first tasks and an easy puredata operator. …after installing it. (sudo apt-get install puredata) …after that you can stream it to whatever mobile device you have. (VNC) tweak some sound card params and you are ready to go.

1 Like

@JohnnyEgo:

Thanks! Will look into it when time permits.

thanks guys!

so, can i use the organelle patches on the raspberry then?

^ You should be able to.

Just bought a 9 inch LCD and enlcosure kit for my pi in the studio https://shop.cyntech.co.uk/collections/hdmipi/products/hdmipi-9-lcd-screen-kit

Going to mount it on the wall and use SEQ24 with a 4 port USB midi interface to drive all my Roland Boutiques, Reface DX and some midi to analog trigger gadgets and midi to CV stuff, not sure how well it will work with my other gear but I don’t envisage any problems.

Also probably will use it for some PD and SonicPi for sampling fodder, as well as using audacity for some simple audio editing duties.

1 Like
2 Likes

wondering if any of you regular Pi folks know whether one can run PD or less basic alsa commands at teh terminal level as scripts etc - i.e. can PD be run at some level without starting a PI GUI environment

i’d recently revived an old script i made way back when the very first Pi came out - basically as a USB Midi host - i’ve had to restructure this bash script a bit to account for the fact that the Korg SQ64 shows up with Multiple entries and it’s not the first entry which you need - the syntax of scripting (on a normally headless device) meant that debugging was tedious, shuffling between two rooms etc

That’s all good - but in addition to ‘smart’ pairing of any available controllers/modules - i’d like to introduce the possibility to cycle through ‘hidden’ multitimbral programs in my son’s Roland Piano (no screen and there’s a whole bunch of impressive stuff otherwise far out of reach) - this means a way to use GPIO to run a terminal script that can script MIDI

Not sure that PD could be run that way, but perhaps ALSA can be deployed which might be a bit more tedious - anyway, anecdotal feedback about there being zero hit for loading the GUI would be interesting to hear about - keep in mind this is the very first Pi

thought or links welcome to this general area - might have to look into what void did above to glean some inspiration.

Korg SQ64 has a lot of legs, but is not such a great combo with this Roland’s default GM piano - i need a way to send program changes - the bluetooth hook-ups are a bit flaky from smart devices (it only has a USB Midi port, doesn’t even have audio outs - only headphone outs!! great Piano modelling and keybed though when used for its day job)

Looking to add some fun to it with the SQ/Pi/powerbrick and a means to physically run scripts (even monitoring MIDI activity would be fine) - just want to avoid adding latency

1 Like

I’m definitely not an expert but I once run PD on a Raspberry without the GUI. The command was as simple as typing « -nogui » or something like that.
I found the info quite easily on the web, but I can check when I’m home in a couple of days.

1 Like

ahah cool - i was really so convinced that would be off-limits i didn’t even search - interesting !

hopefully there will be a way to do lots of this with PD as i’m fine in Max/MSP

will aim to establish if headless PD stuff can run and monitor Midi USB note/control input whilst a shell script links the hardware … ideally with no impact on the ‘host’ connection

okay this sounds like it has legs :thup:

Further thoughts on this headless Pi situation

I’ve got a launch Pi which i’ve set aside for USB Host and controller duties

Currently the main thrust of this is to make access to the innards of a Roland Piano possible … there’s no screen and it uses key combos to load sounds, but there are multitimbral sound engines hidden from view and exploiting that will add another dimension to my Son’s learning on that (and me too)

I’ve done a quick check on pattern matching to change sounds - playing specific keys in a defined order - a bit clunky, but a first proof of concept.

This Pi will not start X windows (not even loaded into OS) - so i wrote off the thought of an interface, besides maybe a few pots and switches to scroll through settings - but the relatively cheap price of oled screen (using 12c protocol) caught my attention and it became apparent that this would be perfect for this setup - i can do all the midi stuff in Pure Data and ideally establish a way to get those numbers out and rendered on the screen - even allowing for dialling in and selecting effects - it’ll add a lot to the table

Then the thought struck me, with all these original iphones lying around - surely there may be a way to present data over the network such that the phone can present an interface of sorts (not a remote desktop view or a SSH terminal view) but a way to tackle this issue in preference to possibly using the OLED

Googling this brings up results which are 100% about using the phone as a remote screen - rather than as an addressable terminal or something more first principles - don’t think i know the right terms to google that may narrow down my searches

but i’d be interested in any insights or user experience with the oleds and scripting text to those from a command line os or using old phones as interfaces or other ways to achieve teh same end - the og pi has two usb ports, so i need both for the piano and controller - so USB solutions may not be ideal, it has ethernet and i can SSH into it from other devices so maybe a networked solution or an oled/switch/pot gpio solution is what i’ll end up with and that seems well discussed (although maybe not in terms of Pure Data ‘integration’)

thoughts/terms welcome … to steer me in a productive searching direction

short answer : using oleds is easy and cheap :slight_smile:

longer answer:
interfacing with phones…
so the problem is, you have to have a protocol and then something to talk to on the other side.
remote desktops seem a bit heavy for this.
I guess if its an android phone, you could write your own app ,and your own protocol… but thats getting to be quite a lot of effort.

if your familiar with web technologies, then you could use this … so you use your phones browser, and basically run a server on your rPI talking to your app.
(this is become a common approach for embedded devices)

of course, other question here though… at this point why use a rPI at all… just run the app on your phone :slight_smile:

OLED/pots/encoders
main advantage is it standalone.
writing to oleds is pretty simply esp. since a lot of them use the same I2C or SPI protocols,
so there are a ton of C++ libraries, or even python to help with interfacing to them
similarly there are a ton of open source projects you can go check out the code for.

e.g. the Organelle M by Critter and Guitar ‘mother’ code is interfacing with oled and encoders, so would be a good starting point.

as for interfacing with PD, two choices really :

easy : have the hardware code running in a separate process, that communicates via something like OSC to PD (approach taken by C&G for Organelle)

bit more involved: write a PD external which talks directly to the hardware
its a bit more involved, since it’s likely to have to beC/ C++ ,and you need to do hardware interaction in separate threads.
Ive got some code that did this for Terminal Tedium.

so if you want a simple solution, and perhaps to prototype…
Id be tempted to get an oled and encoders, and perhaps look at doing it in Python.
(just make sure the oled you choose is supported by the relevant python library)

1 Like

I am not 100% sure but WRT the iphone there are a couple of apps that might do some of what you want PDparty or MobMuPlat but check as it is a long while since I tried either of them.

1 Like

The pi is primarily my USB host for the devices which don’t have any regular midi

But thanks for the comprehensive points, lots to feed into this and it’s good to hear that the oled approach is sensible as it’s probably the most fun to attempt tbh

The web angle is something I had overlooked completely. Food for thought

Good shout - I did use an app on the og iPhone that required addressing the phone with openGL through an external in a Max environment. It shows, along with those linked apps( one of which I definitely have), that something could be in reach that way.

Ideally doing something with an oled and buttons etc will fire up my son’s imagination for making, so I may gravitate to that first.