Max RNBO template - user created modules

it’s nice to see these things coming around after all these times.

one thing to bare in mind, or to at least be careful of …
rnbo (and max/msp) work on a buffer level (128 samples on SSP) , not at sample level…
so you have to take this into account in some places

e.g.

buffer [idx] = buffer [idx-1] * 0.1

this wont work on the first sample of the buffer, since what you really need is sample 127 from the previous sample frame.
(not a great example, but you can see what I mean hopefully)

note: gen~ does not have this, since it works at a sample level.

sharing… where ever you like…
thats why I suggest a topic, so you could just use the link to.

I use GitHub as I need version control,
but you could use something like dropbox, as I do for my releases… if you want to keep it simple.

Im always a fan of keeping is simple, until you need something more complex.

btw: if you just share the rnbo patch, you dont need to worry about plugin name really.


for rename, just look in the CMakeFile.txt, you really just need to change the plugin and manufacture code (4 letters), and you can change the text in quotes.
anyway, do it once, and you’ll see how it looks on the ssp etc.

1 Like

added a tips n’ tricks page to the SSP wiki

Trying out Max and RNBO. I have some Max experience, but this is my first time using RNBO.

Following the guide and running cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../xcSSP.cmake .. from ~/projects/rnbo.example.ssp/modules/<MODULE NAME>/build I am getting

CMake Error at CMakeLists.txt:3 (add_subdirectory):
  The source directory

    /Users/punk1290/git/rnbo.example.ssp/modules/ex01

  does not contain a CMakeLists.txt file.

My ~/git is equivalent to your ~/projects directory.

if I remove the add subdirectory directive in the CMakeFile at ~/projects/rnbo.example.ssp/modules/CMakeLists.txt then
The first cmake command succeeds.

But running cmake --build . returns

No such file or directory
CMake Error: Generator: execution of make failed. Make command was:  -f Makefile &&

My tool chain worked for non-RNBO modules. Any ideas what might be going wrong?

One thing I noticed was the create_module.sh command didn’t update ~/projects/rnbo.example.ssp/modules/CMakeLists.txt with my new module.
Now what I am running into is the following when running cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../xcSSP.cmake .. at ~/projects/rnbo.example.ssp/modules/<MODULE NAME>/build

CMake Error at TEST/CMakeLists.txt:49 (juce_add_plugin):
  Unknown CMake command "juce_add_plugin".
1 Like

I cannot believe I’ve missed this thread! this is INCREDIBLE! Thank you @ thetechnobear!!

2 Likes

sorry @punk1290 I’ll have to get back to you later… Ive got family visiting till this weekend… and this is going to take a little digging into .

I will say, as a starter, Id follow my exact instructions… (particularly directories) as we know this works.
then once you have that working, then you can alter to your setup needs.

1 Like

not sure, might be at some point I checked in the wrong version of this cmake file
(for reasons I dont want to get into… managing this particular cmake file is tricky)

anyway, key point is…

create_modules.sh just adds entries to modules/CMakeFile.txt

at any point if you dont want a module to compile just edit the file and remove any unwanted add_subdirectory lines
e.g. delete

add_subdirectory(ex01)

hmm, perhaps what I should do is try to make it so that, modules/CMakeFiles.txt just compiles all subdirectories… that way create_module.sh would not have to edit it!

this means either
a) you have not created the make files.

 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../xcSSP.cmake .. 

b) you are not in the build directory
(hence it cannot find the above :))

this sounds like you did not pull in submodules ,

git submodule update --init --recursive

please note: all the above IS in the documentation I put together.

It’s REALLY important that new users to this follow my documentation to the letter… don’t change anything, dont skip anything … even if you are familiar with development processes etc.
the documentation took me a long time to put together.
the reason I invested that time, is because I hoped spending hours on it, would save me hours on support… but if people only vaguely follow it, and then end up asking questions here… then frankly Ive wasted my time.

also as I stated previously… I really just don’t have time to support people on ‘development projects’, its can turn out to be extremely time consuming… and unless they share their efforts, it just turns into 1 on 1 support… rather than helping a community (which I want to be my main focus)

of course, all that said, I do get that when following instructions its easy to miss steps.
or they may not be clear, or possibly even incorrect in some circumstances.
thats why Id like to get people to do exactly as specified, then if something is wrong I can correct the instructions.

again, its not that I dont want to help… I just need to ensure all of our time is spend as wisely as possible.

2 Likes

I appreciate you looking into this. I had done git submodule update --init --recursive and something was still missing. After reading through your post I decided to try moving everything to a ~/proiects directory instead of ~/git but everything still failed. Was a new error with a hint though

CMake Error at /opt/homebrew/Cellar/cmake/3.25.0/share/cmake/Modules/CMakeDetermineSystem.cmake:130 (message):
  Could not find toolchain file: ../xcSSP.cmake
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)

Seemed like I was in the wrong directory.
I was unclear what the directory commands should be run in for step 3 here and made quite the error

Once run from the correct directory works in either a ~/projects or a ~/git root. Did notice some things seem to default to ~/projects if they can’t find something so will move over there just to be certain.

Thanks for all your efforts on this. I look forward to playing around and iterating on some ideas more quickly.

RNBO 1.10 has been released with the following comments, is there any possibility of being able to read files externally by default at max RNBO template?

New Features

  • Plugin Target: support for loading audio file data at runtime

Fixed Bugs

  • data: can load files with @file and @url

not really, I don’t use the plugin target… its of no value to the SSP, and its the plugin host that loads the data files…
this is where Cycling74 are never clear with their description of RNBO, the role of the host code vs the rnbo generated code… e.g look at how they talk about Plugin/RPI/JS and you’ll see the host is as important as the rnbo code.

1 Like

Ah, I completely overlooked that the new feature is for that the “plug-in target”, not for c++.
Sorry!

no worries, Its not clear…

I’ve not had a chance yet, but I will be looking at the 1.1.0 release, and see if there are any changes to the api that provide any opportunities for improvements.

also, now Ive implemented my own ‘file browser’ , it may be I can do something in this area.
though, Im still a bit unsure how do fit it into the UI.
the main issue is, in the ‘generic’ form (so no custom code) , there could be many data buffers - so somehow the UI needs to allow you to select which buffer needs loading… and then load the buffer.
… in GRA4/LOOP, I did this all with custom code, that was based around the ‘layer’, so it all made sense to the user, but thats not generic enough for the template code.

anyway. I’ll give it another consider… once Ive looked at the api, and see whats new.

btw: expectation management, when I had a quick look thru the 1.1.0 release notes, nothing really stood out… as ‘wow, thats going to change things’ - but you never know, often the devil is in the detail.

p.s. Ive also not checked that 1.1.0 has not broken anything… if it has, I will obviously fix it :slight_smile:

1 Like

It’s really awesome if it is possible to use file browser at the Max RNBO template!

The file browser feature certainly seems difficult to generalize if there are many data buffers. But it really useful even if the file browser can available only one data buffer.
Although it is only what an amateur think, it may be a little easier to generalize if the file browser only works with one certain specific data buffer name.

sorry, I either do it properly or not all …

I take pride in what I do, and also how I do it - be that development or music.

quick hacks like these - are like telling an artist…
“oh just use any old kick/synth, no one will notice anyway”

it doesn’t matter, if someone else notices…
I will know, and I will judge its poor quality :wink:

1 Like

Yeah, that’s a very good parable!
Now I understand exactly what I said. :laughing:

1 Like

nah, I totally get it… nothing wrong with it either…
as users, we often see software as products, that do a purpose… we don’t care how, as long as it works.

and, to be brutally honest, some/a lot of software development these days, its like this.
… its almost cookie cutter stuff, you just glue bits of code together.
for many, its horrible its been really de-skilled… all in the name of productivity.

but fortunately, Im a bit old school, and Ive always worked in areas which are specialised,
where creative solutions are respected, where its a craft, and code quality is important.

so yeah, Im really into coding as a creative endeavour, a highly skill craft … just as much as technical engineering. In many ways, quite similar to electronic music… it’s a mix of creativity and technical skills.

But, I totally understand why for many software is a ‘product’, its the end result that matters.
in the same way, I guess as some music is viewed (e.g. pop?)

(I also recognise that sometimes, my views are a little unpopular with users :laughing: , as Im sometimes just as interested in how/why is an issue… as how we can quickly fix/workaround it!)

1 Like

ok, just re-built my example with new max/rnbo version … seems to be fine.
so my template does not require any changes.

I’ve had a quick look over the api, and nothing substantial has changed from what Ive seen so far.

looking at the release notes for rnbo, I’d suspect Cycling 74’s main plans are to bug fix, and expand objects that are available. this is not a bad thing, means core api may be pretty stable.

2 Likes

So I see that Tom Erbe updated all the soundhack max plugs, can these be made to work via RNBO into the SSP? https://www.soundhack.com/2024/08/max-msp-externals-updated-for-intel-arm-64-bit/

no… max externals cannot be used with RNBO… different tech.
(also the max externals would need to be compiled/supplied as arm7 32bit binaries… which they are not)

1 Like

Im looking to buy an XMX very soon and the idea of making my own modules with rnbo is amazing and I’d love to be able to share with users on here, can you DM me? I’m curious about the price of a lesson in rnbo as I’d really love to start learning how to make modules to share with everyone, first two modules I’d like to make is a quad EG and quad lfo since theres only 8 modules allowed in the XMX patches

1 Like