Quote:
Originally Posted by mespotine
(...)
Build: 39682
Additions:
- FXManagement: DeleteParmAlias_FXStateChunk - deletes a parameter-alias-entry from a specific fx in an FXStateChunk
- FXManagement: DeleteParmLFOLearn_FXStateChunk - deletes a parameter-lfo-learn-entry from a specific fx in an FXStateChunk
- FXManagement: DeleteParmLearn_FXStateChunk - deletes a ParmLearn-entry from a specific fx in an FXStateChunk
- FXManagement: SetFXStateChunk - sets an FXStateChunk into a TrackStateChunk or MediaItemStateChunk
- FXManagement: SetParmAlias_FXStateChunk - sets a parameter-alias-entry from a specific fx in an FXStateChunk
- FXManagement: SetParmLearn_FXStateChunk - sets a parameter-learn-entry from a specific fx in an FXStateChunk
- FXManagement: SetParmLFOLearn_FXStateChunk - sets a parameter-lfo-learn-entry from a specific fx in an FXStateChunk
Changes:
- FXManagement: GetFXStateChunk - when using MediaItemStateChunks, it allows now selecting, from which take to get the FXStateChunk
- Localize: Localize - has now link to localize-fileformat in their description
- Localize: Localize_RefreshFile - has now link to localize-fileformat in their description
- Localize: Localize_UseFile - has now link to localize-fileformat in their description
Notes on how to use the ParmLearn-functions:
- Step 1: Get a Track/MediaItemStateChunk using GetTrackStateChunk/GetItemStateChunk
- Step 2: Get the FXStateChunk using ultraschall.GetFXStateChunk
- Step 3: Get/Set the setting(s) in the FXStateChunk
- Step 4: Add the altered FXStateChunk to the original Track/ItemStateChunk using ultraschall.SetFXStateChunk
- Step 5: Commit the altered Track/ItemStateChunk to the project, using SetTrackStateChunk
Step 4 and 5 only, if you want to change something in the ParmLearn-settings
Notes: Committing changes made with SetParmLFOLearn_FXStateChunk with SetTrackStateChunks doesn't work due a bug in Reaper, which changes it to a regular ParmLearn-entry.
I've bugreported that already.
|
Thanks. I am currently testing this out, but hit upon a problem. Here is an excerpt from my code:
Code:
TrackStateChunk = ultraschall.GetProject_TrackStateChunk(ProjectFileNameWithPath, trackID + 1, 0)
FxStateChunk = ultraschall.GetFXStateChunk(TrackStateChunk)
reaper.ShowConsoleMsg("TrackStateChunk:\n\n"..(TrackStateChunk).."\n\n")
reaper.ShowConsoleMsg("-----------------------\n\n")
reaper.ShowConsoleMsg("FXStateChunk:\n\n"..(FxStateChunk).."\n\n")
When I print TrackStateChunk, I get the expected result. However when I print FxStateChunk, I get the following error message:
tl_Use 2 stereo FXs to process O1A ambisonics.lua:182: attempt to concatenate a nil value (global 'FxStateChunk')
Am I missing something obvious here?
Apart from that I also have a second question: Is there any way of providing the currently open project as "ProjectFileNameWithPath" rather than having to point to a saved version of the project?
Thanks!
PS: The spaces that show up in (TrackStateChunk) and (FxStateChunk) in line 3 and 5 of the code are due to the forum software formatting, and these spaces are not present in my own code. - Update: did as advised by nofish in his reply below.