Skip to content

Repository files navigation

PolySampler

A VST3/CLAP plugin for automatically multisampling instruments and exporting presets for the Teenage Engineering OP-XY.

Point it at any MIDI-controllable instrument, hit Start, and it steps through every note in your range — recording, trimming silence, finding loop points, and packaging everything into a drag-and-drop .preset file ready for the OP-XY.

Status: early / experimental. Built and tested on macOS (Apple Silicon). It works, but expect rough edges. Bug reports and pull requests are welcome.

Not affiliated with Teenage Engineering. This is an independent tool that writes files in a format the OP-XY can read.


Features

  • Auto-multisampling — steps through MIDI notes, detects onset, records until silence, moves to next note
  • Loop point detection — autocorrelation or zero-crossing algorithms, snapped to zero crossings to prevent clicks
  • OP-XY export — generates a valid patch.json + WAVs zipped into a .preset file (drag onto device or import via OP-XY app)
  • Range presets — one-click Bass / Keys / Lead / Full ranges with interval auto-set to stay within the OP-XY's 24-zone limit
  • Envelope presets — Bass, Keys, Lead, Pad, Pluck, Sustain starting points for amp + filter envelopes
  • BPM mode — timing sliders snap to musical beat values synced to host BPM
  • Level meter — real-time input monitoring with draggable silence threshold
  • Piano keyboard — click to set note range with visual feedback during sampling
  • Normalize — peak normalize each sample to 0 dBFS before export
  • Monitor toggle — pass audio through to DAW output while sampling

Building

Requires Rust and cargo-nih-plug.

# Install bundler (once)
cargo install cargo-nih-plug

# Build universal binary (required on Apple Silicon)
cargo nih-plug bundle-universal polysampler --release

The built plugin will be at target/bundled/PolySampler.vst3 and target/bundled/PolySampler.clap.

Install (macOS)

cp -r target/bundled/PolySampler.vst3 ~/Library/Audio/Plug-Ins/VST3/

Usage

  1. Load PolySampler on a MIDI track in your DAW, routed to receive audio from your target instrument
  2. Set your note range using the sliders, piano keyboard, or a range preset
  3. Configure recording settings (silence threshold, hold time, etc.)
  4. Set your export name and save path
  5. Configure OP-XY settings (envelope, loop, play mode, etc.)
  6. Click Start Sampling

PolySampler will send MIDI notes one at a time, record the audio response, and export a .preset file when done.

OP-XY Import

Drag the exported .preset file onto the OP-XY's display, or import via the OP-XY companion app.


Parameters

Note Range

Parameter Description
Low Note Lowest MIDI note to sample
High Note Highest MIDI note to sample
Interval Semitones between each sampled note (1 = every semitone)
Velocity MIDI velocity used when triggering notes

Range presets: Bass (C1–C4, interval 2), Keys (C2–C6, interval 3), Lead (C3–C6, interval 2), Full (C1–C7, interval 4) — all tuned to stay within the OP-XY's 24-zone limit.

Recording

Parameter Description
Silence Threshold dBFS level below which audio is considered silent
Silence Duration How long audio must stay silent before moving to the next note
Min Hold Time Minimum time the MIDI note is held before releasing
Max Record Time Hard cap on recording time per note
Cooldown Wait time between notes

Export

  • Loop Points — Off, Autocorrelation, or Zero Crossing
  • Loop Crossfade — smooths the loop transition point (0–100%, default 20%); only active when loop is enabled
  • Sample Rate — 11 / 22 / 44.1 / 48 / 96 kHz
  • Bit Depth — 8-bit, 12-bit, 16-bit, 24-bit, 32-bit float
  • Normalize — peak normalize to 0 dBFS

Dependencies


Roadmap

See ROADMAP.md for planned features.


Example output

example_preset/ contains a sample .preset directory produced by PolySampler — the generated patch.json alongside the recorded WAVs — if you want to see what the export looks like before running it yourself.


Contributing

Issues and pull requests are welcome. There's no formal process — open an issue to discuss anything substantial before writing a lot of code. Run cargo fmt and make sure cargo check is clean before submitting.

By contributing, you agree that your contributions are licensed under the same terms as the rest of the project (see below).


License

PolySampler is licensed under the PolyForm Noncommercial License 1.0.0.

In plain terms: you can use, modify, and share this software freely for any noncommercial purpose — personal projects, hobby use, study, research, education, and nonprofit or public-institution work are all permitted. What you cannot do is use it commercially or sell it. If you want to use PolySampler in a commercial context, open an issue to arrange a separate license.

Note that this is a source-available license, not an OSI-approved open source license, because it restricts commercial use.

Third-party code and binary distribution

PolySampler builds on nih-plug and several other libraries. One dependency matters for redistribution: the VST3 bindings are GPLv3, so while you can build and use a VST3 privately, compiled VST3 binaries should not be redistributed. CLAP builds have no such restriction.

See NOTICE.md for the full dependency license list and details.

About

A VST3/CLAP plugin for automatically multisampling instruments and exporting presets for the Teenage Engineering OP-XY.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages