Restim: e-stim audio generation software

Discussion about Cock Hero and other sexy videos.

Moderator: andyp

darthjj
Explorer
Explorer
Posts: 60
Joined: Wed Jun 16, 2021 6:42 am

Re: Restim: e-stim audio generation software

Post by darthjj »

Just checked out the latest version and wanted to say you're a true champ for implementing VLC sync!

I initially had a really annoying problem when trying to get it working, though none of your fault. Turned out that one of the VLC luac scripts was using pow(), which has been deprecated. This led to a cryptic error result when trying to fetch the status endpoint, but once I figured out the cause I could just download the non-compiled script for the correct VLC version, modify it and replace the luac file with my modified lua. Just thought I'd mention it in case someone else runs into the same issue.

While local playing and sync works well, I've now started getting problems when used with Intiface Central.. Getting the two to connect seemed a bit glitchy, then it worked for a while, but eventually Restim freezes entirely (stim signal continues to play but UI becomes unresponsive and I need to kill the process). I haven't been able to pinpoint what's the cause yet, but have you used it with the latest version of Intiface and it works well for you?

When syncing with VLC it seems like the video file path is urlencoded, which causes QUrl to say that it is invalid if the filename contains spaces. I changed class VLC(MediaSource) to:

Code: Select all

                         id = attributes.value('id') # playlist id
                         uri = attributes.value('uri')
                         url = QUrl.fromPercentEncoding(uri.encode('ascii'))
                         if id == self.playlist_id:
                             self.filename = url
                             self.query_media_duration()
                         xml.skipCurrentElement()
This seems to work for me, but I'm not sure it's 100% correct.

Also it would be really nice if Restim could make continuous attempts to connect to IntifaceCentral if configured to do so. Currently you have to restart the app to do so, right?

And a final feature request, it would be nice if Restim saved the media player sync setting (e.g. VLC), tried to connect at least on startup, and if the connection fails just print a log message and fall back to the internal media player.
diglet
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Sun Dec 11, 2022 5:43 pm

Re: Restim: e-stim audio generation software

Post by diglet »

@darthjj

I will implement continuous reconnect for intiface central soon. Initially I did not implement it because intiface didn't like reconnects, but that appears to be fixed.

I'm a puzzled by the VLC error. The documentation states QUrl('some string') is equivalent with QUrl.fromEncoded(b'some bytearray'), so that substitution does not have any effect. I noticed you also removed url.toLocalFile(), this results in a crash on windows. I suspect you may have changed something else and that fixed the problem?

Can you send me the contents of http://127.0.0.1:8080/requests/playlist.xml? Is VLC using the english interface language?

I tested intiface and it just works. I can't reproduce it on my end and I have no idea where to look.
lorada
Explorer
Explorer
Posts: 8
Joined: Sun Feb 04, 2024 3:28 am

Re: Restim: e-stim audio generation software

Post by lorada »

diglet wrote: Tue Feb 13, 2024 10:17 pm Indeed it is the opposite of what is supposed to happen. What you describe is exactly what I feel with all zero calibration settings, reducing the neutral setting should gradually equalize the sensations at top and bottom position.


I think you can only get this behavior if your computer outputs a mono signal or the left/right channel are shorted together in your box somehow. But if that were the case, you would easily spot it with the test Kelvinator mentioned. You might want to test, with a dual-channel setup, whether Restim actually outputs a higher voltage on the left channel when position is left in the diagram. But I suspect you already tested this. I have no further Idea's.
Actually I have one more idea. Can you open your box and check if the left and the right channel are connected in the same way? You might get this behavior if only one of the channels has the + and - reversed.
I am not very experienced with electronics. I was lucky to be able to build this thing in the first place. I really don't know where to look.
Spoiler: show
Image
Spoiler: show
Image
I don't see anything obvious. Could the hexnuts securing the purple and green outputs somehow cause a short? I had a mishap while drilling the holes in the faceplates, so those two sockets are close enough that the hexnuts are in contact. I used sockets that don't have any gap in the plastic housing to avoid making contact with the aluminum case.

The only other thing I can think of is that I crammed the components in to a case that's too small (you can see my initial screwholes for an arrangement of the resistors that didn't fit). Could the housing of the resistors making contact cause a short? Am I just an idiot for using a metal case in the first place?

I'm sorry to beg for help troubleshooting my hardware, and if I should move this post to another thread, I will.

Thanks.
User avatar
47dahc
Explorer At Heart
Explorer At Heart
Posts: 173
Joined: Mon Aug 03, 2020 1:43 pm
Gender: Male
Sexual Orientation: Straight
I am a: Switch

Re: Restim: e-stim audio generation software

Post by 47dahc »

I think this might be better suited in the hardware thread. However, to answer your questions:
I used sockets that don't have any gap in the plastic housing to avoid making contact with the aluminum case.
If your sockets are shorted out against the case, then yes, this will short out that channel.
Could the hexnuts securing the purple and green outputs somehow cause a short? I had a mishap while drilling the holes in the faceplates, so those two sockets are close enough that the hexnuts are in contact.
Yes. The hex nuts are metal, so if they are touching, that will cause a short.
Could the housing of the resistors making contact cause a short?
No. The housings are nothing more than heat sinks. The heatsinks have no effect on the resistor value unless somehow the leads are in contact with them.

I think the best thing you could do is get a multimeter that has continuity check on it. Read all your connections out to the case, to the heat sinks, and between each other. A quick YT search should provide countless results on how to use a multimeter.
diglet
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Sun Dec 11, 2022 5:43 pm

Re: Restim: e-stim audio generation software

Post by diglet »

lorada wrote: Mon Mar 04, 2024 12:00 am
I traced the wiring and everything looks OK.

With the plastic parts you are using, the nuts touching doesn't matter. It also doesn't explain the symptoms. If the channels are shorting out you would see no signal on that channel, this doesn't match what you are seeing.

You are supposed to connect the electrodes to the box like this:
Spoiler: show
Image
Can you also try it like this?
Spoiler: show
Image
You don't have to try the other permutations, these are the only 2 unique ones.
diglet
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Sun Dec 11, 2022 5:43 pm

Re: Restim: e-stim audio generation software

Post by diglet »

Release 1.14: https://github.com/diglet48/restim/releases

Changelog:
  • You can now control most axis with funscript or tcode.
  • Configure additional search paths for funscripts.
  • When using funscripts, show the current axis value in the UI.
  • Auto-reconnect for buttplug.io / Intiface.
  • Fix issues with UTF-8 characters in funscripts.
  • Fix VLC not working with interface language set to non-english.
  • Fix Heresphere causing the UI to crash when network is really slow.
Image


I received some reports that VLC can sometimes lose sync when seeking, but I can't reproduce it. If you run into this problems, send me the logs.
Electro
Explorer At Heart
Explorer At Heart
Posts: 407
Joined: Thu Feb 13, 2020 9:45 am

Re: Restim: e-stim audio generation software

Post by Electro »

diglet wrote: Thu Mar 07, 2024 12:36 amI also noticed a bug, which is entirely my fault. If a script sets the pulse frequency really low (0.001) the audio cuts out as Restim attempts to generate a very long silence between pulses. The workaround is to not set the pulse frequency very close to zero, but I will try to fix it in code.
This was the end of your post from the vi22 thread(about Klinik vi33b funscripts), but this is related to Restim and not that video or its funscript files. I got a divide by zero error popping up inside Restim trying to use a vibration based funscript file as the pulse_frequency funscript when using MultiFunPlayer to feed the T-Code to Restim. I got around it by setting the output range setting at the bottom of MFP to 1% to avoid the value being zero, but this caused there to be a slow pulse when the 'vibe' was supposed to stop. I basically took a video that had standard position based scripts where someone else threw together a vibrator based script and was experimenting. The results were interesting, but as I expected the two types of scripts didn't really work together too well and there are better ways to emulate the vibrations than just slamming a vibe script into pulse_frequency, but I ran out of time to play so I'm wondering, is the divide by zero error a non-issue if I toss a funscript into the vibrator specific frequency 'T-Code slot'?
lorada
Explorer
Explorer
Posts: 8
Joined: Sun Feb 04, 2024 3:28 am

Re: Restim: e-stim audio generation software

Post by lorada »

diglet wrote: Mon Mar 04, 2024 9:41 am
lorada wrote: Mon Mar 04, 2024 12:00 am
I traced the wiring and everything looks OK.

With the plastic parts you are using, the nuts touching doesn't matter. It also doesn't explain the symptoms. If the channels are shorting out you would see no signal on that channel, this doesn't match what you are seeing.

You are supposed to connect the electrodes to the box like this:
Spoiler: show
Image
Can you also try it like this?
Spoiler: show
Image
You don't have to try the other permutations, these are the only 2 unique ones.
I tried both arrangements, with no change in behavior, but I realized something that I might be doing wrong. I have been using a bipolar plug with one negative channel to each pole of the electrode. I connected these channels with another cable at the stim box, and I had been assuming that this arrangement would behave the same as both negative channels connected to a single-pole electrode, but now I am unsure about my reasoning. Have I been doing this wrong the whole time?
diglet
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Sun Dec 11, 2022 5:43 pm

Re: Restim: e-stim audio generation software

Post by diglet »

Electro wrote: Thu Mar 07, 2024 3:00 am
diglet wrote: Thu Mar 07, 2024 12:36 amI also noticed a bug, which is entirely my fault. If a script sets the pulse frequency really low (0.001) the audio cuts out as Restim attempts to generate a very long silence between pulses. The workaround is to not set the pulse frequency very close to zero, but I will try to fix it in code.
This was the end of your post from the vi22 thread(about Klinik vi33b funscripts), but this is related to Restim and not that video or its funscript files. I got a divide by zero error popping up inside Restim trying to use a vibration based funscript file as the pulse_frequency funscript when using MultiFunPlayer to feed the T-Code to Restim. I got around it by setting the output range setting at the bottom of MFP to 1% to avoid the value being zero, but this caused there to be a slow pulse when the 'vibe' was supposed to stop. I basically took a video that had standard position based scripts where someone else threw together a vibrator based script and was experimenting. The results were interesting, but as I expected the two types of scripts didn't really work together too well and there are better ways to emulate the vibrations than just slamming a vibe script into pulse_frequency, but I ran out of time to play so I'm wondering, is the divide by zero error a non-issue if I toss a funscript into the vibrator specific frequency 'T-Code slot'?
Yes, the divide by zero bug and the other bug I mentioned do not occur when using the vibration specific axis because it's coded differently.

But the behavior is not ideal, you can't control whether the vibration stops on the peak or trough of the vibration. I recommend pairing the vibration funscript with a volume funscript that goes to 0 when the vibration funscript goes very low.

If you combine the pulse generator with vibration, you might get some unpredictable effects when the pulse frequency and vibration frequency are very close to each other. It's not dangerous.

lorada wrote: Thu Mar 07, 2024 4:10 am I tried both arrangements, with no change in behavior, but I realized something that I might be doing wrong. I have been using a bipolar plug with one negative channel to each pole of the electrode. I connected these channels with another cable at the stim box, and I had been assuming that this arrangement would behave the same as both negative channels connected to a single-pole electrode, but now I am unsure about my reasoning. Have I been doing this wrong the whole time?
This arrangement seems correct.

...but if you don't feel any difference, that does suggest you messed up the wiring. Perhaps you should try a config with only three electrode surfaces to make the wiring simpler?
User avatar
edger477
Explorer At Heart
Explorer At Heart
Posts: 663
Joined: Mon Nov 29, 2021 8:24 pm
Gender: Male
Sexual Orientation: Straight
I am a: None of the above
Location: Europe

Re: Restim: e-stim audio generation software

Post by edger477 »

@diglet, I was wondering, would it be possible to implement "invert alpha" axe option, so that people who don't like to use common on top can still get the correct stroking sensation?
diglet
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Sun Dec 11, 2022 5:43 pm

Re: Restim: e-stim audio generation software

Post by diglet »

With "adjust limits", on the calibration tab, you can rotate the funscript to match your electrode wiring.
Electro
Explorer At Heart
Explorer At Heart
Posts: 407
Joined: Thu Feb 13, 2020 9:45 am

Re: Restim: e-stim audio generation software

Post by Electro »

diglet wrote: Thu Mar 07, 2024 12:14 pm With "adjust limits", on the calibration tab, you can rotate the funscript to match your electrode wiring.
Edger477, to add to what diglet said, diglet also has the mirror function to change direction of rotation to modify the order the stim goes between electrodes, the mirror function changes the direction of the rotation. It functions well with trying to synchronize your Funscript so the head is stimmed when the head should be stimmed, for example.
User avatar
edger477
Explorer At Heart
Explorer At Heart
Posts: 663
Joined: Mon Nov 29, 2021 8:24 pm
Gender: Male
Sexual Orientation: Straight
I am a: None of the above
Location: Europe

Re: Restim: e-stim audio generation software

Post by edger477 »

Ok this is great, so when creating the funscripts for restim, the electrode configuration is not predetermined anymore, you find a piece of video where stroking was implemented as synced on screen and calibrate so that is fine, and you are good to go :)
thebears73
Explorer At Heart
Explorer At Heart
Posts: 256
Joined: Sat May 11, 2019 7:22 am

Re: Restim: e-stim audio generation software

Post by thebears73 »

Im struggling with getting v1.4 to work, in the synce media section i am adding "ADD FUNSCRIPT" and it just crashes. just trying to get all the scripts to load for Vi33 to play through.
diglet
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Sun Dec 11, 2022 5:43 pm

Re: Restim: e-stim audio generation software

Post by diglet »

That's not good. Can you run Restim from command line (In windows explorer, file -> "open windows powershell". Then type in "./restim.exe"), once it crashes again copy the output and send it to me.

(Yes, I should save the logs to a file automatically...)

You shouldn't need to add the funscripts manually since Restim will try to find them automatically.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Dale-Heart, Faroe, Luke349, Strothy and 86 guests