pub struct MidiP {
next_gate: i8,
cur_note: u8,
cur_gate: u8,
cur_vel: f32,
trig_sig: TrigSignal,
gate_sig: GateSignal,
}
Expand description
The (stereo) output port of the plugin
Fields
next_gate: i8
cur_note: u8
cur_gate: u8
cur_vel: f32
trig_sig: TrigSignal
gate_sig: GateSignal
Implementations
sourceimpl MidiP
impl MidiP
pub fn new(_nid: &NodeId, _node_global: &NodeGlobalRef) -> Self
pub const chan: &'static str = "MIDI Channel 0 to 15\n"
pub const gmode: &'static str = "MIDI gate mode.\n- **MIDI** gate same as MIDI input\n- **Trigger** output only triggers on ~~gate~~ output\n- **Gate Len** output gate with the length of the ~~glen~~ parameter\n"
pub const glen: &'static str = "MIDI gate length\n\ If ~~gmode~~ is set to **Gate Len** this controls and overrides the gate length on a MIDI \ note event. **Trigger** will just send a short trigger when a note event is received. \ **MIDI** means the gate reflects the note on/off duration."
pub const det: &'static str = "Detune input pitch a bit"
pub const freq: &'static str = "MIDI note frequency, detuned by ~~det~~."
pub const gate: &'static str = "MIDI note gate"
pub const vel: &'static str = "MIDI note velocity"
pub const DESC: &'static str = "MIDI Pitch/Note Input\n\n\ This node is an input of MIDI note events into the DSP graph. \ You get 3 outputs: frequency of the note, gate signal for the length of the note and the velocity."
pub const HELP: &'static str = r#"MIDI Pitch/Note Input This node is an input of MIDI note events into the DSP graph. You get 3 outputs: frequency of the note, gate signal for the length of the note and the velocity. You can modify the gate length using the ~~gmode~~ and ~~glen~~ settings. Setting ~~gmode~~ to **Trigger** allows you to get only a short trigger signal, which might be helpful in some situations. The **Gate Len** setting allows you to overwrite the gate length with a custom and fixed gate length. However, if new note is played on this MIDI channel, the gate will restart after a very short pause. "#
pub fn graph_fun() -> Option<GraphFun>
Trait Implementations
sourceimpl DspNode for MidiP
impl DspNode for MidiP
sourcefn set_sample_rate(&mut self, srate: f32)
fn set_sample_rate(&mut self, srate: f32)
Updates the sample rate for the node.
sourcefn process(
&mut self,
ctx: &mut dyn NodeAudioContext,
ectx: &mut NodeExecContext,
_nctx: &NodeContext<'_>,
atoms: &[SAtom],
inputs: &[ProcBuf],
outputs: &mut [ProcBuf],
ctx_vals: LedPhaseVals<'_>
)
fn process(
&mut self,
ctx: &mut dyn NodeAudioContext,
ectx: &mut NodeExecContext,
_nctx: &NodeContext<'_>,
atoms: &[SAtom],
inputs: &[ProcBuf],
outputs: &mut [ProcBuf],
ctx_vals: LedPhaseVals<'_>
)
The code DSP function. Read more
Auto Trait Implementations
impl RefUnwindSafe for MidiP
impl Send for MidiP
impl Sync for MidiP
impl Unpin for MidiP
impl UnwindSafe for MidiP
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more