Skip to main content

beamer_core/
lib.rs

1//! # beamer-core
2//!
3//! Core abstractions for the Beamer audio plugin 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//! - [`Descriptor`] - Plugin definition (unprepared state, holds parameters)
12//! - [`Processor`] - Core DSP processing trait (prepared state)
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//! - [`ParameterInfo`] - 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 buffer_storage;
31pub mod bus_config;
32pub mod bypass;
33pub mod conversion_buffers;
34pub mod config;
35pub mod editor;
36pub mod error;
37pub mod midi;
38pub mod midi_cc_config;
39pub mod midi_cc_state;
40pub mod parameter_format;
41pub mod parameter_groups;
42pub mod parameter_info;
43pub mod parameter_range;
44pub mod parameter_store;
45pub mod parameter_types;
46pub mod plugin;
47pub mod preset;
48pub mod process_context;
49pub mod sample;
50pub mod setup;
51pub mod smoothing;
52pub mod sysex_pool;
53pub mod types;
54
55// Re-exports for convenience
56pub use buffer::{AuxiliaryBuffers, AuxInput, AuxOutput, Buffer};
57pub use buffer_storage::ProcessBufferStorage;
58pub use bus_config::{CachedBusConfig, CachedBusInfo};
59pub use config::{Config, FourCharCode};
60pub use conversion_buffers::ConversionBuffers;
61pub use bypass::{BypassAction, BypassHandler, BypassState, CrossfadeCurve};
62pub use editor::{EditorConstraints, EditorDelegate, NoEditor};
63pub use error::{PluginError, PluginResult};
64pub use midi::{
65    // Basic types
66    cc, ChannelPressure, ControlChange, MidiBuffer, MidiChannel, MidiEvent, MidiEventKind,
67    MidiNote, NoteId, NoteOff, NoteOn, PitchBend, PolyPressure, ProgramChange,
68    // Advanced VST3 events
69    ChordInfo, NoteExpressionInt, NoteExpressionText, NoteExpressionValue, ScaleInfo, SysEx,
70    // MIDI 2.0 types
71    Midi2Controller,
72    // RPN/NRPN types
73    rpn, ParameterNumberKind, ParameterNumberMessage, RpnTracker,
74    // Note Expression Controller types (VST3 SDK 3.5.0)
75    NoteExpressionTypeFlags, NoteExpressionTypeInfo, NoteExpressionValueDesc,
76    // Keyswitch Controller types (VST3 SDK 3.5.0)
77    keyswitch_type, KeyswitchInfo,
78    // Physical UI Mapping types (VST3 SDK 3.6.11)
79    physical_ui, PhysicalUIMap,
80    // MPE Support types (VST3 SDK 3.6.12)
81    MpeInputDeviceSettings,
82    // Constants modules
83    note_expression,
84    // 14-bit CC utilities
85    combine_14bit_cc, combine_14bit_raw, split_14bit_cc, split_14bit_raw,
86    // Buffer size constants
87    MAX_CHORD_NAME_SIZE, MAX_EXPRESSION_TEXT_SIZE, MAX_KEYSWITCH_TITLE_SIZE,
88    MAX_NOTE_EXPRESSION_TITLE_SIZE, MAX_SCALE_NAME_SIZE, MAX_SYSEX_SIZE,
89};
90pub use parameter_format::Formatter;
91pub use parameter_range::{LinearMapper, LogMapper, LogOffsetMapper, PowerMapper, RangeMapper};
92pub use parameter_groups::{GroupId, GroupInfo, ParameterGroups, ROOT_GROUP_ID};
93pub use parameter_info::{ParameterFlags, ParameterInfo, ParameterUnit};
94pub use parameter_store::{NoParameters, ParameterStore};
95pub use parameter_types::{BoolParameter, EnumParameter, EnumParameterValue, FloatParameter, IntParameter, ParameterRef, Parameters};
96pub use smoothing::{Smoother, SmoothingStyle};
97pub use midi_cc_config::{controller, MidiCcConfig, MAX_CC_CONTROLLER};
98pub use midi_cc_state::{MidiCcState, MIDI_CC_PARAM_BASE};
99pub use plugin::{
100    AuxInputCount, AuxOutputCount, BusInfo, BusLayout, BusType, Descriptor, HasParameters,
101    HostSetup, MainInputChannels, MainOutputChannels, MaxBufferSize, Midi1Assignment,
102    Midi2Assignment, MidiControllerAssignment, PluginSetup, ProcessMode, Processor, SampleRate,
103};
104pub use preset::{fnv1a_hash, FactoryPresets, NoPresets, PresetInfo, PresetValue};
105pub use process_context::{FrameRate, ProcessContext, Transport};
106pub use sample::Sample;
107pub use sysex_pool::SysExOutputPool;
108pub use types::{ParameterId, ParameterValue, Rect, Size, MAX_AUX_BUSES, MAX_BUSES, MAX_CHANNELS};