mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: reenable standalone sequencer
This commit is contained in:
parent
690a8e8f24
commit
0eb063db1c
7 changed files with 125 additions and 37 deletions
|
|
@ -457,16 +457,7 @@ impl Scene {
|
|||
}
|
||||
/// Returns the pulse length of the longest phrase in the scene
|
||||
pub fn pulses <E: Engine> (&self, tracks: &[ArrangementTrack<E>]) -> usize {
|
||||
self.clips.iter().enumerate()
|
||||
.filter_map(|(i, c)|c
|
||||
.map(|c|tracks
|
||||
.get(i)
|
||||
.map(|track|track
|
||||
.phrases
|
||||
.get(c))))
|
||||
.filter_map(|p|p)
|
||||
.filter_map(|p|p)
|
||||
.fold(0, |a, p|a.max(p.read().unwrap().length))
|
||||
self.clips.iter().fold(0, |a, p|a.max(p.as_ref().map(|q|q.read().unwrap().length).unwrap_or(0)))
|
||||
}
|
||||
/// Returns true if all phrases in the scene are currently playing
|
||||
pub fn is_playing <E: Engine> (&self, tracks: &[ArrangementTrack<E>]) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue