Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Trigger Thread

For general discussion related FlowStone

Trigger Thread

Postby gvalletto » Tue Sep 05, 2023 8:27 pm

Hi all,
Can anyone tell me where get explanations / examples of the "Trigger Thread" prim/component? I have not found anything about it in the FS manuals.
User avatar
gvalletto
 
Posts: 115
Joined: Fri Jul 09, 2010 10:15 pm
Location: Argentina

Re: Trigger Thread

Postby Spogg » Wed Sep 06, 2023 8:57 am

It’s an R&D component and I’ve never used it or seen it used. The popup info doesn’t really help and it also says it’s unstable.
Maybe you could test it somehow and report back…?
User avatar
Spogg
 
Posts: 3324
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Trigger Thread

Postby Tepeix » Thu Sep 07, 2023 12:35 pm

Maybe it's a little like an old module from Synthmaker, the De-Threader ??

Where the help text is : "De-threader\nTakes an input trigger that may originate from another thread and outputs a trigger that runs inside the main application thread\nThis is useful if you want to trigger timers from MIDI events for example"

I never truly understand this description.. But i remember that it make a tick happen in the next tick time. Or delay from one tick..

Doing the experiment with a counter we could verify this.. But now there's a little difference if we use the synthmaker module or the beta module to feed the counter...
Attachments
De Threader.fsm
(56.63 KiB) Downloaded 538 times
Tepeix
 
Posts: 354
Joined: Sat Oct 16, 2021 3:11 pm

Re: Trigger Thread

Postby Spogg » Thu Sep 07, 2023 3:39 pm

Well, I tried several things to see if it made any difference and came up with nothing. :(

If only trogg was still around… :cry:
User avatar
Spogg
 
Posts: 3324
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Trigger Thread

Postby Tepeix » Thu Sep 07, 2023 4:50 pm

The difference is very subtle for me, if i use the synthmaker one to feed the counter,
they will read the same value, but if i use the flowstone trigger thread the synthmaker one will read one tick latter the result of the counter..
That's mysterious ;)
Tepeix
 
Posts: 354
Joined: Sat Oct 16, 2021 3:11 pm

Re: Trigger Thread

Postby Spogg » Fri Sep 08, 2023 8:49 am

Yeah, I set up a very elaborate system with 10,000 floats in series in 2 “channels” with mono readouts and ASIO on (to try and load the stream handling) followed by various trigger counters. I used the MIDI mono prim with counters to time the gap between playing 2 different notes (any notes).
I could sometimes get a difference of 1 trigger count with the Thread prim in various places and configurations. I found it inconsistent at all points so I didn’t think it worth sharing. Basically I couldn’t get it to repeat reliably under any operations.

At some point I’ll mess around with it in a real synth when it gets big, because that might reveal what it can actually do.

The developer wouldn’t have gone to the trouble of making a prim which was useless, so I remain intrigued!
User avatar
Spogg
 
Posts: 3324
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Trigger Thread

Postby tulamide » Fri Sep 08, 2023 9:07 am

Do yourselves a favour and don't fool around with program threads, especially when the tool provided is in R&D, and you don't know about the topic behind the tool.

I could explain what a thread is, but others have done so much better than I could. For example here:
https://www.geeksforgeeks.org/thread-in-operating-system/

In the alpha, MyCo already makes use of threads in abundance. That's nothing very important to have as a tool. And if you followed the explanation above, you should know by now, that a delay of any length is actually a bad sign.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2688
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Trigger Thread

Postby R&R » Fri Sep 08, 2023 9:07 pm

tulamide wrote:Do yourselves a favour and don't fool around with program threads, especially when the tool provided is in R&D, and you don't know about the topic behind the tool.


Threads :D

Can't contribute to the topic of actual "threads" but I have some newbie contemplations about timers...

It's enough frustrating to work with just regular delayed triggers using timers (within what I guess could be said to be the "main green thread" :mrgreen: )

Not having any control of underlying code... and creating actual new threads, and any asynchronous behaviour that follows feels like an awesome way to crash FS :lol:
Threads would seem to make more sense when not using somewhat of a "blackbox" environment like FS is?
I still don't understand if Ruby runs in same thread as green (by FS itself, that is).

I'm working very little with FS4... so I don't know If there is any way to accomplish it... but I do "sort of" miss a listener system in FS3.08... like a system with some predetermined flags that FS can raise when finished with updating poly or other hardcoded things, that then can be used to create consecutive triggers in green.

In general... regarding regular timers... The more timers I have the more issues I get in my synth :lol: so I'm always trying to get rid of any. But I do have some left.

Mostly for two purposes...
To make sure an inital trigger propagates throughout the schematic and force FS to do that update.
And... also for creating what in the analog world would be the "knob" equivalent of a "button bounce protection" (I don't know the english translation) to reduce update frequency. For example when a condition is only met intermittently and any update only should occur when condition is met within a given timeframe.

I'm dealing with well over 600 poly selectors, probably much much more... switching on preset changes and when resetting these in my synth. The amount of green selectors/multiplexer and other spaghetti I've lost track of completely :lol:

Btw Tulamide...
Indirectly related to triggers. I'm in the progress of moving to using string presets parameters in my synth :lol: and getting my switching/resetting system to work was a nightmare :lol: I almost threw my laptop out the window several times.

The trick became to retain values correctly. Simple S&H prim logic alone didn't do the job. But I think I got it to work now, using unnecessarily elaborate trigger switch logic LOL
Unfortunately changing presets takes even longer than before string presets. But that's fine... :)
R&R
 
Posts: 440
Joined: Fri Jul 15, 2022 2:28 pm

Re: Trigger Thread

Postby tulamide » Sat Sep 09, 2023 11:27 am

R&R wrote:Threads would seem to make more sense when not using somewhat of a "blackbox" environment like FS is?
I still don't understand if Ruby runs in same thread as green (by FS itself, that is).

Correct, that's why I said, to leave it up to MyCo. In the early days of Synthmaker, there might have been applications for this, but in the alpha, MyCo has optimized everything to its optimum already.

There are 3 main threads. The main Flowstone loop, all the schem editors, the GUI and green are in one thread (that's why a plugin runs smoother than in Flowstone), all streams are in one thread and Ruby runs in its own thread. The latter is only true for version 3.0.6 and the alpha. In other versions, Ruby accidentally was moved as a sub-thread to the main thread, making it extremely slow.
Apart from those main thread there a many sub threads, which are children of their respective "mother"-thread. However, all of this is not necessary for us to know. That's all behind-the-scenes stuff, that won't help us using Flowstone.

Just do, what you want to do. Flowstone will make sure it runs, albeit with varying results.
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2688
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Trigger Thread

Postby R&R » Sun Sep 10, 2023 6:26 pm

Good and useful info as usual... 8-) thanks tulamide!
R&R
 
Posts: 440
Joined: Fri Jul 15, 2022 2:28 pm

Next

Return to General

Who is online

Users browsing this forum: No registered users and 93 guests