Generative Sample Playback on Raspberry Pi/RNBO

Jane Arnison's icon

Hello all,

I having fun with making effects and simple oscillator based synths exported to my RPI from rnbo, but now I have moved on to do something more developed for an upcoming installation, and i'm stuck. So I'm hoping that some can offer insight.

I have created a generative patch using buffer~ and granulator~ inside of Rnbo and I cannot get any audio playback. I tried to simplify and find the source of my issue by copying the simple granulator playback from the help file and just creating very basic param functionality. It doesn't work.

I noticed similarly when I tried to export it to a VST that the VST wouldn't load/was corrupted, so there is something fundamentally wrong - and I'm just not sure what it is.

I wonder whether it is something about using audio sample and sample playback from a buffer? (Yes I've checked that audio samples are included in the export) Has anyone had success exporting granulator based patch to raspberry pi?

I would include my patch, but it is literally the help file of granulator exported to rpi, so I don't think it is much help.

I am very much confused at this stage - thanks in advance for any insights.

Alex Norman's icon

Hey Jane,

There are 2 problems with the granulator help file that I've noticed.

First, the output of the granulator is routed through a UI object which you have no way to augment once you export, so if you want to send that patcher to your rpi, I suggest you either route directly from the granulator to the dac~ or add a param to control the gain, probably defaulted to something non-zero.

Second, this kind of feels like a bug, sample dependencies don't seem to work correctly if you don't specify the file extension in the buffer~ object. So in the help file, if you add ".aif" after "@file drumLoop" to make it "@file drumLoop.aif" you should see the drum loop being copied over to your rpi and automatically loaded. I've created a ticket to look into the no-extension version for later.

These same issues should be present in the VST/AU export and I suspect will be resolved if you do the two things suggested here.

I hope that all helps!

Jane Arnison's icon

Hey Alex,

Thanks so much for responding. I had actually taken about the UI gain~ object and replaced it with a gate~ and param - so I guess I should have included my patch actually afterall.

However, your suggestions did help - the fix came from adding the .aif to the drumloop.aif filename in my buffer~ object.
But it returns me to my first problem, because I actually did inititally specify the .aif in the filename.aif in my original patch. So here I've tried to do it again with a slightly more involved patch using the granulator~, and the issue is there again.

Can you see what I'm doing wrong here?

I should also add that although I got the simple granulator help patch playing drumloop to work in rnbo export to RPI, it didn't work as a VST and also didn't work as an external.

I feel like there is some problem linking to the embedded file with the buffer~ inside of rnbo - is there any way more to ensure that the audio is embedded? I imagine it can be checked to see if the file embedded with the export in the code, unfortunately I'm not at the stage of coding much yet.

Thanks for your help!

Jane

Test RPI export granulator maxsample.maxpat
Max Patch

Alex Norman's icon

Hi Jane,

Can you share your support information so that I can make sure we're on the same page as far as what versions of Max and RNBO you're running? "Include your support information. To share your support information, navigate to the About Max window (in the Max menu on macOS, and the Help menu on Windows), and click the text "Copy support information to clipboard." Then, paste the information that has been copied in your forum post."

Next.. if you should be able to see if a sample is loaded by looking a the JSON in a web browser.. for instance, my rpi is at c74rpi.local so I can see the information here:
http://c74rpi.local:5678/rnbo/inst/0/data_refs

{"FULL_PATH":"/rnbo/inst/0/data_refs","CONTENTS":{"whispers":{"FULL_PATH":"/rnbo/inst/0/data_refs/whispers","TYPE":"s","VALUE":"cherokee.aif","ACCESS":3,"CLIPMODE":"none"}}}

I can see that it is mapped to a sample since the "VALUE" shows the aif that I expect. Are you seeing that? If not, make sure that you've selected 'copy sample dependencies'?

Jane Arnison's icon

The box that says copy sample dependencies is automatically checked - I confirmed it was checked though before export. I've not opened the json file yet - I'll check that now.

Can I ask you if you have any issues with exporting a granulator based patch to a rpi? I'm guessing not . . so in that case its definitely operator error not a bug..

I am on max 8.5.2.

Here is the support info:
{
    "version" : "Version 8.5.2 (c9ba072623d) (x64 mac)",
    "platform" : "mac",
    "arch" : "x64",
    "osversion" : "Mac OS X Version 12.6 (Build 21G115) x86_64",
    "samplerate" : 48000,
    "iovs" : 256,
    "sigvs" : 64,
    "scheduler_in_audio_interrupt" : "off",
    "audio_drivername" : "Core Audio",
    "audio_driver_subname" : "",
    "license" : "permanent full",
    "machine_id" : "e10ed5e2db5ab71a84c8def8cda1e668",
    "addons" :     {
        "rnbo_v1" : "full license"
    }
,
    "eventinterval" : 2,
    "schedinterval" : 1.0,
    "overdrive" : "on",
    "pollthrottle" : 40,
    "queuethrottle" : 100,
    "sysqelemthrottle" : 1000,
    "refreshrate" : 30.0,
    "schedslop" : 25.0,
    "eventprobing" : 0,
    "mixerparallel" : "off",
    "mixercrossfade" : 0,
    "mixerlatency" : 30.0,
    "mixerramptime" : 10.0,
    "videoengine" : "avf",
    "gfxengine" : "glcore",
    "packages" :     {
        "ACToolkit" : "0.9.8",
        "adsr221" : "0.0.3",
        "aka.leapmotion 0.21" : "",
        "BAT Fundamentals library" : "",
        "BEAP" : "1.0.4",
        "CNMAT Externals" : "1.0.5",
        "docs" : "",
        "EAMIR SDK" : "2.9.0",
        "ease" : "1.2.3",
        "externals" : "",
        "filter" : "0.2.6",
        "FluidCorpusManipulation" : "1.0.5",
        "Gen CV Tools" : "1.0.1",
        "gen~ Plugin Export" : "2.1.0",
        "Gesture&Sound" : "1.8",
        "GIMLeT" : "2.0",
        "gl3" : "0.3.3",
        "go" : "1.0.0",
        "Grainflow" : "1.0.0",
        "hap" : "1.0.6",
        "HISSTools Impulse Response Toolbox (HIRT)" : "2.1.0",
        "HoaLibrary-Mac-v2.2" : "",
        "ICST Ambisonics" : "3.0.2",
        "init" : "",
        "Janes RNBO Externals" : "",
        "jasch objects" : "0.8.3",
        "jit.mo" : "1.1.6",
        "JIT_patch_64bit" : "",
        "Jitter Tools" : "1.0.7",
        "jk.push 2" : "2.0.3",
        "jk.softstep" : "3.0.2",
        "leapmotion-osx-v2.3.0+31542" : "",
        "LowkeyNW" : "1.3.1",
        "max-mxj" : "8.2.0",
        "maxforlive-elements" : "1.0.6",
        "Mira" : "1.2.1",
        "ml.star" : "1.3.0",
        "modosc" : "0.1",
        "monome" : "0.0.3",
        "MuBu For Max" : "1.10.5",
        "myo" : "0.1.3",
        "nn_tilde" : "",
        "Node for Max" : "2.0.4",
        "odot" : "1.3.4",
        "RNBO" : "1.0.2",
        "RNBO Guitar Pedals" : "1.0.0",
        "RNBO Synth Building Blocks" : "1.1.2",
        "RNBOGenerated" : "",
        "ScaleMaster" : "",
        "Sound Design Toolkit" : "3.0.0",
        "soundhack-0.0.9-max-mac64" : "",
        "spat5" : "5.2.6",
        "SuperVPForMax" : "2.18.5",
        "Syphon" : "1.0.9",
        "VIDDLL" : "1.2.8",
        "Vizzie" : "2.2.1"
    }

}

Jane Arnison's icon

Fixed the issue :)
- just posting here for anyone who has the same issue.

I still don't really know what the issue was but this is what I did today and it worked for me:
- closed my computer and restarted everything
- connected my Raspbery pi via ethernet cable direct from my computer.

I feel like this shouldn't necessarily impact things but just for full transparency noting everything I did differently.

When I opened up the raspberry pi export again, now the 'save file dependencies' was not selected. So I clicked this. Noting that previously when ever I was checking settings before export, 'file dependencies' was preselected. Maybe there was a glitch here that needed a full restart.

Finally, I also saved the rnbo patch in the same folder on my computer as the audio file in the buffer. Previously I had only saved the max patch not rnbo patch.

Thanks Alex - really appreciate your support here!

Cheers,
Jane

Alex Norman's icon

Happy to hear that you got it working Jane!