mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
pass root clock - and groovebox works!
This commit is contained in:
parent
997d67a487
commit
4e2702f69e
2 changed files with 16 additions and 15 deletions
|
|
@ -111,10 +111,10 @@ impl Cli {
|
|||
_ => todo!("{mode:?}"),
|
||||
};
|
||||
let config = Configuration::new(&config_path, false)?;
|
||||
let clock = Clock::new(jack, self.bpm)?;
|
||||
let mut app = App {
|
||||
jack: jack.clone(),
|
||||
color: ItemTheme::random(),
|
||||
clock: Clock::new(jack, self.bpm)?,
|
||||
pool: match mode {
|
||||
LaunchMode::Sequencer | LaunchMode::Groovebox => clip.as_ref().map(Into::into),
|
||||
LaunchMode::Arranger { .. } => Some(Default::default()),
|
||||
|
|
@ -141,7 +141,7 @@ impl Cli {
|
|||
&name,
|
||||
None,
|
||||
jack,
|
||||
None,
|
||||
Some(&clock),
|
||||
clip.as_ref(),
|
||||
midi_froms.as_slice(),
|
||||
midi_tos.as_slice()
|
||||
|
|
@ -152,7 +152,7 @@ impl Cli {
|
|||
&name,
|
||||
None,
|
||||
jack,
|
||||
None,
|
||||
Some(&clock),
|
||||
clip.as_ref(),
|
||||
midi_froms.as_slice(),
|
||||
midi_froms.as_slice(),
|
||||
|
|
@ -165,6 +165,7 @@ impl Cli {
|
|||
scenes,
|
||||
selected: Selection::TrackClip { track: 0, scene: 0 },
|
||||
config,
|
||||
clock,
|
||||
..Default::default()
|
||||
};
|
||||
if let &LaunchMode::Arranger { scenes, tracks, track_width, .. } = mode {
|
||||
|
|
|
|||
|
|
@ -18,29 +18,29 @@ pub trait HasSequencer {
|
|||
/// Contains state for playing a clip
|
||||
pub struct Sequencer {
|
||||
/// State of clock and playhead
|
||||
pub clock: Clock,
|
||||
pub clock: Clock,
|
||||
/// Start time and clip being played
|
||||
pub play_clip: Option<(Moment, Option<Arc<RwLock<MidiClip>>>)>,
|
||||
pub play_clip: Option<(Moment, Option<Arc<RwLock<MidiClip>>>)>,
|
||||
/// Start time and next clip
|
||||
pub next_clip: Option<(Moment, Option<Arc<RwLock<MidiClip>>>)>,
|
||||
pub next_clip: Option<(Moment, Option<Arc<RwLock<MidiClip>>>)>,
|
||||
/// Play input through output.
|
||||
pub monitoring: bool,
|
||||
pub monitoring: bool,
|
||||
/// Write input to sequence.
|
||||
pub recording: bool,
|
||||
pub recording: bool,
|
||||
/// Overdub input to sequence.
|
||||
pub overdub: bool,
|
||||
pub overdub: bool,
|
||||
/// Send all notes off
|
||||
pub reset: bool, // TODO?: after Some(nframes)
|
||||
pub reset: bool, // TODO?: after Some(nframes)
|
||||
/// Record from MIDI ports to current sequence.
|
||||
pub midi_ins: Vec<JackMidiIn>,
|
||||
pub midi_ins: Vec<JackMidiIn>,
|
||||
/// Play from current sequence to MIDI ports
|
||||
pub midi_outs: Vec<JackMidiOut>,
|
||||
pub midi_outs: Vec<JackMidiOut>,
|
||||
/// Notes currently held at input
|
||||
pub notes_in: Arc<RwLock<[bool; 128]>>,
|
||||
pub notes_in: Arc<RwLock<[bool; 128]>>,
|
||||
/// Notes currently held at output
|
||||
pub notes_out: Arc<RwLock<[bool; 128]>>,
|
||||
pub notes_out: Arc<RwLock<[bool; 128]>>,
|
||||
/// MIDI output buffer
|
||||
pub note_buf: Vec<u8>,
|
||||
pub note_buf: Vec<u8>,
|
||||
}
|
||||
|
||||
impl Default for Sequencer {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue