Old 10-23-2021, 08:16 AM   #1
PROPHESSOR
Human being with feelings
 
PROPHESSOR's Avatar
 
Join Date: Oct 2021
Location: Ukraine
Posts: 26
Default JSFX: Process OSC events

I need to be able to create and process OSC events with JSFX like it now is implemented for MIDI.

Request features:
- Intercept OSC events (may be pattern of OSC event like "/myplugin/*")
- Send OSC events

P.S> It would also be great if sections @midi and @osc were added to JSFX to receive and process these events when they received but not in @block/@sample as it is now.

Last edited by PROPHESSOR; 10-23-2021 at 10:09 AM. Reason: P.S>
PROPHESSOR is offline   Reply With Quote
Old 10-23-2021, 09:22 AM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,770
Default

As JSFXes use an interface towards Reaper very similar to VSTs, and don't have an API toward the OS, there is no way to have them work on OSC messages.

You can use ReaPack->ReaLearn to receive and send OSC messages.
ReaLearn has an internal EEL (JSFX-language) processor you can install our code in.

Moreover ReaLearn can convert OSC messages to Midi messages and your JSFX could receive those and work on them.
-Michael
mschnell is offline   Reply With Quote
Old 10-23-2021, 09:55 AM   #3
PROPHESSOR
Human being with feelings
 
PROPHESSOR's Avatar
 
Join Date: Oct 2021
Location: Ukraine
Posts: 26
Default

Quote:
Originally Posted by mschnell View Post
and don't have an API toward the OS
But as far as I know, it is possible to use Reaper's internal OSC queue, like a MIDI one. So REAPER receives OSC event from one of configured OSC devices, if it isn't a known REAPER's event, REAPER sends it to all JSFX plugins that are listening to OSC (it may be done using options header in a JSFX plugin like in gmem "options:gmem=someUniquelyNamedSpace"). If a plugin sends OSC message, it moves to REAPER's OSC queue and is being send to configured OSC devices as soon as possible by REAPER itself.

Thank you for solution with ReaLearn but it looks like a hack..)
PROPHESSOR is offline   Reply With Quote
Old 10-23-2021, 11:02 PM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,770
Default

Quote:
Originally Posted by PROPHESSOR View Post
use Reaper's internal OSC queue, like a MIDI one.
(AFAIU) Those things don't exist.

There are many "Midi Queues" that are defined and handled by the Midi routing and accessed by plugins via their Midi in/out interfaces, and of course by Track Midi input and playback/recording. Such Midi messages also can be sent to Midi devices as an output.

And there is the "Reaper Control Path" queue that is completely separate. Same holds "Events" that are generated (e.g.) by Midi devices with the "control" checkbox activated, other such events are generated by OSC messages Reaper receives. Hence in the (single) queue/path these events can be of different nature, one might be "derived from midi" and one might be "derived from OSC". Pluguins - including JSFX - don't have access to the Control Path. (Exception are especially crafted such as ReaLearn and MidiToReaCintrolPath.)
-Michael

Last edited by mschnell; 10-24-2021 at 10:24 PM.
mschnell is offline   Reply With Quote
Old 10-25-2021, 03:34 AM   #5
PROPHESSOR
Human being with feelings
 
PROPHESSOR's Avatar
 
Join Date: Oct 2021
Location: Ukraine
Posts: 26
Default

Quote:
Originally Posted by mschnell View Post
Pluguins - including JSFX - don't have access to the Control Path. (Exception are especially crafted such as ReaLearn and MidiToReaCintrolPath.)
-Michael
I think it can be made possible by changing REAPER internals
PROPHESSOR is offline   Reply With Quote
Old 10-25-2021, 02:02 PM   #6
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,770
Default

Quote:
Originally Posted by PROPHESSOR View Post
I think it can be made possible by changing REAPER internals
i.e. using a different DAW.

But: As this is Reaper close to everything is possible using the appropriate tools. I already did point out the ReaLearn might provide means for accomplishing what you have in mind.

-Michael
mschnell is offline   Reply With Quote
Old 10-25-2021, 04:55 PM   #7
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,032
Default

There is also oscii-bot.
TonE is offline   Reply With Quote
Old 10-25-2021, 10:56 PM   #8
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,770
Default

Quote:
Originally Posted by TonE View Post
There is also oscii-bot.
I frequently do this. You need to additionally use some midi device software to route Midi from/to OSCIIBot from/to Reaper.

-Michael
mschnell is offline   Reply With Quote
Old 10-31-2021, 05:10 AM   #9
PROPHESSOR
Human being with feelings
 
PROPHESSOR's Avatar
 
Join Date: Oct 2021
Location: Ukraine
Posts: 26
Default

I tried ReaLearn and yes, it provides such possibilities, but there are several dissapoints:
1. There is a bug in it, when even without a single mapping, it eats some (fast) midi events (even if both of pass-through flags are enabled)
2. It does not provide the ability to send OSC events from JSFX. That is, if I need to send OSC from JSFX, I need to either transmit it through MIDI (see point 1), or through mapping of fader movements, which is a terrible hack

So personally, I really need the ability to send OSC messages directly from JSFX, if there is any plugin that adds such capabilities to JSFX - please let me know

Last edited by PROPHESSOR; 10-31-2021 at 05:24 AM.
PROPHESSOR is offline   Reply With Quote
Old 10-31-2021, 03:59 PM   #10
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,770
Default

Quote:
Originally Posted by PROPHESSOR View Post
1. There is a bug in it, ...
Helgoboss in very helpful and fast, when he gets information about errors. Meet him in the appropriate thread in the General Forum.
Quote:
Originally Posted by PROPHESSOR View Post
2. It does not provide the ability to send OSC events from JSFX.
??? It does not know abount your JSFX, so what do you think it could do.
Quote:
Originally Posted by PROPHESSOR View Post
That is, if I need to send OSC from JSFX, I need to either transmit it through MIDI
This is a very obvious way to do this.
Quote:
Originally Posted by PROPHESSOR View Post
or through mapping of fader movements, which is a terrible hack.
IMHO less straight forward than Midi,m but rot really a hack,, as JSFX indeed is able and intended to write automation values. There even is a function to call especially to immediately notify Reaper about the change of a slider value. If you want you can use hidden sliders in order to not clutter the JSFX GUI.
Quote:
Originally Posted by PROPHESSOR View Post
So personally, I really need the ability to send OSC messages directly from JSFX, if there is any plugin that adds such capabilities to JSFX - please let me know
This never will happen. JSFXes are not intended to do OS calls and this is necessary to send or receive Network streams.

-Michael
mschnell is offline   Reply With Quote
Old 11-02-2021, 03:38 AM   #11
PROPHESSOR
Human being with feelings
 
PROPHESSOR's Avatar
 
Join Date: Oct 2021
Location: Ukraine
Posts: 26
Default

Quote:
Originally Posted by mschnell View Post
Helgoboss in very helpful and fast, when he gets information about errors. Meet him in the appropriate thread in the General Forum.
Yes, I already wrote to him on GitHub and this point is no longer relevant

Quote:
Originally Posted by mschnell View Post
IMHO less straight forward than Midi,m but rot really a hack,, as JSFX indeed is able and intended to write automation values. There even is a function to call especially to immediately notify Reaper about the change of a slider value. If you want you can use hidden sliders in order to not clutter the JSFX GUI.
This is how my plugin works)
It accepts fader automation, converts, outputs midi, which receives ReaLearn and sends on OSC
Yes, it works, but as a developer I would like to have programmatic access to the OCS device and send requests not by sending them in MIDI Lyrics through a neighboring plugin, and even more so through CC or Note Velocity, but directly from the plugin.
Receiving is the same problem, either binding to fader automation via MIDI Learn, or via ReaLearn and transmitting via MIDI messages
Compared to other simple and elegant solutions in REAPER, it looks like a crutch

Quote:
Originally Posted by mschnell View Post
This never will happen. JSFXes are not intended to do OS calls and this is necessary to send or receive Network streams.
I asked about this on a nearby forum and, in principle, if you patch the JSFX engine, you can add a C ++ function - so why not do the same, just not with a patch, but officially?
This is already implemented in OSCIIBot because there is a need, why not add this to Reaper itself?
https://forum.cockos.com/showthread.php?t=259109
PROPHESSOR is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.