F.A.P.S (Funscript - Audio Processing System) by CaptainHarlock

I can not download 6 GB from mega for free, or is there another place to get it ?

D’oh! :sweat_smile:
Well, if you wait, I think 4-5 hours, it will resume the download (if MEGA hasn’t changed how it works).
Anyway, I’ll try to upload it somewhere else later.

I am allowed 5 GB a day.

Here’s another link: Gofile - Cloud Storage Made Simple

I have two PCs but both are AMD 7900XTX GPUs. Would I be forced into the CPU fallback or can I just use a Pytorch that works with ROCm for AMD? Thanks.

I have no plans at present to try to make it work with ROCm. I have already explained the reasons for this here:

Besides, I don’t even have an AMD GPU to try it out.
I’m sorry, it’s been a huge effort to get all the dependencies working and compatible with each other, and compatibility has been ensured with a long list of Nvidia GPUs (from the 10xx series to the current 50xx series), but porting it to AMD ROCm or Intel ARC would be too much work for me (for Intel ARC it would be even more difficult or even impossible).
I’m not saying it can’t be done, but right now I can’t do it.
The application uses Python, so anyone can review the code and give it a try.

Oh, yes, I forgot to mention the CPU fallback thing.
Currently, since all the tests were focused on working properly with AI models and using the GPU, I can’t guarantee that the “librosa+CPU” fallback will work perfectly, but yes, there are several fallbacks configured, so you can try them out.
But obviously, with fallbacks, not everything will work the same. You won’t be able to use all-in-one for beat detection, BPM, sections, etc.; nor will you be able to use advanced moods that require AI models, and therefore GPU, such as “Fap Mixer,” “SixthSense,” “Hypno,” “Edging,” or any “JOIs…,” but the rest should work, you just have to test if they work well.

No problem - I’m not one to complain about a thing I didn’t make/pay for. I missed the earlier response. Thanks for taking the time.

2 Likes

6 channel audio stem separation fails with the following error:

=> Found 0 tracks already analyzed and 1 tracks to analyze.
Warning: Failed to get stems for C:\Users\xxx\AppData\Local\Temp\tmplrq0xgmu.wav: Given groups=1, weight of size [48, 2, 8], expected input[1, 6, 343980] to have 2 channels, but got 6 channels instead
=> Found 0 tracks with stems ready, 1 failed.
=> Found 0 spectrograms already extracted, 0 to extract.

It works when added -ac 2 to ffmpeg arguments in ai_config_dialog.py line 3148 and app.py line 5009. I did not test whether other ffmpeg calls should also convert to stereo.

Example video: 23.88 MB file on MEGA

2 Likes

Thanks for reporting it!
I hadn’t tested AC3 sound or other stereo or mono varieties. The problem is now fixed, along with the others you mentioned. Thank you very much!

Working on some adjustments to Queue and some moods to publish the new version…

1 Like

looking forward to new version :heart_eyes:

1 Like

Dude this thing is insane, what a huge upgrade over something like funscriptdancer which i’ve been using, thanks for making this!

1 Like

Decided to give this a shot but I’m only getting to this. It’s looking for a Python exe somewhere, but that’s not where the installer puts it.

Finishing up a few adjustments, I’m now working on a new mood called “Pulse,” which is intended to be a better replacement for “Normal,” as I wasn’t entirely satisfied with it; it needed to better follow the rhythm of the music. However, the “Normal” mood will still be available, and I had to make an important fix to it due to a desynchronization issue
(took me a full day, lol).
The new version also includes “python embedded,” making it truly portable. You can move it, rename the folder, or even copy it to another computer, and it should work. Until now, venv was used, but with a permanent path, so if you moved it, it wouldn’t work. You had to delete venv and reinstall it.
It now also allows you to save the “boundaries” of the songs, a task that could be manual and annoying to have to do again if you wanted to repeat it in AI Analysis.
More missing translations, and other small changes that I can’t remember exactly now…
Let’s see if I can upload the new version in a couple of days.

Thanks!
Yep, it aims to be SOTA, using the most advanced models in terms of stem separation, beat detection, etc, etc…
But instead of just having an interface with lots of controls to manipulate, I preferred to focus on offering several “moods,” centered on specific actions/reactions to the music (approaches, you could say), because each user is different and may have different tastes, so it’s better to have several moods and only a few controls, but ones that can significantly alter the result in some cases.
But apart from creating funscripts, it’s also very useful for editing them, whether or not they were made with the application. I think the “Point Editor” tab is really simple but powerful in terms of editing, with the added bonus of being able to use existing patterns or create new ones.
Feel free to contribute ideas if you think something can be improved :wink:

That’s because it’s trying to use Python 3.11, which must be the one you have installed on your system. Uninstall it and install the executable that is already in the downloadable file, which is Python 3.12. With that, you’ll be able to install it without any problems.
NOTE: The new version I’m preparing doesn’t even require you to have/install Python, as it already has its own embedded version :smiley:

I’ve been experimenting out of curiosity, and honestly I’m pretty surprised. I’m not an expert in PMV scripting at all, but I’ve tried FunScriptDancer, PythonDancer, and even making scripts completely by myself.

There are parts of certain songs where it actually does a pretty decent job. But I’ve noticed it doesn’t fully understand which sections are clearly meant to have more intensity and which ones aren’t. Also, in parts with a steady, consistent rhythm, it sometimes goes a bit crazy and doesn’t maintain the pattern properly.

That’s what led me to this idea :light_bulb:: how crazy would it be to add an option to “train” it? For example, letting it analyze both the video and the script so it can learn how to translate rhythms into scripting patterns, and understand which sections should feel more intense and which shouldn’t.

Or maybe even create a user preference profile, so if someone prefers a certain scripting style, the program could learn to generate something similar to that style.

Also, I don’t really understand the sensitivity bar. When I tweak it a little, the script changes completely in ways that don’t make sense to me. If I turn it up a lot in “crazy” mode, the script gets flattened at the top. If I lower it to half, it produces a very different script with very few points. But then if I set it around 30%, it works correctly. I’m not sure if I just don’t fully understand it or if it’s a bug.

I hope this feedback is useful. Overall, I’ve been pleasantly surprised and I’ll be following its progress.

Edit : An intensity multiplier like in FunScriptDancer wouldn’t be bad.

1 Like

How am I supposed to install this?

I’m getting errors saying it needs 3.14, but when installed, it fails as it needs 3.12.

For reference, I installed 3.12 only, it would fail and say it needs 3.14.
"[3/5] Installing basic dependencies…
did not find executable at ‘C:\Users\Ryan\AppData\Local\Python\pythoncore-3.14-64\python.exe’: The system cannot find the path specified."

I haven’t experienced that, but I’ve had problems with Python too, like not being able to find the path or something. I went to Google Gemini, explained it to them, gave them the logs, and they guided me to solve it. Try it and see if it works for you :sweat_smile:

Thanks for the feedback!
It’s definitely difficult to make a perfect funscript just the way you want it. For those who listen to music, it’s easy to know or think about when it should be more or less intense/fast, or have one type of movement/pattern or another, but translating this into something automatic using AI models or mathematical formulas is the challenge, lol :wink:
As I said in the presentation, it’s not designed to make every single point generated perfect, which is really difficult, but rather to facilitate the work of creating funscripts that need to follow a rhythm, and therefore there are ways of doing this without it having to be a manual and tedious process. And although it doesn’t aim to be 100% perfect, it does seek maximum fidelity in following the music and its intensity, and tries to capture this in a funscript that conveys that rhythm and intensity of each moment when used in The Handy or other haptic stimulation devices.
That said, I don’t know if you’ve only tried “Crazy” or other moods as well. I should mention that the first ones I created, when I started creating the application, were based on the use of librosa. I hadn’t yet incorporated AI models, and librosa, unlike AI models, doesn’t detect beats as such, but rather onsets. and although these can also be very accurate and do a good job, the problem is adapting their detection and correctly translating them into the funscript, specifying how to use them or with which formulas; To understand what I mean, onsets can capture all the energy of any moment, and if you don’t limit that or tell it how to behave when generating a funscript, what it will do is generate a lot of ultra-fast points at short distances, which cannot be reproduced with The Handy because it has limitations on maximum speed or minimum interval between points. That’s kind of how they behave, although in a limited and controlled way, moods like “Crazy” or “Crazy+Voice” are moods created with the intention of following the energy of each moment by generating rapid vibrations and variations. The problem is that they have to be limited in some way, and that limitation sometimes means that they don’t seem to follow the rhythm of the music exactly in terms of beat rate, for example, or that they can generate some bad points that break the immersion a little; although I have tried to limit those problems and fine-tune them as much as I can.
Also, before continuing with my explanation, I would like to mention that you should make sure you are using AI models when using the application. I hope that is the case, but if they are not available, the application has fallbacks to librosa (old configuration). However, since these fallbacks to librosa are not a priority, they have not been checked or tested, so if you see something in the CMD window log that mentions “fallback,” I don’t know how it will react. If you have a Nvidia GPU from the 10xx to 50xx series and the installation has been done correctly, it should work as intended and tested (you can run the verification in “install.bat” to see if everything is OK).
Continuing with the explanation, later, when the AI models and GPU acceleration were added, I began to improve the moods that had already been created, but I also began to create some new ones, or redo others, with a different approach. Those that use beats detected by AI models are much more accurate in giving the feeling of keeping the rhythm; their ups and downs will be EXACT with the rhythm, which is the good thing about beats. The challenge here is that it’s not as simple as just following the beats, because that would only create VERY monotonous and repetitive funscripts, so the key here is to program it to have different variations and reactions according to certain parameters… that the rise-fall value range is variable, that the spacing between rise and fall is variable, that it’s capable of creating reactions between beats according to certain things, etc., etc.
If you want to experience a MUCH more realistic follow-up to the rhythm of the music, I recommend trying the latest mood I created, “SixthSense,” which uses a separation of 6 stems + 5 drum sub-stems. I guarantee that it follows the rhythm really well :wink:
It’s also configured to adapt to the type of section of the song (intro, verse, chorus, etc.); But you can also configure several parameters that make it very versatile, allowing you to make it go faster or slower in general (“Strokes” drop-down menu), give different ‘weight’ to the instruments, and add “vibratos” by detecting the guitar (vibrations). However, I’ve noticed a problem with this mood, which is that sometimes it produces areas (moments) that are too “quiet,” where the movements (ups and downs) are barely noticeable. The mood does its job well, but the problem is that the movement that is clearly visible in the funscripts is very slight when transferred to The Handy’s movement. But I already have in mind to add a parameter to solve this.
Also, if you want to try moods based on beats, you can try the “Fap Mixer,” which is also highly configurable. Or the ‘Simple’ or “Relaxed” moods, which were completely redesigned and now follow the beats, more faithful to the rhythm of the music. However, these moods, such as “Simple” or “Relaxed,” as well as others such as ‘Crazy’ and “Crazy+Voice,” are designed to generate specific types of movements/reactions throughout the music. Don’t expect big changes or adaptations; they are not as versatile as the more advanced ones.
That’s why I also created the “AUTO” mood, which has three possible systems for analyzing the music and using each of those moods in different parts to provide more variety.

One last example of the difference between onsets and beats… Just today I was reviewing the “Normal” mood, because it’s a pretty important mood since when you use “AUTO” it’s mostly the one used the most, so it has to be good. Well, I didn’t really like how the funscripts turned out; yes, in general, it followed the rhythm of the music, but not exactly, it left things out, or had unexpected reactions that didn’t quite fit. It’s not that it’s bad, but after trying out how others like “SixthSense” work now, one knows that something better can be achieved.
In order not to touch it directly, I left the “Normal” mood as it is, but I started designing/creating a new one that should be its natural improved replacement. I called it “Pulse,” and although it took a lot of work to fine-tune it, I think it’s turning out pretty well; the music/rhythm tracking is really good, and I like it because it reacts well to musical moments of greater or lesser intensity/energy.
I’m now tweaking a few small things to make it good and final, and it will be included in the next version. I hope you get to try it! :wink:

Sorry for the long text, I wanted to explain it well but I didn’t want to go on too long, lol

As for your other questions:

  • Some sliders can act massively at their extremes, be careful, as you said, moving the sensitivity a little is enough for you to notice changes, but if you put it at the extremes, you may be pushing it too far. In any case, what you’re saying is a problem and should be solved by adjusting those maximums and minimums to values that give an acceptable result and don’t cause problems. This is something I can do, I’ll look into it. Although, as I said before, it would also be good to know that you are actually using AI models and that the fallback hasn’t been triggered.
  • Training a model as you describe is a little beyond my capabilities. I suppose there would be ways to do it, but I don’t see it as simple at all, among other things because, what is the standard to follow to consider a funscript good or bad for a person? Some like it slower, others faster, some want variety, others simple ups and downs, some want different ranges, others want the full 0-100 range… What would you train it with?
    This does not guarantee that you will create a good funscript for everyone… That’s why I think it’s better to have an application that, with its different moods, has one that you like, another that someone else likes… someone will use PMVs of commercial music, another of disco music, others heavy metal… some will want to create funscripts for “Hypno” or ‘Edging’ types, others for “JOIs…” types, etc…