diff --git a/examples/clipit/source/gui.d b/examples/clipit/source/gui.d index 14ab1eb5..b07ab0b6 100644 --- a/examples/clipit/source/gui.d +++ b/examples/clipit/source/gui.d @@ -88,7 +88,7 @@ nothrow: _clipKnob.position = rectangle(308, 101, 128, 128).scaleByFactor(S); _outputGainKnob.position = rectangle(70, 320, 128, 128).scaleByFactor(S); _mixKnob.position = rectangle(308, 320, 128, 128).scaleByFactor(S); - + _modeSwitch.position = rectangle(380, 28, 50, 20).scaleByFactor(S); _bassSlider.position = rectangle(208, 27, 96, 24).scaleByFactor(S); diff --git a/examples/clipit/source/main.d b/examples/clipit/source/main.d index b2cfd57b..2ff379e4 100644 --- a/examples/clipit/source/main.d +++ b/examples/clipit/source/main.d @@ -27,8 +27,23 @@ enum : int paramBassBoost } - -/// Example mono/stereo distortion plugin. +/** + A small clipper plug-in named ClipIt! + + It demonstrates: + - parameters + - I/O settings (mono or stereo) + - presets + - buffer-split + - using biquads from dplug:dsp + - resizeable UI + - use of dplug:flat-widgets + + To go further: + - Examples: Distort and Template. + - FAQ: https://dplug.org/tutorials + - Inline Doc: https://dplug.dpldocs.info/dplug.html +*/ final class ClipitClient : dplug.client.Client { public: @@ -204,6 +219,5 @@ private: float _sampleRate; BiquadDelay[2] _bassFilter; - } diff --git a/examples/distort/source/main.d b/examples/distort/source/main.d index d50cfc27..d7a92095 100644 --- a/examples/distort/source/main.d +++ b/examples/distort/source/main.d @@ -9,7 +9,7 @@ import dplug.core, import gui; import ar; -// This define entry points for plugin formats, +// This define entry points for plugin formats, // depending on which version identifiers are defined. mixin(pluginEntryPoints!DistortClient); @@ -22,7 +22,27 @@ enum : int paramOnOff, } -/// Example mono/stereo distortion plugin. +/** + A small distortion plug-in named Distort! + + It demonstrates: + - parameters + - I/O settings (mono or stereo) + - basic presets + - latency reporting + - using biquads from dplug:dsp + - custom UI widgets and custom DSP + - drawing with `dplug:canvas` and `canvasity` + - resizeable UI + - basic DSP->UI feedback + - use of `dplug:pbr-widgets` + + To go further: + - Examples: ClipIt and Template. + - FAQ: https://dplug.org/tutorials + - Inline Doc: https://dplug.dpldocs.info/dplug.html +*/ + final class DistortClient : dplug.client.Client { public: @@ -117,7 +137,7 @@ nothrow: _outputRMS.reallocBuffer(maxFrames); foreach(channel; 0..2) - { + { _hpState[channel].initialize(); } } diff --git a/examples/template/source/gui.d b/examples/template/source/gui.d index 521fc5ee..e061d098 100644 --- a/examples/template/source/gui.d +++ b/examples/template/source/gui.d @@ -6,6 +6,15 @@ import dplug.client; import main; +/** + This is a barebones and empty UI with only a static image as + background. + + To go further: + - Examples: Distort and ClipIt. + - FAQ: https://dplug.org/tutorials + - Inline Documentation: https://dplug.dpldocs.info/dplug.html +*/ class TemplateGUI : FlatBackgroundGUI!("blank.png") { public: @@ -21,9 +30,14 @@ nothrow: setUpdateMargin(0); // ... - // Add widgets here with `addChild` + // Add widgets here with `addChild`. + // + // Base widgets are typically in packages dplug:flat-widgets + // and `dplug:flat_widgets`. + // + // See the examples/distort and example/clipit plug-ins for + // how to add interface elements to your plug-in. // ... - } override void reflow() @@ -31,7 +45,9 @@ nothrow: super.reflow(); // ... - // Set position of every widget here + // Set position of every widget here. + // This function is called on UI opening and resize. + // eg: _myKnob.position = rectangle(240, 170, 60, 60); // ... } diff --git a/examples/template/source/main.d b/examples/template/source/main.d index 249b1f5b..18027f9a 100644 --- a/examples/template/source/main.d +++ b/examples/template/source/main.d @@ -5,6 +5,14 @@ import gui; mixin(pluginEntryPoints!MyClient); +/** + This is a barebones and empty plug-in that does nothing. + + To go further: + - Examples: Distort and ClipIt. + - FAQ: https://dplug.org/tutorials + - Inline Doc: https://dplug.dpldocs.info/dplug.html +*/ final class MyClient : Client { public: @@ -24,7 +32,11 @@ nothrow: auto params = makeVec!Parameter(); // ... - // Add parameters here + // Add parameters here. + // + // See `dplug.client.params` module, and other examples. + // Example: + // params ~= mallocNew!BoolParameter(0, "bypass", false); // ... return params.releaseData(); @@ -36,7 +48,7 @@ nothrow: int numOutputs) { // ... - // Add DSP initialization here + // Add DSP initialization here. // ... }