mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
add clock to sequencer tracks
This commit is contained in:
parent
67a5ea3a2b
commit
4f53058742
5 changed files with 42 additions and 22 deletions
|
|
@ -113,6 +113,8 @@ pub struct PhraseEditor<E: Engine> {
|
|||
/// Phrase player.
|
||||
pub struct PhrasePlayer<E: Engine> {
|
||||
_engine: PhantomData<E>,
|
||||
/// Global timebase
|
||||
pub clock: Arc<TransportTime>,
|
||||
/// Phrase being played
|
||||
pub phrase: Option<Arc<RwLock<Phrase>>>,
|
||||
/// Next phrase
|
||||
|
|
@ -328,9 +330,10 @@ impl std::cmp::PartialEq for Phrase {
|
|||
}
|
||||
impl Eq for Phrase {}
|
||||
impl<E: Engine> PhrasePlayer<E> {
|
||||
pub fn new () -> Self {
|
||||
pub fn new (clock: &Arc<TransportTime>) -> Self {
|
||||
Self {
|
||||
_engine: Default::default(),
|
||||
clock: clock.clone(),
|
||||
phrase: None,
|
||||
next_phrase: None,
|
||||
now: Arc::new(0.into()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue