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

Reply
 
Thread Tools Display Modes
Old 01-15-2021, 02:56 AM   #681
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 gxray View Post
Oh okay awesome, thanks! So roughly something like this then, where sourcefiles is the list of Lua filenames from the text file?

Code:
for _, sourcefile in pairs(sourcefiles) do
  local file = io.open(sourcefile , "r");
  local text = file:read("*a")
  local _, docblocks = ultraschall.Docs_GetAllUSDocBlocsFromString(text)
end
Better: use ultraschall.ReadFullFile()


You can load them and concatenate the loaded file-strings into one string. Then run the get all docblocs function over it.
__________________
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-15-2021, 07:12 AM   #682
gxray
Human being with feelings
 
Join Date: Dec 2020
Location: Miami, FL USA
Posts: 396
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Better: use ultraschall.ReadFullFile()


You can load them and concatenate the loaded file-strings into one string. Then run the get all docblocs function over it.
Ah duh, that ought to be a fair bit more efficient eh? Haha

Thanks again Mespotine, will give this a shot later tonight or early in the weekend and see if I can't get your Ultraschall API added to the VS Code extension!
__________________
Seasoned codemonkey
Dunno a thing about making music (here to learn!)
gxray is offline   Reply With Quote
Old 01-15-2021, 07:19 AM   #683
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

You can't yet, as my filelist is not in the current release yet.
Though I'm working on finishing up the next version of Ultraschall-Api so it's probably only a few days away.
Though you can already test with all lua-files in the modules folder, as most of them will be included in the list.
__________________
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-15-2021, 09:08 AM   #684
gxray
Human being with feelings
 
Join Date: Dec 2020
Location: Miami, FL USA
Posts: 396
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
You can't yet, as my filelist is not in the current release yet.
Though I'm working on finishing up the next version of Ultraschall-Api so it's probably only a few days away.
Though you can already test with all lua-files in the modules folder, as most of them will be included in the list.
Sweet, no rush/worries -- if and when you get to it, I'll be grateful. And if you don't, you don't owe me anything so I'd not complain about it

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Though you can already test with all lua-files in the modules folder, as most of them will be included in the list.
This sounds a plan then 👌
__________________
Seasoned codemonkey
Dunno a thing about making music (here to learn!)
gxray is offline   Reply With Quote
Old 01-15-2021, 12:17 PM   #685
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

The list is already done, so I just need to finish the other stuff
__________________
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-2021, 05:10 PM   #686
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

New update available:

4.2.003 - "Georg Friedrich Händel - Sarabande" - 6th of February 2021

Has now 1385 functions, with 26 new ones

new in this release:
  • BatchConvertFiles
    Ever fancied programming the batch-converter? Now you can, with BatchConvertFiles. No more fiddling around with command-line.
  • GetProjectStateChunk
    Is now improved and finally working stable. What a difficult birth, but now you can access all your project-states available.
  • FXStateChunk-functions
    Getting and setting FXStateChunk-entries should be fully supported now. Some can't be set at runtime in Reaper, due some quirks with setting statechunks, but nevertheless.
  • GetActionCommandIDByFilename
    So here's the story: you have this nice filename of a nice ReaScript and would like to call it for a date or just by Main_OnCommand, but:
    you don't know the ActionCommandID. GetActionCommandIDByFilename will be your knight in shining armor and give you what you need.
  • M1-Mac support
    Now all scripts using Ultraschall-API run smooth on the new Arm-Macs as well. Dozens of fixes and bugreports made it possible.
  • SetUIScale
    Now you can scale your Reaper-window to planet-size, by setting its UI-scaling-factor. So if 2 isn't enough for your oldening eyes, set it to 100.
  • 2nd pass rendering
    Also added, so you can use the new 2nd-pass-rendering-feature in your scripts. Loop Loop!
  • Custom Markers/Regions
    They can now be enumerated, set, deleted and count with "" as well. This will give you all custom-marker/regions instead of a specific one.
  • GetItem_ClickState and GetTrackEnvelope_ClickState
    Stopped working due bugfix in SWS, now returned back to working due bugfix in Ultraschall-API. So getting the currently clicked/dragged item/envelope-point is available again.
  • EditReaScript
    Open a specific ReaScript with a specific window-position and size. So arranging your ReaScript-IDE-windows is now real easy.
    Under the assumption, you have a taste for a nice IDE-arrangement.
  • Bugfixes, improvements, speedups
    The usual cleanup of old functions that usually eliminate bugs and slow code.

    New features in 4.2.003
  • Configuration-files: GetActionCommandIDByFilename - get the actioncommand-id of a registered script
  • Docs: misc/USDocML-Specs1_0.txt - describes the USDocML-format I use for my Reaper/Ultraschall-API documentation
  • File-Management: BatchConvertFiles - allows converting files using the batch-converter of Reaper
  • FX-Management: GetDocked_FXStateChunk - gets the docked state of an fxchain from an FXStateChunk
  • FX-Management: GetFXBypass_FXStateChunk - returns the BYPASS-entry-values of an FXStateChunk(bypass and online/offline state)
  • FX-Management: GetFXFloatPos_FXStateChunk - returns the float state and position of the fx-window of an fx in an FXStateChunk
  • FX-Management: GetFXGuid_FXStateChunk - returns the guid of an fx in an FXStateChunk
  • FX-Management: GetFXMidiPreset_FXStateChunk - returns the MIDIPRESET-entry-values of an FXStateChunk(link to midi program change)
  • FX-Management: GetFXWak_FXStateChunk - returns the WAK-entry-values of an FXStateChunk(embed and send keyboardinput to fx)
  • FX-Management: GetLastSel_FXStateChunk - returns the last selected fx of an FXStateChunk
  • FX-Management: GetShow_FXStateChunk - gets the state of visibility of the fxchain-window and a specific fx from an FXStateChunk
  • FX-Management: GetWndRect_FXStateChunk - gets the position of the fxchain-window when floating from an FXStateChunk
  • FX-Management: SetDocked_FXStateChunk - sets the docked state of an fxchain from an FXStateChunk
  • FX-Management: SetFXBypass_FXStateChunk - sets the BYPASS-entry-values of an FXStateChunk(bypass, online/offline-state)
  • FX-Management: SetFXFloatPos_FXStateChunk - sets the float state and position of the fx-window of an fx in an FXStateChunk
  • FX-Management: GetFXGuid_FXStateChunk - sets the new guid of an fx in an FXStateChunk
  • FX-Management: SetFXMidiPreset_FXStateChunk - sets the MIDIPRESET-entry-values of an FXStateChunk(link to midi program change)
  • FX-Management: SetFXWak_FXStateChunk - sets the WAK-entry-values of an FXStateChunk(embed and send keyboardinput to fx)
  • FX-Management: SetLastSel_FXStateChunk - sets the last selected fx of an FXStateChunk
  • FX-Management: SetShow_FXStateChunk - sets the SHOW-entry-values of an FXStateChunk(the currently shown fx in the fxchain)
  • FX-Management: SetWndRect_FXStateChunk - sets the position of the fxchain-window when floating from an FXStateChunk
  • ItemManagement: GetItemImage - gets the image, associated with an item in the item-notes-dialog
  • ItemManagement: SetItemImage - sets the image, associated with an item in the item-notes-dialog
  • MarkerManagement: GetAllCustomMarkerNames - returns all custom-marker-names available in the current project(requested by fernsehmuell)
  • MarkerManagement: GetAllCustomRegionNames - returns all custom-region-names available in the current project(requested by fernsehmuell)
  • Misc: Ultraschall_Api_List_Of_USDocML-Containing_Files.txt - a list of all Lua-files, that contain Ultraschall-API-related USDocBlocs(requested by gxray)
  • User Interface: GetUIScale - gets the scaling of Reaper's UI(requested by willpadgett)
  • User Interface: SetUIScale - sets the scaling of Reaper's UI(requested by willpadgett)

    Changes from 4.2.002 to 4.2.003
  • Automation Items: AutomationItem_Delete - didn't work due stupid bug, completely rewritten -> fixed(thanks to XRaym)
  • Configuration-files: CountKBIniActions - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: CountKBIniKeys - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: CountKBIniScripts - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: DeleteKBIniActions - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: DeleteKBIniKeys - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: DeleteKBIniScripts - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: GetActionCommandIDByFilename - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: GetKBIniActions - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: GetKBIniActionsID_ByActionCommandID - setting filename_with_path=nil uses default reaper-kb.ini; rewritten and sped up by magnitudes; returns found indices as table now; didn't work with command-id-numbers -> fixed(thanks to Aaron Cendan)
  • Configuration-files: GetKBIniFilepath - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: GetKBIniKeys - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: GetKBIniKeys_ByActionCommandID - setting filename_with_path=nil uses default reaper-kb.ini; rewritten and sped up by magnitudes; returns found indices as table now; didn't work with command-id-numbers -> fixed(thanks to Aaron Cendan)
  • Configuration-files: GetKBIniScripts - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: GetKBIniScripts_ByActionCommandID - setting filename_with_path=nil uses default reaper-kb.ini; rewritten and sped up by magnitudes; returns found indices as table now; didn't work with command-id-numbers -> fixed(thanks to Aaron Cendan)
  • Configuration-files: QueryKeyboardShortcutByKeyID - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: SetKBIniActions - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: SetKBIniKeys - setting filename_with_path=nil uses default reaper-kb.ini
  • Configuration-files: SetKBIniScripts - setting filename_with_path=nil uses default reaper-kb.ini
  • Developer Tools: ultraschall_functions_ProjectManagement_ProjectFil es_Module.lua - uses now the project active at script-start.
  • Developer Tools: ultraschall_ShowProjectDiffs.lua - doesn't need to save the project anymore to show changes in the projectfile
  • Docs: Reaper Internals - update to Reaper 6.20, SWS 2.12.1.3; added missing retvals and params, removed duplicated ones
  • Docs: Render-presetfile-docs - added 2nd pass render-option
  • Doc-Engine: Docs_GetUSDocBloc_Params - returns now 0, when no retval is found
  • Doc-Engine: Docs_GetUSDocBloc_Retvals - returns now 0, when no retval is found
  • Developer: EditReaScript - allows now setting position and size of the to-open-IDE-window
  • EnvelopeManagement: GetTrackEnvelope_ClickState - works now again
  • File-Management: CountDirectoriesAndFilesInPath - flushes cache on Reaper 6.20+ to be more reliable
  • File-Management: DirectoryExists - flushes cache on Reaper 6.20+ to be more reliable
  • File-Management: GetAllDirectoriesInPath - flushes cache on Reaper 6.20+ to be more reliable
  • File-Management: GetAllFilenamesInPath - flushes cache on Reaper 6.20+ to be more reliable
  • File-Management: GetAllRecursiveFilesAndSubdirectories - flushes cache on Reaper 6.20+ to be more reliable
__________________
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-2021, 05:11 PM   #687
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

  • HelperFunctions: CheckActionCommandIDFormat - returns now true, when the command-id-number is passed over as string as well; fixes some functions(thanks to Aaron Cendan)
  • HelperFunctions: IsOS_Mac - works now on arm-macs as well(thanks to rstockm)
  • MarkerManagement: AddEditMarker - works now on arm-macs as well(thanks to rstockm)
  • MarkerManagement: AddEditRegion - works now on arm-macs as well(thanks to rstockm)
  • MarkerManagement: AddPodRangeRegion - works now on arm-macs as well(thanks to rstockm)
  • MarkerManagement: CountAllCustomMarkers - "" counts now all custom-markers, regardless of their name
  • MarkerManagement: CountAllCustomRegions - "" counts now all custom-regions, regardless of their name
  • MarkerManagement: DeleteCustomMarkers - "" deletes now over all custom-markers, regardless of their name
  • MarkerManagement: DeleteCustomRegions - "" deletes now over all custom-regions, regardless of their name
  • MarkerManagement: EnumerateCustomMarkers - "" enumerates now over all custom-markers, regardless of their name
  • MarkerManagement: EnumerateCustomRegions - "" enumerates now over all custom-regions, regardless of their name
  • MarkerManagement: GetAllCustomMarkers - "" returns now all custom-markers, regardless of their name(requested by fernsehmuell)
  • MarkerManagement: GetAllCustomRegions - "" returns now all custom-regions, regardless of their name
  • MarkerManagement: IsMarkerValidCustomMarker - "" checks now over all custom-markers, regardless of their name
  • MarkerManagement: IsRegionValidCustomRegion - "" checks now over all custom-regions, regardless of their name
  • MarkerManagement: SetCustomMarker - "" sets now over all custom-markers, regardless of their name
  • MarkerManagement: SetCustomRegion - "" sets now over all custom-regions, regardless of their name
  • MarkerManagement: SetEditRegion - works now on arm-macs as well(thanks to rstockm)
  • MediaItem Management: GetItem_ClickState - works now again
  • Miscellaneous: OpenURL - works now on arm-macs as well
  • ProjectManagement: GetProjectStateChunk - works now reliable in Reaper 6.20+; fixed some bugs that might improve stability on earlier Reaper-versions
  • ProjectManagement: GetProject_RenderStems - supports now 2nd pass rendering(Reaper 6.20+)
  • ProjectManagement: IsValidProjectStateChunk - sped up by magnitudes, which is important for checking huge ProjectStateChunks
  • ProjectManagement: SetProject_RenderStems - supports now 2nd pass rendering(Reaper 6.20+)
  • RenderManagement: AddRenderPreset - supports now 2nd pass rendering(Reaper 6.20+)
  • RenderManagement: ApplyRenderTable_Project - supports now 2nd pass rendering(Reaper 6.20+)
  • RenderManagement: ApplyRenderTable_ProjectFile - supports now 2nd pass rendering(Reaper 6.20+)
  • RenderManagement: CreateNewRenderTable - all parameters are optional and when passed nil, will be set with Reaper's factory defaults
  • RenderManagement: GetRenderCFG_Settings_AIFF - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_AVI_Video - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_AudioCD - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_FLAC - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_GIF - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_LCF - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_MKV_Video - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_MP3 - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_MP3ABR - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_MP3CBR - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_MP3MaxQuality - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_MP3VBR - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_MP4Mac_Video - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_OGG - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_OPUS - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_QTMOVMP4_Video - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_WAV - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_WAVPACK - stabilized some edgecases
  • RenderManagement: GetRenderCFG_Settings_WebMVideo - stabilized some edgecases
  • RenderManagement: GetRenderTable_Project - supports now 2nd pass rendering(Reaper 6.20+)
  • RenderManagement: GetRenderTable_ProjectFile - supports now 2nd pass rendering(Reaper 6.20+); didn't return render-cfg and render-cfg2 as empty string when not set in project -> fixed
  • RenderManagement: GetRenderPreset_RenderTable - supports now 2nd pass rendering(Reaper 6.20+)
  • RenderManagement: IsValidRenderTable - supports now 2nd pass rendering(Reaper 6.20+)
  • RenderManagement: RenderProject_RenderTable - supports now 2nd pass rendering(Reaper 6.20+)
  • RenderManagement: SetRenderPreset - supports now 2nd pass rendering(Reaper 6.20+)

Please update it via ReaPack using: https://github.com/Ultraschall/ultra..._api_index.xml
__________________
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-10-2021, 11:55 AM   #688
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
Default

I have a question about the use of:

integer retval = ultraschall.SetProject_Tempo(string projectfilename_with_path, integer bpm, integer beat, integer denominator, optional string ProjectStateChunk)

I want the current project path, so I call:

string projectfilename_with_path = ultraschall.GetProjectFilename(ReaProject proj)

I'm not sure how to get the currently active ReaProject to send to this method... all the ultraschall methods seem to return an array of opened projects. Is there a way to find out which project is active and give it to the method?

EDIT: found reaper.enumprojects, I'll try that...
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 02-10-2021, 12:11 PM   #689
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

^ Don't know how it is with Ultraschall-API but in the native Lua API you can simply put nil (edit: or 0) for the current active project.

Last edited by nofish; 02-10-2021 at 12:24 PM.
nofish is offline   Reply With Quote
Old 02-10-2021, 04:16 PM   #690
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

It's not possible. All these functions change only project-files. This is due limitations in Reaper's own API, as I don't have a way to access all elements of projects(No SetProjectStateChunk-function available).

I'm fiddling around with finding a solution for this for years now, but I got not any closer to it.

If at any point it's possible to do it, I'll add passing a ReaProject(as returned by EnumProjects) as parameter into all of them, but until then, all you can do is setting these in rpp-projectfiles or in strings which hold the contents of a projectfile(I call them ProjectStateChunk in my docs).
__________________
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-10-2021, 10:54 PM   #691
woodslanding
Human being with feelings
 
woodslanding's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Posts: 633
Default

Okay, well I thought I'd figured out how to do what I was trying to do...
Code:
local function getCurrentProject()
    local _,proj = reaper.EnumProjects(-1)
    return proj
end

local function getCurrentProjectFilename()
    local projectName = ultraschall.GetProjectFilename(getCurrentProject())
end
I didn't check what that did, except to note it didn't change the tempo display in reaper. Guess now I know why!

So I used these reaper methods, which seem to work...

Code:
--project tempo doesn't seem to update anything?
function SetTempo(tempo)
    reaper.SetCurrentBPM( 0, tempo, 1 )
end

function GetTempo()
    return  reaper.Master_GetTempo()
end
__________________
eric moon
Very Stable Genius
https://gogolab.com/
woodslanding is offline   Reply With Quote
Old 02-24-2021, 06:53 AM   #692
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Hotfix 1 available:

- Filemanagement: BatchConvertFiles - forgot to add it to the release

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-25-2021, 02:16 AM   #693
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Hey mespotine can you help me in this part of AddParmLearn_FXStateChunk:

Code:
 
       CC Mode-dropdownlist:
           set the following flags to their specific values (0=0, 1=the value beginning &, like &65536 or &131072 or &262144)
            &65536 &131072 &262144
               0       0       0,      Absolute
               1       0       0,      Relative 1(127=-1, 1=+1)
               0       1       0,      Relative 2(63=-1, 65=+1)
               1       1       0,      Relative 3(65=-1, 1=+1)
               0       0       1,      Toggle (>0=toggle)
Like lets say I want CC 65 in absolute mode what should I put there?
65&0 ?
Sorry I didn't understand this part :/
daniellumertz is offline   Reply With Quote
Old 02-25-2021, 04:54 AM   #694
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 daniellumertz View Post
Hey mespotine can you help me in this part of AddParmLearn_FXStateChunk:

Code:
 
       CC Mode-dropdownlist:
           set the following flags to their specific values (0=0, 1=the value beginning &, like &65536 or &131072 or &262144)
            &65536 &131072 &262144
               0       0       0,      Absolute
               1       0       0,      Relative 1(127=-1, 1=+1)
               0       1       0,      Relative 2(63=-1, 65=+1)
               1       1       0,      Relative 3(65=-1, 1=+1)
               0       0       1,      Toggle (>0=toggle)
Like lets say I want CC 65 in absolute mode what should I put there?
65&0 ?
Sorry I didn't understand this part :/
Best is to set one via UI of Reaper and have a look at the statechunk, which value will be shown and then copy them.

In the above list, you basically combine the &values, if there's a 1 shown in the row.

For Relative3, the 1 is there for &65536 and &131072. So the value would be 65536+131072 for the cc-dropdownlist.
__________________
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-25-2021, 05:11 AM   #695
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

hm, the thing is I wanted to the CC be a variable...

Else I would be able to just copy from the chunk as you said
daniellumertz is offline   Reply With Quote
Old 02-26-2021, 09:01 AM   #696
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

I have a better idea worked on yesterday. I write some functions for the next version to do it more handy. It's probably easier than trying to explain that.

You will have parameters for selecting the midi-channel, the midi-mode(note, pc, cc, pitch), the value and the options of the dropdownlist, who are currently all combined in that one parameter.
__________________
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-26-2021, 09:24 AM   #697
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
Default

Is there a way to change which FX parameter that have last focused? (without the mouse!)
I would like to jump between different FX parameters with a luascript. I have tried to look thru
the Ultraschall API and couldn't find, maybe because my english understanding is not top-notch


...oh and another one, is it possible to change the order of Sends in MPC?
Say you have 3 sends - #1 #2 #3, and you want to make #3 the first send.
(also without the mouse)

Regards
Thomas
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad is offline   Reply With Quote
Old 02-26-2021, 09:29 AM   #698
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
Is there a way to change which FX parameter that have last focused? (without the mouse!)
I would like to jump between different FX parameters with a luascript. I have tried to look thru
the Ultraschall API and couldn't find, maybe because my english understanding is not top-notch


...oh and another one, is it possible to change the order of Sends in MPC?
Say you have 3 sends - #1 #2 #3, and you want to make #3 the first send.
(also without the mouse)

Regards
Thomas
The former, probably no. I would try to alter a setting and restore it right afterwards and hope, it triggers the last touched feature of Reaper. But I have no clue.
You can have a look at the statechunk if something changes when you touch fx. If yes, I could try to code it.

The latter, can you do it via ui? If yes, can you make me a gif of this, so I can reproduce and look, if I can find something to affect that?
__________________
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-26-2021, 05:45 PM   #699
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
I have a better idea worked on yesterday. I write some functions for the next version to do it more handy. It's probably easier than trying to explain that.

You will have parameters for selecting the midi-channel, the midi-mode(note, pc, cc, pitch), the value and the options of the dropdownlist, who are currently all combined in that one parameter.
oh thanks mespotine, this would be great. Thinking in doing a script to automatically bind a CC to parameter under mouse. Would totally use it ! Thanks
daniellumertz is offline   Reply With Quote
Old 02-27-2021, 07:08 AM   #700
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
The former, probably no. I would try to alter a setting and restore it right afterwards and hope, it triggers the last touched feature of Reaper. But I have no clue.
I found something in Reaper API:
Code:
 retval, tracknumber, fxnumber, paramnumber = reaper.GetLastTouchedFX()
--reaper.SetOnlyTrackSelected( reaper.GetLastTouchedTrack() )
  --reaper.ShowMessageBox(tostring(paramnumber), "Info", 0) -- + "," + tostring(fxnumber) + "," + tostring(paramnumber), "Info", 0)
 reaper.TrackFX_SetParam(reaper.GetLastTouchedTrack() , fxnumber, (paramnumber + 1) , 0 )
reaper.GetLastTouchedTrack()
 --reaper.GetSelectedTrack(0, 0 )
I am playing around with it, and it sort of work but I need to get the next fxparam value and put its value in SetParm before running it. AND make it
working without clicking track before running it. I want to stay in the fx window.

Later I need to get the number of parameters so I can scroll thru all and start on 0 again.


Quote:
You can have a look at the statechunk if something changes when you touch fx. If yes, I could try to code it.
That sort of new for me - how do I look at the statechunk?
Somewhere in the back of my head I remember someone here
at forum made some tool for this....
OR am I getting things from my dreams?


Quote:
The latter, can you do it via ui? If yes, can you make me a gif of this, so I can reproduce and look, if I can find something to affect that?
Ooops, was wrong, dont know where I got that from (in my dreams?). I thought
it was possible to move them, but nooope....

Maybe if its possible to save them before deleting them and then paste them in in the wanted order?? Have to look into that...
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad is offline   Reply With Quote
Old 02-27-2021, 09:07 AM   #701
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
The former, probably no. I would try to alter a setting and restore it right afterwards and hope, it triggers the last touched feature of Reaper. But I have no clue.
I got it working with one FX(ReaEQ), you need FXwindow-Options-Ignore Fx chain keyboard shortcuts selected:

Code:
local retval, tracknumber, fxnumber, paramnumber = reaper.GetLastTouchedFX()

local track = reaper.GetTrack(0, tracknumber-1)
      reaper.SetOnlyTrackSelected( track )
 
local retval2, minval, maxval = reaper.TrackFX_GetParam( track, fxnumber, (paramnumber + 1) )

reaper.TrackFX_SetParam(track , fxnumber, (paramnumber + 1) , retval2)
After opening the FX you need to click on the parameter you want to
start from, then its only a matter of running the script. It will make
the next parameter the last touched, YEAY! ;-)

Now I have to figure out how to jump to the first parameter when
the last parameter is done. And it would be nice to not need to
touch a parameter with mouse when opening FX, just start from the
first parameter,
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify

Last edited by tompad; 02-27-2021 at 11:08 AM.
tompad is offline   Reply With Quote
Old 02-28-2021, 01:28 AM   #702
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 811
Default

@Meo-Ada Mespotine

Ooops, sorry, I just realized I hijacked this thread with something
that NOT is related to UltraschallAPI (yet!). Wanted to find something
related in UltraschallAPI but then I found it in ReaperAPI....

Regards
Thomas
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad is offline   Reply With Quote
Old 06-03-2021, 08:21 AM   #703
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

As the next update still needs some work, I decided to push a little update and fix some bugs in the process:

Changes:
- API: loading procedure - didn't work sometimes on systems, whose path to the resource-folder contained umlauts
- BatchConvert: BatchConvertFiles - didn't work due stupid error -> fixed
- Docs: Reaper Internals: updated to Reaper 6.29, ReaBlink 0.3.3, ReaImGui 0.4

The docs are now the latest version, so gxray can update the syntax-completion-parts.
Also includes the new and hot ReaBlink-functions in the docs.
__________________
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 06-11-2021, 12:16 PM   #704
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

4.2.004 - "Grandma - kl" - 12th of June 2021

Has now 1400 functions, with 15 new ones

new in this release:
  • Automation Items
    You can get now the automation items by time and you can split them.
  • State Inspector
    Allows now using Ctrl+C and Ctrl+V to copy n paste statechunks from the statechunk-views. That way, you can easily get
    and set statechunks for easier debugging.
  • Rendering
    Razor Edits-rendering is now supported.
  • InputFX
    All inputFX-functions allow now adressing inputfx of specific tracks.
  • GMEM
    You can get now all gmems from a specific gmem-name. You can also get all values from the Video-Sample-Peeker-JSFX to do something with it, like visualizing.
  • Razor Edit
    You can get all razor-edits from the current project as well as checking, whether there's any razor-edit at all.
  • MetaData Presets
    You can get now all metadata-entries from the metadata-presets. Will be enhanced in the future with additional functions.
  • Developer Tools
    Get now the statechunk of items/envelopes/tracks underneath the mouse directly into the clipboard and put the statechunks from clipboard back into it.
  • BatchConverter
    Works now, now that I fixed this stupid bug..cough...cough...
  • Docs updates
    Updated Docs to Reaper 6.29 and added ReaImGui, ReaBlink.
  • Tons of bugfixes and stuff

    New features in 4.2.004
  • Automation Items: AutomationItems_GetByTime - gets all automation-items from an envelope at position(requested by AZpercussion)
  • Automation Items: AutomationItem_Split - splits a specific automation-item from an envelope at position(requested by AZpercussion)
  • Developer Tools: EnvelopeStateChunk_from_Clipboard_envelope_to_unde r_mouse.lua - gets envelopestatechunk from clipboard to envelope under the mouse
  • Developer Tools: EnvelopeStateChunk_from_Clipboard_to_selected_enve lope.lua - gets envelope statechunk from clipboard to selected envelope
  • Developer Tools: EnvelopeStateChunk_to_Clipboard_selected_envelope - puts statechunk of selected envelope into clipboard
  • Developer Tools: Find_Duplicated_Lines_In_Clipboard - shows duplicated lines in the string in the clipboard
  • Developer Tools: ItemStateChunk_from_Clipboard_to_first_selected_it em.lua - gets trackstatechunk from clipboard to first selected track
  • Developer Tools: ItemStateChunk_from_Clipboard_to_item_mouse.lua - gets itemstatechunk from clipboard to item under the mouse
  • Developer Tools: ItemStateChunk_to_Clipboard_first_selected_item - puts statechunk of first selected item into clipboard
  • Developer Tools: ItemStateChunk_to_Clipboard_item_under_mouse - puts statechunk of item under the mouse into clipboard
  • Developer Tools: TrackStateChunk_to_Clipboard_first_selected_track - puts statechunk of first selected track into clipboard
  • Developer Tools: TrackStateChunk_to_Clipboard_track_under_mouse - puts statechunk of track under the mouse into clipboard
  • Developer Tools: EnvelopeStateChunk_to_Clipboard_envelope_under_mou se - puts statechunk of envelope under the mouse into clipboard
  • Docs: Reaper API-docs - added ReaImGui 0.4.1, OSARA 2021, ReaBlink 0.4.0
  • Examplescript: US_Api_Examples_Visualize_VideoSamplePeekerJSFX.lu a - displays the Video Sample Peeker-JSFX-values in a gfx-window
  • GMem: GMem_Read_ValueRange - returns a value-range from gmem-values as a handy table
  • GMem: GMem_GetValues_VideoSamplePeeker - returns the samples as provided by the jsfx "video sample peeker", whose values are used by certain video processor presets
  • MediaItem-Management: ApplyActionToMediaItemTake - allows applying actions to MediaItemTakes
  • MediaItem-Management: CountMediaItemTake_StateChunk - counts all takes in a MediaItemStateChunk
  • MediaItem-Management: GetMediaItemTake_StateChunk - gets a TakeStateChunk from a MediaItemStateChunk
  • Metadata-Management: Metadata_GetAllPresetNames - returns all metadata-presetnames
  • Metadata-Management: Metadata_GetMetaDataTable_Presets - returns all metadata-presetnames
  • Razor Edit: RazorEdit_GetAllRazorEdits - returns a table with all razor-edits available in the current project
  • Razor Edit: RazorEdit_ProjectHasRazorEdit - returns, if the currently opened project contains any Razor Edits
  • Rendering: AreRenderTablesEqual - compares, if two RenderTables are equal
  • Spectral Edit: CountItemSpectralEdit2 - counts all spectral-edits within a take(requested by Fabian)
  • Spectral Edit: GetItemSpectralConfig2 - gets the spectral-config of a take(requested by Fabian)
  • Spectral Edit: GetItemSpectralEdit2 - gets all spectral-edit-states of a take(requested by Fabian)


    Changes from 4.2.003 to 4.2.004
  • API: Modulator3000 - reverted binary-chunk back to source-code, due Reaper-path-encoding problems with Umlauts in resourcepath(thanks to rstockm)
  • API-HelperFunctions: SFEM - parameters didn't work as I..ehrm....forgot to add them.... -> fixed
  • ConfigurationManagement: KB-ini-functions - parameter/retval-descriptions were missing information -> fixed
  • Developer Tools: State Inspector - the show item/track/envelope-statechunk modes allow now copy'n'pasting of statechunks from/to clipboard
  • Docs: Filetype Descriptions - added missing descriptions and mouse modifiers for reaper-mouse.ini
  • Docs: Reaper Internals - updated to Reaper 6.29
  • File-Management: BatchConvertFiles - added, as I had forgotten to add it in the last release -> fixed
  • FXManagement: InputFX_AddByName - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_CopyFX - couldn't copy fx to the end of the fx-chain -> fixed; supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_CopyFXFromTakeFX - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_CopyFXFromTrackFX - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_CopyFXToTakeFX - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_CopyFXToTrackFX - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetCount - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_Delete - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_EndParamEdit - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_FormatParamValue - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_FormatParamValueNormalized - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetChainVisible - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetEnabled - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetEQ - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetEQBandEnabled - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetEQParam - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetFloatingWindow - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetFormattedParamValue - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetFXChain - readded global monitoring-fxchain-entries; supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetFXGUID - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetFXName - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetIOSize - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetNamedConfigParm - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetOffline - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetOpen - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetParam - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetParameterStepSizes - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetParamEx - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetParamName - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetParamNormalized - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetPinMappings - didn't work due bug -> fixed, supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetPreset - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_GetUserPresetFilename - supports now inputFX of individual tracks as well(thanks to X-Raym)
__________________
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 06-11-2021, 12:17 PM   #705
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

  • FXManagement: InputFX_MoveFX - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_MoveFXFromTakeFX - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_MoveFXFromTrackFX - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_MoveFXToTakeFX - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_MoveFXToTrackFX - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_NavigatePresets - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_QueryFirstFXIndex - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetEnabled - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetEQBandEnabled - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetEQParam - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetFXChain - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetOffline - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetOpen - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetParam - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetParamNormalized - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetPinMappings - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetPreset - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_SetPresetByIndex - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: InputFX_Show - supports now inputFX of individual tracks as well(thanks to X-Raym)
  • FXManagement: IsValidFXStateChunk - supports now inputFX-FXChains as well(thanks to X-Raym)
  • Helper functions: IsOS_Mac - didn't work on arm-macs due stupid typo -> fixed(thanks to rstockm)
  • Helper functions: StateChunkLayouter - corrected edge-case that could cause missing > at the end -> fixed
  • Parameter-Modulation: CountParmModFromFXStateChunk - didn't return correct error-retvals -> fixed
  • ProjectManagement: GetProjectStateChunk - had trouble with Razor-Edit-render-options activated in Reaper 6.26 -> fixed
  • Rendering: all functions - support now Razor Area rendering
  • Rendering: ApplyRenderTable_Project - allows now setting project to dirty, if RenderTable is different from the current project's render settings; changed a value of the provided RenderTable, which shouldn't happen -> fixed
  • Rendering: ApplyRenderTable_ProjectFile - changed a value of the provided RenderTable, which shouldn't happen -> fixed
  • TrackManagement: GetTrackGroupFlagsState - returns now the table with all 23-entries, even if some checkboxes aren't set in any group
  • TrackManagement: GetTrackGroupFlags_HighState - returns now the table with all 23-entries, even if some checkboxes aren't set in any group

Please update it via ReaPack using: https://github.com/Ultraschall/ultra..._api_index.xml
__________________
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 06-23-2021, 10:32 AM   #706
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
I have a better idea worked on yesterday. I write some functions for the next version to do it more handy. It's probably easier than trying to explain that.

You will have parameters for selecting the midi-channel, the midi-mode(note, pc, cc, pitch), the value and the options of the dropdownlist, who are currently all combined in that one parameter.
Oh, this sounds also relevant and useful for my csv import project. (csv export is done, see above. csv import is still missing.)
TonE is offline   Reply With Quote
Old 06-23-2021, 01:38 PM   #707
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 TonE View Post
Oh, this sounds also relevant and useful for my csv import project. (csv export is done, see above. csv import is still missing.)
Shit, I hope I did it already, as I totally forgot about it and about the idea... :/
Could you 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 06-25-2021, 08:24 AM   #708
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

What you did the complete csv import already? Really? What is the function name, I could check it of course. That would give us the most flexible midi controller mapping system of the universe.

Map anywhere without Reaper, according to your ideas. Come home, load into Reaper and have fun with those ideas. Assumptions I am making are as follows:
1. You have a set of midi controller devices.
2. You know how many controls you have in sum and know which midi events they are outputting. Knobs, buttons, faders. Let us say for simplicity 100 controls.
3. You know the controls placement position in the hardware, e.g. on Bitstream 3X you have 4 x 8 knobs on top, 8 faders below that, 1 crossfader on the right side. All together 41 controls. Just one example.
4. Now the fun is starting. Here you just define which targets you want to control using which control! You can start from any Reaper project, meaning .RPP file. This .rpp might have no midi mappings at all, no problem.
5. Just edit the .csv, import into your project. Have fun.

Those above 5 steps are mostly enough for my use case. If ReaLearn would work also in wine 32 bit (which does not, unfortunately) I could even experiment with its features for more complicated stuff. But I can do already a lot with Reaper internal tools like using the gazillions of available jsfx, combined with probability, parameter modulation. There you go. The main thing is only how to combine the real hardware knobs to your Reaper project as comfortably, as efficiently, as simple, as flexible, as independent of any tools, as possible. The .csv editing method is my favourite somehow. Just a simple text file, using columns, all values are there, edit in Excel, or use tools like Emacs and swiper for quickly finding and replacing values. Even multiple values if you want. 100 times faster than doing all manually one by one inside Reaper or anywhere else. I was missing exactly this method for a long time in Reaper. (Actually many other DAWs do not offer this flexibility as well I guess.) In my opinion this should be the first thing a developer should care about. I do not want to click only with the mouse all the time. Why we have all those hardware controllers?

Well, now, if I know your implemented function name, I could test it of course. I would test it as follows:
1. Taking any existing project of mine.
2. Exporting all its midi mappings with my old .csv export lua script.
3. Changing this .csv file in emacs here and there.
4. Reimporting the new edited .csv back into same project.
5. Testing if those edits are working correctly.

If the tests are successfull, we have best midi mapping system of the universe. The best DAW of the universe is already Reaper (with hackey trackey + hackey trackey sample player + redux vst).

- ReaSamplomatic, great for samples.
- hackey trackey sample player, great for samples, beta, but already fun, thanks saike.
- redux vst, great for samples, extra power from renoise world.
(thus no need any more for shortcircuit 1.1.2 for example, sitala vst is also nice, but above tools do already anything you can imagine with samples)

- I would mention also phrazor vst additionally if you want to add more midi power to Reaper, where those midi is *outside the arrange*, meaning independently of Reapers arrange, you can imagine it like an external hardware if you want, which is sending midi to Reaper where you can add probability on top of it for example! For inside the arrange, just use above tools or what Reaper offers.
TonE is offline   Reply With Quote
Old 06-25-2021, 11:18 AM   #709
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 TonE View Post
What you did the complete csv import already? Really? What is the function name, I could check it of course. That would give us the most flexible midi controller mapping system of the universe.
No, I was referring to Daniel Lumertz's request, that I had answered too, which answer you quoted(jesus, this is complicated to write ) that was referring to the fact, that some ParmMod-functions have complicated parameters that I could make easier to access.
Haven't done it yet, though.

I will probably never include any csv-related function, as csv isn't properly standardized and writing a parser for it with all the edgecases involved is a nightmare.

Quote:
Map anywhere without Reaper, according to your ideas. Come home, load into Reaper and have fun with those ideas. Assumptions I am making are as follows:
1. You have a set of midi controller devices.
2. You know how many controls you have in sum and know which midi events they are outputting. Knobs, buttons, faders. Let us say for simplicity 100 controls.
3. You know the controls placement position in the hardware, e.g. on Bitstream 3X you have 4 x 8 knobs on top, 8 faders below that, 1 crossfader on the right side. All together 41 controls. Just one example.
4. Now the fun is starting. Here you just define which targets you want to control using which control! You can start from any Reaper project, meaning .RPP file. This .rpp might have no midi mappings at all, no problem.
5. Just edit the .csv, import into your project. Have fun.
Hmm, maybe it's even better to just create the actual data-structure that Reaper uses in projects for ParmMod/ParmLearn/etc. That means, no csv, but rather exporting-importing it as a "statechunk" that could be inserted into projects, trackstatechunks, etc.
So you could make "ParmMod-presets" or something like that, though they might be better put into TrackTemplates or RFXChain-files, as they both should support it. But I never used hardware with tracks/parmmod so I might be wrong with that.

It's sad, that I didn't get my head around ParmModulation/Learn for real as I simply have no usecase for it. Otherwise I could build some nice workflow improving stuff. But with my current knowledge, it would only be halfbaked which wouldn't help at all.

Creating the statechunk-entries for ParmMods for export/import should be possible for me though, so if that helps?
__________________
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 06-25-2021, 12:32 PM   #710
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Thanks for your quick response.

No, from my perspective, it is only about ParmLearn, not ParmMod, because parameter modulation in my use cases needs exact adjustment, in which range they should operate and which other parameters also need to be adjusted, so they all together create one nice effect. So doing all these programmatically is impossible, you need to listen to the sound in real-time. At least for my use cases of parameter modulation I do not need this.

StateChunk, export, import technique is also nothing for me. Because I want to have human readable, editable and understandable format, which csv is. There is no need for a perfect standard for csv, in my use case at least, just for ParmLearn, you could check my csv export lua if you want to see its output. I actually only need the way back, if I can get those data back into .RPP I would be more than happy already. I am just reading the track names, vst/jsfx names, parameters names. Those I never touch, they stay always as coming from Reaper. I need those only so I know which mapping I am changing where. The rest columns should be self explanatory, the note/cc (so far), its value, midi channel, that's it. I have seen you something regarding the mapping style above, absolute, relative, toggle, and so on, those I would need also for midi mapping, as sometimes I am using absolute and in other cases toggle. Mostly I need only those two. absolute and toggle. cc and note. pitchbend can be also nice for mapping sometimes.

I wrote all above just you know from which angle I am looking into this field. Looking always as simple as possible, doing the most important part fully and correctly, ignoring the rest. This has the advantage of getting 90% of fun, without having to create a perfect parser or anything fully perfect. If I would have the above mentioned criteria, this is already I was using so far. And I did lots of midi experiments, regarding midi control and midi hardware.

This part was relevant from discussion with daniellumertz. And what you wrote below should be relevant in exact same form for ParmLearn as well I guess. I will check those functions at some point.



Quote:
Originally Posted by Meo-Ada Mespotine View Post
I have a better idea worked on yesterday. I write some functions for the next version to do it more handy. It's probably easier than trying to explain that.

You will have parameters for selecting the midi-channel, the midi-mode(note, pc, cc, pitch), the value and the options of the dropdownlist, who are currently all combined in that one parameter.

Last edited by TonE; 06-25-2021 at 12:44 PM.
TonE is offline   Reply With Quote
Old 06-26-2021, 03:14 PM   #711
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

@TonE

Ah, I get it. Ok, will try to add this to the next release.
__________________
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 06-26-2021, 03:15 PM   #712
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Hotfix 1 - June 27th, 2021

- Markers: MoveMarkersBy - didn't work on markers with 0 in their index number -> fixed(thanks to GNetzer)

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 06-27-2021, 07:00 AM   #713
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
@TonE

Ah, I get it. Ok, will try to add this to the next release.
Thanks, sounds great. Does not hurry at all.
TonE is offline   Reply With Quote
Old 07-21-2021, 07:32 AM   #714
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

4.2.005 - "Anne Clark - Our Darkness" - 21st of July 2021
Has now 1406 functions, with 6 new ones

new in this release:

- Dark Mode in all documentation
Ever been blinded by the light...ehrm docs? Suffer no more. All docs are now in dark-mode, relayouted with a proper
color scheme, smaller, faster to load.
And I nicked some code from X-Raym's fantastic docs, so clicking on function-calls is now copying them into the
clipboard.
Also the index has now links that you can link to. So if you want to give somebody a list of all marker-functions,
click on the ^ next to the category.
The order of functions is also by category. So all marker-functions are next to each other. Endless scrolling to find
that one other marker-related-function is now a thing of a past.
The header on pages is also sticky now. Endless scrolling to switch page is also now a thing of the past.
Enjoy Darkmode.
No more sunburns from reading docs. Can you believe it?

- Normalization on Rendering
You can use now the new normalization-features of Reaper in all rendering-functions.

- Parameter Learn
Some of the ParmLearn functions were hard to use, due some parameters being complex. I added variations of them, so
setting them is now much more easier.

- Toggle Beta-Functions
I almost never finish all new functions, but I deploy them anyway. Though they are not accessible directly, only
when Ultraschall-API is set to Beta-Mode.
This can now be done in the API-settings.
Beta-functions can be found in ultraschall\_functions\_engine\_beta.lua for toying around with them.
But keep in mind: they aren't released for a good reason. Be careful with them.

- Bugfixes
Bugfixes, Bugfixes, Bugfixes...


New features in 4.2.005
- API: Settings - Beta-functions can now be activated via Ultraschall-API-Settings
- Docs: Darkmode - all docs are now relayouted and in darkmode! Clicking on functions copies them to the clipboard(thnx to X-Raym)
- Parameter/Learn/Mapping: AddParmLearn\_FXStateChunk2 - variation of AddParmLearn\_FXStateChunk that allows setting values more detailed(requested by DanielLumertz and TonE)
- Parameter/Learn/Mapping: GetParmLearn\_FXStateChunk2 - variation of GetParmLearn\_FXStateChunk2 that allows setting values more detailed(requested by DanielLumertz and TonE)
- Parameter/Learn/Mapping: SetParmLearn\_FXStateChunk2 - variation of SetParmLearn\_FXStateChunk that allows setting values more detailed(requested by DanielLumertz and TonE)
- Project-Files: GetProject\_Render\_Normalize - gets the render-normalize-settings from an rpp-file or ProjectStateChunk
- Project-Files: SetProject\_MasterTrackView - sets the master-track-view-settings in an rpp-file or ProjectStateChunk
- Project-Files: SetProject\_Render\_Normalize - sets the render-normalize-settings in an rpp-file or ProjectStateChunk

Changes from 4.2.004 to 4.2.005
- BatchConverter: BatchConvertFiles - supports now retaining metadata from sourcefile
- Developer Tools: ultraschall\_developertool\_Display-Altered-Config-Vars.lua - fixed a bug, that omitted some config-vars
- Docs: RenderPreset-Configfile.txt - added new normalization information
- Docs: Reaper Internals - updated to Reaper 6.32, ReaImGui 0.5.2
- Docs: Converter-Pipeline - largely rewritten, so it's now faster, better designed, streamlined
- DocsManagement: Docs\_GetUSDocBloc\_ChapterContext - didn't return all chapter-context-entries -> fixed
- GuiLib: Lokasenna\_LoadGuiLib\_v2 - didn't load due stupid typo -> fixed
- Helper functions: StateChunkLayouter - did add unnecessary newline at the end, which faulted IsValidTrackStateChunk -> fixed
- Markers: MoveMarkersBy - didn't work on markers with 0 in their index number -> fixed(thanks to GNetzer)
- MediaItem-Management: InsertMediaItemFromFile - didn't insert media into the right track due Reaper API-limitations -> fixed(thanks to Fergler)
- Parameter/Learn/Mapping: SetParmLearn\_FXStateChunk - added error-message, when no such parm-alias exists
- RenderManagement: AddRenderPreset - supports now render-normalization
- RenderManagement: ApplyRenderTable\_Project - supports now render-normalization
- RenderManagement: CreateNewRenderTable - supports now render-normalization
- RenderManagement: DeleteRenderPreset\_FormatOptions - supports now deleting presets with render-normalization
- RenderManagement: GetRenderPreset\_RenderTable - supports now render-normalization
- RenderManagement: GetRenderTable\_Project - supports now render-normalization
- RenderManagement: GetRenderTable\_ProjectFile - supports now render-normalization
- RenderManagement: IsValidRenderTable - supports now render-tables with render-normalization-settings
- RenderManagement: SetRenderPreset - supports now render-normalization

Please update your ReaPacks:
https://github.com/Ultraschall/ultra..._api_index.xml
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

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

I'll be off for some time(probably some months) and therefore I will be here very rarely.

I will still update docs and put out bugfixes, but I'll probably not read this thread for this time.

So if you have any issues, bugs, docs-improvements, please head over to here to post them:
https://github.com/Ultraschall/ultra...-reaper/issues


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 07-21-2021, 08:17 AM   #716
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Have a nice trip mespo! Thanks for the huge update
daniellumertz is offline   Reply With Quote
Old 07-22-2021, 03:48 AM   #717
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Have a nice off-time Mespotine, thanks for adding the new functions, I hope I can test them until you are back here. If I succeed in using those, of course I will post my results in this forum.
TonE is offline   Reply With Quote
Old 07-25-2021, 10:18 AM   #718
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Dear Mespotine, thanks for adding the latest functionality. I did finally some testing, csv import seems working. Found a few bugs in ultraschall API. I will do some more testing, then posting all here.

In short I can make ultraschall.AddParmLearn_FXStateChunk2 only work.
Also ultraschall.SetParmLearn_FXStateChunk2 works separately. But when trying both together in same script somehow it does not work. Will do some more testing. Regarding midi channel 16 not working, I found one bug in: ultraschall_functions_FXManagement_Module.lua
Around line 8470 it should be this:
PHP Code:
--  if channel<or channel>15 then ultraschall.AddErrorMessage("AddParmLearn_FXStateChunk2""channel""must be between 1 and 16", -12) return false end  
  
if channel<or channel>16 then ultraschall.AddErrorMessage("AddParmLearn_FXStateChunk2""channel""must be between 1 and 16", -12) return false end 
Then in
PHP Code:
          retvalalteredFXStateChunk ultraschall.AddParmLearn_FXStateChunk2(FXStateChunkfxcountparamcount-1paramnameinputmodechannelccnoteccmodecheckboxflags
paramcount in my use case is off by one, so I am using it as above to compensate.

Other than that all seems fine, I had to play around a bit for finding the correct use of api functions. And there was one more nil bug. In line 8684 I added this:
PHP Code:
  if midi_note==nil then return nil end 
My current solution looks as follows:
1. First run of a first script which does only Add.
2. Second run of a second script which does only Set.
Somehow whatever I tried when trying to use both Add and Set in same script, something was not working. I hope I can find a solution the next days.

Thanks Mespotine, thanks to your help and great ultraschall API the Reaper world will have perfect midi mapping export and import as simple text files. Ready to be edited anywhere you like, like in Excel or emacs. This feature allows Reaper getting a groovebox. You can have as many grooveboxes as you want.
TonE is offline   Reply With Quote
Old 07-27-2021, 08:22 AM   #719
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 95
Default

Have a good trip Mespotine !!

One last bug on this forum and i'll post on github after :
Since Reaper 6.33 update, the array returned by RenderProject_RenderTable is nil : it seems the regex is not working with the data provided by reaper.(i guess reaper changed its data format)

I did a quick fix by replacing the following line 5337:

PHP Code:
  -- Filearray[i]=MediaItemStateChunkArray[i]:match("%<SOURCE.-FILE "(.-)"")
             
Filearray[i]=MediaItemStateChunkArray[i]:match("%<SOURCE WAVE\nFILE (.*)\n>\n>"
And this is what i'm getting from the MediaItemStateChunkArray[i] array.

PHP Code:
<ITEM
ULTRASCHALL_TRACKNUMBER 18.0
POSITION 38.75104925839501
SNAPOFFS 0
LENGTH 0.31860416666667
LOOP 1
ALLTAKES 0
FADEIN 3 0.01 0 3 0 
--1
FADEOUT 3 0.01 0 3 0 1 1
MUTE 0 0
SEL 1
IGUID 
{8A833A07-E418-479E-BC4F-221285932107}
IID 25
NAME CROWDS_APPLAUSE_LIGHT_TAKE01_MALE_416
.wav
VOLPAN 1 0 1 
-1
SOFFS 0
PLAYRATE 1 1 0 
-1 0 0.0025
CHANMODE 0
GUID 
{81CAB033-0CB0-43BF-A874-DF2150CECC36}
<
SOURCE WAVE
FILE D
:\_EXPORT_WAV\__REAPER_RENDER\CROWDS_APPLAUSE_LIGHT_TAKE01_MALE_416.wav
>

can confirm the old format was
PHP Code:
<ITEM
ULTRASCHALL_TRACKNUMBER 11.0
POSITION 222.17022633158112
SNAPOFFS 0
LENGTH 0.23622916666667
LOOP 1
ALLTAKES 0
FADEIN 0 0 0 0 0 0 0
FADEOUT 0 0 0 0 0 0 0
MUTE 0 0
SEL 1
IGUID 
{94F1F68F-B0E2-46AA-BB91-6E5A7BEC9A2C}
IID 4419
NAME wavfile
.wav
VOLPAN 1 0 1 
-1
SOFFS 0
PLAYRATE 1 1 0 
-1 0 0.0025
CHANMODE 0
GUID 
{1AD10AA8-CA6A-44D4-A88E-625D1B2F4DE2}
<
SOURCE WAVE
FILE 
"D:\_EXPORT_WAV\__REAPER_RENDER\wavfile.wav"
>


Last edited by aurelien; 07-27-2021 at 08:31 AM.
aurelien is offline   Reply With Quote
Old 07-29-2021, 11:55 AM   #720
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Will release an update tomorrow. Hope this fixes the problems.

@TonE
The offbyone error could be, that this parameter parmidx is 0-based,not 1-based.
Will clear this up in the docs.
SetParmLearn2 had wrong docs in the first place. Hope that fixes things.

Add and Set in one script works over here. For further investigation, I probably need a simple demo-script that displays this issue.
If you post such demo, please at GitHub.

@Aurelien
You were right. The devs changed the format of source.
Good spot.
__________________
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
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 06:59 AM.


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