Cabbage Logo
Back to Cabbage Site

Cabbage -> FMod on MacOS 10.14 - plugin error

I have been faithfully following your excellent instructions of creating a FMod plugin in Cabbage, but I can’t get my dylib plugin files to load in FMod Studio (2.01.07) and thus can’t get it to unity. From one of the post on the FMod forum I am wondering if it is a compatibility problem with Mac OS 10.14 which I am running and I can’t downgrade any longer.

I have set my asset plugin folder in FMod and FMod tries to load the file but generates an error:
00:18:29 Error loading plugin /Users/keith/Desktop/CSoundStuff/MaleVoice.dylib: File not found.

My questions, I guess, is are the dylib files being generated by cabbage compatible with FMod 2.01 or is the problem with FMod.

The plugins have been tested with FMOD 2 and higher and I haven’t heard any of any issues. I’m able to run them here on my Mac, but I’m still using High Sierra. If you check the forums here there was some discussion about updating them to version 2 some time back. Are you trying to create an effect or a generative sound?

I am creating a generative sound - it works fine when I create a compiled application from Cabbage and run it, but FMod Studio can’t seem to load the dylib file (even if I put it in with the FMod folder with the other plugins) I suspect it is a macOS problem but I have no idea how to fix it.

I was really looking forward to working with Csound again ( I worked with Barry Vercoe in the 1980s) and running it dynamically in Unity, so I hope there is a workaround.

Is there a link to a dylib plugin created by Cabbage that I could test to confirm that it is a OS problem?

Sure. I just created this, exported it and was able to run in FMOD 2.01. (43.7 KB)

For what it’s worth, I wrote this CsoundFMOD interface before I learned Unity. Nowadays I just bring Csound straight into Unity using the CsoundUnity package. It’s really a lot more streamlined. That’s why I rarely use this interface any more.

Your dylib loads into FMod without any problems - so I will go back to my code and compare it with yours to see what my error is. I really appreciate your help with this. I will also have a look at the CsoundUnity path since that might bypass some of the compatibility issues. why work through 3 applications when you can work through 2.

Btw, you should update Cabbage. Click on the drop link here and install the latest package. I’m not sure the most up to date FMOD binaries are in the last release.

OK - my dylib is loading into FMod Studio now - I had changed the pluginId to something else, and I shouldn’t have done that - the new version of Cabbage gives me an error message when I compile the plugin and once that is changed back to a 4 character string the export and import works properly.

Thanks for your prompt assistance on this - I will move on through your tutorials and let you know if I run into any problems I can’t solve.

I can now see some of the limitations for working through FMOD and I have been experimenting with CSoundUnity which is probably better suited to my purposes. I have looked through the sequencer example and have it working in Unity. I am wondering, though, what would be the best strategy for creating an instrument that would basically respond to note on messages and note off messages from within Unity. For example if I were creating a keyboard that could be played in Unity and I want to the trigger the start and stop of the instrument.

Are you using the latest develop branch from the CsoundUnity page? That’s the most up to date version and light years ahead of the master branch.

In terms of triggering notes I typically start them with a call to SendScoreEvent. Something like:

csound.SendScoreEvent('i1 0 1 60 .4')

If you want to keep the note playing for as long as you have a moused pressed using an ‘r’ envelope or madsr, then trigger a turnoff for that instrument once you have released the mouse. Let us know if you need some assistance. It’s a lot of fun once you get going, and I think you are already seeing that it’s far more powerful than simply calling Csound in FMOD.

Yes, have the most recent CsoundUnity - 2.3 - and I am getting things to work pretty well. I am slowly getting my brain back into csound mode - I taught csound at university for about 10 years in the 1990s and I just remembered a few tricks like negative p3 and negative p1 values to turn notes on and off and i see there are some opcodes like ihold and turnoff that can be used as well.

Thanks so much for your help getting me up and running and if I run into snags I will post more messages to the forum. I am a software developer as well (music notation software) and I appreciate the time you take to provide support to your users - its much appreciated.

It’s my pleasure. It’s always nice to welcome a lost sheep back to the herd :rofl: What notation software are you working on?

I can see a lot of potential for using Csound directly in Unity. In the past couple of years, I have been using MaxMSP to generate audio and to perform audio analysis and trigger events in Unity, but for some tasks using Csound directly in Unity has some really advantages.

The notation software I developed is called NoteAbilityPro and it runs only on Macintosh computers - It is free and supports some cool features like the ability to save a notated score as a .sco file for use in Csound (though I don’t think anyone has used that feature in a decade or more) It also can be used to send OSC messages to MaxMSP or to Unity and things not usually available in notation software.

Nice feature. I wonder how many people actually know about it. The software look nice. Congrats.

Nice discussion.
@kahamel to use the newest develop branch use Unity Package Manager:
If you have git: press +, Add package from git url
If you don’t have git: clone the content of the develop branch on your local disk, press + in the Package Manager, add package from disk, and select the package.json inside the folder you downloaded.

@rorywalsh we should update the readme with this info, and possibly plan an official 3.0 release, since basically we’re ready!

@giovannibedetti Let’s do that release :+1:

1 Like