| Crates.io | klavier-jack |
| lib.rs | klavier-jack |
| version | 0.1.11-beta.3 |
| created_at | 2024-01-03 01:46:48.667254+00 |
| updated_at | 2025-08-16 05:43:46.259538+00 |
| description | Jack library of klavier. |
| homepage | https://github.com/ruimo/klavier-jack |
| repository | https://github.com/ruimo/klavier-jack |
| max_upload_size | |
| id | 1086923 |
| size | 130,720 |
You need to install jack.
$ sudo apt install qjackctl pulseaudio-module-jack libjack-jackd2-dev
Launch qjackctl.
$ qjackctl
Click Start on qjackctl before starting your application. Once your application started, clickg Graph on qjackctl. Your application will be shown with the name you specified in the first argument of jack::Client::new(). Your MIDI interface will be shown with the name 'system'. Connect your application's output to the system's MIDI interface.
After the 'Prepare' described above, you can run sample.
$ cargo run --example sample01
Ticks per quarter(TPQ): 240 Tempo: The number of quarter notes per minute. Tick length (ms): 1000 * 60 / tempo / TPQ
Sampling Rate(SR): 22050 Cycle(ms): 1000 / SR
1 tick per cycle: SR * 60 / tempo / TPQ
1 cycle per tick: tempo * TPQ / SR / 60