A C++ Class Factory for JUCE

A C++ Class Factory for JUCE

The Problem

So, I’m working on a side project (as one does), and reach the point in development where I need to be able to take a tree of objects that all share a common base class and persist them to and from disk.

I prefer using plain text files to binary (for a bunch of different reasons, most of them enumerated in the original The Pragmatic Programmer book), so the problem really boils down to:

At runtime, I need to be able to convert a string containing the name of a class into a pointer to an object of the corresponding C++ class.

If you do like I did, and go to the shelf to see what the old Gang of Four Design Patterns book has to say on the matter, maybe you’d have been underwhelmed, too. (more…)

An RPC Framework for JUCE

An RPC Framework for JUCE

Recently, I’ve been working on a project for a long-time client who came to us with a request that we haven’t seen in a while–we were tasked with taking their existing application written in C++ using the JUCE application framework into two separate applications:

  • A Windows Service Application that will start itself automatically at boot time to continually be processing streams of audio and network data using their proprietary hardware
  • A GUI application that connects to the service app doing the processing for monitoring and control.

Since the application was already cleanly written using the Model/View/Controller architecture, what I really wanted to have was a Remote Procedure Call layer that would let me chop the existing Controller object into two pieces:

  • an API half that is called by the UI code exactly as it’s already being called
  • an “engine”/server half that actually houses the logic to perform the work of the application.

…that would be connected together over some sort of an interprocess link, most likely sockets. (more…)

NAMM Wrap-up (part 1)

NAMM Wrap-up (part 1)

Thanks to the blizzard that hit my East Coast home base while I was at the NAMM show this past weekend, I’m currently cooling my heels in a Starbucks near family in San Diego while figuring out how to get home. I’ve been trying to figure this out since the second morning of the show when I got the first email of several telling me that my flight home was canceled, so I ended up missing a significant amount of time on the show floor speaking with clients and checking out new gear — very frustrating.

One unexpected upside of being stranded in Southern California was that I was able to attend a developer meetup hosted by ROLI, the owners of the JUCE C++ framework that’s widely used in the industry. (more…)

Developing Audio Applications With JUCE (part 2)

PluginEditors

Last time we looked at getting a very basic version of an application that can process audio running using the classes provided with the JUCE application framework.

The Scumbler app as we last saw it:

  • Could enumerate the installed audio/MIDI hardware on a computer
  • Let user select which hardware to use
  • Persisted that setup information between invocations
  • Created an AudioProcessorGraph object and an AudioProcessorPlayer to stream blocks of audio samples through
  • Created AudioGraphIOProcessor objects for performing actual audio input and output, which when wired into the filter graph successfully got audio moving through the application.

A lot of work to basically do nothing. This time, we’ll add some meatier stuff — the ability to add and control VST or AU plugins into the filter graph.

(more…)