Forums > Dev

Library – Max to Pd and Pd to max

October 4, 2013 | 2:45 pm

Hi,
Most of this project is for Pd but don’t leave now, it can be interesting for devs…
I’m actually working on a project that aims to facilitate the creation of GUI externals in Pd and to easily convert source code from Max to Pd and from Pd to Max. I’ve created a small C/C++ library (at the end, it will be a full C library) with:
- An automatic generation of border and inlets/outlets (like Max)
- A better graphics behavior (layers and functions to clip the drawings within the box boundaries) (like Max)
- Attributes (size, value, whatever you want) that are saved with the patch (like Max)
- Dynamic inlets/outlets (like Max…)
- An easy management of mouse motion and keys
- Macros to convert from Max to Pd and from Pd to Max

So, here the git of the project :

https://github.com/pierreguillot/PdEnhanced.git

You can find Mac examples in the Pd Chocolate folder, a small set of externals that is not essential, unlike Pd vanilla, but that can be useful (there’re a vu~ and a nbx~ that don’t have the blink effect of their homologue). You will also find a library, much more substantial with many quite complex GUIs dedicated to ambisonics on the git project HOA where the codes are almost similar to those used in Max:

http://www.mshparisnord.fr/hoalibrary/

https://github.com/CICM/HoaLibrary.git

As you can guess, I would like to get feedbacks and advises.

The things I want to improve are:
- the automatic creation of the properties window based on the attributes
- a better captation of mouse events (right click in run mode for example)
- creation of object in a sort of « canvas » or « window » like popmenu or entry (I want to use the clip functions of tcl/tk)

So, if you want to participate to this project, you are welcome and if you have externals that you want to convert from Max to Pd or from Pd to Max, i can help you.

Pierre


October 5, 2013 | 1:13 am

Hi Nicolas,

I use Tcl/Tk for the Pd part. Juce is one solution but, for the moment, I want to try with the native dependencies of Pd. The origin of this small project was to create a Pd version of the HoaLibrary. We have beautiful sources for Max and I would prefer to use the same for pd. It’s already difficult to compile Pd externals in C++ or with other dependencies than the native ones (Blas, Atlas for example) so I didn’t want to add another dependency. If I offer a C library that only use Pd and Tcl/Tk, I’m pretty sure that it will work. With this approach, we will be able to compile on source against the Max Sdk and the Pd sdk, with Juce we have to re-code all the stuff. Juce is really good, but the externals don’t seem to be well integrated in Max and I don’t know what the render is going to be in Pd. With the "Juce" plugin, we have problems with the multichannel behavior that why I didn’t want to use it for Max and Pd but perhaps it could be a better solution (and I’ve seen that you already have done the job for Max).

Best,

Pierre


October 5, 2013 | 4:35 pm

Hi, by curiosity, how does that project relate with Flext – i mean, is it a comparable functionning ? seems a great job, thanks.


October 6, 2013 | 6:33 am

Hi,
It’s different even if there are strong likenesses…
If you use Flext, you have to you have to learn a new API and rewrite all your Pure Data code or Max code. I think there is enough likeness between Max and PD to avoid such behavior. Fact is that Flext is useful if you directly write your code with it. Furthermore, there are platform particularities difficult to manage with Flext. I don’t know if Flext allows you to easily write GUI, if there methods to clip the drawing, or a method to resize the number of inputs and outputs, etc… My project comes from different wishes, the main one is that I want to have an API in Pure Data, in particular for GUI, as good as Max API.

The first version of the library is almost finished, you can have a look on it. It works for Mac and Windows, C and C++.

Thank a lot,


Viewing 4 posts - 1 through 4 (of 4 total)