Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 09-19-2023, 05:15 AM   #1
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,150
Default slider_next_chg() does not work in stop mode

IMHO this is a bug, even if the documentation of slider_next_chg() does not explicitly mention parameter linking.

I tried to upgrade a (public) JSFX of mine (ReaPack -> Slider and Midi CC) to allow for sample accurate parameter modulation.

I found that slider_next_chg() seems to work in play mode (I did not test record mode) - providing me with the (somewhat) current slider position in @block - but not in stop mode.
In fact I am very much into "Reaper as an instrument" ("live" Reaper usage). Here Reaper stays in stop mode being used as a versatile VST host engine. That is why I am concerned about realtime issues in stop mode.

IMHO slider_next_chg() should work in stop mode as well, as sample accurate parameter ("slider") modulation does make sense in stop mode, e.g. when the parameter is driven by Midi linking, which obviously can move the slider multiple times in a sample block, and the moving positions within the block absolutely might matter.


More specific:

In play mode, I do get slider movements when driven by Midi link.

Even in play node, I don't seem to get slider movements when the slider is manually handled.

When the slider is moved by a midi link the return value always is 511 (in the tests I did).

Doing while ((spos = slider_next_chg(1, sli1)) >= 0), I don't get more than one value per block (with spos = 511) even when modulating the parameter 12 times per block via Midi link (using the CC LFO).

AFAIU, VST3 can do sample accurate parameter modulation from midi linked parameters in Reaper.

Thanks for listening !
-Michael

Last edited by mschnell; 09-21-2023 at 02:59 AM.
mschnell is offline   Reply With Quote
Old 09-20-2023, 06:32 AM   #2
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,150
Default

bump
mschnell is offline   Reply With Quote
Old 09-20-2023, 11:21 AM   #3
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,150
Default

Edited first post due to some glitches.
mschnell is offline   Reply With Quote
Old 09-20-2023, 11:33 AM   #4
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,150
Default

BTW.:
This example code -> https://www.admiralbumblebee.com/mus...in-Reaper.html IMHO is erroneous and does not do any sample accurate modulation.
The result (>0) of slider_next_chg() (called in @sample) is ignored and hence the parameter value is provided in the first sample of the block and applied at that point in virtual time instead at the position is comes with.
E.g.the stock JSFX "general dynamic" and "volume_sample_pan_accurate_auto" correctly compare the slider_next_chg() result to a sample No in block counter.

Last edited by mschnell; 09-21-2023 at 03:15 AM.
mschnell is offline   Reply With Quote
Old 09-21-2023, 04:03 AM   #5
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,150
Default

If I manually paint an envelope I do get fine grained positions.
mschnell is offline   Reply With Quote
Old 09-21-2023, 04:09 AM   #6
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,150
Default

I am not sure that I completely understand the documentation, but here I want to convert the parameter move in CC midi events, and hence I don't need to do interpolation. (But first that needs to work at all with the slider driven by hand, midi (etc) link, and envelope).
I intend just to propagate the position info retrieved from slider_next_chg() with the CC event sent.

Last edited by mschnell; 09-22-2023 at 03:22 AM.
mschnell is offline   Reply With Quote
Old 09-22-2023, 03:22 AM   #7
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,150
Default

Nobody ever took a deeper look at slider_next_chg() ?
mschnell is offline   Reply With Quote
Old 09-23-2023, 12:13 AM   #8
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,150
Default

If slider_next_chg() does not work in stop mode I need to use same in @block, and additionally some code in the @slider section, to make the plugin work in stop mode and do sample accurate envelope following in play mode.

Seems a bit complicated and error prone....
mschnell 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 01:48 PM.


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