monome gs128 is working here on raspberry pi 3 + supercollider headess.

i am using this image: 2016-05-27-raspbian-jessie-lite.img
and this guide: http://supercollider.github.io/development/building-raspberrypi

i just edit this line for onboard sound (-dhw:0):
jackd -P75 -dalsa -dhw:0 -p1024 -n3 -s -r44100 &

then i installed libmonome & serialosc using step 2 from this guide:
http://monome.org/docs/linux/
and step6, to load kernel modules:
$ sudo modprobe usbserial ftdi_sio
$ lsmod

i did ermina suggestion:
(and added usbserial and ftdi_sio to /etc/modules so that they are loaded on every boot.)
and rknLA corrections from this post.

also added a line to autostart.sh, after
/usr/local/bin/jackd -P75 -dalsa -dhw:0 -p1024 -n3 -s -r44100 &
i added
/usr/local.bin.serialoscd &
for serialoscd autostart…

then used putty to move supercollider monome classes (monom-master)
(from https://github.com/catfact/monom/archive/master.zip)
to /home/pi
and after
sudo mv monom-master /usr/local/share/Supercollider/SCCassLibrary/.
(putty didnt wanted to move right away, something with permissions…)

i am running a modversion of grid-studies-3-5.scd
(for non varibright models, see http://archive.monome.org/community/discussion/comment/213275#Comment_213275),
using top(linux cmdline app) i measure CPU 21%…

i tried also Switch to use my gs128 with rpi and WW without luck.
so switching between modules and computer only works with mac? doesnt work with my windows also…

thx for all help here, thx ermina e rknLA!
:slight_smile:

5 Likes

What are the chances of making a bootable image from your SD card in its current state? I use Pi Filler (http://ivanx.com/raspberrypi/) to restore from back ups (made from Pi Copier) and was thinking of how much easier it might be to such a process. I apologize in advance if there is an obvious obstical that would prevent such an endeavor, I’m a noob to Linux and maker boards. I am also, however, the proud owner of two raspberry pi 3’s!

the first thing i tried to do after running mycode.scd was a backup image.
i did one with win32DiskImage, but i am using a 16gb microsd!
does anyone knows how to backup only 2gb?
(i am not using 16gb at all!)

maybe with sudo raspi-config to resize partition?

if you have a mac around try pi copier: http://ivanx.com/raspberrypi/

1 Like

I second pi copier, as well as the other utilities from Ivan x, but I do believe they are limited to OSX.

Hello, this is my first time posting to lines (though I used to be a monome.org forum regular)!

Just want to share a recent project involving a 128 and a raspberry pi:

Not an original concept, but I thought I’d try it this time with pure python (using pyserial) in a pi. The servos are driven by an arduino uno.

I wrote my own monome python library (at the time I wrote it, pymonome didn’t exist yet), which is functional but not really meant for general use.

Also, I’m a python novice so the code is kinda messy :slight_smile:

13 Likes

are those the regular kind of servos you’d find in a remote control car? Also could I pick your brain about the raw monome serial protocol if you already hand-rolled a monome driver?

There are a couple of things about libmonome that seem to not sit super-well with my current software project (codename serial-hub) - already wrote my own raw midi drivers for lisp (no FFI), a module specially for boomerang pedal, and did hostside aleph serial protocol the same way. In that context it’s kinda clunky bolting on libmonome rather than having the monome interface work like the 3 other supported serial protocols…

very nice!

(You could probably get away with the servo driver talking serial direct to your Pi’s GPIO ports - if the servo driver is a SPI/I2C device.)

I pretty much depended on this spec while I was writing my monome library:

http://monome.org/docs/serial.txt

I don’t have experience with libmonome, but I do recommend trying out the raw serial route. I find it wasn’t too difficult to write for it (though it was a huge barrier for me at first as I started with zero python/serial knowledge).

And yes, those servos are the regular 9g ones you can get off RC shops.

Thanks! I think did consider using GPIO (can’t remember exactly as I planned this thing many years ago), but ultimately decided it would be cooler to use an arduino to handle servo movements. Yep, it’s pretty much the cool factor haha :slight_smile:

ha yea I think @tehn pointed me in that direction at some point last time I was thinking/asking about this. Must’ve got more computer-literate in the meanwhile - message descriptions actually making 100% sense this time around, very clear document…

Still stuck at the same point as last night though, not able to simply print all the bytes coming in off /dev/ttyUSB0 …

EDIT:

Bah - sorry to rubber-ducky the forum - I found the answer to my own question immediately after asking… It’s a gotcha I already ran into with the aleph, you first have to call stty -F /dev/ttyUSB0 raw before opening the file.

Still seeing something strange though… If I run my finger along a line of buttons pretty fast whilst reading from /dev/ttyUSB0 the monome will go crazy, light a bunch of random leds & stop responding to the input commands. Zoinks! this bug is intermittent (totally gone now) and possibly usb cabling-related. All is well, back to building fun stuff!

EDIT:
slept, rebooted, back to buggy… I have now solved the intermittent bad behaviour with furious button-mashing (hopefully once & for all). For the record a UNIX incantation for a well-behaved monome grid goes thusly:

stty -F /dev/ttyUSB0 115200 sane -brkint -icrnl -opost -onlcr -isig -icanon -iexten -echo -echoe

after that, one’s programming language of choice can just read/write raw bytes to/from /dev/ttyUSB0. Kind of wondering now whether some of the weird hangs/craziness I saw running serial comms stress tests flat out on the aleph could be attributed to some missing stty options???

relevant libmonome code for opening a monome on POSIX systems:

1 Like

For my own implementation I did not need to run that command beforehand but it’s probable that the pyserial module is handling all of that in the background. The only parameter I needed to declare in my code was the baud rate.

I never did button-mashing stress tests on it, though, but it seems to hold up with moderate button usage (say 2-3 buttons pressed/depressed at at time). And it seems to work consistently across my Windows desktop, Fedora laptop, and Raspberry Pi with Raspbian.

Just bought a RP3 B and have a grid kit sat waiting. I’m hoping I can pull of some simple music fun with it

2 Likes

this seems to be a readily available solution for getting 2 channels in/out of a pi:

http://canada.newark.com/wolfson-microelectronics/cirrus-logic-audio-card/hd-audio-card-wm5102-stereo-rpi/dp/84X8125?CMP=KNC-GCA-GEN-SKU-WOLFSON_MICROELECTRONICS&gclid=COSTlOTd1c4CFVFcfgodLqQPbA&mckv=sNhtcfBBo_dc|pcrid|42812471753|plid||kword|cirrus%20logic%20audio%20card|match|p

could be a manageable, affordable route to deploy something like @askbre’s molisam software on ARM (for those of us that missed out on bela’s kickstarter). I read one blog post that claims they got a low-latency (1/2 ms) audio setup cooking along these lines…

http://blokas.io this looks interesting

3 Likes

yah - looks like another good option - couple of built-in midi ports is a nice bonus! Of course the midi circuit is totally trivial to hijack pi/bbb UART - the thing that seems really tricky for more ‘casual’ DIYers (barring mad kernel-hacking skillz) is hooking any ol’ i2s DAC into alsa.

Anyone know of a linux kernel module or something that works like ‘blank codec’ for one of these little arm boards? I.e input/output i2s clocks & signals on the relevant pins, leaving any i2c configuration to hand-rolled driver in userspace? How would one set samplerate & pcm data-format with such a thing? (assuming something actually exists - I googled couple of times and came up empty-handed)

Actually quick and dirty i2c configuration of most audio chips can even be done quite effectively using shell-scripts leveraging tools i2detect, i2cset & i2cset. I’ve done quite a bit of hacking around/bodging with one of these usb->i2s bridges - but obviously latency is nasty for music purpose because USB. stereo audio i/o on a pi gets a lot more interesting if you can also switch off the DAC’s DC offset correction like these awesome little things http://www.expert-sleepers.co.uk/es3.html

Is anyone starting serialoscd automatically as part of their Raspberry Pi boot sequence?

I’ve tried calling serialoscd from /etc/rc.local but I’m having problems with the orientation of my grid when I do that (it’s 180 degrees out)

If I start serialoscd manually, then there is no problem.

Perhaps running from /etc/rc.local means serialoscd fires too early access the config file, or something?

Any suggestions would be most welcome.

regards,

Mark

did you try this ermina` suggestion earlier on this post?

hmmm sounds like I will also run into this once things are running well enough to think about moving from my dev laptop to embededded…
EDIT:
no! I won’t because I rolled my own serial driver for monome in lisp ha!

maybe it’s possible to have /etc/rc.local run an auxilliary script in the background, where the first line of aux script is sleep 20. Like this:

/etc/rc.local :
/home/rick/bin/run-serialoscd.sh &

/home/rick/bin/run-serialoscd.sh:
/usr/bin/sleep 20
/usr/local/bin/serialoscd

haven’t actually tried this myself - quick enough to suck it and see…