qzn3t_tuner

Crates.ioqzn3t_tuner
lib.rsqzn3t_tuner
version0.2.7
created_at2025-10-05 01:24:53.195617+00
updated_at2025-12-18 00:23:52.161537+00
descriptionA tuner for musical instruments
homepage
repositoryhttps://github.com/worikgh/qzn3t/tree/mistress/tuner
max_upload_size
id1868510
size40,310
Worik Stanton (worikgh)

documentation

README

Tuner

Part of the Qzn3t collection of musical utilities

Utilises the pitch-detector crate

Usage

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 data
  • buffer_size The size of the ring buffer used to store Jack samples
  • max_vol_min: The minimum value of the maximum volume in the sample for there to be an attempt to gage the frequency
  • mean_min: This needs ot be deprecated

Then 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;
			}
		};

Commit count: 0

cargo fmt