[PD-dev] Can somebody help to create a desktop / VST / AU version of a PD / libPD / app ?

Dan Wilcox danomatika at gmail.com
Tue Apr 21 17:48:49 CEST 2015


*Replying on list, so we don’t loose the thread.*


> On Apr 21, 2015, at 11:10 AM, Oliver Greschke <info at o-g-sus.de> wrote:
> 
> Hi Dan,
> 
> I am answering you directly now, I don’t get this antiquated email-list stuff.

It’s just email where replies to the list aka (pd-dev at lists.iem.at <mailto:pd-dev at lists.iem.at>) go out to other people subscribed to it. That way we can keep a public discussion going so other people with similar questions/info can find it later and we all benefit.

> What could I „do“ with the new libPD? Create a desktop app or an AU, both I guess, which was not possible before, because of that multi-instance problem?

A desktop app was already possible using any of the available languages/wrappers (C, C++, Obj-C, Python, CSharp, Java) from the main libpd repo, not the iOS specific libpd-for-ios one. The main problem was that before Miller’s work last year supporting multi parallel instances of pd was not possible due to the global C architecture of pd’s internals. Aka there is one 1 “pd” when using libpd. This is obviously problematic if you want to have multiple concurrent “pd”’s in a single application aka AudioUnits but is totally fine for a single instance app aka Pd itself.

Miller’s update basically allows you to do this (in pseudo code):

libpd_init();

pd_setinstance(1);
libpd_openfile(“./“, “patch1.pd”);

pd_setinstance(2);
libd_openfile(“./“, “patch2.pd”);

So now there are actually two “instances” of pd inside the app, each running a different patch. You can switch between them using pd_setinstance(). In an audio plugin usage, I’d imagine keeping a global static array of the current instance IDs for each plugin instance.

> Sorry I am rather new to Objective-C and have no clue at all about desktop development or C, C++ programming

If you have it working on iOS, you’ll basically need to port the GUI to the desktop and choose an audio api, since libpd itself doesn’t provide direct audio support except in the Obj-C & Android wrappers. There are a number of ways to approach doing this and lots of information online.

If you want to focus mainly on AudioUnit/VST support, I’d echo the suggestion to use JUCE which is a cross platform C++ application framework that provides GUIs, audio access, and direct audio plugin development. This way you don’t have to specific Win/Mac/Lin code each time. It is, however, a C++ library so you’ll need some background working with C++ and compiler toolchains.

Another option is to use OpenFrameworks and ofxPd, a libpd addon I wrote. OF allows you to write cross platform projects in C++, but it’s more focused on interactive visual/art/learning application development and not as suitable for   audio as something like JUCE. There is also no direct audio plugin support, but there are a number of addon libraries for AudioUnits, etc.

If you were looking for an easy answer, I’m afraid there are none, but it’s totally possible.

> Cheers,
> Oliver
> 
>> Am 21.04.2015 um 16:42 schrieb Dan Wilcox <danomatika at gmail.com <mailto:danomatika at gmail.com>>:
>> 
>> This should be possible with the current version of libpd which includes Miller’s multiple instance updates, see http://lists.puredata.info/pipermail/pd-dev/2014-05/019839.html <http://lists.puredata.info/pipermail/pd-dev/2014-05/019839.html>
>> 
>> I just haven’t gotten around to adding libpd-specific wrapper functions for this yet, but Miller provides code in that dev list exchange.
>> 
>> --------
>> Dan Wilcox
>> @danomatika
>> danomatika.com <http://danomatika.com/>
>> robotcowboy.com <http://robotcowboy.com/>
>>> On Apr 21, 2015, at 6:00 AM, pd-dev-request at lists.iem.at <mailto:pd-dev-request at lists.iem.at> wrote:
>>> 
>>> From: Oliver Greschke <info at o-g-sus.de <mailto:info at o-g-sus.de>>
>>> Subject: [PD-dev] Can somebody help to create a desktop / VST / AU version of a PD / libPD / app ?
>>> Date: April 21, 2015 at 3:15:44 AM EDT
>>> To: pd-dev at lists.iem.at <mailto:pd-dev at lists.iem.at>
>>> 
>>> 
>>> Hi,
>>> I am the creator of the Elastic Drums iOS app (with great PD help from Matt Davey).
>>> It’s made with PureData, libPD and Objective-C.
>>> I got asked a couple of times now, if there will be ever a standalone desktop version or even better Plugin (VST, AU) version of the app.
>>> 
>>> As far as I know, there are not ready to use workarounds to do so. Which is sad, because I can imagine a lot of fantastic plugins emerging from PD
>>> 
>>> Has somebody here some experience with doing such ports?
>>> Then please contact me.
>>> 
>>> Cheers,
>>> Oliver
>>> 
>>> info at o-g-sus.de <mailto:info at o-g-sus.de>
--------
Dan Wilcox
@danomatika
danomatika.com <http://danomatika.com/>
robotcowboy.com <http://robotcowboy.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20150421/f1e2faca/attachment.html>


More information about the Pd-dev mailing list