Crate jinglebells

Crate jinglebells 

Source
Expand description

§Jingle Maker

A Rust library for generating pleasant-sounding jingles and notification sounds using custom oscillators and musical theory.

§Features

  • Custom oscillator synthesis with multiple waveforms (sine, triangle, sawtooth, square)
  • ADSR envelope control for natural-sounding audio
  • Musical theory support with scales, chords, and progressions
  • WAV file export functionality
  • Preset jingle generators for common notification types

§Example

use jinglebells::{JingleGenerator, WaveForm};
 
let mut generator = JingleGenerator::new();
let samples = generator.create_notification_jingle(WaveForm::Sine, None, None);
generator.export_to_wav(&samples, "notification.wav").unwrap();

Re-exports§

pub use audio::WaveForm;
pub use audio::ADSR;
pub use audio::Oscillator;
pub use audio::LayeredOscillator;
pub use audio::OscillatorLayer;
pub use music::Note;
pub use music::Scale;
pub use music::Chord;
pub use music::ChordProgression;
pub use music::Melody;
pub use music::MelodyPattern;
pub use music::RhythmPattern;
pub use export::JingleGenerator;
pub use error::JingleError;
pub use effects::DelayBuffer;
pub use effects::Echo;
pub use effects::Reverb;
pub use effects::LowPassFilter;
pub use effects::LowPass;
pub use effects::AutomaticGainControl;
pub use effects::AGC;
pub use effects::normalize_samples;
pub use effects::peak_normalize;
pub use presets::*;

Modules§

audio
Audio synthesis components
effects
Audio effects processing
error
Error types for the jingle maker library
export
Audio file export functionality (WAV and MP3)
music
Musical theory components for jingle generation
presets
Pre-built jingle presets for common notification types

Constants§

A4_FREQUENCY
A4 frequency reference for musical note calculations
SAMPLE_RATE
Standard sample rate used throughout the library