ahh, ya im down and out for that. I’m interested in @shellfritsch 's direction, so I’ll be trying to do that too. You’ll prolly beat me tho!
okay, update as I slowly chip away at understanding this (im on mac OS):
- I figured out that I needed GNU Make to “make” the the /pd folder to create bees_op.pd_linux in Terminal
- I downloaded Make and after lots of googling figured out how to install that command
- tried to “make” /pd but couldn’t figure out how to actually execute it in Terminal…
- I also found out that pd looks for .pd_darwin for externals on mac OS so I’d have to figure out some way to translate bees_op.pd_linux to bees_op.pd_darwin…not sure if that is possible
This is what I get when I execute “make” on the /pd folder:
ah, then if figured out with “make help” that I could point to my /src/m_pd.h which brought me to this error below…im so deep in stuff i don’t understand, lol…
Not at a point where I can help debug compiling the Pd external, but I did want to mention that the preferred way to get make going on a mac is to use Apple’s XCode command line tools.
This guide does a nice job of hand-holding through it.
looks like you’re missing liblo, which is a dependency of the library. a little bit of googling suggests liblo should work on a mac. See if you can install that library somehow - I only know how to do it on linux http://liblo.sourceforge.net/
After installing the XCode command line tools, install homebrew following these instructions
brew install liblo
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.
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
[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.
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 https://github.com/DrewskyH/max-sdk
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.
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!
hoping to port kria MIDI from norns into m4l in the semi-not-so-distant future
Amazing! Great news
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)