Compare commits
2 Commits
v0.1
...
squashchun
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f67aa682a | |||
| dd4847399c |
156
README.md
Normal file
156
README.md
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
# Pdvst-0.52
|
||||||
|
|
||||||
|
|
||||||
|
Based on https://github.com/jyg/pure-data/tree/master/pdvst but updated to load with Pd-0.52
|
||||||
|
or higher.
|
||||||
|
|
||||||
|
|
||||||
|
# How does it work ?
|
||||||
|
|
||||||
|
PdVst consists of two main parts :
|
||||||
|
* a vst-plugin (pdvst-template32.dll, pdvst-template64.dll) to place in your favorite vst folder.
|
||||||
|
* a custom external scheduler (vstschedlib.dll) to copy in the pure-data /bin folder
|
||||||
|
|
||||||
|
When a PdVst plugin is opened by the host application, a setup file (*.pdv) is read to determine
|
||||||
|
information about the plugin, such as the Pd patch file to use, the number of parameters, etc...
|
||||||
|
An instance of Pd.exe is started and opens the Pd patch file whose name was found in the setup file.
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
|
||||||
|
This new version doesn't need a custom version of pure-data. You can use your current pure-data
|
||||||
|
installation (>= Pd-0.52) with your favorite externals).
|
||||||
|
|
||||||
|
1) According to your pd version (32 or 64 bits), go to the folder pd-scheduler32 or pd-scheduler64.
|
||||||
|
Copy `vstschedlib.dll` to `\bin` directory of your current pure-data installation
|
||||||
|
|
||||||
|
2) Copy your plugin `.dll` file (e.g. `Pd_Gain.dll`) to the vst plugins directory
|
||||||
|
for the application (e.g. `c:/Program Files (x86)/Steinberg/Cubase VST/VstPlugins/`)
|
||||||
|
|
||||||
|
3) New way : in the vst plugin directory, create a subdir with the name of your plugin
|
||||||
|
(e.g. `c:/Program Files (x86)/Steinberg/Cubase VST/VstPlugins/Pd_Gain/`).
|
||||||
|
This folder will contain the `.pdv` and `.pd` files associated to your plugin.
|
||||||
|
|
||||||
|
NOTE (advanced) : if you choose the new way, you can also include an standalone version of
|
||||||
|
puredata in the vst directory, simply paste it in the subfolder `.pd/`
|
||||||
|
(e.g. `c:/Program Files (x86)/Steinberg/Cubase VST/VstPlugins/.pd/`)
|
||||||
|
|
||||||
|
3bis) Old way : create a pdvst folder in the directory that contains the
|
||||||
|
application (e.g. `Reaper.exe`) that you want to use PdVst with.
|
||||||
|
(e.g. `c:/Program Files/REAPER/pdvst/`). This folder will contain the `.pdv` and `.pd` files, and
|
||||||
|
optionnally a copy of pure-data application (inside `c:/Program Files/REAPER/pdvst/pd/`).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Creating VST Plugins from Pd Patches
|
||||||
|
|
||||||
|
* Create a new `.pdv` setup file (see the `.pdv` Setup File section). The file
|
||||||
|
must be named the same as the plugin (e.g. for a plugin named Pd_Gain you
|
||||||
|
would create a file named `Pd_Gain.pdv`). Place this file and all dependant
|
||||||
|
files (`.pd` files, external Pd library `.dll` files, etc.) as specified above (section
|
||||||
|
"Installation").
|
||||||
|
|
||||||
|
* Make a copy of the `pdvst-template32.dll` / `pdvst-template64.dll` file and
|
||||||
|
rename the same as the plugin and `.pdv` file (e.g. for a plugin named
|
||||||
|
Pd_Gain you would copy `pdvst-template32.dll` to a new file named `Pd_Gain.dll`).
|
||||||
|
Move your new plugin `.dll` file to the vst plugins folder of the application.
|
||||||
|
|
||||||
|
# The .pdv Setup File-
|
||||||
|
|
||||||
|
This file contains all of the information about your plugin. The format is ASCII
|
||||||
|
text with keys and values separated by an '=' character and each key and value
|
||||||
|
pair separated by a carriage return. Comments are demarked with a '#' character.
|
||||||
|
For an example, see Pd_Gain.pdv.
|
||||||
|
|
||||||
|
-Keys-
|
||||||
|
|
||||||
|
CHANNELS = <integer>
|
||||||
|
Number of audio input and output channels. Tested with 2 and 4.
|
||||||
|
Should work with larger values.
|
||||||
|
|
||||||
|
PDPATH = <string>
|
||||||
|
Path to the installation directory of pure-data program.
|
||||||
|
(example : PDPATH = C:/Program Files (x86)/pd-0.47-1/ )
|
||||||
|
If this line is not specified, for compatibility with older version, the program will first
|
||||||
|
look for pd.exe in <host_exec_dir>/pdvst/pd/bin.
|
||||||
|
If there is not an existing pd installation in <host_exec_dir>/pdvst/, the program will then
|
||||||
|
look for pd.exe in <VST_FOLDER>/.pd/
|
||||||
|
|
||||||
|
MAIN = <string>
|
||||||
|
The .pd file for Pd to open when the plugin is opened.
|
||||||
|
|
||||||
|
ID = <string[4]>
|
||||||
|
The 4-character unique ID for the VST plugin. This is required by VST and
|
||||||
|
just needs to be a unique string of four characters.
|
||||||
|
|
||||||
|
SYNTH = <TRUE/FALSE>
|
||||||
|
Boolean value stating whether this plugin is an instrument (VSTi) or an effect.
|
||||||
|
Both types of plugins can send/receive midi events.
|
||||||
|
|
||||||
|
CUSTOMGUI = <TRUE/FALSE>
|
||||||
|
Boolean value stating whether the Pd patch uses a custom GUI (e.g. GrIPD).
|
||||||
|
|
||||||
|
DEBUG = <TRUE/FALSE>
|
||||||
|
Boolean value stating whether to display the Pd GUI when the plugin is opened.
|
||||||
|
|
||||||
|
PARAMETERS = <integer>
|
||||||
|
Number of parameters the plugin uses (up to 128).
|
||||||
|
|
||||||
|
NAMEPARAMETER<integer> = <string>
|
||||||
|
Display name for parameters. Used when CUSTOMGUI is false or the VST host doesn't
|
||||||
|
support custom editors.
|
||||||
|
|
||||||
|
PROGRAM = <string>
|
||||||
|
Declares a new VST program and sets the name (up to 128 programs can be declared)
|
||||||
|
|
||||||
|
PARAMETER<integer> = <float>
|
||||||
|
Defines the parameter values for the last declared program. <float> must be
|
||||||
|
between 0 and 1 inclusive.
|
||||||
|
|
||||||
|
# Pd/VST audio/midi Communication
|
||||||
|
|
||||||
|
When the plugin is opened, the .pd patch file declared in the .pdv setup file's MAIN key
|
||||||
|
will be opened.
|
||||||
|
|
||||||
|
The Pd patch will receive its incoming audio stream from the adc~ object,
|
||||||
|
and incoming MIDI data from the Pd objects notein, ctlin, and pgmin.
|
||||||
|
|
||||||
|
Pd patches should output their audio stream to the dac~ object,
|
||||||
|
and their midi stream to the noteout, ctlout, pgmout objects.
|
||||||
|
|
||||||
|
REMARKS :
|
||||||
|
* The midi out feature is still experimental and not fully tested. It should work when host uses ASIO driver, more erratic with mmio. Midi out note on/off have been tested, other midi messages untested but should work.
|
||||||
|
* Inside puredata plugin, don't use "media/ASIO" or "media/standard" audio menu, you may crash pd & host.
|
||||||
|
* You can continue to use "media/midi settings" menu to select input and output midi devices independently from host.
|
||||||
|
|
||||||
|
# Pd/VST - further communications
|
||||||
|
|
||||||
|
For purposes such as GUI interaction and VST automation, your patch may need to communicate
|
||||||
|
further with the VST host. Special Pd send/receive symbols can be used in your Pd patch.
|
||||||
|
For an example, see the pd-gain.pd file.
|
||||||
|
|
||||||
|
* rvstparameter<integer> : Use this symbol to receive parameter values from the VST host. Values will be floats between 0 and 1 inclusive.
|
||||||
|
* svstparameter<integer> : Use this symbol to send parameter values to the VST host. Values should be floats between 0 and 1 inclusive.
|
||||||
|
* rvstopengui : Use this symbol to receive notification that the patch's GUI should be opened or closed. The value will be either 1 or 0.
|
||||||
|
* rvstplugname : Use this symbol to receive plug & instance name from host
|
||||||
|
* vstTimeInfo (play head information support) :
|
||||||
|
|
||||||
|
vstTimeInfo.ppqPos, vstTimeInfo.tempo, vstTimeInfo.timeSigNumerator, vstTimeInfo.timeSigDenominator, vstTimeInfo.flags are experimental receivers for getting time infos from host. Names should change in the future.
|
||||||
|
|
||||||
|
* EXPERIMENTAL
|
||||||
|
guiName : use this symbol to send and signal to the host the name of the gui-extra window to embed (see Pd_Gain(gui) example).
|
||||||
|
|
||||||
|
Note: for most VST hosts, parameters for VST instruments are recorded as sysex data, so be
|
||||||
|
sure to disable any MIDI message filtering in the VST host.
|
||||||
|
|
||||||
|
#CURRENT FEATURES
|
||||||
|
|
||||||
|
* Windows x32 and x64 only
|
||||||
|
* Support for embedding external gui window into host
|
||||||
|
* multichannel audio in/out support
|
||||||
|
* integrated vst midi-in, experimental midi-out
|
||||||
|
* added play head information support (see examples)
|
||||||
|
|
||||||
|
#TODO
|
||||||
|
|
||||||
|
* optimize plugin loading
|
||||||
|
* use of chunks for preset saving
|
||||||
35
build/Release64/Pd_Chunks-test/Pd_Chunks-test.pd
Normal file
35
build/Release64/Pd_Chunks-test/Pd_Chunks-test.pd
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#N canvas 0 265 595 358 12;
|
||||||
|
#X obj 78 87 adc~, f 6;
|
||||||
|
#X obj 73 241 loadbang;
|
||||||
|
#X msg 73 271 \; pd dsp 1 \;;
|
||||||
|
#X obj 77 162 dac~, f 6;
|
||||||
|
#X msg 142 52 \$1 30;
|
||||||
|
#X obj 142 87 line~;
|
||||||
|
#X obj 122 127 *~;
|
||||||
|
#X obj 78 127 *~;
|
||||||
|
#X obj 142 11 r gain;
|
||||||
|
#X obj 242 8 r rvstparameter0;
|
||||||
|
#X obj 242 235 * 100;
|
||||||
|
#X obj 242 263 dbtorms;
|
||||||
|
#X obj 242 290 s gain;
|
||||||
|
#X obj 300 225 s svstparameter0;
|
||||||
|
#X obj 277 75 vsl 50 128 0 1 0 0 empty empty empty 0 -9 0 10 -262144
|
||||||
|
-1 -1 0 1;
|
||||||
|
#X msg 277 42 set \$1;
|
||||||
|
#X text 355 117 range is 0..1;
|
||||||
|
#X connect 0 0 7 0;
|
||||||
|
#X connect 0 1 6 0;
|
||||||
|
#X connect 1 0 2 0;
|
||||||
|
#X connect 4 0 5 0;
|
||||||
|
#X connect 5 0 6 1;
|
||||||
|
#X connect 5 0 7 1;
|
||||||
|
#X connect 6 0 3 1;
|
||||||
|
#X connect 7 0 3 0;
|
||||||
|
#X connect 8 0 4 0;
|
||||||
|
#X connect 9 0 10 0;
|
||||||
|
#X connect 9 0 15 0;
|
||||||
|
#X connect 10 0 11 0;
|
||||||
|
#X connect 11 0 12 0;
|
||||||
|
#X connect 14 0 13 0;
|
||||||
|
#X connect 14 0 10 0;
|
||||||
|
#X connect 15 0 14 0;
|
||||||
49
build/Release64/Pd_Chunks-test/Pd_Chunks-test.pdv
Normal file
49
build/Release64/Pd_Chunks-test/Pd_Chunks-test.pdv
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Number of audio input and output channels
|
||||||
|
CHANNELS = 2
|
||||||
|
|
||||||
|
# installation directory of puredata (optional)
|
||||||
|
# If non specified, will search in <host_exec_dir>\pdvst\pd\
|
||||||
|
# then in <vst_dir>\.pd\
|
||||||
|
#PDPATH = D:\Programs\pd-0.48-1-test\
|
||||||
|
|
||||||
|
# Main Pd patch of the plugin
|
||||||
|
MAIN = Pd_Chunks-test.pd
|
||||||
|
|
||||||
|
# Unique four character VST plugin ID
|
||||||
|
ID = pdch
|
||||||
|
|
||||||
|
# Whether this is a VSTi
|
||||||
|
SYNTH = FALSE
|
||||||
|
|
||||||
|
# Whether there is a custom GUI (e.g. GrIPD)
|
||||||
|
CUSTOMGUI = FALSE
|
||||||
|
|
||||||
|
# Display Pd GUI or not
|
||||||
|
DEBUG = TRUE
|
||||||
|
|
||||||
|
# External libraries (comma delimited list, relative to pdvst/)
|
||||||
|
# ***OBSOLETE, use [declare] inside patch instead***
|
||||||
|
#LIB =
|
||||||
|
|
||||||
|
# Number of VST parameters (up to 128)
|
||||||
|
PARAMETERS = 1
|
||||||
|
|
||||||
|
# Name of first VST parameter
|
||||||
|
# used when CUSTOMGUI is false or VST host doesn't support custom editors
|
||||||
|
NAMEPARAMETER0 = Level
|
||||||
|
|
||||||
|
# Define a program (up to 128)
|
||||||
|
PROGRAM = Full Blast
|
||||||
|
|
||||||
|
# Set first parameter value for this program
|
||||||
|
PARAMETER0 = 1.0
|
||||||
|
|
||||||
|
#another program
|
||||||
|
PROGRAM = Muted
|
||||||
|
|
||||||
|
PARAMETER0 = 0.0
|
||||||
|
|
||||||
|
#another program
|
||||||
|
PROGRAM = -6dB
|
||||||
|
|
||||||
|
PARAMETER0 = 0.94
|
||||||
BIN
build/Release64/Pd_Chunks-test/test.fxp
Normal file
BIN
build/Release64/Pd_Chunks-test/test.fxp
Normal file
Binary file not shown.
@@ -38,6 +38,7 @@ ALL: $(SOURCES)
|
|||||||
cp pdvst-template.dll ../build/Release$(arch)/Pd_Gain-gui.dll
|
cp pdvst-template.dll ../build/Release$(arch)/Pd_Gain-gui.dll
|
||||||
cp pdvst-template.dll ../build/Release$(arch)/Pd_Gain-nogui.dll
|
cp pdvst-template.dll ../build/Release$(arch)/Pd_Gain-nogui.dll
|
||||||
cp pdvst-template.dll ../build/Release$(arch)/Pd_Midi.dll
|
cp pdvst-template.dll ../build/Release$(arch)/Pd_Midi.dll
|
||||||
|
cp pdvst-template.dll ../build/Release$(arch)/Pd_Chunks-test.dll
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user