[grid] - Easy grid I/O for vanilla pd

[grid]

[grid] is a vanilla pd abstraction for communicating with grids.

2021-09-06T20:49:54+01:00

[grid] is my vanilla pure data abstraction for making grid I/O easy. When I first got my grid I wanted to use it in pd patches, but the serialosc abstraction on the pd grid studies page was out of date and required additional externals to work in current vanilla versions of pd, so I built my own that is 100% vanilla.
I’ve been using this in my personal patches for a while and it has been working well so I thought I’d share. (if this is in the wrong subforum feel free to move it!)

Known Limitations

  • Connects to the first serialosc device only, and assumes that it is a grid.
  • Has some funky behavior if you have two [grid] objects in one patch.
  • May be a little inflexible in other ways - tell me if you spot any!

I would love to fix some of these, but I don’t have access to any setup with multiple serialosc devices so I wouldn’t be able to test whatever solution I came up with.

Requirements

  • grid - varibright is supported, but any grid should work
  • puredata vanilla (purr-data should also work, but I’ve not tested it)

Documentation

Documentation is accessible from inside pd by right-clicking a [grid] object, or looking in the grid-help.pd file in the download.

Download

v0.1.0 - https://tildegit.org/nihilazo/pd/archive/0.1.0.zip

Git Repo - nihilazo/pd: pure data stuff that I use a lot - pd - tildegit

Installation: download the zip or clone the git repo, unpack into a folder, and make sure that it’s in your pd path (add the folder in pd’s file->settings->path window)

33 Likes

Have you tried this with an organelle by chance??
I’m curious about sending information back to the grid for variable lighting and sequencing. Would you be able to share a screen shot of what that would look like?

i’m so excited about this! however, i can’t seem to get my grid to connect… tried the two i own, separately of course. here’s the error messages i get:

netreceive: listen failed: Address already in use (48)
unpack: type mismatch
unpack: type mismatch
unpack: type mismatch
unpack: type mismatch
unpack: type mismatch
unpack: type mismatch

tried disconnecting and reconnecting, etc. possible i’ve missed something silly. any ideas? anyone else getting this error?

EDIT

looked deeper into the main patch, i’m guessing all i need to do is update the get-device-port patch and change the localhost numbers to the ones relevant to my computer. just gotta remember how to do that! i know there’s a max patch that tells you your addresses in serialosc. can’t try this til later but will advise if this fixes it

ANOTHER EDIT

it’s been a while since i’ve done anything with monome in max, and i forget where that utility patch is, that tells us what port we’re using for what device… what’s it called?? i can’t find it!

EDIT 3: THE EDITENING

found it! it’s called Monome Home. updated some things, i no longer get an error message - i don’t get any messages - but i don’t have any response from the patch or grid yet.

@PedalsandChill
I haven’t tried this with the organelle as I don’t have one, but it requires serialosc, which I’m not sure would run on an organelle. There are examples of what grid output looks like in the help patch.

@reallyok
The patch tries to get the address of the device itself from serialosc rather than requiring one from monome home - the error message you originally got makes me think you either have something else already connected to your grid through serialosc (the patch opens a connection itself) or something already using port 9999. If you close everything that might be using the grid other than serialosc itself (with the unmodified patch) then do you see any change?

i had nothing open at the time, and i reset my mac to try again… same error. is there any way i can see what is connected to that port?

not sure on a mac, sorry (I work on a linux machine).

1 Like

can’t seem to find anything connected to that port. really strange. i’ll keep looking into it.

i’d like to know if anyone else has tried this object yet! am i the only one having issues? i’ll update here if i come up with anything.

On MacOS i need to do this sometimes when the serial port has been used by something else.

launchctl load /Library/LaunchAgents/org.monome.serialosc.plist

or

launchctl unload /Library/LaunchAgents/org.monome.serialosc.plist

You probably want load

EDIT - these are commands you enter in the Terminal.

1 Like

thanks for this! unfortunately the behavior is still the same. i used “load” first and it told me the service was already loaded. unloaded and loaded again… same error message on connect.

in my own searching last night i came across this command

sudo lsof -PiTCP -sTCP:LISTEN

which did list my ports… but nothing in 9999. i used the network utility to try to see what’s connected to port 9999… and it came up blank.