Skip to main content

oscen/
lib.rs

1//! ## Oscen - a library to build modular software synthesizers.
2//! 
3//! ### The Oscen architecture is designed with the following objcectives in mind:
4//! - **Extensible** — Users of Oscen should be able to create their own synth
5//! modules without having to modify any of the library code, e.g. add cases to
6//! an enum. This is accomplished by defining the [`Signal`] trait and using trait
7//! objects to represent synth modules which can be added to a `Rack` (graph).
8//! Signal objects can be downcast using the `Any` trait to access specific
9//! features of that particular `SynthModule`.
10//!
11//! - **Dynamic** - The [`Rack`] should be able to be "patched" while the synth
12//! is running, similar to a modular hardware synth. A [`Rack`] is basically a
13//! graph where nodes are synth modules, e.g. oscillators, envelope generators
14//! and filters. Each node can have many inputs and a single output. Edges 
15//! connect the ouput of one node to one of the inputs of another. Since we
16//! cannot know the names of the fields of a node (because it's a trait object)
17//! We use the `Index` and `IndexMut` traits to access the fields by a `&str`.
18//!
19//! - **Strongly Typed** - As much as possible have the rust catch errors
20//! in our synth at comple time. This is difficult to do in light of the 
21//! previous objective and some compromises have to be made. E.g., it is not
22//! possible to know at compile time about a patch that will be added while the
23//! synth is running.
24//!
25//! [`Signal`]: signal/trait.Signal.html
26//! [`Rack`]: signal/struct.Rack.html
27
28
29/// A collection of some basic audio filters.
30pub mod filters;
31/// An implementation of *freeverb*.
32pub mod reverb;
33/// Envelope generators.
34pub mod envelopes;
35/// Core Oscen types and traits.
36pub mod signal;
37/// Syth modules for combining other sytn modules.
38pub mod operators;
39/// Some common (and some less common) oscillators.
40pub mod oscillators;
41/// Wave shaping.
42pub mod shaping;
43/// Midi interface nodes.
44pub mod midi;
45/// Utilites.
46pub mod utils;
47/// Instruments.
48pub mod instruments;
49/// Sequencer
50pub mod sequencer;