some tweaks after docs regen
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
stop screaming 2026-02-21 05:19:26 +02:00
parent abf950aea4
commit 817d2a722c
7 changed files with 214 additions and 217 deletions

View file

@ -894,8 +894,8 @@ impl Timebase {
/// Specify sample rate, BPM and PPQ
pub fn new (
s: impl Into<SampleRate>,
b: impl Into<BeatsPerMinute>,
p: impl Into<PulsesPerQuaver>
b: impl Into<Bpm>,
p: impl Into<Ppq>
) -> Self {
Self { sr: s.into(), bpm: b.into(), ppq: p.into() }
}
@ -1077,9 +1077,9 @@ impl_time_unit!(SampleCount);
impl_time_unit!(SampleRate);
impl_time_unit!(Microsecond);
impl_time_unit!(Quantize);
impl_time_unit!(PulsesPerQuaver);
impl_time_unit!(Ppq);
impl_time_unit!(Pulse);
impl_time_unit!(BeatsPerMinute);
impl_time_unit!(Bpm);
impl_time_unit!(LaunchSync);
/// Implement [Jack] constructor and methods
@ -1769,11 +1769,11 @@ impl Clock {
&self.timebase.sr
}
/// Current tempo
pub fn bpm (&self) -> &BeatsPerMinute {
pub fn bpm (&self) -> &Bpm {
&self.timebase.bpm
}
/// Current MIDI resolution
pub fn ppq (&self) -> &PulsesPerQuaver {
pub fn ppq (&self) -> &Ppq {
&self.timebase.ppq
}
/// Next pulse that matches launch sync (for phrase switchover)
@ -3856,7 +3856,7 @@ fn sampler_jack_process (
/// Create [Voice]s from [Sample]s in response to MIDI input.
fn sampler_midi_in (
samples: &Samples<128>, voices: &Arc<RwLock<Vec<Voice>>>, RawMidi { time, bytes }: RawMidi
samples: &SampleKit<128>, voices: &Arc<RwLock<Vec<Voice>>>, RawMidi { time, bytes }: RawMidi
) {
if let Ok(LiveEvent::Midi { message, .. }) = LiveEvent::parse(bytes) {
match message {
@ -4438,7 +4438,7 @@ impl Track {
}
impl<const N: usize> Samples<N> {
impl<const N: usize> SampleKit<N> {
fn get (&self, index: usize) -> &Option<Arc<RwLock<Sample>>> {
if index < self.0.len() {
&self.0[index]
@ -4448,7 +4448,7 @@ impl<const N: usize> Samples<N> {
}
}
impl<const N: usize> Default for Samples<N> {
impl<const N: usize> Default for SampleKit<N> {
fn default () -> Self {
Self([const { None }; N])
}