Skip to content

Commit

Permalink
Make it a Synth
Browse files Browse the repository at this point in the history
  • Loading branch information
ales-tsurko committed Oct 23, 2021
1 parent 34bed72 commit 3c67b5c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion koto/pattern.koto
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ export @tests =
for item in expected
assert_eq foo.next(), item

foo = pseq [pseq([0,2], 2), pseq([1,3], 2)], 2
foo = pseq [pseq([0,2], 2), pseq([1,3], 2)], inf
expected = [0,2,0,2,1,3,1,3]
for _ in 0..2
for item in expected
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl Plugin for Kotoist {
name: "Kotoist".to_string(),
vendor: "Ales Tsurko".to_string(),
unique_id: 27052021,
category: Category::Generator,
category: Category::Synth,
preset_chunks: true,
..Default::default()
}
Expand Down
10 changes: 8 additions & 2 deletions src/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ pub(crate) fn make_module(orchestrator: Arc<Mutex<Orchestrator>>) -> ValueMap {
}
}

orchestrator_cl.lock().unwrap().schedule_patterns(patterns, quant);
orchestrator_cl
.lock()
.unwrap()
.schedule_patterns(patterns, quant);

Ok(Empty)
}
Expand Down Expand Up @@ -210,7 +213,10 @@ impl Player {
}

fn is_playing(&self) -> bool {
if let Some(time_info) = self.host.get_time_info(0) {
if let Some(time_info) = self
.host
.get_time_info((TimeInfoFlags::TRANSPORT_PLAYING).bits())
{
return TimeInfoFlags::from_bits(time_info.flags)
.map(|val| val.contains(TimeInfoFlags::TRANSPORT_PLAYING))
.unwrap_or(false);
Expand Down

0 comments on commit 3c67b5c

Please sign in to comment.