Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 12-05-2019, 09:38 AM   #361
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

I'm in the final stages of the first "real" version of Ultraschall-API, which isn't beta anymore and would like to ask, has somebody of you found any problems with Ultraschall-API and Reaper v6 so far?

It should work and the only bug I found is already fixed in the latest but still, I'm not sure yet.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 12-19-2019, 09:35 AM   #362
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

4.00 Beta 2.79: - "Yes - Owner of a lonely heart"

Has now 1082 functions, with 12 new ones

New in this release:

NOTE: There are some new features, who make use of Reaper v6-features. Please update soon, as Reaper 6 will be a requirement soon!
  • Speedup when loading US-API
    I made a modules-system, which speeds up loading and initalization as well as memory-use of the Ultraschall-API by magnitudes.
    This approach loads only the functions needed by your script(used to load all functions in earlier versions).
    The loading is now about 86% faster and memoryuse if 56% less.
    And what do you need to do to make use of the modules approach?
    Well, nothing. The Ultraschall-API does it for you! (requested by many, so hope, this helps you a lot).
  • Marker/Region Extstates
    Reaper 6.02 added some new features, which gives a unique guid for a marker. This again, helped me adding a feature I wanted to have for a long time: Marker/Region Extstates.
    They work like regular ProjectExtStates, but have the benefit, that they allow saving additional key-value stores associated with a certain marker/region.
    And even if you change the whole order of the markers, the extstates will still be attached to the marker of your choice.
    Possible usecase: storing the render-format-settings as region-extstates for region-rendering or simply adding additional metadata to markers/regions, that are needed but would spam the markertitle shown in the arrangeview.
    Experiment with it, you'll quickly get the idea and ideas for practical usecases!
  • Blitting an image centered
    Sometimes, you want to blit an image into gfx-windows centered. Problem is: it's not easy to do. Until now, as I added the function
    GFX_BlitImageCentered, which does exactly that.
    That means, you can pass to the function the position of the center of the image and change rotate/scale. This makes zooming in and out of images much more easier, as they stay at their position.
  • Subtitles SRT-import/export
    You can import and export now SRT-files for subtitles. This should allow you to use regions as subtitle-feature.
  • ConvertStringToBits and ConvertBitsToString
    This can be helpful, if you have a string, which represents a binary-number: Just convert it with this function and voila, you can work with the bits themselves.
    And if you need to do it the other direction, use ConvertBitsToString. That way, you can work easily on a bitlevel, if fiddling with bitshifting is too difficult for you.
  • Bugfixes with ArrangeViewSnapShots, Markers
    Should now work like a charm.
New features in 4.00beta2.79
  • API: loadspeed - sped up loading speed by 86%, as API will now only load functions, actually needed, not all of them; memory need is reduced by about 56%.
  • Docs: Reaper Internals - updated to Reaper 6.02
  • ExtStateManagement: GetMarkerExtState - gets an extstate from a specific marker/region
  • ExtStateManagement: SetMarkerExtState - sets an extstate for a specific marker/region
  • GFX: GFX_BlitImageCentered - blits an image centered at a given position, to make "zooming"-effects easy to produce
  • Helper Functions: ConvertBitsToString - converts a table with bits(entries with 0 or 1) into its string-representation
  • Helper Functions: ConvertStringToBits - converts a string into its bit-representation
  • Markermanagement: GetMarkerIDFromGuid - get the markerid from a guid
  • Markermanagement: GetGuidFromMarkerID - get the guid from a marker
  • Scrubbing: Scrubbing_MoveCursor_GetToggleState - gets the current toggle-state for when scrubbing using an action/surface
  • Scrubbing: Scrubbing_MoveCursor_Toggle - toggles the state for when scrubbing using an action/surface
  • Subtitles: ReadSubtitles_SRT - imports a SubRip-srt-subtitlefile
  • Subtitles: SaveSubtitles_SRT - export a SubRip-srt-subtitlefile
Changes from Beta 2.78 to Beta 2.79
  • API: Reapack-API-xml-generator.lua - didn't correctly create zip-archive of the API stored in GitHub -> fixed
  • ArrangeView Snapshots: DeleteArrangeviewSnapshot - deleted all Arrangeview-Snapshots instead of the slot-one and didn't check for valid value for parameter slot -> fixed
  • ArrangeView Snapshots: IsValidArrangeviewSnapshot - regression, didn't return false, if no snapshot was available in a certain slot -> fixed
  • ArrangeView Snapshots: RetrieveArrangeviewSnapshot - had inner variable exposed -> fixed
  • ConfigurationManagement: CountValuesByPattern - didn't count at all(for some reason), errors in docs -> fixed(thanks to reapero)
  • Developer: ultraschall_developertool_Display-Altered-Config-Vars.lua - didn't work with rc-pre-releases of Reaper -> fixed
  • Marker Management: AddCustomRegion - was expecting length, although declared as regionend in the docs -> fixed
  • Marker Management: MoveRegionsBy - still had debug-code in it, which could display messageboxes and overwrite global variables -> fixed (sorry for that)
  • Marker Management: SetCustomRegion - had docs of AddCustomRegion -> fixed
  • Project Management: GetProject_MarkersAndRegions - supports now guids of markers and regions, as introduced in Reaper 6.02
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 12-20-2019, 02:03 AM   #363
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

Nice for the uploading speed ! It was my main concern with using such big library :P (not for my personal scripts but for script I share at least).



So if it now only loads what is necessary... Seems as good as it can get !


Thx !
X-Raym is offline   Reply With Quote
Old 12-20-2019, 09:17 AM   #364
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

I think, I can improve even further(I have...ideas*), but need some time to rest, after that much stuff I coded this year for the API


*that's how every evolutionary step or amargeddon starts
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 12-23-2019, 03:47 AM   #365
Ivannn Bennnettt
Human being with feelings
 
Join Date: Feb 2017
Posts: 304
Default

I'm waiting for an Armageddon
Ivannn Bennnettt is offline   Reply With Quote
Old 01-05-2020, 10:05 AM   #366
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

Hotfix 1 now available.
5th of January 2020

Changes:
- EventManager: Eventmanager_RemoveEvent - didn't work with new speedup-improvements -> fixed(thanks to rstockm)
- EventManager: Eventmanager_RemoveAllEvents_Script - - didn't work with new speedup-improvements -> fixed
- Docs: had typo in the functionnames of Eventmanager_RemoveEvent and Eventmanager_RemoveAllEvents_Script -> fixed

Please update your ReaPacks.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-07-2020, 06:40 AM   #367
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default SetFXStateChunk with FX chain file content

Hi Mespotine,


Code:
boolean retval, optional string alteredStateChunk = ultraschall.SetFXStateChunk(string StateChunk, string FXStateChunk)

I tried to use it to insert FX chains file content, but it doesn't seems to work,
the validator functions tolds me that this file content isn't a valid FX state chunk (which I think it i supposed to be)



Is there a subtle differnece I missed between FX chains file content and FX state chunk ?


Thx for your assistance !
X-Raym is offline   Reply With Quote
Old 01-07-2020, 06:54 AM   #368
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

Ok I see,


regular take FXs have
Code:
 <TAKEFX
...
>

which isn't present in FX chains file content.


A funciton to support this would be very nice :P


----
Bug report:


Doc says that take ID is optionnal for GetFXStateChunk but it doesn't seems to be the case. I had to put '1' as ID.


Question, if optional, would it only consider active take right ?
X-Raym is offline   Reply With Quote
Old 01-07-2020, 07:09 AM   #369
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default Set FX chain chunk bug

I tried to add <Take FX > to my FX chain file content to see if it could works,


the FX chain is validated by ultrashall validator function but I get this error when trying to set the altered string to an item:


Code:
...i//Modules/ultraschall_functions_FXManagement_Module.lua:1726: bad argument #1 to 'gsub' (string expected, got nil)

Code:
      if ultraschall.IsValidFXStateChunk(FXStateChunk) then
        retval, StateChunk = reaper.GetItemStateChunk( item, '', false )
        retval, alteredStateChunk = ultraschall.SetFXStateChunk(StateChunk, FXStateChunk)
        reaper.SetItemStateChunk( item, alteredStateChunk, true)
      end

Do you see any error in this code ?

Can this because I didn't add propper indendation to every line of my FX chain chunk ?
(I suspect - cause the chunk is validated by your validator funciton) and hope that the set Chunk functions doesn't need propper indendations).

EDIT
I discover that we have to put take ids

Code:
      if ultraschall.IsValidFXStateChunk(FXStateChunk) then
        take_id = reaper.GetMediaItemInfo_Value( item, "I_CURTAKE" )
        retval, StateChunk = reaper.GetItemStateChunk( item, '', false )
        retval, alteredStateChunk = ultraschall.SetFXStateChunk(StateChunk, FXStateChunk)
        reaper.SetItemStateChunk( item, alteredStateChunk, true, take_id  )
      end
In this case, no crash, bu it still don't work.

Last edited by X-Raym; 01-07-2020 at 07:36 AM. Reason: Remove ID
X-Raym is offline   Reply With Quote
Old 01-07-2020, 07:22 AM   #370
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default Missing parameter in doc

Code:
boolean retval, optional string alteredStateChunk = ultraschall.SetFXStateChunk(string StateChunk, string FXStateChunk)

Just discover that this definition lacks the optional ID parameter :P
X-Raym is offline   Reply With Quote
Old 01-07-2020, 07:26 AM   #371
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

Thanks, I'll look into it.

Looks like it's time for Hotfix 2

It's all probably oversights on my side, as fas as I see.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-07-2020, 07:38 AM   #372
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

@mespotine
Ok many thanks !



I edit my post on https://forum.cockos.com/showpost.ph...&postcount=369


with code with and without take ID.


With take ID it doesnt break but it still don't work. The reutrned alteredStateChunk is nil.
X-Raym is offline   Reply With Quote
Old 01-07-2020, 08:49 AM   #373
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

Yeah, it's time, I take on the take-management to take it to new heights.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-07-2020, 08:55 AM   #374
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

Ok then I pause my script for now,


waiting for your magic :P


Good luck !
X-Raym is offline   Reply With Quote
Old 01-07-2020, 09:07 AM   #375
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

Thank you for your detailed bugreports. This may help me getting my head around that more quickly, especially with my limited time right now(we're working on our next Ultraschall4-Extension release so API-development is very limited currently).
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-14-2020, 09:19 AM   #376
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

@XRaym

I fixed all the bugs for the next version of the API, but I couldn't really get the problem you have with FXStateChunks.
Can you give me two FXStateChunks, the original one and the one after insertion of the new FX?
With thatm I could work with the actual material for debugging.

One more thing: Currently there's no function for inserting, removing and counting FX in FXStateChunks, so SetFXStateChunk only supports setting already existing FXses.
Maybe this is the confusion(and I reworked the docs to clear up this confusion a bit).

Also means: I'll add the missing functions in the next update.


BTW: Did I understand correctly, that you're working on the first official US-API-requiring script?
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-14-2020, 10:27 AM   #377
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

@mespotine
Thx for your work !


Quote:
Can you give me two FXStateChunks, the original one and the one after insertion of the new FX?
FX chunk are just one coming from FXchain file. No matter which one. You can try with any of your
X-Raym is offline   Reply With Quote
Old 01-14-2020, 10:29 AM   #378
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

Quote:
BTW: Did I understand correctly, that you're working on the first official US-API-requiring script?
What do you mean ? There are various scripts which uses ultraschall API already !
X-Raym is offline   Reply With Quote
Old 01-14-2020, 11:03 AM   #379
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

Oh, didn't know that
How can I find them. Via ReaPack?
One thing still missing, that I should write a small code-snippet for insertion into such a script, that gives feedback to the user, if Ultraschall-API is not installed.
ToDoList.



In regards of FXStateChunk, I need yours, as mine may not have the problems yours have, so I may not be able to reproduce the buggy behavior.
At least, I tried yesterday to no avail.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-14-2020, 11:13 AM   #380
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,550
Default

Quote:
Originally Posted by mespotine View Post
Oh, didn't know that
How can I find them. Via ReaPack?
One thing still missing, that I should write a small code-snippet for insertion into such a script, that gives feedback to the user, if Ultraschall-API is not installed.
Try:
Code:
local UltraSchall, err = loadfile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")
if err then reaper.MB("Couldn't load Ultraschall:\n\n"..err, 0); return; end
UltraSchall()
For performance you'd be better off having US return itself so it can be stored in a local variable rather than a global. The difference can be significant for scripts accessing it frequently.
Lokasenna is offline   Reply With Quote
Old 01-14-2020, 11:14 AM   #381
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

Thanks, will try that.

Everything that makes the stuff faster is appreciated
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-14-2020, 11:37 AM   #382
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

this how I put the dependency in my scripts


Code:
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")

if not (ultraschall and ultraschall.CopyMediaItemToDestinationTrack and ultraschall.AddItemSpectralEdit) then
  reaper.ShowConsoleMsg("Please Install Ultraschall API via Reapack\nhttps://raw.githubusercontent.com/Ultraschall/ultraschall-lua-api-for-reaper/master/ultraschall_api_index.xml")
  return false
end

Advantages :
  • Users have full detailed about the missing stuffs and how to install them
  • it is in console so they can copy the link easily
  • it does check for the necessary functions used in the script
I'll have to compare with lokasenna method though for the "local" improvements.

---
Not all ultraschall scripts are shared publicly, especially because it allows complex functions so it is used for very specific workflow which are not always shared, but for those which are just CTRL+SHIFT+F in a code editor (usually, search in content of all files) in the REAPER / Scripts folder and search for ultraschall. You will have all scripts with used it :P


But I have to admit that I have more ultraschall scripts in my private repo and test files than shared publicly !


Anyway, your API is useful ! I'm not the only one who have commented this thread so far :P There is various things for which having to code solutions from scratch would have been very tedious (like spectrogram edit).


EDIT: GetProject_Extensions also very useful.
X-Raym is offline   Reply With Quote
Old 01-20-2020, 10:19 AM   #383
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

I have noticed, that the Render-preset-functions quit working, due some changes in the way, render-presets are stored since Reaper 6.

I'm on my way of fixing(or better reimplementing) them, but that also means, that the next update will require Reaper 6.02 and later.

So be prepared for that.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-20-2020, 11:57 AM   #384
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

Quote:
So be prepared for that.
I was born ready !
X-Raym is offline   Reply With Quote
Old 01-22-2020, 09:01 AM   #385
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

4.00 Beta 2.80: - "Starsailor - Four to the Floor"

Note: Ultraschall-API needs now Reaper 6.02 or higher. Please update to Reaper 6. It's worth it!

Has now 1079 functions, with 20 new ones and 23 deprecated ones removed

new in this release:
  • Improved Defer Management
    Ultraschall.Defer allows you now to set and get the timer-settings of a given ultraschall.Defer-cycle.
    You can even do this from the outside of the deferred script!
    You can also protect now ultraschall.Defer-cycles from being stopped from the outside.
  • Rendering functions
    The RenderPreset-functions do work again, after some changes in the way Reaper stores render-presets since Reaper 6.02.
    They also allow you to use: preset-names with spaces. (I know, this should have been in there from the beginning... )
  • GetItem_ClickState
    Is now fully functional. That means, if you call this function in every defer-cycle of a script, you can actually monitor clicked and dragged MediaItems.
    This will open up new ways of editing and item-manipulation, like RippleDrag, etc.
  • FXStateChunk
    They can now be counted, added, removed and gotten. Means: I added the missing functions for working with them, so you can fully work with FXStateChunks now.
    XRaym will love that
  • GetProjectLength
    unlike Reaper's own API-function GetProjectLength, this one returns the end of the last itemedge, the last regionedge, marker and time-sigmarker
  • Easy Clipboarding
    FromClip and ToClip allow you now to get/put strings from/to the clipboard without having to type gazillions of characters.
  • GetProject and GetTrackState-functions
    I completely reworked most of them, so they will now return all values, even those, which I haven't put into the docs yet.
    That means, if the devs add new values, you can retrieve them right away, without being dependent on me to add them.
    Will do the same with the Set-functions in the future.

New features in 4.00beta2.80
  • Helper functions: FloatCompare - compares two float-numbers, with the a chance to set a precision to compare against(thanks to fernsehmuell)
  • Helper functions: FromClip - gets a string from the clipboard
  • Helper functions: ToClip - puts a string into the clipboard
  • DeferManagement: GetDeferCycleSettings - allows getting mode and timer-settings of running ultraschall.Defer-cycles at runtime and even from the outside of the deferred script
  • DeferManagement: SetDeferCycleSettings - allows setting mode and timer-settings of running ultraschall.Defer-cycles at runtime and even from the outside of the deferred script
  • FXManagement: CountFXStateChunksInStateChunk - counts the FXStateChunks within a Project-/Track-/ItemStateChunk(requested by XRaym)
  • FXManagement: RemoveFXStateChunkFromTrackStateChunk - removes a FXStateChunk from a TrackStateChunk(requested by XRaym)
  • FXManagement: RemoveFXStateChunkFromItemStateChunk - removes a certain FXStateChunk from an ItemStateChunk(requested by XRaym)
  • MediaItems: GetEndOfItem - returns the endposition of a MediaItem(thanks to fernsehmuell)
  • MediaItems: GetAllMediaItemAttributes_Table - returns all attributes of a MediaItem as a handy table(requested by fernsehmuell)
  • MediaItems: GetAllSelectedMediaItemsBetween - returns all selected MediaItems between start- and endposition within certain tracks of your choice(requested by fernsehmuell)
  • MediaItems: SetAllMediaItemAttributes_Table - sets all attributes of a MediaItems using an attributes table, like the one returned by GetAllMediaItemAttributes_Table(requested by fernsehmuell)
  • Reaper Internals: Jumping_FX_Button_in_TCP-demo.zip - demoes, how Set/GetLayout-functions work; includes a demo theme and a script, that influences it, including comments
  • Reaper Internals: RenderPreset-Configfile.txt - documentation of the Render-Presets of Reaper
  • Reaper Internals: Reaper-ProjectDefault-ConfigSettings.txt - documents all reaper.ini-entries, responsible for default project settings
  • Reaper Internals: Reaper-StuffMidiMessage-Codes(engl_shortlist).txt - holds all messages and their meaning for StuffMIDIMessage
  • Reaper Internals: StuffMidiMessage-docs.txt - describes the usage of the StuffMIDIMessage-function
  • Render Management: GetRender_EmbedStretchMarkers - gets the current state of the "Embed stretch markers/transient guides"-checkbox from the Render to File dialog
  • Render Management: SetRender_EmbedStretchMarkers - sets the current state of the "Embed stretch markers/transient guides"-checkbox from the Render to File dialog
  • ProjectManagement: GetProjectState_NumbersOnly - returns all numerical values, associated with a certain state
  • ProjectManagement: GetProject_PooledEnvAttach - gets the pooled-envattach-state
  • ProjectManagement: GetProjectLength - gets the length of the current active project, as well as the position of the last itemedge, regionend, marker, time-sig-marker(requested by rstockm)
  • TrackManagement: GetTrackState_NumbersOnly - returns all numerical values, associated with a certain state
Changes from Beta 2.79 to Beta 2.80
  • API: deprecated - allows showing a warning message, if a script uses a deprecated function in a script; will be shown only once until Reaper restarts, so scripts are stil useable
  • Defer Management: GetDeferIdentifier - removed
  • Defer Management: GetDeferRunState - removed Defer01-Defer20 management; threw Lua-error, when passing nonstring as identifier -> fixed
  • Defer Management: Defer1 through Defer20 - removed
  • Defer Management: Defer - mode and timer can also be set now from the outside of the defer-cycle; can now be protected from stopping it from the outside; couldn't be stopped from the outside when mode~=2 -> fixed
  • Defer Management: GetDeferRunState - was missing parameters in the docs due typo -> fixed
  • Defer Management: StopDeferCycle - didn't work, when mode=2 of a ultraschall.Defer-cycle -> fixed
  • Docs: DeferScripts_004_Working_with_Defer_Identifiers - removed
  • Docs: Defer - reworked docs and removed all references to Defer1 through Defer20
  • Docs: JS-Extension - updated to 0.998
  • Docs: Reaper - updated to Reaper 6.03
  • Docs: render-codes-decoded-base64-strings.txt - removed last 00-byte in every string(except DDP), as it was wrongly there
  • Event Manager: Eventmanager_RemoveEvent - couldn't be found due typo in new module-loader -> fixed (thanks to rstockm)
  • Event Manager: EventManager_RemoveAllEvents_Script - couldn't be found due typo in new module-loader -> fixed
  • Helper functions: Base64_Decoder - removed small bug, which added a nullbyte at end of strings
  • MediaItems: GetSelectedMediaItemsAtPosition - sped up a little; returns now a MediaItemStateChunkArray as well
  • ProjectManagement: GetProject_AddMediaToProjectAfterRender - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_AutoCrossFade - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_CursorPos - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_DefPitchMode - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_EnvAttach - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_Feedback - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_GlobalAuto - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_Grid - simplified implementation, future values added by Reaper-devs will now be returned properly
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-22-2020, 09:01 AM   #386
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

  • ProjectManagement: GetProject_GroupDisabled - simplified implementation, future values added by Reaper-devs will now be returned properly; didn't return anything, when no groups were disabled -> fixed
  • ProjectManagement: GetProject_GroupOverride - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_HorizontalZoom - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_ItemMixBehavior - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_Lock - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_Loop - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_LoopGran - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterAutomode - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterFXByp - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterMuteSolo - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterNChans - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterPanMode - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterSel - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterTrackColor - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterTrackHeight - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterTrackView - didn't return the new values added in recent Reaper-versions -> fixed and stabilized
  • ProjectManagement: GetProject_MasterTrackView - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterVolume - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MasterWidth - simplified implementation, future values added by Reaper-devs will now be returned properly; didn't return 1 in case of +100 width -> fixed
  • ProjectManagement: GetProject_MaxProjectLength - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_MixerUIFlags - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_PanLaw - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_PanMode - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_PeakGain - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_Playrate - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_ProjOffsets - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_RecMode - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_RenderDitherState - simplified implementation, future values added by Reaper-devs will now be returned properly; updated docs with new options like embed stretch markers
  • ProjectManagement: GetProject_RenderFreqNChans - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_RenderRange - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_RenderResample - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_RenderSpeed - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_RenderStems - simplified implementation, future values added by Reaper-devs will now be returned properly; updated docs with new rendering selected tracks/media through master-options
  • ProjectManagement: GetProject_RippleState - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_SMPTESync - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_SampleRate - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_Selection - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_TakeLane - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_Tempo - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_TempoTimeSignature - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_TimeBase - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_Timemode - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_TrackMixingDepth - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_UseRecConfig - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_VerticalZoom - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: GetProject_VideoConfig - simplified implementation, future values added by Reaper-devs will now be returned properly
  • ProjectManagement: SetProject_RenderDitherState - updated docs with new options like embed stretch markers
  • ProjectManagement: SetProject_RenderStems - updated docs with new rendering selected tracks/media through master-options
  • Reaper Internals: render-codes-decoded-base64-strings.txt - added new settings for AIFF
  • Render Management: AddRenderPreset - supports now embed stretch markers-checkbox; works only with render-presets as of Reaper 6; supports now presetnames with spaces in it
  • Render Management: ApplyRenderTable_Project - supports now embed stretch markers-checkbox as of Reaper 6
  • Render Management: ApplyRenderTable_ProjectFile - supports now embed stretch markers-checkbox as of Reaper 6
  • Render Management: CreateRenderCFG_AIFF - added Embed Beat Length-checkbox, as included with Reaper 6
  • Render Management: CreateNewRenderTable - added new "Embed stretch markers/transient guides"-settings as of Reaper 6; CloseAfterRender wasn't accepted as boolean -> fixed
  • Render Management: GetRenderCFG_Settings_AIFF - returns Embed Beat Length-checkbox, as included with Reaper 6
  • Render Management: GetRenderPreset_Names - reimplemented; supports now presetnames with spaces in them as well
  • Render Management: GetRenderTable_Project - supports now "Embed stretch markers/transient guides"-settings as of Reaper 6
  • Render Management: GetRenderTable_ProjectFile - supports now "Embed stretch markers/transient guides"-settings as of Reaper 6
  • Render Management: GetRenderPreset_RenderTable - reimplemented due changed reaper-render.ini-format in Reaper 6, should be more stable now; backwards compatible to old Reaper 5 presets
  • Render Management: DeleteRenderPreset_Bounds - supports now presetnames with spaces in it
  • Render Management: DeleteRenderPreset_FormatOptions - supports now presetnames with spaces in it
  • Render Management: IsValidRenderTable - checks now as well new "Embed stretch markers/transient guides"-settings as of Reaper 6
  • Render Management: RenderProject_RenderTable - supports now new Embed stretch markers/transient guides-checkbox as of Reaper 6
  • Render Management: SetRenderPreset - supports now new Embed stretch markers/transient guides-checkbox as of Reaper 6; supports now spaces in preset-names as well
  • TakeManagement: GetFXStateChunk - parameter TakeFXChain_id wasn't optional due typo -> fixed(thanks to XRaym)
  • TakeManagement: SetFXStateChunk - docs were unclear, that only setting NOT inserting is possible; could crash, if no FXStateChunk for setting could be found -> fixed(thanks to XRaym)
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-22-2020, 09:02 AM   #387
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

  • TrackManagement: GetTrackPeakColorState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackBeatState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackAutoRecArmState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackMuteSoloState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackIPhaseState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackIsBusState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackBusCompState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackShowInMixState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackFreeModeState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackRecState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackVUState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackHeightState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackINQState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackNChansState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackBypFXState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackPerfState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackMIDIOutState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackMainSendState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackLockState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackAutomodeState - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackMidiCTL - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackWidth - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackPanMode - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackScore - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • TrackManagement: GetTrackVolPan - improved implementation, it returns now new values as well, who are added by the Reaper-devs and aren't documented yet
  • User Interface: GetReaperWindowPosition_Left - removed
  • User Interface: GetReaperWindowPosition_Right - removed
  • User Interface: GetItem_ClickState - remembers now the dragged item+take, even if mouse-cursor is not above it anymore


Please update your ReaPacks: https://github.com/Ultraschall/ultra..._api_index.xml
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-22-2020, 09:06 AM   #388
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

Please test the new Render-Preset-functions. I had to completely reimplement them, as Reaper 6 changed the way the reaper-render.ini works.

I did as good as I could, and I tried to make GetRenderPreset_RenderTable backwards compatible, so you can still read the render-presets stored with Reaper 5.
https://mespotin.uber.space/Ultrasch...et_RenderTable

I hope I managed to pull it off, but I fear, I missed some edge-cases as they were quite complicated to rewrite.
So if you could test them and find all bugs I missed, it would be awesome.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-22-2020, 09:50 AM   #389
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

  • Quote:
    XRaym will love that
Indeed ! Thx


Small question though,


do I need to take care of every line indentation or is your function agnostic to this ?


Cause I want to use FXchain file, and I want and to know if I have to indent every line when parsing the file.


(I notice that I also have to add
Code:
FXStateChunk = "<TAKEFX\n" .. FXStateChunk .. ">"

so fxchainf ile content pass
Code:
 ultraschall.IsValidFXStateChunk(FXStateChunk)
  • Quote:
    GetProjectLength
    unlike Reaper's own API-function GetProjectLength, this one returns the end of the last itemedge, the last regionedge, marker and time-sigmarker
I don't need it right now, but just to be sure, have you take care of last envelope points ? :P
Also, what about =START =END marker ? Is it taken into account, as it would be expcted ?


Thanks for your support !
X-Raym is offline   Reply With Quote
Old 01-22-2020, 09:59 AM   #390
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

I don't succeed to use the Set FX chain chunk function, even with plain strings;


Can you show an exemple of the format expected by this function ?


Thx :P
X-Raym is offline   Reply With Quote
Old 01-22-2020, 10:04 AM   #391
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

Code:
      FXStateChunk = "<TAKEFX\n" .. FXStateChunk .. ">"
      if ultraschall.IsValidFXStateChunk(FXStateChunk) then
        Msg("FX Valid")
        retval, StateChunk = reaper.GetItemStateChunk( item, '', false )
        Msg(StateChunk)
        --retval = xpcall(  ultraschall.SetFXStateChunk, Msg, StateChunk, FXStateChunk )
        --Msg(retval)
        take_id = reaper.GetMediaItemInfo_Value( item, "I_CURTAKE" )
        retval, alteredStateChunk = ultraschall.SetFXStateChunk(StateChunk, FXStateChunk, take_id)
        Msg(retval)
        reaper.SetItemStateChunk( item, alteredStateChunk, true )
      end
    end

Here is my code (I use the function with Take FX)
X-Raym is offline   Reply With Quote
Old 01-22-2020, 10:12 AM   #392
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

1) You get the MediaItemStateChunk
2) You get the right FXStateChunk(every take has its own FXStateChunk) from that MediaItemStateChunk
3) You modify that FXStateChunk
4) You set THE SAME FXStateChunk into the same Take, by using the same take_id you used in step 2
5) You set the MediaItemStateChunk to the MediaItem.

Be aware, that set does not add FXStateChunks, so you may need to insert one first.
Don't remember right now, but I think, that Takes may have no FXStateChunk at all, if it hasn't been added yet.


And while I was writing this, I think, I should doublecheck exactly that, so I can don't just return all existing FXStateChunk, but also, if a certain take hasn't got one.
Otherwise, take_id would not be take_id but rather FXStateChunk_id, which would be confusing.



GetProjectLength doesn't(yet) take envelope-points into account. I may add that at a later date, but I need to find a way to make that efficient.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-22-2020, 10:20 AM   #393
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

Can you post me, how you get the contents of the variable FXStateChunk in your examplecode?
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-23-2020, 09:31 AM   #394
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

Hotfix1 - 23rd of January 2020

Changes:
- FXManagement: GetFXStateChunk - counted FXStateChunks, not Takes by parameter TakeFXChain_id -> fixed(thanks to XRaym)
- FXManagement: RemoveFXStateChunkFromItemStateChunk - counted FXStateChunks, not Takes by parameter take_id -> fixed(thanks to XRaym)
- FXManagement: SetFXStateChunk - counted FXStateChunks, not Takes by parameter TakeFXChain_id -> fixed(thanks to XRaym)

Please update your ReaPacks.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-23-2020, 09:33 AM   #395
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

@XRaym

I've debugged the functions one more time. However, I think, that the script you've sent me has issues on the general understanding of how FXChains work, as one loop expects FXChains in its condition, though you get the FXChain within that loop, not before.

Long story short, I wrote a basic demo-script, on how to work with them, so you can get a better idea on that:

Code:
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")

-- Examplecode on how to toggle bypass with FXStateChunks in TakeFX by Meo Mespotine 23rd of January 2020
    bypasstoggle=1 -- set it to 1 to bypass, set it to 0 to unbypass FX of Takes


-- the following order is essential. If you leave out one of them or mix them up...you're out of luck

-- first, you need get the StateChunk
    MediaItem          = reaper.GetMediaItem(0, 0)
    B0, ItemStateChunk = reaper.GetItemStateChunk(MediaItem, "", false)

-- get the FXStateChunk. Before that, you cannot do anything with the FXStateChunks!
    FXStateChunk       = ultraschall.GetFXStateChunk(ItemStateChunk, 1)

-- let's manipulate it to make all FX bypassed
    FXStateChunk       = string.gsub(FXStateChunk, "BYPASS.-\n", "BYPASS "..bypasstoggle.." 0 0\n")

-- after the FXStateChunk is manipulated, you can set it back into the ItemStateChunk
    C, ItemStateChunk  = ultraschall.SetFXStateChunk(ItemStateChunk, FXStateChunk, 1)

-- now you can set the statechunk into the MediaItem again
    Result             = reaper.SetItemStateChunk(MediaItem, ItemStateChunk, false)


-- update Arrangeview, so any changes in MediaItem-takes are shown
    reaper.UpdateArrange()

This should help you getting your script right, I hope.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-23-2020, 10:44 AM   #396
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

@mespotine
Thanks for your investigation !


Though, I don't see any difference with my code (a part that my FX chain is made in a diff

I'm sorry but I'm surely missing something obvious I just don't get it.


If you can try to see on my script directly this would help a lot. :S


I checked the version with the GetApiVersion function and it is the last one. (4.00Beta 2.80 - "Starsailor - Four to the Floor")
X-Raym is offline   Reply With Quote
Old 01-24-2020, 06:24 AM   #397
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

Look at line 78, which is the line that I don't get.

To me, this looks like you try to get the FXStateChunk in it BUT the earliest is the commented line 80, which would return the FXStateChunk into the variable retval, not the variable FXStateChunk.

That means, whatever you have in the variable FXStateChunk within that loop, it's not a FXStateChunk in the first place.
That's why adding "<TAKEFX\n" is making it somewhat valid. You try to make something, that isn't a FXStateChunk into one by patching it together with that string.

It's like writing Bible on the cover of the telephone-book. It may look like a bible but is still a telephone-book instead.

This is maybe the bug in there, maybe not.

With my testproject, I didn't have anything in FXStateChunk at all, but I could have used the script wrong.
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-24-2020, 06:51 AM   #398
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

Quote:
That means, whatever you have in the variable FXStateChunk within that loop, it's not a FXStateChunk in the first place.
In is indeed not a FXStateChunk... it is a FXChain file content... which are somehow dumped files of FxStateChunk (without first line of chunk), so I expect it to work :P


To continue your metaphor, it is like my telephone book is in fact the bible in the inside, not random phone numbers.



Have you tried with FXChain Files content ?
X-Raym is offline   Reply With Quote
Old 01-24-2020, 07:07 AM   #399
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,896
Default

No, I haven't yet.

How can I create one? Just exporting an FXChain in the FXChain-dialog? Never used that feature before...
__________________
Pronoun me with she/her, when referencing me, please. Thanks :)
Ultraschall-API - 1111 ReaScript functions for Reaper
Reaper Internals - Developerdocs4Reaper
mespotine is offline   Reply With Quote
Old 01-24-2020, 07:38 AM   #400
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 6,317
Default

There is many of them avaible for free on stash :P https://stash.reaper.fm/v/35108/TiltEQtest.RfxChain


To create them manually, just right click on FX chain of the track and item > FX CHAIN and then SAVE. it will be saved in user resource / FXchains file with .fxchain extension (if I'm correct).
X-Raym 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 10:09 PM.


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