Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about CC support #88

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion core/src/channel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,22 @@ impl Default for ChannelInitOptions {
/// Represents a single MIDI channel within XSynth.
///
/// Keeps track and manages MIDI events and the active voices of a channel.
///
/// MIDI CC Support Chart:
/// - `CC0`: Bank Select
/// - `CC6`, `CC38`, `CC100`, `CC101`: RPN & NRPN
/// - `CC7`: Volume
/// - `CC8`: Balance
/// - `CC10`: Pan
/// - `CC11`: Expression
/// - `CC64`: Damper pedal
/// - `CC71`: Cutoff resonance
/// - `CC72`: Release time multiplier
/// - `CC73`: Attack time multiplier
/// - `CC74`: Cutoff frequency
/// - `CC120`: All sounds off
/// - `CC121`: Reset all controllers
/// - `CC123`: All notes off
pub struct VoiceChannel {
key_voices: Vec<Key>,

Expand Down Expand Up @@ -391,7 +407,7 @@ impl VoiceChannel {
let vol: f32 = value as f32 / 128.0;
self.control_event_data.volume.set_end(vol);
}
0x0A => {
0x0A | 0x08 => {
// Pan
let pan: f32 = value as f32 / 128.0;
self.control_event_data.pan.set_end(pan);
Expand Down
3 changes: 2 additions & 1 deletion core/src/channel_group/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const MAX_EVENT_CACHE_SIZE: u32 = 1024 * 1024;

/// Represents a MIDI synthesizer within XSynth.
///
/// Manages multiple VoiceChannel objects at once.
/// Manages multiple VoiceChannel objects at once. For info about MIDI CC
/// support, please see the documentation of the `VoiceChannel` struct.
pub struct ChannelGroup {
thread_pool: Option<rayon::ThreadPool>,
cached_event_count: u32,
Expand Down
Loading