-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to create a plugin #73
Comments
thanks pierre! as soon i finish a huge mixing/arranging work (deadline moved to mid february due to executive production delays) i'll be back helping on Camomile! |
How to use openpanel and savepanel:From the patch, send the message openpanel or savepanel to the plugin via the symbol camomile. You can use an optional argument for the default path (for example Here is a patch for the example. Another example that shows how to route the result of the openpanel or savepanel functionalities and use it for different purposes: Further information on this issue #71. Important: Most of the time, you will use this feature to load or to save a file from/to your hard drive. If the files are large, Pure Data takes time to perform the operation. At best, it generates glitches and crackles but several DAW simply crash because audio doesn't wait! To avoid such problem, you should use the flag |
How to save and load extra data with the state information of the plugin:When saving its state information, the plugin sends a bang to the patch via the symbol Here a simple example that demonstrate how the plugin can save the content of two arrays with the plugin state information: When loading a state, the plugin sends back the messages via the symbol Here a simple example that demonstrate how the plugin can set the content of two arrays with the plugin state information: Important: Some DAW don't load the state information of the plugin if the plugin doesn't have any parameter. To ensure that the method will be called, you can create a dummy parameter (with the property Here another example with a text object: |
Great advancements! Thanks! |
How to display and change the content an array:The future version 1.0.4 allows to use graphical interface of the array in Camomile to visualize and to change its content: But the version also offers a mechanism to display the content of the non-graphical array define object in a floating window like when the user clicks on it. From the patch, send the message array followed by the name of the array via the symbol camomile to open a window that displays the content of the array: If the user changes the content of the array by clicking on it, the plugin sends back to the patch the name of the array that has been modified via the symbol array. Thus, the patch can use the information to retrieve the content of the plugin via the object array get: |
First of all let me thank you for this awesome work! |
For the array/GOP, I think you missed the 1st line ;)
For the moment dynamic patching is insecure but we can investigate the subject. Feel free to create a new specific issue. |
How to change the dynamically change the graphical interface:The future version 1.0.4 will allow to dynamically change the graphical interface. After changing the size of the visible area the patch, you can notify the plugin to resize the graphical interface by sending the messages Here is an example: |
How to change dynamically the audio options (latency)The future version 1.0.4 will allow to dynamically change the audio options. To change the audio specifications from the patch, you can use the audio method of the plugin by sending the message One would like to change the tail length dynamically but it's not supported by most of the DAW. So it's more suitable to use a very long tail length that will suit all the possibilities (see this thread). |
Reload the patch dynamicallyThe future version 1.0.4 will allow to dynamically reload the patch. As explained previously, some characteristics of the plugin can be changed after the the loading like the audio configurations supported, the parameters, etc. But as all these static characteristics are defined in the text file, nothing prevent to dynamically reload the patch. To do so, you only have to click on the fourth icon of the console (and now the console uses the icons set created by Gregor Cresnar because they are simple and pretty while mine were complicated and ugly). The patch can also be reloaded automatically each time you save it - each time the operating system assumes that the patch has been modified - by adding the entry
This feature can slow a bit the plugin so don't forget to set the value to |
Hi @pierreguillot, can you make an example of using the "playhead" feature? |
I thing the patch attached will be a start... |
Thanks @Reinissance ! |
I have updated the documentation on how to create plugins, it's still a rough draft but I integrate all the information provided by this issue and I changed a lot of things. Now I prefer to close this issue :) |
Hi @pierreguillot, I am trying to figure out a way to use several tables or arrays. But Camomile seems to always overwrite every array in the patch, no matter the name. Do I miss something in the documentation? I use it like that |
@J-Ginkgo Yes, the [openpanel] and [savepanel] methods are global. You can use the small trick that allows to route the message, as explained in the documentation (there is also a patch): https://github.com/pierreguillot/Camomile/wiki/How-to-create-new-plugins#openpanel-and-savepanel-support. |
@pierreguillot thats it, thank you very much! Yet I have another question concerning multichannels. I tried to have 6 outputs in my patch. Inputs are not needed. In my properties file I put the entry: bus 0 6; In Reaper I routed it to the channels but I only get channel 1+2. Is that feature still in experimental work so it doesnt work yet? |
@J-Ginkgo Multichannel should work. Please open a new issue. |
@pierreguillot sorry nevermind. It works now. I didnt find out why it didnt work in the first place though |
Just a quick answer to let you experiment:
Now the plugin can work without any GUI (in the previous versions parameters was created depending on the GUI in the patch). So here are the most importants things to know apart from the GUI.
index value
. The index starts with 1. Look at the abstraction [param.get] in the plugins folders if you want an example to see how to use it. The best approach for example if you want to receive the value of the 1st parameter but to avoid duplicates:[r param] -> [route index] -> [change]
.input 2 stereo
. Important: multi-buses and side chain are still experimental, it could change in the futureThe text file is used to defined the behavior of the plugin, here are the options:
bus 2 2
if you want to add the support for 2 channels in and 2 channels out andbus 4 8
if you want to add the support for 4 channels in and 8 channels out. Important: multi-buses and side chain are still experimental, it could change in the futureprogram zozo
. The order of the programs corresponds to their order in the text file from top to bottom.param -name Frequency -label Hz -min 0 -max 5000 -default 500;
for a "numeric parameter" orparam -name Waveform -list Triangular/Sawtooth/Square;
for a "list parameter".The text was updated successfully, but these errors were encountered: