kria is written in c. you’d need to port it to javascript, running inside of max. so probably not trivial unless you’re versed in javascript/c in addition to max.

as much as i’d like to do this myself, i still can’t commit. however, the beauty of kria being open-source is that someone with the skills can take this on whenever they want.

2 Likes

ahhh, ya. I’m certainly not qualified to do that :sweat:

Anyone else interested? I’ll send you flowers :bouquet:

Another avenue for software-izing Kria, would be to port the C code to VCVRack. Not on my TODO list, but I’m up for sending flowers as well. :wink:

heh - aleph kria was ported from the eurorack standalone inside of a puredata wrapper. Pretty sure the pd external still works. Also whitewhale & meadowphysics. So yea it’s there for pd users but afaik noone’s touched it.

Could definitely give some pointers to anyone attempting a similar port for max feel free to PM me…

3 Likes

How hard would it be for a pd newb to get this external running with basic 4 channel midi output?

2 Likes

what OS? I can only help compiling for linux unfortunately - don’t have mac or windows here. on my platform took me about 10 mins to get that cooking in a patch - btw great suggestion!

Somehow got so caught up in other things I didn’t think to use this combo, even though I have a pretty fun MPC/midi setup up and runnning.

EDIT:

first unzip that tarball. The code in utils/pd works for me. “make” builds bees_op.pd_linux, copy that to pd-externals directory & then open the bees_ops_grid.pd patch. That gives some hints how to actually use the objects - basically bang the second inlet of each of those grid ops with a 1 & then you can switch focus between the grid ops.

Midi is another song and dance but not hard once you get used to pd (it’s a bit weird at first)

So would I be naive/delusional to think that I could do this:

  • use something like emscripten to compile the .c file to asm.js
  • learn how to run that asm.js file in max
  • learn how to make max patcher usable for m4l

I have now clue what im talking about…lol

i’m a lil confused by this part… i see “makefile” and “makefile.pdlibbuilder” but i’m not sure what to do with these… how do i run them?

if i can get this external loaded in PD you’ll probably see me popping up in the pd topic shortly :wink:

The problem you will encounter is I/O. An aleph has very different I/O than Ableton Live. So you’d have to change things (quite a few things). This means it’s not a question of wrapping/conversion, but rather a question of editing and writing code.

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! :slight_smile:

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

[edit]
This is what I get when I execute “make” on the /pd folder:

58 PM

[edit 2]
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…

26 PM

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.
http://railsapps.github.io/xcode-command-line-tools.html

1 Like

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/

1 Like

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

[edit]
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?

2 Likes

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.
[https://github.com/catfact/audio-externals]

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.

2 Likes

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:
(https://github.com/catfact/max-sdk/blob/c2a7330a5b084e904b9817b17d19b762566bc7f7/source/audio/fpu~/fpu_msp~.c)

(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:
header:
[https://github.com/catfact/audio-externals/blob/master/fpu/fpu.h]
source:
[https://github.com/catfact/audio-externals/blob/master/fpu/fpu.c]

(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