mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
refactoring time representation into multuple traits
This commit is contained in:
parent
a25548c39c
commit
5a18a2023d
4 changed files with 149 additions and 72 deletions
|
|
@ -9,7 +9,7 @@ impl Phrase {
|
|||
(frame0, frames, _): (usize, usize, f64),
|
||||
) {
|
||||
let mut buf = Vec::with_capacity(8);
|
||||
for (time, tick) in Ticks(timebase.pulse_per_frame()).between_frames(
|
||||
for (time, tick) in Ticks(timebase.pulses_per_sample()).between_frames(
|
||||
frame0, frame0 + frames
|
||||
) {
|
||||
let tick = tick % self.length;
|
||||
|
|
@ -84,7 +84,7 @@ impl<E: Engine> PhrasePlayer<E> {
|
|||
}
|
||||
if self.recording {
|
||||
phrase.record_event({
|
||||
let pulse = timebase.frame_to_pulse(
|
||||
let pulse = timebase.samples_to_pulse(
|
||||
(frame0 + frame - start_frame) as f64
|
||||
);
|
||||
let quantized = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue