mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
wip: f64 timebase (sloooo)
This commit is contained in:
parent
c4d8692b71
commit
4055662bbd
12 changed files with 206 additions and 142 deletions
|
|
@ -43,12 +43,8 @@ fn main () -> Result<(), Box<dyn Error>> {
|
|||
let input = ".*nanoKEY.*";
|
||||
let output = ["Komplete.*:playback_FL", "Komplete.*:playback_FR"];
|
||||
let (client, _) = Client::new("init", ClientOptions::NO_START_SERVER)?;
|
||||
let timebase = Arc::new(Timebase {
|
||||
rate: AtomicUsize::new(client.sample_rate()),
|
||||
bpm: AtomicUsize::new(125000000),
|
||||
ppq: AtomicUsize::new(96),
|
||||
});
|
||||
let ppq = timebase.ppq() as u32;
|
||||
let timebase = Arc::new(Timebase::new(client.sample_rate() as f64, 125000.0, 96.0));
|
||||
let ppq = timebase.ppq() as usize;
|
||||
macro_rules! play {
|
||||
($t1:expr => [ $($msg:expr),* $(,)? ]) => {
|
||||
( $t1 * ppq / 4, vec![ $($msg),* ] )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue