6 releases
| new 0.2.2 | May 14, 2026 |
|---|---|
| 0.2.1 | May 10, 2026 |
| 0.2.0 | Feb 23, 2026 |
| 0.1.2 | Jan 27, 2026 |
#1282 in Audio
Used in armas
1.5MB
24K
SLoC
armas-audio
Audio-specific UI components for egui.
Overview
UI components for building DAW (Digital Audio Workstation) interfaces, music production tools, and audio software. Includes MIDI controllers, mixer controls, timeline components, and sequencers. Built on the Armas component library.
Installation
[dependencies]
armas-audio = "0.1.0"
armas = "0.1.0"
egui = "0.33"
Examples
Fader:
use armas_audio::Fader;
let mut level = 0.8;
Fader::new(&mut level)
.height(200.0)
.show(ui, &theme);
Piano Keyboard:
use armas_audio::Piano;
use std::collections::HashSet;
let pressed_keys = HashSet::from([60, 64, 67]); // C major chord
let response = Piano::new()
.octaves(2)
.pressed_keys(pressed_keys)
.show(ui, &theme);
for note in response.clicked_keys {
println!("Note pressed: {}", note);
}
Knob:
use armas_audio::Knob;
let mut value = 0.5;
let response = Knob::new()
.label("Cutoff")
.range(0.0..=1.0)
.show(ui, &mut value, &theme);
if response.changed {
println!("Knob value: {}", value);
}
Audio Meter:
use armas_audio::AudioMeter;
let peak_level = 0.8;
let rms_level = 0.6;
AudioMeter::new(peak_level)
.rms(rms_level)
.height(150.0)
.show(ui, &theme);
MPE Keyboard with Expression:
use armas_audio::{MPEKeyboard, MPENote};
use std::collections::HashMap;
let mut notes = HashMap::new();
notes.insert(60, MPENote::new(60)
.velocity(0.8)
.pressure(0.5)
.pitch_bend(0.2));
let response = MPEKeyboard::new()
.active_notes(notes)
.show(ui, &theme);
Transport Controls:
use armas_audio::Transport;
let mut transport = Transport::new();
let response = transport.show(ui, &theme);
if response.play_clicked {
println!("Play pressed");
}
if response.stop_clicked {
println!("Stop pressed");
}
Components
MIDI Input: Piano, MPEKeyboard, XYPad, ModWheel, MIDIPad Mix Controls: Fader, Knob, AudioMeter, MixerStrip Timeline: Timeline, TimelineTrack, TimelineMarker, TimelineRegion, PianoRoll, WaveformDisplay, Playhead, TimeRuler Sequencers: DrumSequencer, StepSequencer Automation: AutomationEditor, AutomationCanvas, PointHandle Utilities: Transport, SnapGrid, TrackHeader
MPE Support
MPEKeyboard supports MIDI Polyphonic Expression with visual feedback for per-note velocity, pressure, pitch bend, and slide.
Documentation
API documentation: docs.rs/armas-audio
License
Licensed under either of:
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.
Links
Dependencies
~7MB
~131K SLoC