$ show BOBONA/Just-a-Sample
Just a Sample is a modern, open-source audio sampler plugin for VST3 and AU formats, built with the JUCE framework. It provides sample playback with time-stretching and pitch-shifting (via the Bungee library), a reorderable FX chain (reverb, chorus, distortion, EQ), waveform editing, recording, and microtonal tuning support via MTS-ESP. The architecture is a single plugin with a modular internal design: the core audio processing lives in CustomSamplerVoice, while UI components like SampleEditor, SampleNavigator, FxChain, and CustomLookAndFeel are separated into distinct modules. Effects are implemented as independent classes (Reverb, Chorus, Distortion, BandEQ) with a common interface. The project also includes Reaper-specific VST3 extensions for tighter DAW integration. The codebase demonstrates solid engineering practices with custom UI patterns, thread-safe sample loading, and a theme system supporting dark/light modes. While some parts show active development (TODOs, experimental features), the overall structure is clean and well-organized, making it a good reference for JUCE-based plugin development.
The LLM identified 5 files worth highlighting for reuse:
Implements pitch detection using the LEAF library's pitch tracker. It is a self-contained utility that takes an audio buffer and returns the detected pitch frequency. Could be extracted and reused in any real-time audio application needing pitch tracking, with minimal modifications (only dependency on LEAF).
Provides asynchronous sample loading using a thread pool and a hash-based cache to avoid reloading duplicate samples. It handles common audio file formats via JUCE's AudioFormatManager. The design is reusable for any project that needs to load audio files off the main thread with deduplication.
Contains stateless utility functions for audio buffer manipulation, including sample hash computation, peak calculation, and gain normalization. These are pure algorithms with no dependencies on the project's internal state, making them easily portable to other audio projects.
Defines a pure interface (FxDragTarget) that allows components to accept dragged FX modules. It is a clean abstraction that can be reused in any JUCE-based drag-and-drop system for reorderable or slot-based UI, without depending on the project's FX implementations.
Implements a thread-safe observable value pattern using atomic operations and a callback listener. It provides a reusable alternative to JUCE's Value/ValueTree for cases where simple scalar observations with minimal overhead are needed. Can be extracted as a standalone utility.