| Crates.io | qzn3t_tuner |
| lib.rs | qzn3t_tuner |
| version | 0.2.7 |
| created_at | 2025-10-05 01:24:53.195617+00 |
| updated_at | 2025-12-18 00:23:52.161537+00 |
| description | A tuner for musical instruments |
| homepage | |
| repository | https://github.com/worikgh/qzn3t/tree/mistress/tuner |
| max_upload_size | |
| id | 1868510 |
| size | 40,310 |
Part of the Qzn3t collection of musical utilities
Utilises the pitch-detector crate
The function get_results(&TunerArgs, mpsc::Sender<TunerData>) starts a jack client and an import port qzn3t_tuner:input.
The &TunerArgs parameter controls the paramneters of the pitch_detector
pub struct TunerArgs {
pub interval: u64,
pub buffer_size: u64,
pub max_vol_min: f32,
pub mean_min: f32, // The absolute mean volume must be smaller than this
}
interval: The period in milli-seconds between sampling the Jack databuffer_size The size of the ring buffer used to store Jack samplesmax_vol_min: The minimum value of the maximum volume in the sample for there to be an attempt to gage the frequencymean_min: This needs ot be deprecatedThen it sends a stream of TunerData objects down the supplied channel.
let (sender, receiver) = mpsc::channel::<TunerData>();
_ = get_results(args, sender);
loop {
let tuner_data = match receiver.recv() {
Ok(r) => r,
Err(err) => {
eprintln!("DBG tuner: get_results send error: {err}");
break;
}
};