Module util

Module util 

Source
Expand description

Shared helper utilities for YM2149 register math.

These functions are used by downstream crates (CLI, Bevy plugin, visualization) to derive channel periods and frequencies in a consistent way.

Functionsยง

channel_frequencies
Convenience helper returning the three channel frequencies for the default clock.
channel_frequencies_with_clock
Compute the frequency of each channel for a given master clock.
channel_period
Compute the 12-bit tone period from register low/high bytes.
period_to_frequency
Convert a tone period into a frequency using the default 2MHz master clock.
period_to_frequency_with_clock
Convert a tone period into a frequency for a specific master clock.