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

Reply
 
Thread Tools Display Modes
Old 01-25-2020, 09:44 AM   #401
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

@XRaym:
You can try out the lastest pre-release, where the functions are available: https://forum.cockos.com/showpost.ph...6&postcount=28
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 01-26-2020, 06:55 AM   #402
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Quote:
Originally Posted by mespotine View Post
@XRaym
Ok, the next version of the API will feature functions to read RFXChain-files and return their contents as Track-FXStateChunk or Take-FXStateChunk.
You will also be able to save FXChains as RFXChain-files so exporting the stuff will be possible as well.

This looks promising, many thanks for your support !


Quote:
RFXChain-files are basically the contents of a FXStateChunk but do not contain the beginning <TRACKFX or <FXCHAIN Tags and the >-endtag.
Yep, and few others TRACKFX tags like BYPASS if I remember well.
X-Raym is offline   Reply With Quote
Old 02-02-2020, 09:31 AM   #403
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

FYI: If anyone's interested in doing Loop-rendering, head over to this thread and try the most recent pre-release:
https://forum.cockos.com/showthread....32#post2239532
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-05-2020, 02:26 PM   #404
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

4.00 Beta 2.9: - "Gentle Giant - Two weeks in Spain"

Has now 1111 functions, with 32 new ones

This is the last beta-release for the Ultraschall-API4.00 and the feature-freeze-version. Until the final one, I will only fix bugs.

new in this release:
  • Render_Loop
    You can render now loops, including so called "wet-loops" which are loops, who include reverb and other such effects.
    For them to be renderable properly, they need to "build up" the effects first until it sounds right.
    Render_Loop does exactly that with 2-pass-rendering. The first one is the part, which includes the loop itself+the effects-buildup.
    So it renders the part of the project until the reverb is build up fully+the actual part to be looped.
    The second pass will cut the actual loop out of the first-pass-render and put it where you want it to be.
    You can also influence the fadein/out time and style of the second-pass-rendering, so you can avoid clickings and pops due harsh cuts
    at the beginning or the end of a loop.
  • Secondary Rendering Support
    This is so hot, it only exists(yet) in pre-releases of Reaper. You can set a secondary render-format. And if you render your project, it will render out into both files.
    That means, you can render your project as WAV+MP3 at the same time.
    And all rendering-functions of Ultraschall-API support that new feature, including the current project, projectfiles, render-presets.
  • Marker-functions and Guids
    All marker/region-functions return now the guid of the marker/region as well. Which is really nice for storing additional metadata for markers/regions.
    You can also request the markers/regions by guid now.
  • Envelope States
    You can read now all envelope-states available. Setting will come soon as well.
  • GFX_Init
    Allows you now to center the window by setting x and/or y-position to nil
  • MoveFileOrFolder
    Tired of copying your files around when you just want to move them? Or folders? Behold: MoveFileOrFolder moves files and folders for you.
    This speeds up moving files around in Lua by magnitudes.
  • FXStateChunks and RFXChainFiles
    You can load/store FXStateChunks from/to RFXChainFiles, which are the FX-Chain-files you can save within the FX-Chain-window.
  • Capturing Screen and Windows
    You can now capture screens and windows for screenshots(CaptureScreenAreaAsPNG and CaptureWindowAsPNG).
    Thanks to edgemeal for that.
  • GetTCPWidth
    returns the width of the TrackControlPanel.
  • More and bugfixes
    as usual
New features in 4.00beta2.9
  • API: StuffMidiMessage-AllMessages_Englisch_Windows.ini - contains all names for all potential StuffMIDIMessage-messages
  • Docs: Concepts: DeferScripts_004_Manipulating_and_Protecting_Defer _loops - describes manipulation of ultraschall.Defer-cycles and how to protect them from manipulation
  • Docs: Concepts: ExtStateManagement_008_MarkerExtStates - describes the marker-extstate-functions
  • Envelope Management: GetEnvelopeState_Act - returns the values of the ACT-entry of a TrackEnvelope/EnvelopeStateChunk
  • Envelope Management: GetEnvelopeState_DefShape - returns the values of the DEFSHAPE-entry of a TrackEnvelope/EnvelopeStateChunk
  • Envelope Management: GetEnvelopeState_LaneHeight - returns the values of the LANEHEIGHT-entry of a TrackEnvelope/EnvelopeStateChunk
  • Envelope Management: GetEnvelopeState_EnvName - returns the envelope-name and possible additional values, if it's an FX-envelope
  • Envelope Management: GetEnvelopeState_NumbersOnly - returns all values of a parameter from an EnvelopeStateChunk, including the undocumented ones when the devs add them
  • Envelope Management: GetEnvelopeState_PooledEnvInstance - returns the attributes of an automation-item within an EnvelopeStateChunk, including the undocumented ones when the devs add them
  • Envelope Management: GetEnvelopeState_PT - returns the attributes of an envelope-point within an EnvelopeStateChunk, including the undocumented ones when the devs add them
  • Envelope Management: GetEnvelopeState_Vis - returns the values of the VIS-entry of a TrackEnvelope/EnvelopeStateChunk
  • File Management: MoveFileOrFolder - moves a file or folder from its old path to a new path
  • FXManagement: GetAllRFXChainfiles - returns all RFXChainfiles currently available in ResourcePath/FXChains
  • FXManagement: GetRecentFX - returns the recent fx-list
  • FXManagement: LoadFXStateChunkFromRFXChainFile - loads an FXStateChunk from an RFXChain-file(requested by XRaym)
  • FXManagement: SaveFXStateChunkAsRFXChainfile - writes an FXStateChunk into an RFXChain-file(requested by XRaym)
  • Image Handling: CaptureScreenAreaAsPNG - captures a screenarea and writes it as png-file(written by edgemeal, big thanks for that!)
  • Image Handling: CaptureWindowAsPNG - captures a window-area and writes it as a png-file(written by edgemeal, big thanks for that!)
  • Image Handling: ResizePNG - resizes a png-file into a new file
  • KB.ini-Management: QueryKeyboardShortcutByKeyID - returns the actual shortcutname as stored by the modifier-key-values in reaper-kb.ini's KEY-entries
  • Metadata-Management: ProjExtState_CountAllKeys - counts the number of keys within a section of a ProjectExtState
  • MIDI-Management: QueryMIDIMessageNameByID - returns the midi-message-name of a midi-message as sendable using StuffMIDIMessage
  • Project Bay: IsValidProjectBayStateChunk - checks, if a ProjectBayStateChunk is a valid one
  • Project Bay: GetAllMediaItems_FromProjectBayStateChunk - returns all items from a ProjectBayStateChunk as MediaItemStateChunkArray
  • Project Management: GetRecentProjects - gets the last x recent projectfilenames, as listed in the recent projects-menu
  • Rendering: Render_Loop - renders a part of a project for later use as loop; supports also the creation of "wetloops" like ones with reverb(requested by musicbynumbers)
  • Scripts: US_Api_Examples_Working_with_FXStateChunks_and_Med iaItems.lua - example of working with FXChainStateChunks
  • Themeing: GetAllThemeLayoutNames - returns all layout-names and values of the current theme
  • Themeing: GetAllThemeLayoutParameters - returns all theme-layout-parameter attributes of the current theme
  • Ultraschall Soundboard: Soundboard_PlayFadeIn - starts a sound with fadein, when having the Ultraschall4.00-Soundboard installed
  • User Interface: GetHelpDisplayMode - returns the current help-display-mode
  • User Interface: GetTCPWidth - gets the current width of the TCP(requested by nofish)
  • User Interface: SetHelpDisplayMode - sets the current help-display-mode
  • User Interface: WiringDiagram_GetOptions - gets the current wiring-diagram-options
  • User Interface: WiringDiagram_SetOptions - sets the wiring-diagram-options


Changes from Beta 2.8 to Beta 2.9
  • ChildScripts: GetScriptParameters - produced Lua-error when no parameter was existing -> fixed
  • ChildScripts: GetScriptReturnvalues - docs fixed; didn't reset returnvalue-counter; produced Lua-error when no parameter was existing; had another stupid bug in it that I don't wanna mention... :/ -> fixed
  • ConfigurationManagement: GetIniFileValue - checks now, if the ini-file exists in the first place
  • Defer Management: Defer - returns now boolean always, as well as the defer_identifier
  • Envelope Management: GetArmState_Envelope - reimplemented, should now return future parameters as well, when added by the Reaper-devs
  • FileManagement: GetAllFilenamesInPath - returns now the paths with / as separator only
  • FileManagement: GetMediafileAttributes - did not recognize jpgs with exif-data -> should be fixed now(thanks to rstockm)
  • FileManagement: WriteValueToFile - produced Lua-error when passing a nil-value as filename_with_path -> fixed
  • FXManagement: GetFXStateChunk - counted FXStateChunks, not Takes by parameter TakeFXChain_id -> fixed
  • FXManagement: RemoveFXStateChunkFromItemStateChunk - counted FXStateChunks, not Takes by parameter take_id -> fixed
  • FXManagement: SetFXStateChunk - counted FXStateChunks, not Takes by parameter TakeFXChain_id -> fixed
  • GFX: GFX_Init - when x and/or y position are set to nil, the window will be centered now horizontally, vertically or both
  • Helper Functions: PrintProgressBar - did produce a Lua-error, when percentage==false -> fixed now
  • Marker Management: AddCustomMarker - returns now the indexnumber and guid of the newly added marker as well
  • Marker Management: AddEditMarker - returns now the guid of the marker; did not return the correct marker-id, but rather the shown id; did not add a : after _edit -> fixed
  • Marker Management: AddEditRegion - returns now the guid of the region; did not return the correct marker-id, but rather the shown id -> fixed
  • Marker Management: AddNormalMarker - returns now the guid of the marker; did not return the correct marker-id, but rather the shown id -> fixed
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-05-2020, 02:27 PM   #405
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

  • Marker Management: AddPodRangeRegion - returns now the guid of the region; did not return the correct marker-id, but rather the shown id -> fixed
  • Marker Management: EnumerateCustomMarkers - returns now the guid of the marker as well
  • Marker Management: EnumerateEditMarkers - returns now the guid of the marker as well
  • Marker Management: EnumerateEditRegion - returns now the guid of the region as well
  • Marker Management: EnumerateNormalMarkers - returns now the guid of the marker as well
  • Marker Management: GetAllCustomMarkers - returns now the guid of the marker as well
  • Marker Management: GetAllEditMarkers - returns now the guid of the editmarkers as well
  • Marker Management: GetAllMarkersBetween - returns now the guid of the markers as well
  • Marker Management: GetAllNormalMarkers - returns now the guid of the markers as well
  • Marker Management: GetAllRegions - returns now the guid of the regions as well
  • Marker Management: GetAllRegionsBetween - returns now the guid of the regions as well
  • Marker Management: GetMarkerAndRegionsByIndex - returns now the guid of the found marker as well
  • Marker Management: GetMarkerByName - returns now an array of guids as well; returned marker-numbers weren't useable with Reaper's own marker-functions due off by 1-error -> fixed
  • Marker Management: GetMarkerByName_Pattern - returns now an array of guids as well; returned marker-numbers weren't useable with Reaper's own marker-functions due off by 1-error -> fixed
  • Marker Management: GetMarkerByScreenCoordinates - retina will now be automatically set; parameter retina removed(please update your scripts!)
  • Marker Management: GetMarkerByTime - retina will now be automatically set; parameter retina removed(please update your scripts!)
  • Marker Management: GetPodRangeRegion - returns now the guid of the podrangeregion as well
  • Marker Management: GetRegionByScreenCoordinates - retina will now be automatically set; parameter retina removed(please update your scripts!)
  • Marker Management: GetRegionByTime - retina will now be automatically set; parameter retina removed(please update your scripts!)
  • Marker Management: GetTimeSignaturesByScreenCoordinates - had typo in functionname, which I corrected(old scripts will still run);retina will now be automatically set; parameter retina removed(please update your scripts!)
  • Marker Management: GetTimeSignaturesByTime - retina will now be automatically set; parameter retina removed(please update your scripts!)
  • Miscellaneous: WinterlySnowflakes - did produce Lua-error, when number of snowflakes was >5000; limited to 5000 now
  • ParmAlias: GetParmAlias_MediaTrack - had wrong functionname in error-messages -> fixed
  • ParmAlias: Docs - all functions ParmLearn-function in the docs move to proper subchapters for clearer index-navigation
  • Project Management: GetAllMediaItems_FromProjectBayStateChunk - didn't return ProjectBayStateChunk properly -> fixed
  • Project Management: GetProject_RenderCFG - returns now the render-cfg-string for the secondary renderformat as well
  • Project Management: SetProject_RenderCFG - allows now setting of secondary render-format as well; backwards compatible with old scripts, who set only primary rendering format in ProjectStateChunks
  • Rendering: AddRenderPreset - allows now adding the render-cfg-string for secondary renderformat as well; had inner variable exposed -> fixed
  • Rendering: ApplyRenderTable_Project - allows now setting the render-cfg-string for secondary renderformat as well
  • Rendering: CreateNewRenderTable - allows now adding the render-cfg-string for secondary renderformat as well; had wrong functionname in docs -> fixed
  • Rendering: DeleteRenderPreset_FormatOptions - deletes now the render-cfg-string for secondary renderformat, if existing
  • Rendering: GetRenderPreset_RenderTable - returns now possible render-cfg-string for secondary renderformat as well; some error-messages didn't work -> fixed
  • Rendering: GetRenderTable_Project - returns now a render-cfg-string for secondary renderformat
  • Rendering: GetRenderTable_ProjectFile - returns now a render-cfg-string for secondary renderformat
  • Rendering: IsValidRenderTable - checks now for the render-cfg-string for secondary renderformat as well
  • Rendering: RenderProject - allows now setting the render-cfg-string for secondary renderformat as well; checks now, if projectfilename is a valid project
  • Rendering: RenderProject_RenderTable - allows now setting the render-cfg-string for secondary renderformat as well; checks now, if projectfilename is a valid project
  • Rendering: SetRenderPreset - allows now setting the render-cfg-string for secondary renderformat as well; set RenderString2="" to remove the secondary renderformat
  • Track Management: GetTrackState_NumbersOnly - had wrong description in the docs -> fixed
  • User Interface: GetHWND_ArrangeViewAndTimeLine - moved to User Interface -> Reaper-Windowhandler in the index of the docs


Note: the next releases will get no new features, only bug-fixes!
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-05-2020, 03:07 PM   #406
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 1,701
Default

This is amazing work, Mespotine!

Do you know if there would be any way to do the following request via the new Envelope States Setting functions that are coming?

https://forum.cockos.com/showthread.php?t=231043
Klangfarben is offline   Reply With Quote
Old 02-05-2020, 03:08 PM   #407
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

If you can show me, where in an statechunk this is stored, then I could try to attempt this.

Edit: I meant statechunk or somewhere
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-05-2020, 03:36 PM   #408
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Thx for the release !



There is an issue in
Quote:
function ultraschall.SetFXStateChunk(StateChunk, FXStateChunk, TakeFXChain_id)

Code:
StateChunk=StateChunk:sub(1,Start-1)..FXStateChunk:sub(2,-1)..StateChunk:sub(Stop+1,-1)

should be


Code:
StateChunk=StateChunk:sub(1,Start-1)..FXStateChunk:sub(1,-1)..StateChunk:sub(Stop+1,-1)

else it is missing < before TAKEFX


That was a really hard one to find... took me two hours --'
X-Raym is offline   Reply With Quote
Old 02-05-2020, 03:51 PM   #409
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Oops...fixing. Thanks.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-05-2020, 04:54 PM   #410
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Thx !


Also, the SetFxChain funciton doesn't work if there wasn't an FX chain already because of
Quote:

if OldFXStateChunk==nil then ultraschall.AddErrorMessage("SetFXStateChunk", "TakeFXChain_id", "no FXStateChunk found", -4) return false end

Is there a way to initiate this FX chain from iltraschall API ? Or should I add a dummy FX ?
X-Raym is offline   Reply With Quote
Old 02-05-2020, 05:01 PM   #411
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Quote:
Originally Posted by mespotine View Post
If you can show me, where in an statechunk this is stored, then I could try to attempt this.

Edit: I meant statechunk or somewhere
That's the problem, apparently the state isn't stored in the state chunk, or I couldn't find it. Do you have any idea where we could look for it besides the chunk?
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 02-05-2020, 05:08 PM   #412
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

I'll have a look but not within tge next few weeks.

@Xraym
Ok, I thought I had added an AddFXStateChunk function but I'll add it to the set-function.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-06-2020, 10:23 AM   #413
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Hotfix1

Build: 43000 - Hotfix1 from 6th of February 2020

Changes:
- FXManagement: SetFXStateChunk - allows now adding FXStateChunks to StateChunks with no existing FXStateChunk as well; didn't add FXStateChunks correctly under some circumstances -> fixed(thanks to XRaym)
- Image Handling: CaptureScreenAreaAsPNG - doesn't work on Mac under some still unknown circumstances
- Image Handling: CaptureWindowAsPNG - doesn't work on Mac under some still unknown circumstances

Please update your ReaPacks.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-06-2020, 11:47 AM   #414
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@mespotine
What version number is supposed to be this released with ultraschall.GetApiVersion() ?

I get 400.029

I wonder my update sync failed somehow as FX chain as still same issue with take without fx chain already ^^


(and the online doc don't relfect the last build)
X-Raym is offline   Reply With Quote
Old 02-06-2020, 12:07 PM   #415
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

The version 400.029 is the official one, the build number is only relevant for me. At least til now. I may add that to the GetApiVersion-function as well.

Unless I already did that and messed that up

Edit: Can you post me the size of the file ultraschall_functions_FXManagement_Module.lua?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-06-2020, 12:34 PM   #416
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Hotfix 2

Changes:
- API: GetApiVersion - returns now the build-number as well

@XRaym:
Can you post me a simple demo-script with all(!) files affected, like RFXChain, etc, which demonstrates this behavior? I definitely need to have a look at your stuff directly, as I'm currently stumbling through the dark.
My own FXChains obviously don't reflect the problems yours do and I have no idea what and how to fix.

Edit: to clarify, a full demo-script, not just snippets, so I can go along every step in the code and see, where the problem actually starts.
The other alternative would be, that I simply remove the functions from the API for the time being, until I have time to go deeply into it. So everything that makes me getting the bug is very very very helpful.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-06-2020, 12:35 PM   #417
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

129 Ko (132 448 octets)


2639 lines



I know I have modified manually but any reapack update should overvrite local modifications, isn't it ?
X-Raym is offline   Reply With Quote
Old 02-06-2020, 12:39 PM   #418
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Quote:
Originally Posted by X-Raym View Post
129 Ko (132 448 octets)


2639 lines



I know I have modified manually but any reapack update should overvrite local modifications, isn't it ?
This seems to be the wrong file, as the number of lines should be 2449. I suggest to reinstall the API completely.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-06-2020, 12:44 PM   #419
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@mespotine
It works !!


it was just that I had ultraschall.ShowLastErrorMessage() which still warn that there is no FX chain in the take initially (despite the fact it is not an error anymore), but as the rest of the script now works I can delete it.


Just a side note,


GetApiVersion returned date is 1 june 2019, and the third returned value is an empty string (I thought it should be date but here is how it works)
Code:
  a = {}
  a.versionnumber, a.version, a._, a.beta, a.tagline, a.date, a.build = ultraschall.GetApiVersion()

Maybe I just misread the API doc as it is not up to date.


Thanks for your work anyway !


I will tell n0ne that these functions are available for FastFX Finder
X-Raym is offline   Reply With Quote
Old 02-06-2020, 12:51 PM   #420
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Geez...I'm so happy I'm off that bug. *clears away the dust from my shoulders*

Quote:
GetApiVersion returned date is 1 june 2019, and the third returned value is an empty string (I thought it should be date but here is how it works)
Ooops...yep, this should be a different date there.

Fixed now with Hotfix 3.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-06-2020, 12:57 PM   #421
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

That wasn't simple for sure :P Congrats for the good job !

We will see how it goes with firther testing :P
X-Raym is offline   Reply With Quote
Old 02-06-2020, 12:57 PM   #422
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

FYI: By the way, I noticed, that in the script, you've sent me, you code the file-reading still "manually".
There's a bunch of functions for reading files in the US-API as well, like ReadFullFile. This makes this stuff way easier to code.

https://mespotin.uber.space/Ultrasch...l#ReadFullFile
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-06-2020, 01:38 PM   #423
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@mespotine
Thanks to your new load from fx chain file functions, I don't even need to parse FX chain files anymore. Code is even more straightforward.
X-Raym is offline   Reply With Quote
Old 02-06-2020, 01:39 PM   #424
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

And you can omit the path to the file, if you want to access them in FXChains in the resourcefolder
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-06-2020, 01:56 PM   #425
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Next tuesday, I will finalize the Ultraschall API 4.00, so from that point on, this isn't beta anymore.

Edit: Ahh..heck...let's finalize it right now
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

Last edited by Meo-Ada Mespotine; 02-08-2020 at 10:21 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-08-2020, 10:22 AM   #426
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

THE FINAL 4.00 OF ULTRASCHALL-API IS HERE.


4.00 - "Aphrodite's Child - Four Horsemen"

Changes from Beta 2.9 to Final
  • API: GetApiVersion - returns now the build-number as well
  • API: Reapack-API-xml-generator.lua - fixed filename-creation for non-beta-versions
  • FileManagement: CheckForValidFileFormats - improved check for jpg and jpg with exif-metadata
  • FXManagement: SetFXStateChunk - allows now adding FXStateChunks to StateChunks with no existing FXStateChunk as well; didn't add FXStateChunks correctly under some circumstances -> fixed(thanks to XRaym)
  • Image Handling: CaptureScreenAreaAsPNG - doesn't work on Mac under some still unknown circumstances
  • Image Handling: CaptureWindowAsPNG - doesn't work on Mac under some still unknown circumstances

Please update your ReaPacks.


I will take a break from coding on this for a while and only add bugfixes, if some come across.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-08-2020, 12:12 PM   #427
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@mespotine
Many thx for your hard work !


But you deserve some rest for sure ! :P
X-Raym is offline   Reply With Quote
Old 02-08-2020, 12:31 PM   #428
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

But you all could help me one more time, and demand this thread becoming sticky

@Xraym
Thanks. I definintely need that. 1111 functions is more than enough to toy around
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-08-2020, 01:57 PM   #429
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Quote:
1111 functions is more than enough to toy around
I'm sorry to bother your after this release but I think I found a bug... :S



Code:
ultraschall.SetFXStateChunk

it doesnt seem work with active take by default but with last take,

and the take ID optional parameters doesn't work :S


Do I miss anything ?
X-Raym is offline   Reply With Quote
Old 02-08-2020, 02:17 PM   #430
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

If I understand correctly FXchunk ID is based on this line


Code:
  local Start, Stop = string.find(StateChunk, OldFXStateChunk, 0, true)

followed by


Code:
  StateChunk=StateChunk:sub(1,Start-1)..FXStateChunk:match("%s-(.*)")..StateChunk:sub(Stop+1,-1)

So several takes have empty string as OldFXStateChunk, then it could fails.


Not sure if this is the issue but maybe it is.


What do you think ?
X-Raym is offline   Reply With Quote
Old 02-09-2020, 01:16 AM   #431
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

I think this code might also be problematic if two takes have similar FX chunk.


Maybe it worth experimenting with MPL take chunk extractor :


https://github.com/ReaTeam/ReaScript...TakeChunks.lua


Anyway, I know you said you want a pause of coding so please, do rest, and make sound instead ! You earned it


Thx again for your work !
X-Raym is offline   Reply With Quote
Old 02-11-2020, 10:29 AM   #432
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Ok so I run into various issue with utlraschall API fxchunks funciton so I push further the experimentation of mpl take extractor, and it seems I found solutions for my need just by using it.


It put explanations in this post : https://forum.cockos.com/showpost.ph...&postcount=124 and posted code snippet.


The problem in ultraschall API were the following


- a FX chain file created from a track with channels count > 2 has REQUIRED_CHANNEL %d as first line. This broke the ultraschall get fx chain file functions, so I had to get back to the regular way of getting them (with file I/O lua)

- There was various issues with take id support, like getting FX chain of a multi take situation, if one of the take didn't have FX while the other had one.


In the end, working on take chunks (thanks to mpl take chunks extractor) rather than full item chunk prevent all issue involving take IDs.


Anyway, thanks for all your work once again,

Now that I have a valid solutions, you can rest safely, I will not disturb you more haha ^^


Cheers !
X-Raym is offline   Reply With Quote
Old 02-22-2020, 03:50 AM   #433
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
Default IsMarkerAtPosition

Hi Mespotine!

First of all - THANKS for giving us this box of magic, a lot of useful things!

I have a question about IsMarkerAtPosition, I am not sure if I am using this function the right way.

When running this code:

Code:
    local retval, count, markersstring, markersarray = ultraschall.IsMarkerAtPosition(reaper.GetCursorPosition())
    reaper.ShowConsoleMsg("IsMarkerAtPos? ".. tostring(retval) .."\n")
....I get false both when there is no marker AND when there are a marker!?
Shouldn't it give true if there is a marker at cursor position?

....Or is it because I'm on Linux when trying this I get wrong answer?
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad is offline   Reply With Quote
Old 02-22-2020, 10:33 AM   #434
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Could you post a simple example-project, where this happens? Then I'll check.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-22-2020, 11:06 AM   #435
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
Default

Quote:
Originally Posted by mespotine View Post
Could you post a simple example-project, where this happens? Then I'll check.
Great!


....however I think I found the problem - this function dont check
for tempo markers, right? Just ordinary markers?

I want to see if a tempo marker is at CursorPos.

I tested with ordinary markers and then it worked.

Is it possible to make function see tempo markers??
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad is offline   Reply With Quote
Old 02-22-2020, 11:28 AM   #436
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Yes, it only checks regular markers.

I thought, I had already added IsTimeSigmarkersAtPosition but haven't yet.

I'll put it on the list for the next dev-cycle.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-22-2020, 02:57 PM   #437
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
Default

Quote:
Originally Posted by mespotine View Post
Yes, it only checks regular markers.

I thought, I had already added IsTimeSigmarkersAtPosition but haven't yet.

I'll put it on the list for the next dev-cycle.
Ok, great - may I ask - what is time of a dev-cycle? ;-)
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad is offline   Reply With Quote
Old 02-22-2020, 03:31 PM   #438
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Quote:
Originally Posted by mespotine View Post
@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.
Do you have some more examples, best for each kind of StateChunk one example would be perfect. We would have the correct style, as a template. Your above example seems to be only for ItemStateChunks.
TonE is offline   Reply With Quote
Old 02-23-2020, 09:41 AM   #439
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Quote:
Originally Posted by tompad View Post
Ok, great - may I ask - what is time of a dev-cycle? ;-)
It'll start probably in April, as I need some time to rest. Only bugfixes until then.

@TonE
As there are some (un)known bugs in the FXStateChunk-functions, I'm going to debug them first, before posting examples. Will try to debug them mid-march, I think.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 02-23-2020, 11:27 AM   #440
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
Default

Quote:
Originally Posted by mespotine View Post
It'll start probably in April, as I need some time to rest. Only bugfixes until then.
Ok, I'm looking forward to April, understand you need rest after the FINAL 4.00 ULTRASCHALL-API. Take care!
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad 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 07:32 AM.


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