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

Reply
 
Thread Tools Display Modes
Old 07-04-2019, 08:50 AM   #1
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default API: SetTrackStateChunk sets LFOLEARN-entries as PARMLEARN

There's an issue with reaper.SetTrackStateChunk, when I want to change the LFOLEARN to accept an osc-message, it will convert the LFOLEARN-line into a PARMLEARN-line.
So the LFO-Learn phase-setting gets lost in the process.

I tried it using Reaper 5.979x64, SWS 2.10.0.1, Windows 7.

In detail:
When I use the following StateChunk for a track:

Code:
<TRACK
NAME ""
PEAKCOL 22979327
BEAT -1
AUTOMODE 0
VOLPAN 1 0 -1 -1 1
MUTESOLO 0 0 0
IPHASE 0
ISBUS 0 0
BUSCOMP 0 0
SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0
FREEMODE 0
REC 0 0 1 0 0 0 0
VU 2
TRACKHEIGHT 0 0 0
INQ 0 0 0 0.5 100 0 0 100
NCHAN 2
FX 1
TRACKID {6F91B576-BCFC-4F68-B93E-65D54608CB48}
PERF 0
MIDIOUT -1
MAINSEND 1 0
<FXCHAIN
WNDRECT 28 56 647 392
SHOW 1
LASTSEL 0
DOCKED 1
BYPASS 0 0 0
<VST "VST: ReaEQ (Cockos)" reaeq.dll 0 "" 1919247729 ""
cWVlcu5e7f4CAAAAAQAAAAAAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAAAAAAAyQAAAAEAAAAAABAA
IQAAAAUAAAAIAAAAAQAAAPzwf28tojVA/+hDQJAy/z/aSQwCK4f6PwEIAAAAAQAAAP8mhOdFRo9AtI2CCitI4z//wMqhRbbnPwEIAAAAAQAAAFbbEaYE8TdAAO61oPfGsD4BAAAAAAAQQAEIAAAAAQAAAKZ+FGCwglpApEc8Ctag9j+v+X5qvHQAQAEBAAAAAQAAAAmxu/hyjsZA4LRbLZjs/z8AXI/C9SjUPwEBAAAAAQAAAAAAAAAAAPA/AAAAAIsCAABrAQAA
AFVsdHJhc2NoYWxsMwAQAAAA
>
PRESETNAME Ultraschall3
FLOATPOS 0 0 0 0
FXID {DB55CB9A-0589-426D-91B0-3917C08B7530}
<PROGRAMENV 0 0
PARAMBASE 0
LFO 1
LFOWT 1 1
AUDIOCTL 0
AUDIOCTLWT 1 1
LFOSHAPE 0
LFOSYNC 0 0 0
LFOSPEED 0.124573 0
>
LFOLEARN 0 1168 9 
WAK 0
>
>
and I try to exchange the line

Code:
LFOLEARN 0 1168 9
with

Code:
LFOLEARN 0 0 100 LBaLeileileilei
generating the following StateChunk:

Code:
<TRACK
NAME ""
PEAKCOL 22979327
BEAT -1
AUTOMODE 0
VOLPAN 1 0 -1 -1 1
MUTESOLO 0 0 0
IPHASE 0
ISBUS 0 0
BUSCOMP 0 0
SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0
FREEMODE 0
REC 0 0 1 0 0 0 0
VU 2
TRACKHEIGHT 0 0 0
INQ 0 0 0 0.5 100 0 0 100
NCHAN 2
FX 1
TRACKID {6F91B576-BCFC-4F68-B93E-65D54608CB48}
PERF 0
MIDIOUT -1
MAINSEND 1 0
<FXCHAIN
WNDRECT 28 56 647 392
SHOW 1
LASTSEL 0
DOCKED 1
BYPASS 0 0 0
<VST "VST: ReaEQ (Cockos)" reaeq.dll 0 "" 1919247729 ""
cWVlcu5e7f4CAAAAAQAAAAAAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAAAAAAAyQAAAAEAAAAAABAA
IQAAAAUAAAAIAAAAAQAAABDpUXZJ94ZA/+hDQJAy/z/aSQwCK4f6PwEIAAAAAQAAAP8mhOdFRo9AtI2CCitI4z//wMqhRbbnPwEIAAAAAQAAAFbbEaYE8TdAAO61oPfGsD4BAAAAAAAQQAEIAAAAAQAAAKZ+FGCwglpApEc8Ctag9j+v+X5qvHQAQAEBAAAAAQAAAAmxu/hyjsZA4LRbLZjs/z8AXI/C9SjUPwEBAAAAAQAAAAAAAAAAAPA/AAAAAIsCAABrAQAA
AFVsdHJhc2NoYWxsMwAQAAAA
>
PRESETNAME Ultraschall3
FLOATPOS 0 0 0 0
FXID {DB55CB9A-0589-426D-91B0-3917C08B7530}
<PROGRAMENV 0 0
PARAMBASE 0
LFO 1
LFOWT 1 1
AUDIOCTL 0
AUDIOCTLWT 1 1
LFOSHAPE 0
LFOSYNC 0 0 0
LFOSPEED 0.124573 0
>
LFOLEARN 0 0 100 LBaLeileileilei
WAK 0
>
>
and I commit it using SetTrackStateChunk, it will "convert" the LFOLEARN-line to

Code:
PARMLEARN 0 0 100 LBaLeileileilei
with the full StateChunk being now:

Code:
<TRACK
NAME ""
PEAKCOL 22979327
BEAT -1
AUTOMODE 0
VOLPAN 1 0 -1 -1 1
MUTESOLO 0 0 0
IPHASE 0
ISBUS 0 0
BUSCOMP 0 0
SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0
FREEMODE 0
REC 0 0 1 0 0 0 0
VU 2
TRACKHEIGHT 0 0 0
INQ 0 0 0 0.5 100 0 0 100
NCHAN 2
FX 1
TRACKID {6F91B576-BCFC-4F68-B93E-65D54608CB48}
PERF 0
MIDIOUT -1
MAINSEND 1 0
<FXCHAIN
WNDRECT 28 56 647 392
SHOW 1
LASTSEL 0
DOCKED 1
BYPASS 0 0 0
<VST "VST: ReaEQ (Cockos)" reaeq.dll 0 "" 1919247729 ""
cWVlcu5e7f4CAAAAAQAAAAAAAAACAAAAAAAAAAIAAAABAAAAAAAAAAIAAAAAAAAAyQAAAAEAAAAAABAA
IQAAAAUAAAAIAAAAAQAAABSWzmq3tkVA/+hDQJAy/z/iSQwCK4f6PwEIAAAAAQAAAP8mhOdFRo9Aso2CCitI4z//wMqhRbbnPwEIAAAAAQAAAF7bEaYE8TdAAO61oPfGsD4BAAAAAAAQQAEIAAAAAQAAAJ5+FGCwglpAokc8Ctag9j+y+X5qvHQAQAEBAAAAAQAAAAOxu/hyjsZA+LRbLZjs/z8AXI/C9SjUPwEBAAAAAQAAAAAAAAAAAPA/AAAAAIsCAABrAQAA
AFVsdHJhc2NoYWxsMwAQAAAA
>
PRESETNAME Ultraschall3
FLOATPOS 0 0 0 0
FXID {DB55CB9A-0589-426D-91B0-3917C08B7530}
<PROGRAMENV 0 0
PARAMBASE 0
LFO 1
LFOWT 1 1
AUDIOCTL 0
AUDIOCTLWT 1 1
LFOSHAPE 0
LFOSYNC 0 0 0
LFOSPEED 0.124573 0
>
PARMLEARN 0 0 100 LBaLeileileilei
WAK 0
>
>
I would expect it to commit the changes to LFOLEARN instead.

I tried this numerous times and always got the same result, so something seems to be mixed up in SetTrackStateChunk, when committing somehow.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 08-13-2019, 04:08 PM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,172
Default

What's that 100 meant to do, in the line you are replacing? On our side, it looks like that field wants to be a flag:

Code:
1=sel track only, 2=soft takeover, 4=focused FX only, 8=LFO retrigger (don't save with default), &16=visible FX only
I think it should work if you leave that field at 9 (LFO retrigger, selected track only), rather than 100.
schwa is offline   Reply With Quote
Old 08-13-2019, 04:14 PM   #3
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

The 100 was only one of many different strings I tried to set, but it was always "converted" to PARMLEARN and never used as LFOLEARN, no matter which values I used.

If the values are invalid for LFOLEARN, then it should not be included at all, rather than being associated to the wrong entry(PARMLEARN).
Otherwise I have the wrong stuff learned as PARMLEARN.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old Today, 09:26 AM   #4
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 12,310
Default

The LFOLEARN vs PARMLEARN token is advisory -- the real defining attribute is whether the "8" bit is set on the flags (parameter 3).
Justin is online now   Reply With Quote
Old Today, 12:58 PM   #5
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

Ah, ok, this makes sense...

Thanks Schwa and Justin
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine 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:40 PM.


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