Skip to content

Releases

v0.6.1

Choose a tag to compare

@charCulbert charCulbert released this 03 Nov 18:08

webview

  • Unloading no longer crashes the host on macOS. Once a plugin's WebView had been shown, unloading the plugin (quitting clap-host, or a host removing it) crashed: AppKit keeps the WebView alive in the host's autorelease pools past gui.destroy, and when it was finally freed, CHOC's delegate class had gone with the binary.
  • The plugin now stays loaded from the first time its view attaches. A plugin whose GUI never opens unloads as before.
  • The cost: until the host restarts, reloading the plugin in the same process runs the code that was first loaded, even after a rebuild, and its globals keep their values from the last load. Start a new host process to pick up a rebuild.
  • Nothing else changes. Windows, Linux and iOS are untouched.

v0.6.0

Choose a tag to compare

@charCulbert charCulbert released this 30 Oct 12:05

chardraw

  • Knobs and sliders follow Compost's curves. A parameter's curve is "log" or linear, and its mid is the value halfway along the travel. Log with a mid bends so the mid sits at the middle; log without one is the plain log law. Linear with a mid is two straight lines through it; without one, the travel is even. The same parameter now feels the same in Compost and in chardraw.
  • This changes v0.5.0's mid. The exponential curve through a mid is gone: a mid with no curve now means two straight lines. To keep a bent knob, add "curve": "log" beside "mid" in the parameter's "params" entry, or "log" after the mid in a chardraw starter's paramTable row.
  • A log curve needs min above 0, and is linear otherwise. Stepped parameters are always even. A control's log argument still overrides the curve and mid.
  • Out-of-range values clamp to the range when placing a control, and a non-finite value counts as min.
  • Nothing reaches the host. CLAP parameter info, automation and saved state don't change.
  • Examples. The starters' rows take a curve. instrument-chardraw's cutoff and release are log, and feel as before; the gallery's Cutoff is log through 1 kHz, and its Drive two lines through 2.

v0.5.0

Choose a tag to compare

@charCulbert charCulbert released this 29 Oct 16:24

chardraw

  • A parameter's mid sets its knob's travel. Give a parameter a mid, the
    value at the middle of its travel, and chardraw's knobs and sliders follow
    an exponential curve through min, mid and max. It works from 0 and on
    negative ranges, and a mid of √(min·max) is the log law. Without a mid,
    travel is even, as before.
  • Opting in. Add "mid" to the parameter's entry in the "params"
    message (gpu::Param::mid). In the chardraw starters, a paramTable row can
    end with its mid. A control's log argument still overrides it.
  • Nothing reaches the host. CLAP parameter info, automation and saved
    state don't change.
  • Examples. instrument-chardraw's cutoff and release, and the gallery's
    Cutoff and Drive, now set their travel with a mid.

v0.4.0

Choose a tag to compare

@charCulbert charCulbert released this 26 Oct 14:15

WCLAP

  • Shared memory by default. A WCLAP now builds for wasm32-wasip1-threads
    with -pthread, imports and exports a shared env.memory (up to 32768
    pages), and exports __stack_pointer, __wasm_init_tls, __tls_size,
    __tls_align and __wasi_init_tp. A host can then run main-thread calls in
    one instance and process() in a second instance over the same memory, at
    the same time, as CLAP expects of a plugin. The README says what a host does
    for the second instance.
  • Opting out. -DWCLAP_SHARED_MEMORY=OFF builds the old private-memory
    module, for runtimes without shared memory.
  • The module's interface changes: it imports env.memory and
    wasi_snapshot_preview1.sched_yield.

v0.3.0

Choose a tag to compare

@charCulbert charCulbert released this 21 Oct 11:39

chardraw

  • Stepped parameters step. A parameter the plugin marks
    CLAP_PARAM_IS_STEPPED (its "params" message now carries stepped) moves
    in whole values only: a drag divides the travel evenly between the steps,
    an arrow key or a wheel notch moves one step, typed values truncate as CLAP does,
    and a stepped toggle is on only at its top step. Knobs show a notch at each
    step (ui.detents, on by default, up to 32 steps).
  • Typed values are a bare number in the smaller unit shown. On a knob
    showing "300 ms", typing 300 now means 300 ms, not 300 s.
    Ui::Format::typedScale sets the unit (1000 types seconds as ms, 100 a
    0..1 range as a percent), and a value opens for typing in it. Text with a
    unit ("2k", "1.2 s", "40 %") isn't taken.

Changes in the starters

  • A stepped Waveform (saw, square, triangle) in both instrument starters.
  • Each unit's text is in params.h: value_to_text, text_to_value and
    the chardraw interface share it, so a typed number reads the same in the
    interface and the host. text_to_value takes a bare number in the smaller
    unit, or the text value_to_text writes, with '.' or ',' as the decimal
    point whatever the host's locale. It no longer reads "2k" or a unit in
    another case ("khz").

Upgrading from v0.2.1

Set GIT_TAG v0.3.0, then:

  • Rename isDarkMode: View::darkMode and platform::darkMode are now
    isDarkMode (ui.theme.withColors (isDarkMode)).
  • Typed values in a format with units: set typedScale to the unit shown
    (e.g. 100 for a 0..1 percent), or typing stays in the raw value. Typed text
    with anything after the number is no longer read.
  • Your plugin.cpp is your own copy, so the starters' changes don't arrive
    with the tag. To get them, copy the new params.h text functions and point
    value_to_text and text_to_value at them, as the starters' plugin.cpp
    does now. To make a parameter step, send stepped (a JSON bool, not 1) in
    your "params" message.

Known issues

  • The instrument web page's knobs step but show no detent notches; the effect
    web page doesn't handle stepped yet (it has no stepped parameter). Web pages
    have no typed entry.

v0.2.1

Choose a tag to compare

@charCulbert charCulbert released this 13 Oct 14:25

Changes in the starters

  • A parameter table in each plugin.cpp. The ids live in params.h; each
    parameter is one row (stable state key, name, range, default, flags, unit).
    The CLAP params functions are still written out and read the table, so adding
    a parameter is an id and a row, then using it.
  • Parameters are saved under a stable key, not their display name, so a
    name can change without losing saved projects. Never change a key once
    released.
  • Recalled settings tell the host (mark_dirty), so it saves them; the
    window size is the worked example, with the steps for adding your own.
  • The window can't be smaller than its content. chardraw reports the
    content's minimum size and the starters' size limits follow it.

Build

  • A shared download cache: set CPM_SOURCE_CACHE and a second project
    configures in seconds instead of minutes (8 s vs 84 s here). See the README.
  • Windows: Ninja builds no longer fail with LNK1104; each target writes its own
    import library.
  • Third-party build warnings are quieted.

Upgrading from v0.2.0

Set GIT_TAG v0.2.1. A plugin started from a v0.2.0 starter keeps working;
the starters' changes above are patterns to copy if you want them. If you
saved parameters by display name, switch to stable keys before your first
release.

Known issues

  • macOS: a rare crash when pluginval closes Effect chardraw's editor (2 in 257
    runs, none in the last 230; no stack yet). Not seen in hosts, on Linux or on
    Windows.
  • Web-page interfaces don't report their minimum size yet, so only chardraw
    interfaces are checked for clipping.

v0.2.0

Choose a tag to compare

@charCulbert charCulbert released this 13 Oct 11:28

The examples are now starters: an effect and an instrument, each with no
interface, a web page, or chardraw. Every plugin.cpp is raw CLAP, with the
same sections in the same order and every extension present (unused ones are
stubs that say what goes there), so turning one kind of plugin into another
means filling in bodies.

Examples

Folder What it is
effect-headless Gain and pan; the host shows its own controls
effect-webview Gain and pan as a channel strip, drawn by a web page
effect-chardraw The same strip, drawn with chardraw
instrument-webview A naive saw synth with a lowpass: Cutoff and Release
instrument-chardraw The same synth, drawn with chardraw
chardraw-gallery Everything chardraw draws (a showcase, not a starter)

Each builds CLAP, VST3, a standalone app, AUv2 and a WCLAP. The web-page
starters also have an iOS app (AUv3); chardraw on iOS comes next. Each UI
starter shows a peak meter (data from the audio thread to the interface) and
keeps its window size in the plugin's state.

Breaking

  • Removed: the GPU Analyzer (see char-spectrum),
    the GPU Spectrogram (now char-spectrogram),
    the ImGui Filter, Dear ImGui (libs/imgui) and the AAX setup.
  • Renamed: headless-gain → effect-headless, webview-synth →
    instrument-webview, gui-gallery → chardraw-gallery.
    new-plugin.py --from takes the new names.
  • A plugin built on libs/imgui must stay on v0.1.2 or move to chardraw.
    Plugins using libs/core, libs/webview, libs/gpu or libs/chardraw need
    no code changes: set GIT_TAG v0.2.0.

Fixes

  • Windows: a host crashed when a chardraw plugin was opened after another had
    been closed; each plugin's view now registers its own window class.
  • chardraw: knobs and sliders can fill from their default value
    (Ui::Fill::fromDefault in a Format), for bipolar parameters like pan.

v0.1.2

Choose a tag to compare

@charCulbert charCulbert released this 13 Oct 09:24

Fixes

  • chardraw: the on-screen keyboard (ui.piano) now hands back its notes in the
    frame that declares it, instead of the next, and a tap shorter than a frame
    no longer leaves its note stuck until the next mouse move. Press to note went
    from about 16 ms to under 1.5 ms.

Added

  • chardraw: knobs, sliders, number boxes and readouts take a Format: a short
    label (screen readers still hear the parameter's full name) and either a
    printf format or a function for the value text, e.g. Hz or kHz.
    Existing calls with a format string compile unchanged.
  • gpu::Params::find(id).

Nothing to change in your plugin: set GIT_TAG v0.1.2.

v0.1.1

Choose a tag to compare

@charCulbert charCulbert released this 13 Oct 07:18

Fixes

  • macOS: loading two plugins built with libs/gpu into one host crashed the
    host once a screen reader (or the host) asked for their accessibility
    children. AccessKit declares its Objective-C classes under fixed names, and
    each plugin carries its own copy; each plugin now gives them its own names.
    Plugins built on v0.1.0 with libs/gpu should update.
  • macOS: the GPU view's timer class is named per plugin too, so the runtime no
    longer warns that it's implemented in more than one plugin.

Nothing to change in your plugin: set GIT_TAG v0.1.1.

v0.1.0

Choose a tag to compare

@charCulbert charCulbert released this 13 Oct 06:21

The first release. Plugins depend on the template's libs/ at this tag (see
Updating the template);
tools/new-plugin.py sets that up.

What's in it

  • Five starter examples (Headless Gain, WebView Synth, GPU Analyzer, GPU
    Spectrogram, ImGui Filter), each building CLAP, VST3 and a standalone app on
    macOS, Windows and Linux, AUv2 on macOS, and a WCLAP for browser hosts.
  • The GUI Gallery, showing everything chardraw draws.
  • libs/core, libs/webview, libs/gpu and libs/chardraw: messages,
    resources, a CHOC WebView, a WebGPU (Dawn) view with AccessKit accessibility,
    and an immediate-mode UI with layout, menus with submenus, colour schemes
    (Magma, Viridis, Inferno, Plasma, Cividis, Turbo, Grayscale) and waveform,
    scope, spectrum and spectrogram views.
  • On Linux the WebView runs in a helper process, so it works in Ardour as well
    as REAPER and clap-host. Building no longer needs the GTK or WebKit
    development packages; running needs libwebkit2gtk-4.1-0 (glibc only).
  • WCLAP archives keep their files at the root beside module.wasm, as browser
    hosts such as openDAW expect.
  • CI builds and validates every example (clap-validator, pluginval, auval),
    fails on warnings in the template's code, checks formatting, and builds a
    project made with new-plugin.py.

Known limits

  • AUs made with clap-wrapper can't resize their window in some hosts (Live).
  • The iOS app's AUv3 has no interface yet.
  • Linux: no Wayland embedding (hosts run on X11 or XWayland); in Ardour, a page
    whose helper process died stays blank until the plugin is re-added.