3
18
Fork
You've already forked LibreDJ
6

Rework jogwheel logic #218

Merged
obsoleszenz merged 30 commits from rewrite_jogwheel into main 2026年06月22日 14:24:40 +02:00

ToDo

  • Audio clicks
    • I would like to get to an architecture where we don't need to instruct ramping on command basis and do this on the "rendering"
  • envelopes are not taken into account when slicing the frame. For example frame_size is 1024, play happens at sample=0 and applies a ramp of 124 samples. the slice size will be 1024 instead of 124.
  • audio clicks on cueing
  • Nudging broken because i broke reverse
  • Audio cracks when scratching quickly?
  • Fix keeping is_scratch state on back/front spins
  • scratching in the kick feels weird, was nicer before fixing the back/front spins
    • we might need an improved vinyl simulation to have this. Maybe postpone as it's not a regression
  • sometimes the ramping seems not to reset?
  • hitting unreachable in
whileself.audio_time.frame_time<frame_size{#[cfg(feature = "log")]println!("");debug!("{} ------",self.audio_time);// 1. Pop commands that align to the current start time and apply them
letinterim_end_pos=loop{matchself.queue_commands.front(){Some((time,_command))=>{if*time==self.audio_time.frame_time{letcommand=self.queue_commands.pop_front().expect_unreachable("front cant be none").1;self.apply_command(command);}elseif*time>self.audio_time.frame_time{break*time;}else{unreachable!()}}None=>{// No more commands, so set end_pos to the end of the frame.
// We might need to shorten this in case we have an envelope that wants to end sooner
breakframe_size;}}};// 2. Check if any envelope needs to end before interim_end_pos
  • Seeking is slightly off as we might need to add gain_ramping_duration_samples() into account?
    • Can be tested by setting AVOID_CLICKS_AUDIO_RAMPING_SECONDS to something big
  • scratching sounds different on smaller buffer sizes
    • i think this is because the window over the jogwheel intervals is over less samples/time an therefore we get smaller changes. Maybe we could sample always over x seconds?

Optional ToDo

  • fine tune alpha/beta constants
  • fine tune JOGWHEEL_NUDGE_SENSITIVITY

Fixes

# ToDo - [x] Audio clicks - [x] I would like to get to an architecture where we don't need to instruct ramping on command basis and do this on the "rendering" - [x] envelopes are not taken into account when slicing the frame. For example frame_size is 1024, play happens at sample=0 and applies a ramp of 124 samples. the slice size will be 1024 instead of 124. - [x] audio clicks on cueing - [x] Nudging broken because i broke reverse - [x] Audio cracks when scratching quickly? - [x] Fix keeping is_scratch state on back/front spins - [ ] scratching in the kick feels weird, was nicer before fixing the back/front spins - [ ] we might need an improved vinyl simulation to have this. Maybe postpone as it's not a regression - [x] sometimes the ramping seems not to reset? - [ ] hitting unreachable in ```rust while self.audio_time.frame_time < frame_size { #[cfg(feature = "log")] println!(""); debug!("{} ------", self.audio_time); // 1. Pop commands that align to the current start time and apply them let interim_end_pos = loop { match self.queue_commands.front() { Some((time, _command)) => { if *time == self.audio_time.frame_time { let command = self .queue_commands .pop_front() .expect_unreachable("front cant be none") .1; self.apply_command(command); } else if *time > self.audio_time.frame_time { break *time; } else { unreachable!() } } None => { // No more commands, so set end_pos to the end of the frame. // We might need to shorten this in case we have an envelope that wants to end sooner break frame_size; } } }; // 2. Check if any envelope needs to end before interim_end_pos ``` - [ ] Seeking is slightly off as we might need to add gain_ramping_duration_samples() into account? - [ ] Can be tested by setting AVOID_CLICKS_AUDIO_RAMPING_SECONDS to something big - [ ] scratching sounds different on smaller buffer sizes - [ ] i think this is because the window over the jogwheel intervals is over less samples/time an therefore we get smaller changes. Maybe we could sample always over x seconds? # Optional ToDo - [ ] fine tune alpha/beta constants - [ ] fine tune JOGWHEEL_NUDGE_SENSITIVITY # Fixes - https://codeberg.org/OpenDJLab/LibreDJ/issues/209 - https://codeberg.org/OpenDJLab/LibreDJ/issues/193 - https://codeberg.org/OpenDJLab/LibreDJ/issues/194 - https://codeberg.org/OpenDJLab/LibreDJ/issues/33
obsoleszenz changed title from (削除) Draft: Rework jogwheel logic (削除ここまで) to Rework jogwheel logic 2026年06月22日 14:24:31 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
OpenDJLab/LibreDJ!218
Reference in a new issue
OpenDJLab/LibreDJ
No description provided.
Delete branch "rewrite_jogwheel"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?