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 midi;
34pub mod midi_params;
35pub mod param_format;
36pub mod param_range;
37pub mod param_types;
38pub mod params;
39pub mod plugin;
40pub mod process_context;
41pub mod sample;
42pub mod smoothing;
43pub mod types;
44
45// Re-exports for convenience
46#[allow(deprecated)]
47pub use buffer::{AudioBuffer, AuxiliaryBuffers, AuxInput, AuxOutput, Buffer, Bus};
48pub use bypass::{BypassAction, BypassHandler, BypassState, CrossfadeCurve};
49pub use editor::{EditorConstraints, EditorDelegate, NoEditor};
50pub use error::{PluginError, PluginResult};
51pub use midi::{
52    // Basic types
53    cc, ChannelPressure, ControlChange, MidiBuffer, MidiChannel, MidiEvent, MidiEventKind,
54    MidiNote, NoteId, NoteOff, NoteOn, PitchBend, PolyPressure, ProgramChange,
55    // Advanced VST3 events
56    ChordInfo, NoteExpressionInt, NoteExpressionText, NoteExpressionValue, ScaleInfo, SysEx,
57    // MIDI 2.0 types
58    Midi2Controller,
59    // RPN/NRPN types
60    rpn, ParameterNumberKind, ParameterNumberMessage, RpnTracker,
61    // Note Expression Controller types (VST3 SDK 3.5.0)
62    NoteExpressionTypeFlags, NoteExpressionTypeInfo, NoteExpressionValueDesc,
63    // Keyswitch Controller types (VST3 SDK 3.5.0)
64    keyswitch_type, KeyswitchInfo,
65    // Physical UI Mapping types (VST3 SDK 3.6.11)
66    physical_ui, PhysicalUIMap,
67    // MPE Support types (VST3 SDK 3.6.12)
68    MpeInputDeviceSettings,
69    // Constants modules
70    note_expression,
71    // 14-bit CC utilities
72    combine_14bit_cc, combine_14bit_raw, split_14bit_cc, split_14bit_raw,
73    // Buffer size constants
74    MAX_CHORD_NAME_SIZE, MAX_EXPRESSION_TEXT_SIZE, MAX_KEYSWITCH_TITLE_SIZE,
75    MAX_NOTE_EXPRESSION_TITLE_SIZE, MAX_SCALE_NAME_SIZE, MAX_SYSEX_SIZE,
76};
77pub use param_format::Formatter;
78pub use param_range::{LinearMapper, LogMapper, LogOffsetMapper, PowerMapper, RangeMapper};
79pub use param_types::{BoolParam, EnumParam, EnumParamValue, FloatParam, IntParam, ParamRef, Params};
80pub use smoothing::{Smoother, SmoothingStyle};
81pub use params::{NoParams, ParamFlags, ParamInfo, Parameters, UnitId, UnitInfo, Units, ROOT_UNIT_ID};
82pub use midi_params::{MidiCcParams, MIDI_CC_PARAM_BASE};
83pub use plugin::{
84    AudioProcessor, BusInfo, BusType, Midi1Assignment, Midi2Assignment, MidiControllerAssignment,
85    Plugin,
86};
87pub use process_context::{FrameRate, ProcessContext, Transport};
88pub use sample::Sample;
89pub use types::{ParamId, ParamValue, Rect, Size, MAX_AUX_BUSES, MAX_BUSES, MAX_CHANNELS};