wip: tying it together...

This commit is contained in:
🪞👃🪞 2024-11-01 02:15:51 +02:00
parent bbafb72e9b
commit ad2f75bee6
7 changed files with 76 additions and 115 deletions

View file

@ -73,16 +73,12 @@ pub struct Arrangement<E: Engine> {
pub struct ArrangementTrack {
/// Name of track
pub name: Arc<RwLock<String>>,
/// Inputs
pub inputs: Vec<Port<MidiIn>>,
/// MIDI player/recorder
pub player: PhrasePlayer,
/// Outputs
pub outputs: Vec<Port<MidiIn>>,
/// Preferred width of track column
pub width: usize,
/// Identifying color of track
pub color: Color,
/// MIDI player/recorder
pub player: PhrasePlayer,
}
#[derive(Default, Debug)]
pub struct Scene {
@ -515,11 +511,9 @@ impl ArrangementTrack {
pub fn new (clock: &Arc<TransportTime>, name: &str, color: Option<Color>) -> Self {
Self {
name: Arc::new(RwLock::new(name.into())),
inputs: vec![],
player: PhrasePlayer::new(clock),
outputs: vec![],
width: name.len() + 2,
color: color.unwrap_or_else(random_color)
color: color.unwrap_or_else(random_color),
player: PhrasePlayer::new(clock),
}
}
pub fn longest_name (tracks: &[Self]) -> usize {