Skip to content

Commit

Permalink
dow wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jeudine committed Sep 29, 2024
1 parent 7b1c3be commit d6e75c3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
//! Library for developing MIDI Sequencers.
//!
//! To start using `mseq`, create a struct that implements the [`Conductor`] trait.
//!
//! You can then
mod acid;
mod arp;
mod clock;
Expand Down
1 change: 1 addition & 0 deletions src/midi_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const NOTE_ON: u8 = 0x90;
const NOTE_OFF: u8 = 0x80;
const CC: u8 = 0xB0;

#[doc(hidden)]
pub trait MidiConnection {
fn send_start(&mut self) -> Result<(), MidiError>;
fn send_continue(&mut self) -> Result<(), MidiError>;
Expand Down
8 changes: 6 additions & 2 deletions src/track.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ pub trait Track {
pub struct DeteTrack {
len: u32,
notes: Vec<(MidiNote, u32, u32)>, // (Note, start step, length)
pub start_step: u32,
start_step: u32,
root: Note,
transpose: Option<i8>,
pub channel_id: u8,
channel_id: u8,
name: String,
}

Expand All @@ -73,6 +73,10 @@ impl Track for DeteTrack {
fn get_name(&self) -> String {
self.name.clone()
}

fn set_start_step(&mut self, start_step: u32) {
self.start_step = start_step;
}
}

impl DeteTrack {
Expand Down

0 comments on commit d6e75c3

Please sign in to comment.