Internal media source: silence at idle, drive for patterns + T-code - #42
Open
quixotic1111 wants to merge 1 commit into
Open
Internal media source: silence at idle, drive for patterns + T-code#42quixotic1111 wants to merge 1 commit into
quixotic1111 wants to merge 1 commit into
Conversation
The Internal media source previously reported CONNECTED_AND_PLAYING
unconditionally, so selecting Internal + Start emitted a steady carrier
tone even when nothing was driving the output.
Gate its reported state on recent activity instead: it returns PLAYING
only while a drive source has written within ACTIVITY_TIMEOUT_S (2s) and
silences otherwise. Every drive source marks activity:
- external T-code (websocket, TCP/UDP, serial, buttplug) via their
existing new_tcode_command signal;
- the built-in pattern generator (motion_3 / motion_4) via its
position_updated signal, but only when the position actually
changes -- so a static / at-rest pattern still silences, preserving
the anti-drone behavior.
Net effect: the built-in pattern generator now drives the electrodes
when Internal is selected (e.g. for calibration) without requiring an
external T-code stream, while the carrier stays quiet at true idle.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
|
Sorry for the delay. I don't want to change this, I feel the current behavior already is not great because the lack of feedback in the user interface and harsh ramp. With this change, testing a non-moving position with the mouse doesn't seem possible anymore. There already is a feature that reduces the output volume when there are no axis changes ("lower volume during pauses"), it is in the volume tab and updates the volume bar. |
Author
|
Hi Diglet48,
Thanks for taking a look. I've found an alternative solution, so the specific fix I previously suggested is no longer necessary.
Inspired by edger’s Funscript processor, I've developed a new approach for real-time interpretation of frequency axes and script channel swapping. This new method also effectively addresses the volume jumping issue in Restim.
I'm developing an application to facilitate this, and I hope to share it with you soon.
On Thursday, July 9, 2026, 5:44 AM, diglet48 ***@***.***> wrote:
All Good… thank you for taking a look. I can’t recall exactly why I was suggesting this particular fix, but found a different way to achieve the same. edger’s Funscript processor gave me an idea about how to interpret the frequency axes, with almost real time swap of generated “script lanes/channels”. The fix I believe, was a way to avoid the volume jumping to.
Sent from Yahoo Mail for iPhone
On Thursday, July 9, 2026, 5:44 AM, diglet48 ***@***.***> wrote:
diglet48 left a comment (diglet48/restim#42)
Sorry for the delay.
I don't want to change this, I feel the current behavior already is not great because the lack of feedback in the user interface and harsh ramp. With this change, testing a non-moving position with the mouse doesn't seem possible anymore.
There already is a feature that reduces the output volume when there are no axis changes ("lower volume during pauses"), it is in the axis tab and updates the volume bar.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Selecting the Internal media source and pressing Start emits a steady
carrier tone even when nothing is driving the output, because
Internal.state()unconditionally returnsCONNECTED_AND_PLAYING. Themute guard in the audio-gen algorithm therefore never engages for the
Internal source.
Conversely, anyone who fixes that idle tone by gating Internal on
activity then finds the built-in pattern generator no longer drives the
electrodes — it doesn't mark itself as activity, so Internal reports
"not playing" and the carrier is muted. That makes Internal + a pattern
(e.g. for electrode calibration) produce no output.
Change
Gate
Internal.state()on recent activity, and have every drive sourcemark activity:
existing
new_tcode_commandsignal.motion_3/motion_4, via theirexisting
position_updatedsignal, but only when the emitted positionactually changes. A static / at-rest pattern marks no activity, so
the carrier still goes quiet at true idle (the anti-drone behavior).
No change to pattern output, timing, or shapes — patterns emit exactly as
before; this only governs the Internal source's reported play state.
Result
stream — useful for calibration.
Two files, +59/-1.