Skip to content

added anlz osc msg & bpm heartbeat - #39

Closed
mrmilbe wants to merge 5 commits into
grufkork:masterfrom
mrmilbe:master
Closed

added anlz osc msg & bpm heartbeat#39
mrmilbe wants to merge 5 commits into
grufkork:masterfrom
mrmilbe:master

Conversation

@mrmilbe

@mrmilbe mrmilbe commented Dec 7, 2025

Copy link
Copy Markdown

changes should be subtle, I added

osc.heartbeat.anlz_path false
osc.heartbeat.bpm false

to the config. If both are false the functionality should remain unchanged.
osc.heartbeat.anlz_path sends the anlz path on the slow heartbeat
osc.heartbeat.bpm sends the bpm on the slow heartbeat additionally to when it changed ( to catch dropped messages)

@grufkork

grufkork commented Dec 7, 2025

Copy link
Copy Markdown
Owner

Allright, just a quick look-over, haven't run anything yet: The anlz part looks good! I'd like to do the heartbeat a bit differently though. I think a more universal way to do it would be to handle it on the beatkeeper side.

Instead of each module separately keeping copies of state and tracking hearbeats, I'd instead suggest just triggering the ..._changed(..) functions again with the same values. This means all modules get hearbeat functionality for free. I'll have to think a bit so that resending the same values doesn't violate some expectation, but I don't think that would be a problem.

@mrmilbe

mrmilbe commented Dec 7, 2025

Copy link
Copy Markdown
Author

makes sense, I just wanted to keep as much of the original code intact, but i pushed another version:

  • Heartbeat logic moved to beatkeeper's slow_update block.
  • Config flags checked once at startup and stored in needs_heartbeat field
  • send_heartbeats() function contains all heartbeat resend logic.
  • added masterdeck_index_changed() callback to OutputModule
  • all gating happens in beatkeeper, OSC modules just send unconditionally.
  • Heartbeat resends: anlz path, masterdeck_index, bpm, original_bpm, track_info, and phrase data
  • Config file updated with individual heartbeat toggles

Less duplicate code, sync more things.
@grufkork

Copy link
Copy Markdown
Owner

Hey, I did a pass over to make sure everything received the heartbeat! It'd be great if you want to try if it still does what you want it to. It needs a little bit of cleanup and more thorough testing, but other than that I think it's pretty pushable 👍

@grufkork

Copy link
Copy Markdown
Owner

Hi @mrmilbe, could you reopen this to target the dev branch?

@mrmilbe mrmilbe closed this Mar 25, 2026
@mrmilbe mrmilbe reopened this Mar 25, 2026
@mrmilbe mrmilbe closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants