Old 07-01-2019, 09:28 AM   #1
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default Ultraschall-API - pre-release-thread

In this thread, I will post updates for unreleased versions of the Ultraschall-API.
You will be able to install the stuff for testing and giving me feedback, if the things don't work as expected or are too difficult to use.

This here is strictly unfinished stuff, will probably change heavily and some features may or may not make it into a final release.

When in doubt, just use the final release, head over to the official Ultraschall-API-thread: https://forum.cockos.com/showthread.php?t=214539
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635

Last edited by mespotine; 07-23-2019 at 08:58 AM.
mespotine is offline   Reply With Quote
Old 07-01-2019, 09:29 AM   #2
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

The next release-cycle will be for version 4.00-beta 2.76.

Focus will be:
- finalizing functions for Parameter-Learn and modulation
- localization
- loop-rendering

Will begin tomorrow with developing on that one.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 07-02-2019, 12:22 PM   #3
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

Ok, this pre-release-procedure is quite new for this project, so I just start with my current idea, of it working. Let's see where it leads us.

Download it with ReaPack using: https://github.com/Ultraschall/ultra...ease_index.xml

Pre-release-build: 38961.00 from 2nd of July 2019

New features
  • Actions: GetAllActions - gets all actions, actioncommandids and scriptnames of all actions in a specific section
  • FXManagement: AutoDetectVSTPlugins - auto-searches for the vst-plugin-folder
  • FXManagement: ScanDXPlugins - rescans all DX(DirectX)-plugins, optionally scans all or just the new ones
  • FXManagement: ScanVSTPlugins - rescans all vst-plugins, optionally clears vst-plugin-cache first
  • HelperFunctions: get_action_context_MediaItemDiff - gets the MediaItemDifference(position, start, end, length, offset) since last time calling this function. Good for ripple-drag-scripts.
  • Localize: Localize - localizes a string, using the texts from a translationfile; can be used with or without ultraschall. at the beginning
  • Localize: Localize_RefreshFile - reloads an already set translation-file, so translations can be updated at runtime
  • Localize: Localize_UseFile - sets a translationfile, that shall be used by function ultraschall.Localize
  • ReaMote: AutoSearchReaMoteSlaves - autosearches for new ReaMote-slaves
  • Render: AddSelectedItemsToRenderQueue - adds selected MediaItems to render-queue as either one render-queued-project or individual projects
  • Render: GetRenderingToFileHWND - gets the hwnd of the rendering-to-file-dialog, during rendering
  • Tools: ultraschall_Add_Developertools_To_Reaper.lua - allows installing developertools into Reaper
  • Tools: ultraschall_Remove_Developertools_From_Reaper.lua - allows removing already installed developertools from Reaper

Changes
  • API: versionscheck - had problems with pre/rc and dev-versions of Reaper -> fixed(reported by X-Raym)
  • Docs: updated Reaper-docs to 5.979 and JS-extension 0.989
  • Helpers: GetPath - when filename has no path, it returns now "", filename
  • Helpers: GetUserInputs - allows now setting width of the captions-fields(requested by Julian Sader), allows now commas in captions and default-values as well; title is now the one defined by the title-parameter(used to have temporary title previously) (reported by X-Raym)
  • Render: RenderProject_Regions - produced Lua-error, when passing a filename without extension and if region was <1, returns error-messages now in that case
  • Scripts: HWND-Displayer.lua - reimplemented, much more comfortable now with a lot of more features.
  • Tools - the following scripts renamed to:
    ultraschall_developertool_ActionlistToIni-Converter.lua
    ultraschall_developertool_Display-Altered-ConfigFile-Entries.lua
    ultraschall_developertool_Display-Altered-Config-Vars.lua
    ultraschall_developertool_Env_State_Diffs_Monitor. lua
    ultraschall_developertool_findConfigVarsToggledByA ctions.lua
    ultraschall_developertool_GetPitchShiftModes.lua
    ultraschall_developertool_gfx_deltablit_displayer. lua
    ultraschall_developertool_HWND-Displayer.lua
    ultraschall_developertool_Item_State_Diffs_Monitor .lua
    ultraschall_developertool_Project_State_Diffs_Moni tor.lua
    ultraschall_developertool_StateInspector.lua
    ultraschall_developertool_Track_State_Diffs_Monito r.lua
  • Tools: ultraschall_Remove_ExampleScripts_To_Reaper.lua - renamed to ultraschall_Remove_ExampleScripts_From_Reaper.lua, better name that way
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 07-03-2019, 09:40 AM   #4
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 194
Default

Thx! Back from holidays in a few days. I'll be testing the render regions thing then.
reapero is offline   Reply With Quote
Old 07-04-2019, 08:53 AM   #5
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

Render regions isn't done yet, only the changes I posted above. Will come in the next few days.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 07-04-2019, 08:56 AM   #6
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

New pre-release-version available, with the following additions and changes.
Install it, using: https://github.com/Ultraschall/ultra...ease_index.xml

Build: 39682

Additions:
  • FXManagement: DeleteParmAlias_FXStateChunk - deletes a parameter-alias-entry from a specific fx in an FXStateChunk
  • FXManagement: DeleteParmLFOLearn_FXStateChunk - deletes a parameter-lfo-learn-entry from a specific fx in an FXStateChunk
  • FXManagement: DeleteParmLearn_FXStateChunk - deletes a ParmLearn-entry from a specific fx in an FXStateChunk
  • FXManagement: SetFXStateChunk - sets an FXStateChunk into a TrackStateChunk or MediaItemStateChunk
  • FXManagement: SetParmAlias_FXStateChunk - sets a parameter-alias-entry from a specific fx in an FXStateChunk
  • FXManagement: SetParmLearn_FXStateChunk - sets a parameter-learn-entry from a specific fx in an FXStateChunk
  • FXManagement: SetParmLFOLearn_FXStateChunk - sets a parameter-lfo-learn-entry from a specific fx in an FXStateChunk

Changes:
  • FXManagement: GetFXStateChunk - when using MediaItemStateChunks, it allows now selecting, from which take to get the FXStateChunk
    • Localize: Localize - has now link to localize-fileformat in their description
    • Localize: Localize_RefreshFile - has now link to localize-fileformat in their description
    • Localize: Localize_UseFile - has now link to localize-fileformat in their description
    Notes on how to use the ParmLearn-functions:
  • Step 1: Get a Track/MediaItemStateChunk using GetTrackStateChunk/GetItemStateChunk
  • Step 2: Get the FXStateChunk using ultraschall.GetFXStateChunk
  • Step 3: Get/Set the setting(s) in the FXStateChunk
  • Step 4: Add the altered FXStateChunk to the original Track/ItemStateChunk using ultraschall.SetFXStateChunk
  • Step 5: Commit the altered Track/ItemStateChunk to the project, using SetTrackStateChunk

    Step 4 and 5 only, if you want to change something in the ParmLearn-settings

    Notes: Committing changes made with SetParmLFOLearn_FXStateChunk with SetTrackStateChunks doesn't work due a bug in Reaper, which changes it to a regular ParmLearn-entry.
    I've bugreported that already.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 07-07-2019, 09:31 AM   #7
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

New pre-release-version available, with the following additions and changes.
Install it, using:
https://github.com/Ultraschall/ultra...ease_index.xml

Build: 39790 - 7th of July 2019

Additions:
  • FXManagement: AddParmAlias_FXStateChunk - adds a parameter-alias-entry to an FXStateChunk
  • FXManagement: AddParmLearn_FXStateChunk - adds a parameter-learn-entry to an FXStateChunk
  • FXManagement: AddParmLFOLearn_FXStateChunk - adds a parameter-lfo-learn-entry to an FXStateChunk
  • FXManagement: CountParmAlias_FXStateChunk - counts parameter-alias-entries in an FXStateChunk
  • FXManagement: CountParmLearn_FXStateChunk - counts parameter-learn-entries in an FXStateChunk
  • FXManagement: CountParmLFOLearn_FXStateChunk - counts parameter-lfo-learn-entries in an FXStateChunk
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 07-12-2019, 08:48 AM   #8
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

Build: 39863 12th of July

Additions:
  • Tools: LangPack2Developer[cur]langpack[/cur]converter.lua - converts a language-pack into a developer-langpack, which displays the sections, in which every caption is located in the langpack
  • Tools: ultraschall_developertool_CheckForNewConfigVars.lu a - checks the individual lines of a string in clipboard for valid config-vars; thought I already had added that...
  • Track Management: AnyTrackMute - returns, if any track is muted; optionally includes the master-track as well


Changes:
  • Docs: FileType-Description - added missing info to ReaperConfigZip-Filetype-description
  • Docs: updated Reaper-docs to 5.980
  • Helpers: SplitStringAtLineFeedToArray - sped up by magnitudes, should now work much faster with megabyte-strings


You can download it using ReaPack and the pre-release-index-file:
https://raw.githubusercontent.com/Ul...ease_index.xml

Online docs for the pre-release-version: https://mespotin.uber.space/Ultrasch...Functions.html
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635

Last edited by mespotine; 07-12-2019 at 08:55 AM.
mespotine is offline   Reply With Quote
Old 07-21-2019, 12:24 PM   #9
lossius
Human being with feelings
 
Join Date: Jul 2011
Location: Bergen, Norway
Posts: 105
Default

Quote:
Originally Posted by mespotine View Post
(...)
Build: 39682

Additions:
  • FXManagement: DeleteParmAlias_FXStateChunk - deletes a parameter-alias-entry from a specific fx in an FXStateChunk
  • FXManagement: DeleteParmLFOLearn_FXStateChunk - deletes a parameter-lfo-learn-entry from a specific fx in an FXStateChunk
  • FXManagement: DeleteParmLearn_FXStateChunk - deletes a ParmLearn-entry from a specific fx in an FXStateChunk
  • FXManagement: SetFXStateChunk - sets an FXStateChunk into a TrackStateChunk or MediaItemStateChunk
  • FXManagement: SetParmAlias_FXStateChunk - sets a parameter-alias-entry from a specific fx in an FXStateChunk
  • FXManagement: SetParmLearn_FXStateChunk - sets a parameter-learn-entry from a specific fx in an FXStateChunk
  • FXManagement: SetParmLFOLearn_FXStateChunk - sets a parameter-lfo-learn-entry from a specific fx in an FXStateChunk

Changes:
  • FXManagement: GetFXStateChunk - when using MediaItemStateChunks, it allows now selecting, from which take to get the FXStateChunk
    • Localize: Localize - has now link to localize-fileformat in their description
    • Localize: Localize_RefreshFile - has now link to localize-fileformat in their description
    • Localize: Localize_UseFile - has now link to localize-fileformat in their description
    Notes on how to use the ParmLearn-functions:
  • Step 1: Get a Track/MediaItemStateChunk using GetTrackStateChunk/GetItemStateChunk
  • Step 2: Get the FXStateChunk using ultraschall.GetFXStateChunk
  • Step 3: Get/Set the setting(s) in the FXStateChunk
  • Step 4: Add the altered FXStateChunk to the original Track/ItemStateChunk using ultraschall.SetFXStateChunk
  • Step 5: Commit the altered Track/ItemStateChunk to the project, using SetTrackStateChunk

    Step 4 and 5 only, if you want to change something in the ParmLearn-settings

    Notes: Committing changes made with SetParmLFOLearn_FXStateChunk with SetTrackStateChunks doesn't work due a bug in Reaper, which changes it to a regular ParmLearn-entry.
    I've bugreported that already.
Thanks. I am currently testing this out, but hit upon a problem. Here is an excerpt from my code:

Code:
TrackStateChunk = ultraschall.GetProject_TrackStateChunk(ProjectFileNameWithPath, trackID + 1, 0)
FxStateChunk = ultraschall.GetFXStateChunk(TrackStateChunk)
reaper.ShowConsoleMsg("TrackStateChunk:\n\n"..(TrackStateChunk).."\n\n")
reaper.ShowConsoleMsg("-----------------------\n\n")
reaper.ShowConsoleMsg("FXStateChunk:\n\n"..(FxStateChunk).."\n\n")
When I print TrackStateChunk, I get the expected result. However when I print FxStateChunk, I get the following error message:

tl_Use 2 stereo FXs to process O1A ambisonics.lua:182: attempt to concatenate a nil value (global 'FxStateChunk')

Am I missing something obvious here?

Apart from that I also have a second question: Is there any way of providing the currently open project as "ProjectFileNameWithPath" rather than having to point to a saved version of the project?

Thanks!

PS: The spaces that show up in (TrackStateChunk) and (FxStateChunk) in line 3 and 5 of the code are due to the forum software formatting, and these spaces are not present in my own code. - Update: did as advised by nofish in his reply below.

Last edited by lossius; 07-22-2019 at 09:44 AM.
lossius is offline   Reply With Quote
Old 07-22-2019, 05:20 AM   #10
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 8,909
Default

Quote:
Originally Posted by lossius View Post
PS: The spaces that show up in (TrackStateChunk) and (FxStateChunk) in line 3 and 5 of the code are due to the forum software formatting, and these spaces are not present in my own code.
You can put your code between [_code_] [_/code_] tags (without the underscores) to prevent this.
https://forum.cockos.com/misc.php?do=bbcode#code
nofish is offline   Reply With Quote
Old 07-23-2019, 08:44 AM   #11
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

@Lossius
You should try the final release, which is discussed in the official release-thread:
https://forum.cockos.com/showthread.php?t=214539

If the problem persists, write me a bug-report over there and I'll try to fix it.

To get a TrackStateChunk of a track in the current project, you can safely use this function:
https://mespotin.uber.space/Ultrasch...nk_Tracknumber

Just pass over the tracknumber, with 1 for the first, 2 for the second, etc.
If you want to have the MasterTrack, pass 0 as tracknumber.

Edit: I think I see the problem, which is probably a problem in my code, which I'll fix. But if you follow my instructions above, this shouldn't be a problem for you.
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635

Last edited by mespotine; 07-23-2019 at 08:54 AM.
mespotine is offline   Reply With Quote
Old 07-23-2019, 08:57 AM   #12
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

New-Prerelease-version available

Build: 40316 - 23rd of July 2019

New features in 4.00beta2.77
  • Helper Functions: FindPatternsInString - finds all occurrences of a matching-pattern in a string

Changes from Beta 2.76 to Beta 2.77
  • API: functions - moved all functions into modules for future modular-concept
    Docs: GetRenderingToFileHWND - had parameters described, that don't exist -> fixed
    Helper Functions: GetUserInputs - did change the tables passed as default-retvals -> fixed now
    Helper Functions: IsValidMatchingPattern - moved to docs-index API-Helper functions -> Data Manipulation
    Helper Functions: SecondsToTime - moved to docs-index API-Helper functions -> Data Manipulation
    Helper Functions: SecondsToTimeString_hh_mm_ss_mss - moved to docs-index API-Helper functions -> Data Manipulation
    Helper Functions: TimeStringToSeconds_hh_mm_ss_mss - moved to docs-index API-Helper functions -> Data Manipulation
    Helper Functions: TimeToSeconds - moved to docs-index API-Helper functions -> Data Manipulation
    HWND: GetActionsHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetBatchFileItemConverterHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetConsolidateTracksHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetExportProjectMIDIHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetPreferencesHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetProjectDirectoryCleanupHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetProjectSettingsHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetRenderQueueHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetRenderToFileHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetRenderingToFileHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetSaveLiveOutputToDiskHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    HWND: GetVideoHWND - moved to docs-index User Interface -> Reaper-Windowhandler
    Project Management: GetProject_MasterGroupFlagsState - moved to correct docsindex Project Management
    Project Management: GetProject_MasterGroupFlagsState - moved to correct docsindex Project Management

You can download this pre-release via ReaPack: https://raw.githubusercontent.com/Ul...ease_index.xml
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 08-05-2019, 09:02 AM   #13
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

Prerelease-Build: 40533 - 4th of August 2019

Additions
  • EventManager: Ultraschall_EventManager.lua - first version of the EventManager-backgroundscript
  • ProjectManagement: GetProjectStateChunk - returns the ProjectStateChunk of the current project(finally working!)
Changes
  • Docs: Doc-Engine - had wrong parameters and retvals in numerous functions...fixed(ooops)
  • FXManagement: GetFXStateChunk - had layoutproblem, when the passed StateChunk was taken from a ProjectStateChunk -> fixed(thanks to Anton9?)


You can download this pre-release via ReaPack: https://raw.githubusercontent.com/Ul...ease_index.xml
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Old 08-06-2019, 07:39 AM   #14
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 1,394
Default

Build: 40540 - 6th of August 2019

Additions:
  • User Interface: GetMediaExplorerHWND - gets the HWND-windowhandler of the Media Explorer
  • User Interface: UpdateMediaExplorer - updates the listview of the Media Explorer
  • User Interface: MediaExplorer_OnCommand - runs an Media Explorer action(just like Reaper's Main_OnCommand and Midi_OnCommand-functions); no scripts yet

Changes:
  • Eventmanager: EventStateChunk defined; can now add events from an EventStateChunk; supports now sections, namely main and MediaExplorer(Midi still missing); checkfunctions can have now their own userspace for their data; events can be paused now; sometimes didn't check events, when multiple were there -> fixed

You can download this pre-release via ReaPack: https://raw.githubusercontent.com/Ul...ease_index.xml
__________________
Ultraschall-API - a Lua-functions-library4Reaper: https://forum.cockos.com/showthread....98#post2067798
Reaper Internals - Developerdocs4Reaper: https://forum.cockos.com/showthread.php?t=207635
mespotine is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:40 AM.


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