mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-02-21 16:29:04 +01:00
refactor(engine): flatten
- add `just stats` - add basic doctests
This commit is contained in:
parent
7afab8eade
commit
37068784cb
34 changed files with 1285 additions and 1173 deletions
|
|
@ -1,5 +1,23 @@
|
|||
use crate::*;
|
||||
|
||||
/// A track consists of a sequencer and zero or more devices chained after it.
|
||||
///
|
||||
/// ```
|
||||
/// let track: tek_device::Track = Default::default();
|
||||
/// ```
|
||||
#[derive(Debug, Default)] pub struct Track {
|
||||
/// Name of track
|
||||
pub name: Arc<str>,
|
||||
/// Identifying color of track
|
||||
pub color: ItemTheme,
|
||||
/// Preferred width of track column
|
||||
pub width: usize,
|
||||
/// MIDI sequencer state
|
||||
pub sequencer: Sequencer,
|
||||
/// Device chain
|
||||
pub devices: Vec<Device>,
|
||||
}
|
||||
|
||||
def_sizes_iter!(TracksSizes => Track);
|
||||
|
||||
impl<T: Has<Vec<Track>> + Send + Sync> HasTracks for T {}
|
||||
|
|
@ -72,20 +90,6 @@ impl<T: MaybeHas<Track>> HasTrack for T {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Track {
|
||||
/// Name of track
|
||||
pub name: Arc<str>,
|
||||
/// Identifying color of track
|
||||
pub color: ItemTheme,
|
||||
/// Preferred width of track column
|
||||
pub width: usize,
|
||||
/// MIDI sequencer state
|
||||
pub sequencer: Sequencer,
|
||||
/// Device chain
|
||||
pub devices: Vec<Device>,
|
||||
}
|
||||
|
||||
has!(Clock: |self: Track|self.sequencer.clock);
|
||||
has!(Sequencer: |self: Track|self.sequencer);
|
||||
impl Track {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue