Kria Max Patch?

After installing the XCode command line tools, install homebrew following these instructions

Then brew install liblo

1 Like

ahhhh, that got me so much farther (i think)! I ran again with liblo installed and got an error for jansson so i googled that and installed that too. then ran again and it worked! yay. it created bees_op.pd_darwin so that takes care of the linux -> mac thing

…problem is now that i have that installed in my pd externals /Resources/extra the objects used in bees_ops_grid.pd are still not found (red dashed boxes)…not really sure where to go from here…from what I understand a .pd_darwin (or .pd_linux) contains a compiled binary pack with multiple externals, but I’m not sure how to check that or anything. I assume bees_op.pd_darwin is supposed to contain the externals used in bees_ops_grid.pd

in the pd dialog box, im getting this error (along with “…couldn’t create” messages for all the externals). something to do with liblo, i guess?


ok, that error means it doesn’t find the liblo dynamic library at runtime, for whatever reason. (brew link liblo ? i dunno. homebrew is weird)

i’m sorry to say that i think this is not the optimal approach. what you want is to just take the source code for kria (either from the euro firmware or from the bees operator) and wrap it in a pd object. or a max object. or both. (not wrap all of bees, which is big and strange.)

this is not very hard if you have ever build pd/max objects before. if you haven’t, there’s gonna be a lot of little stumbling blocks.

i’m additionally sorry to say that i cannot volunteer myself for this right now. i can only point at the pd/max sdks and tutorials.

if someone really loves javascript i can’t imagine it would be too hard to just write up the kria functionality in that environment and plop it in a max.js…

1 Like

Ah, ya that makes sense. wrapping it in a max object makes the most sense to me, but I’m not familiar with that process. I have begun learning max, and I’m down to figure it out (I’d like to learn through these ventures). Whatever advice you could give in the way of pointing to max sdks and tutorials would be really appreciated! I don’t think I’m ready for javascript…

but, but… i’d suggest that making a javascript object in max is quite approachable, compared to building a custom max object in c. that is kind of its reason for being.

and that said, i’d suggest just make stuff in max until you are quite experienced with it and feel yourself straining at its seams. rather than diving in at the deepest end.

think about what properties of kria you like; chances are they are not so hard to achieve in whatever environment is most convenient. i can almost guarantee that setting up an xcode project to build a max external using kria firmware is the least convenient approach.

[ed] ok, if you really want to jump into writing externals, my primary advice is to just clone the max SDK from github and edit one of the examples, rather than start from scratch with an xcode project. the configuration process is totally insane.

here’s a repo of mine where i did that, albeit for a signal object, but similar. in same repo is a pd wrapper for the same core logic.

the max API docs are just there on the c74 page. you know. wherever the search engine tells you they are.

and btw, i’m sorry if i assumed you haven’t had experience writing c code. not like its rocket science or something, but i don’t like to have to learn more than 1 thing at a time myself.


woof, okay, ya. I suppose this is as good a time as any to really dive in and try and use my 6 months of free max well, hehe. thank you for the advice! I’ll stop looking for shortcuts and get to work :slight_smile:

[edit for yr edit]

that looks fun! i might dig into that first and then just start actually learning max well. srsly, no worries. i definitely don’t know c and generally don’t have experience in any kind of code. the more time i spend on this forum, however, the more persuaded i am to learn…

ok, well if you are actually gonna look at that thing then i should explain a bit more:

in the repo is my fork of the max API example repo, included as a submodule, with one target added. the target contains a small .c file wrapping the core logic in the max API:

(this part is pure gobbledegook without the max API reference on hand.)

believe it or not, this submodule dance was the easiest way to do it; i acquired a few more gray hairs trying to set up a max external xcode project from scratch.

that target links against the core logic source, which lives up here along with the pd wrapper:

(this part should be comprehensible given that you can read C code.)

it would not be too hard to adapt the kria firmware or op sources to this format.

i’m putting this stuff here not because it’s particularly smart or cool or anything, but just because after a few rounds of doing custom externals i found this to be the only way of getting one done in a day, without too much blood and tears.

1 Like

this is probably correct! A lot of irrelevant complexity in the code I’ve posted (because it’s an aleph-specific thing), so that health warning shouldn’t be understated!

I would like to do something similar eventually - i.e break out just the ‘grid ecosystem’ from BEES as a standalone for PD. Grid focus-swapping between apps is really cool though, so I’d like to keep that as a feature somehow.


Okay, I’m really hacking at this with my eyes closed…

So I spent lots of hours learning how things work like trying to figure out how to create a forked submodule of the max sdk (couldn’t figure it out). I basically just tried to mimic your changes. I forked max sdk repository and added the ansible_grid.c and ansible_grid.h to a folder. Then I copied the simplemax example in the “basic” folder (i assume i need to be there rather than “audio”) and renamed the files ansible_grid. I spent a good while trying to figure out what I would need to do to make that .c wrapper and what changes I would need to make to the simplemax example, but I’m pretty lost here. I basically didn’t do anything. I’m afraid this might be too high over my head…

Here is my mess

This is really good advice. Take a step back and think about the skills you have. What do you already know how to do? Be honest with yourself.

Now, set that aside for a moment and think about how Kria works. Maybe try writing down all of its features, with a description of how each works. Imagine you were creating it from scratch, and try to think about all the details that you would have to think through to make it work. Think of the Kria app that already exists like the answer in the back of the math textbook. It’s there to help you when you get stuck, but skipping to the answer without trying to come up with it on your own doesn’t help you learn.

So now you have an honest assessment of your skills, and a clear understanding of your goal. Your next task is to identify the gaps between what you know how to do and what you want to achieve. Break it down feature by feature. Implement the things that you know how to implement, using methods that are already familiar to you. Get all of those things done. Debug them. Make them solid. Now, start asking the questions you need to find direction for learning the skills you are missing that will allow you to complete the project.

And if you’re starting from zero, have never built anything in Max or Pd or by writing code of any kind before, there are a lot of different ways to get started. Personally, I feel the monome grid studies are as good a starting point as any.


let it begin. :bouquet:

Just happening upon this thread. Since the last post was in 2017 I assume that no one ever successfully ported Kria to Max. Is that correct as far as y’all know? Just got a Grid and would love to use it in Max if so.


Even better if it was available in Max for Live!

1 Like

hoping to port kria MIDI from norns into m4l in the semi-not-so-distant future


Amazing! Great news :slight_smile:

I’ve already done most of the work here if anyone else is interested in giving it a shot

you would just need to modify this example device

with lua from @junklight’s norns script

the beautiful thing about the future of grid development taking place in lua is that lua can easily run inside of max (just now learning external development and this thread was funny to read. that’s a hard road to travel for sure, but a really powerful one)


Hi @andrew ! This is very good news! I feel daunted when thinking about lua, but im going to check this as at least i can get some things going in Max!

I’m not a coder at all, but if I was I’d love to help with this…

I’m really hoping for more Grid and arc friendly M4L devices!!!


are you thinking of using lim or just doing a full port in max ? if you want to use lim lemme know - I need to push a couple updates to the main repo and document it a tiny bit. there’s not a ton of lua needed to get it working, I designed it to be mostly copy and paste.

it pretty much works - I’m fighting a bug which crashes everything, so it’s probably not ready to use, but everything is probably in place to start developing with it

1 Like

Hi Andrew! thanks for the reply and your work! I was going to start from your max device lim, i have been looking at some of my old max devices last night and i’m a bit rusty from what i have seen.
Thanks a lot