Skip to content

simdott/Light_Sampler

Repository files navigation

Light Sampler LV2 Plugin

Simple one-sample, one-note dynamic sampler with envelope controls and other features. Essentially designed to play single percussive sounds.

Plugin Screenshot

Plugin controls as displayed by Ardour's default generic UI. Your host may show controls differently. The MIDI piano shown below the controls is part of Ardour's plugin window, not a feature of this plugin.

Features

  • Designed for efficient real-time operation with low CPU cost
  • Single MIDI note trigger per sample instance (ideal for drums and percussion)
  • ADHSR envelope (Attack, Decay, Hold, Sustain, Release)
  • Pitch shifting (±12 semitones)
  • Humanization (randomized pitch and volume for natural feel)
  • Forward or backward playback
  • Mono or dual-voice polyphony
  • Sample-accurate playback with linear interpolation
  • Stereo or mono output
  • LV2 state save/restore
  • LV2 worker interface for non-realtime sample loading

Project Home

https://simdott.github.io/light_sampler

Plugin URI

urn:simdott:light_sampler

Dependencies

  • LV2 SDK (lv2-dev or lv2-devel)
  • libsndfile (libsndfile-dev or libsndfile-devel)
  • GCC or Clang (C99 compliant compiler)
  • Make

Installation by distribution

Debian/Ubuntu : sudo apt-get install build-essential lv2-dev

Fedora : sudo dnf install gcc lv2-devel

Arch : sudo pacman -S base-devel lv2

Build and Install

The install.sh script automatically builds the plugin and copies files to the correct LV2 directory.

  1. Download the source : git clone https://github.com/simdott/light_sampler cd light_sampler

  2. Install for current user (recommended) : sh install.sh

    Or install system-wide (requires sudo) : sudo sh install.sh

Verification

List installed plugins : lv2ls | grep light_sampler

Should show : urn:simdott:light_sampler

Usage

Basic Operation

  1. Load the plugin in your LV2 host

  2. Click on the "Sample" parameter to select and load a sample via the displayed file browser window

  3. Set the desired MIDI note number (default: C4/60)

  4. Play that note on your MIDI keyboard or sequencer

Parameter Guide

Parameter Range Description
Volume 0-150% Output volume (above 100% adds gain)
Voices 1 or 2 Maximum simultaneous notes
Pitch Shift -12 to +12 Transposition in semitones
Play Backward 0/1 Reverse playback direction
Humanize 0/1 Randomizes pitch (±0.2 semitones) and volume (±6%)
Stereo 0/1 0 = mono (left to both outputs), 1 = stereo
MIDI Channel 1-16 MIDI channel to listen on
MIDI Note 0-127 Trigger note number
Attack 0-500 ms Rise time from silence to peak
Hold 0-1000 ms Duration at peak before decay
Decay 0-1000 ms Fall time from peak to sustain
Sustain 0-100% Level held while note continues
Release 0-1000 ms Time from sustain to silence

Technical Notes

Sample Loading

The plugin loads samples asynchronously via LV2 worker interface. Sample loading does not interrupt audio processing.

Audio Format Support

  • Sample rate: Any (resampled on-the-fly to host rate)
  • Channels: Mono or stereo
  • Bit depth: Any supported by libsndfile
  • Formats: WAV, FLAC, Ogg Vorbis, AIFF and others (Linear PCM recommended)

Note: Audio format support depends on your system's libsndfile configuration. Most distributions include WAV, FLAC, Ogg, and AIFF support.

Envelope Processing

The AHDSR envelope is calculated once per audio block for efficiency. Attack, Decay, and Release curves are exponential.

Files

  • light_sampler.c - Plugin source code
  • light_sampler.ttl - Plugin description (ports, properties)
  • manifest.ttl - Bundle manifest
  • install.sh - Build and install script
  • uninstall.sh - Uninstall script

Uninstall

The uninstall.sh script automatically removes the plugin from the LV2 directory.

  1. Open a terminal in the plugin's folder

  2. Uninstall for current user : sh uninstall.sh

    Or uninstall system-wide : sudo sh uninstall.sh

Reporting Issues

Report bugs at: https://github.com/simdott/light_sampler/issues

Latest Version

  • v1.0.0 (2026-05-??) - Initial release

License

GPL-2.0-or-later

Author

Simon Delaruotte (simdott)

About

Simple one-sample/one-note dynamic LV2 sampler with envelope controls and other features. Essentially designed to play single percussive sounds.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors