wip: vst2 host?

This commit is contained in:
🪞👃🪞 2024-06-20 20:12:26 +03:00
parent 228805d30d
commit 4b0055a21c
7 changed files with 151 additions and 42 deletions

View file

@ -4,47 +4,47 @@ use ratatui::style::Stylize;
type Sequence = std::collections::BTreeMap<u32, Vec<::midly::MidiMessage>>;
pub struct Sequencer {
name: String,
name: String,
/// JACK transport handle.
transport: ::jack::Transport,
transport: ::jack::Transport,
/// Holds info about tempo
timebase: Arc<Timebase>,
timebase: Arc<Timebase>,
/// Sequencer resolution, e.g. 16 steps per beat.
resolution: usize,
resolution: usize,
/// Steps in sequence, e.g. 64 16ths = 4 beat loop.
steps: usize,
steps: usize,
/// JACK MIDI input port that will be created.
input_port: Port<MidiIn>,
input_port: Port<MidiIn>,
/// Port name patterns to connect to.
input_connect: Vec<String>,
input_connect: Vec<String>,
/// Play input through output.
monitoring: bool,
monitoring: bool,
/// Red keys on piano roll.
notes_on: Vec<bool>,
notes_on: Vec<bool>,
/// Write input to sequence.
recording: bool,
recording: bool,
/// Map: tick -> MIDI events at tick
sequence: Sequence,
sequence: Sequence,
/// Don't delete when recording.
overdub: bool,
overdub: bool,
/// Play sequence to output.
playing: bool,
playing: bool,
/// JACK MIDI output port that will be created.
output_port: Port<MidiOut>,
output_port: Port<MidiOut>,
/// Port name patterns to connect to.
output_connect: Vec<String>,
output_connect: Vec<String>,
/// Display mode
mode: SequencerView,
mode: SequencerView,
/// Range of notes to display
note_axis: (u16, u16),
note_axis: (u16, u16),
/// Position of cursor within note range
note_cursor: u16,
note_cursor: u16,
/// Range of time steps to display
time_axis: (u16, u16),
time_axis: (u16, u16),
/// Position of cursor within time range
time_cursor: u16,
time_cursor: u16,
}
#[derive(Debug, Clone)]