JUCE

Nov 22, 2013 at 7:13am

JUCE

Hi, has anyone got any experience of using JUCE with MAX to make writing cross-platform externals for Windows and Mac easier? Does it reduce effort? Is it worth it etc?

Any insight appreciated, thx

#272047
Nov 22, 2013 at 8:41am

Hi,

I asked several times that question (even in the JUCE forum) without any success.

http://www.juce.com/forum/topic/example-max/msp-juce

http://www.juce.com/forum/topic/max/msp-project-introjucer

Months ago i started few investigations about configuring “the Introjucer” ( https://github.com/nicolasdanet/Jojo ) and successfully create a dummy Max/MSP external. I stopped since i had no more time. In few weeks i plan to continue the experiments.

Googling i only found http://code.google.com/p/jucemsp/ and http://ftm.ircam.fr/index.php/A_brief_introduction_to_FTM where it is claimed that “The editors for FTM objects are implemented in Juce and integrated into Max/MSP using mxj”. But i didn’t go deeper in the sources.

Martin Robinson (author of the repository above) wrote a book, but i didn’t read it ( http://shop.oreilly.com/product/9781783283316.do ).

I’m really interested by that topic ; so keep in touch if you are ;-)

#272062
Nov 22, 2013 at 11:19am

In short, you can’t use our version of Juce to build your externals. You need to use jgraphics as demonstrated in the SDK’s examples. If you want to build externals with juice component you’ll have to link it and include your Juce version.

#272082
Nov 22, 2013 at 2:56pm

I was more interested in trying to use JUCE to build my own VST external.

#272114
Nov 25, 2013 at 8:06am

@Emmanuel, yes – wasn’t thinking about using your version. What I was wondering was whether I can write all my stuff on Windows using Visual Studio, link in your libraries and a version of Juce and then just transport that onto a Mac and build the complete job lot on Xcode.

Obv this is possible, but wanted to know whether anyone had tried this and had experience of it? On the surface this seems a good solution for developing cross-platform externals, but there doesn’t seem to be any noise about it so maybe I’ve got something wrong…

#273734
Nov 25, 2013 at 8:49am

It’s definitely possible to use juce to create your own gui components and insert them into Max.
I do that a lot (developing many Ircam external objects, cross-platform).

This is relatively easy.
Basically, you render your juce component into a juce::Graphics
(cf Component::paintEntireComponent)
Then you retrieve the raw bitmap data from the graphics context
(cf Image::BitmapData::getPixelPointer)
You create a Max image surface from the bitmap data
(cf jgraphics_image_surface_create_for_data)
Then you paint the image surface into the patcher
(cf jgraphics_image_surface_draw)

This approach is not very efficient (you do all the job twice), but there are some alternatives.

This works for VST too.

#273738
Nov 25, 2013 at 5:16pm

I have most of those IRCAM externals, they’re quite excellent.

Is there any chance you could provide a trivial working example for a vst?

#273789
Nov 26, 2013 at 1:27am

I’m not looking to write gui components – I just want to be able to write some externals in C++ and build them for Windows and Mac in the easiest way from the same source code…

#273819
Nov 26, 2013 at 2:27am

@DHJDHJDHJ: There’s a VST with JUCE in the HOA library ( https://github.com/CICM/HoaLibrary/tree/master/Plugins/HoaTools/Source ).

@WORLD:

- To be able to reuse the same code on various platforms, embedded in various softwares (Max/MSP, Pd, SC…) should be awesome.
Pierre Guillot is doing a workaround with “PD Enhanced” ( https://github.com/pierreguillot/PdEnhanced ) concerning Max/Pd but i guess that a more universal approach is welcomed. And JUCE seems perfect for that.

@LEE:

- If you don’t need the GUI part of JUCE, i suppose you can still use modules from it in your code. Same as you can use BOOST / STL / or anything else. In that case i would prefer to use BOOST as the licence is more permissive and it is widely used and tested on many platforms. JUCE without “the Intojucer” seems difficult to configure ; and TBH use “the Introjucer” to build Max/MSP externals appears to be an annoying machinery. To manage build process on several platform i found the Jamoma approach more interesting ( http://74objects.com/2012/07/25/inventing-a-new-project-format/ ). But that’s just a matter of taste.

My 2 cents.

#273824
Nov 26, 2013 at 5:01am

@NICOLAS —- Thanks so much for the reference. Much appreciated.

#273837
Jan 23, 2014 at 6:23am

@LEE:

Ultimately, configuring Max/MSP externals with “The Introjucer” is pretty easy (at least with Max 5 and for Mac OS X). The JUCE API is rather pleasant to use (sources are readable, simple and clean). IMHO it worth the cost to give a chance to it for cross platform development (specially if like me you are not STL / BOOST friendly). I recently started a serie of experiments ( https://github.com/nicolasdanet/Jojo ). Note that they must be considered with caution (until more extensive tests).

#278949

You must be logged in to reply to this topic.