Trait tune::tuner::TunableSynth

source ·
pub trait TunableSynth {
    type Result: IsErr;
    type NoteAttr: Clone + Default;
    type GlobalAttr;

    // Required methods
    fn num_channels(&self) -> usize;
    fn group_by(&self) -> GroupBy;
    fn notes_detune(
        &mut self,
        channel: usize,
        detuned_notes: &[(Note, Ratio)]
    ) -> Self::Result;
    fn note_on(
        &mut self,
        channel: usize,
        started_note: Note,
        attr: Self::NoteAttr
    ) -> Self::Result;
    fn note_off(
        &mut self,
        channel: usize,
        stopped_note: Note,
        attr: Self::NoteAttr
    ) -> Self::Result;
    fn note_attr(
        &mut self,
        channel: usize,
        affected_note: Note,
        attr: Self::NoteAttr
    ) -> Self::Result;
    fn global_attr(&mut self, attr: Self::GlobalAttr) -> Self::Result;
}
Expand description

A note-based multichannel synthesizer with note detuning capabilities.

Required Associated Types§

Required Methods§

source

fn num_channels(&self) -> usize

source

fn group_by(&self) -> GroupBy

source

fn notes_detune( &mut self, channel: usize, detuned_notes: &[(Note, Ratio)] ) -> Self::Result

source

fn note_on( &mut self, channel: usize, started_note: Note, attr: Self::NoteAttr ) -> Self::Result

source

fn note_off( &mut self, channel: usize, stopped_note: Note, attr: Self::NoteAttr ) -> Self::Result

source

fn note_attr( &mut self, channel: usize, affected_note: Note, attr: Self::NoteAttr ) -> Self::Result

source

fn global_attr(&mut self, attr: Self::GlobalAttr) -> Self::Result

Implementors§