Trying to get 'bsaylor~' running on the Organelle


#1

Hi there,

I’ve been patching with Pd for a while, and successfully porting most of what I do onto the Organelle. However, I’ve recently run into a problem when trying to get the ‘bsaylor~’ library working.

From my (limited) understanding, the source code is freely available, but the externals have only been compiled for 64-bit versions of Windows and Linux. Hence, when trying to run, say, ‘partconv~’, I get some error message along the lines of “ELFCLASS64 incompatible with ELFCLASS32” when I try to get it working on the Organelle.

So, I’ve spent all weekend trying to work out how to compile things. I’ve been using a 32-bit iteration of Ubuntu. I had copied the necessary files from ‘bsaylor~’ (all the .c files, that sort of thing), and used Codeblocks to build. Then I used the pd-lib-builder to compile everything and generate my .pd_linux file. I didn’t encounter any errors here, so I was hoping everything had gone well.

However, when I tried to create the object in Pd, I was just left with a “couldn’t create” error. The same thing has happened on my Ubuntu installation, and on the Organelle.

I’m unsure if what I’m doing is even correct, or viable, but any input would be fantastic. Happy to send over my Makefiles, etc…, if need be.


#2

So, whilst you’re waiting for an answer, have you got any good patches you might share on here?

:stuck_out_tongue:


#3

assuming you are running Ubuntu on a laptop or desktop, are you cross compiling? it needs to be compiled for the correct architecture (ARMv7), which is 32 bit, but not the same as x86 machine, even though both will have .pd_linux extension.

you can compile externals right on the Organelle which is probably the way to go. should be able to follow same steps (although I’m not sure what the Codeblocks step is all about)…


#4

Ah, gotcha, I’ll have to give that a try tonight. Thank you!!

Apologies, I’m new to trying this coding stuff, and am just trying to get my head around a process. I was using codeblocks to organise everything, but I’m unsure whether that’s necessary.

Can I just get away with compiling on the Organelle, using a makefile with pd-lib-builder?? (This is the only method I could find, I’m not sure whether there’s a better way). I don’t need to “build” before compiling??


#5

yes, pd-lib-builder works fine on the Organelle, i used to use it for all my externals.
(basically it uses same compile options as rPI3)

but you can also craft your own makefiles if you wish, its really not that hard…
these days I use CMake as its properly maintained and works a treat on Mac,Windows,Linux and rPI/Organelle.
if you want a 'template to you started, you could look at my Mi4Pd repo

this basically has a directory per external, so its really quick to add new externals too.

what i like about Cmake, is whilst its completely cross-platform, and lightweight - you can also use JetBrains CLion with it as an IDE - which makes the development process really smooth. basically i write all the code on macOS, once its working upload it to git, then download from git, and compile on organelle.

compiling for organelle on a desktop (mac/windows/linux) , you can do cross-compilation, but frankly its only worth doing on really large project, where the compilation takes a very long time (e.g. kernel builds).
for small things like PD externals its quicker/easier to do on the organelle, partly because if you do cross-compilation, you still need to then transfer the binary to the Organelle to test it… so what you save on compilation you loose, on faffing copying files around :wink:


#6

Thank you!!

I feel somewhat confident in getting a Makefile going myself, but everything past “what i like about Cmake” is totally over my head, haha.

I’m gonna give the ol’ compiling thing a go now, fingers crossed it all works out.


#7

Okay, here’s a fantastic new question: these externals need the ‘fftw’ library installed. I’ve got the tar.gz on my USB, and I’ve already extracted it, but I’m at a loss as to how to install it onto the Organelle.

Any ideas?? :slight_smile:


#8

ha, this is where the fun starts with building any software (including externals), getting all the dependancies,
well organised projects tend to take care of this for you, or give you detailed instructions, but many require you to set up the build environment yourself.

anyway, good news is many of these libs are already available as packages on pacman

I thought libfftw was already installed, but perhaps not…
(Im not able to check right now, and honestly my dev organelle has lots of libs that I’ve already or installed, so likely im wrong for a vanilla organelle)

if not then i think you can install libfftw via the pacman

BUT if you want this to work on others organelle , then thats not a good direction, instead what you should do is either :

a) install the libfftw from pacman, then copy the library to you externals directory , and distribute it with the external

b) build it, it’ll probably come with a makefile, you’ll just have to review the compiler options.
(i think these has been discussed before on the forum, but if not you can use rPI3 options as good starting point)

once you’ve done that you’ll need to ensure your makefile for bsaylor~ can find it, first the header files using -I, then the library using -L and -l


#9

@scumvullage

Did you try the BSaylor version that are in the PD-extended external folder that you can find here in the Organelle forum?

I just tried loading both the PVoc~as well as the partconv~ on the Organelle and I get no errors here. For the PVoc, I did load a sample and it work fully, but for the part conv, I didnt test it with a file, I didnt have a convolution file on the Organelle, so couldnt test it. But I dont see any reasom why it shouldnt work.


#10

I can’t believe I never found this. I’ll have to check it tomorrow but goddamn I’ve been trying to wrap my head around linux for a week now… and then there’s this…

Thank you very much. I’m still going to try this compiling stuff, I’d like to be able to start working on externals myself. But I’m glad I’ve got something to reference to now :stuck_out_tongue:


#11

Yeah Id like to get know how to compile externals too. There are some goodies around that would be great to have and would be nice to make some custom ones too, no doubt :slight_smile:

But I need another computer for that. Like everytime I wanted to compile something I needed to intall a bunch of different things. I realized quickly that another computer for compiling, etc. would be very good idea, to not overflood my computerwith stuff, that I only needed once for this one thing… Its all these things you might install once, to install ONE single external, I just foresaw pure chaos on my regular computer that I prosponed it a bit.

If you find some good source for the external stuff, please let me know. There are som papers on creating externals for pd, but to ne honest I think they are maybe a bit too complicated. There are some Github guides on how to do this, for example the basic “hello world” example.

I think even there are som videos on Youtube about it too.


#12

Well, I got it compiled and working, so there are some victories here.

The new issue is that it completely eats all the CPU. Might be time to get back into my math textbooks and try and optimise the code :stuck_out_tongue: