beamer_core/
lib.rs

1//! # beamer-core
2//!
3//! Core abstractions for the Beamer VST3 WebView framework.
4//!
5//! This crate provides platform-agnostic and format-agnostic traits that define
6//! the interface for audio plugins. It has no external dependencies, making it
7//! suitable for use in any context.
8//!
9//! ## Main Traits
10//!
11//! - [`Plugin`] - Complete plugin trait combining DSP and parameters
12//! - [`AudioProcessor`] - Core DSP processing trait
13//! - [`Parameters`] - Parameter collection trait
14//! - [`EditorDelegate`] - GUI configuration and callbacks
15//!
16//! ## Types
17//!
18//! - [`Size`] - 2D size in pixels
19//! - [`Rect`] - Rectangle in pixels
20//! - [`Buffer`] - Main audio I/O buffer
21//! - [`AuxiliaryBuffers`] - Sidechain and aux bus access
22//! - [`BusInfo`] - Audio bus configuration
23//! - [`ParamInfo`] - Parameter metadata
24//! - [`PluginError`] - Error types
25//! - [`MidiEvent`] - MIDI event types
26//! - [`Transport`] - DAW transport/timing state
27//! - [`ProcessContext`] - Processing context with sample rate and transport
28
29pub mod buffer;
30pub mod bypass;
31pub mod editor;
32pub mod error;
33pub mod fnv;
34pub mod midi;
35pub mod midi_params;
36pub mod param_format;
37pub mod param_range;
38pub mod param_types;
39pub mod params;
40pub mod plugin;
41pub mod process_context;
42pub mod sample;
43pub mod smoothing;
44pub mod types;
45
46// Re-exports for convenience
47#[allow(deprecated)]
48pub use buffer::{AudioBuffer, AuxiliaryBuffers, AuxInput, AuxOutput, Buffer, Bus};
49pub use bypass::{BypassHandler, BypassState, CrossfadeCurve};
50pub use editor::{EditorConstraints, EditorDelegate, NoEditor};
51pub use error::{PluginError, PluginResult};
52pub use fnv::fnv1a_32;
53pub use midi::{
54    // Basic types
55    cc, ChannelPressure, ControlChange, MidiBuffer, MidiChannel, MidiEvent, MidiEventKind,
56    MidiNote, NoteId, NoteOff, NoteOn, PitchBend, PolyPressure, ProgramChange,
57    // Advanced VST3 events
58    ChordInfo, NoteExpressionInt, NoteExpressionText, NoteExpressionValue, ScaleInfo, SysEx,
59    // MIDI 2.0 types
60    Midi2Controller,
61    // RPN/NRPN types
62    rpn, ParameterNumberKind, ParameterNumberMessage, RpnTracker,
63    // Note Expression Controller types (VST3 SDK 3.5.0)
64    NoteExpressionTypeFlags, NoteExpressionTypeInfo, NoteExpressionValueDesc,
65    // Keyswitch Controller types (VST3 SDK 3.5.0)
66    keyswitch_type, KeyswitchInfo,
67    // Physical UI Mapping types (VST3 SDK 3.6.11)
68    physical_ui, PhysicalUIMap,
69    // MPE Support types (VST3 SDK 3.6.12)
70    MpeInputDeviceSettings,
71    // Constants modules
72    note_expression,
73    // 14-bit CC utilities
74    combine_14bit_cc, combine_14bit_raw, split_14bit_cc, split_14bit_raw,
75    // Buffer size constants
76    MAX_CHORD_NAME_SIZE, MAX_EXPRESSION_TEXT_SIZE, MAX_KEYSWITCH_TITLE_SIZE,
77    MAX_NOTE_EXPRESSION_TITLE_SIZE, MAX_SCALE_NAME_SIZE, MAX_SYSEX_SIZE,
78};
79pub use param_format::Formatter;
80pub use param_range::{LinearMapper, LogMapper, RangeMapper};
81pub use param_types::{BoolParam, EnumParam, EnumParamValue, FloatParam, IntParam, ParamRef, Params};
82pub use smoothing::{Smoother, SmoothingStyle};
83pub use params::{NoParams, ParamFlags, ParamInfo, Parameters, UnitId, UnitInfo, Units, ROOT_UNIT_ID};
84pub use midi_params::{MidiCcParams, MIDI_CC_PARAM_BASE};
85pub use plugin::{
86    AudioProcessor, BusInfo, BusType, Midi1Assignment, Midi2Assignment, MidiControllerAssignment,
87    Plugin,
88};
89pub use process_context::{FrameRate, ProcessContext, Transport};
90pub use sample::Sample;
91pub use types::{ParamId, ParamValue, Rect, Size, MAX_AUX_BUSES, MAX_BUSES, MAX_CHANNELS};