 |
|
|
02-25-2020, 04:53 PM
|
#441
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,962
|
Dear mespotine, today I played a bit with parmlearn functions, it seems the counting of learned parms is not working correctly. Even I had a few learned parameters this function was returning 0, in this project. In another project it was returning something, meaning for some fx 1.
PHP Code:
function ultraschall.CountParmLearn_FXStateChunk(FXStateChunk, fxid)
Easy and quick test references can be created simply rgrep'ing the to be tested .rpp file for 'parmlearn', so many results above function should deliver at least.
If you want I can create a test.rpp?
Last edited by TonE; 02-26-2020 at 05:51 AM.
|
|
|
02-26-2020, 11:32 AM
|
#442
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Yes, testprojects are always useful.
|
|
|
02-26-2020, 12:55 PM
|
#443
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,962
|
Quote:
Originally Posted by mespotine
Yes, testprojects are always useful.
|
I called the testproject* 'mespotine ep'  It is only an empty project, but with 6 mappings which should be recognized, 1 mapping per track. Let us start small. In the past I had projects with 1440 mappings per project, I used autohotkey for mapping them, the code is still in this forum somewhere, I mentioned it multiple times in various related topics. Actually this whole story is just doing kind of same, but in a more elegant way, first without needing AutoHotkey anymore, plus projects can be mapped while being open in Reaper, plus mapping files could be shared, thus saving/loading of midi_mappings.txt for a given hardware definition, for example reason mode which is my favourite, because it exists prebuilt in the hardware bitstream 3x, you can never lose this mapping, switch on the hardware, start!  No time wasting with mappings on the hardware side, on the software side, this solution will it be in future, hopefully.
* https://github.com/michaelsjackson/r...orums/issues/4
|
|
|
02-26-2020, 03:50 PM
|
#444
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Thanks. Can you also give me a testscript, which reflects the behavior with the testproject?
|
|
|
02-26-2020, 11:43 PM
|
#445
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,962
|
Thanks for caring, here we go.
export_track_names.lua
PHP Code:
-- export track number, track name, fx name, parameter name as text file, TonE greets you :)
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua") -- required for ultraschall
local reaper = reaper
-- construct an array
track_names_array = {}
function Main( )
-- construct a string
result = ""
for i=1,reaper.CountTracks() do
track_names_array[i] = {}
-- i is track number, starting counting with 1
trackname = ultraschall.GetTrackName(i)
track_names_array[i].trackname = trackname
-- fxname = ultraschall.GetTrackName(i)
local fromTrack = reaper.GetTrack(0,i-1)
if fromTrack ~= nil
then
local fxcount = reaper.TrackFX_GetCount(fromTrack)
-- first of triple command
B0, TrackStateChunk = reaper.GetTrackStateChunk(fromTrack,"",false)
-- second of triple command
-- Returns an FXStateChunk from a TrackStateChunk or a MediaItemStateChunk.
-- An FXStateChunk holds all FX-plugin-settings for a specific MediaTrack or MediaItem.
FXStateChunk = ultraschall.GetFXStateChunk(TrackStateChunk, 1)
if fxcount == 0 then
result = result .. i .. "," .. trackname .. "," .. "fx count:0" .. "\n"
else
for j=1,fxcount do
--local ret, fxname = reaper.TrackFX_GetFXName(fromTrack, 0, "")
local ret, fxname = reaper.TrackFX_GetFXName(fromTrack, j-1, "")
-- if fxname == "" then fxname = "fxname will be here" end
track_names_array[i].fxname = fxname -- fxname using 0 it should show first fx at least
-- get parameter names from fxname
numparams = reaper.TrackFX_GetNumParams(fromTrack, j-1)
-- third of triple command
-- integer count = ultraschall.CountParmLearn_FXStateChunk(string FXStateChunk, integer fxid)
-- Description:
-- Counts already existing Parm-Learn-entries of an FX-plugin from an FXStateChunk.
paramslearned = ultraschall.CountParmLearn_FXStateChunk(FXStateChunk, j-1)
for k=1,numparams do
--boolean retval, string buf = reaper.TrackFX_GetParamName(MediaTrack track, integer fx, integer param, string buf)
ret, paramname = reaper.TrackFX_GetParamName(fromTrack, j-1, k-1, "")
--track_names_array[i].paramname = "paramname will be here" -- paramname is the goal here
result = result .. i .. "," .. trackname .. "," .. fxname .. "," .."fx count:" .. j .. "," .. paramname .. "," .. "param count:" .. k .. "," .. "paramslearned:" .. paramslearned .. "\n"
-- "parm learn:" .. A .. B .. C .. D .. E .. "\n"
--j = j - 1
--ultraschall.GetParmLearn_MediaTrack(MediaTrack, fxid, id)
--A,B,C,D,E,F,G=ultraschall.GetParmLearn_MediaTrack(reaper.GetTrack(0,0), 1, 1)
end
end
end
end
end
end
function export()
-- OS BASED SEPARATOR
if reaper.GetOS() == "Win32" or reaper.GetOS() == "Win64" then
slash = "\\"
else
slash = "/"
end
resource = reaper.GetResourcePath()
-- file_name = reaper.GetTakeName( take )
-- dir_name = resource .. slash .. "Data" .. slash .. "MIDI Sequences"
dir_name = reaper.GetProjectPath("")
reaper.RecursiveCreateDirectory(dir_name, 0)
-- file = dir_name .. slash .. file_name .. ".txt"
file = dir_name .. slash .. "midi_mappings" .. ".txt"
-- CREATE THE FILE
-- f = io.open(file, "w")
-- io.output(f)
--Msg(file)
-- for i, line in ipairs(track_names_array) do
-- f:write( tostring( i .. "," .. track_names_array[i].trackname .. "," .. track_names_array[i].fxname .. "," .. track_names_array[i].paramname ) )
-- if i == #track_names_array then break end
-- f:write("\n")
-- end
-- f:close() -- never forget to close the file
-- Msg("File exported: " .. file)
file2 = dir_name .. slash .. "midi_mappings_result" .. ".txt"
f = io.open(file2, "w")
io.output(f)
f:write( result )
f:close()
Msg("File exported: " .. file2)
end
function Msg(g)
reaper.ShowConsoleMsg(tostring(g).."\n")
end
-------------------------------
-- INIT
-------------------------------
reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function.
Main( ) -- Execute your main function
export()
reaper.Undo_EndBlock("Export track based midi mapping information as CSV", 0) -- End of the undo block. Leave it at the bottom of your main function.
reaper.UpdateArrange() -- Update the arrangement (often needed)
-- end --
|
|
|
03-16-2020, 07:31 AM
|
#446
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 800
|
Quote:
Originally Posted by mespotine
It'll start probably in April, as I need some time to rest. Only bugfixes until then.
|
May I come with an additional suggestion?
It would be nice to have a function that check if a time selection is done -
boolean IsTimeSelectionDone.
Have looked in ReaperAPI and UltrashallAPI but couldn't find it....
|
|
|
03-16-2020, 08:34 AM
|
#447
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 11,965
|
Quote:
Originally Posted by tompad
It would be nice to have a function that check if a time selection is done
|
Here's an example script to check if a time selection is set:
https://forum.cockos.com/showthread....53#post2169253
|
|
|
03-16-2020, 11:55 AM
|
#448
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 800
|
Quote:
Originally Posted by nofish
|
Voow! Thanks!
(Silly me - forgot to check the forum - just checked the ReaperAPI and UltrashallAPI)
|
|
|
03-17-2020, 11:55 AM
|
#449
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
But yeah, it could be helpful to have such a function, so I'll put one in.
|
|
|
03-17-2020, 11:45 PM
|
#450
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 800
|
Quote:
Originally Posted by mespotine
But yeah, it could be helpful to have such a function, so I'll put one in.
|
Great - thanks!
|
|
|
04-17-2020, 02:02 PM
|
#452
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Yes, it's the right placce to post it.
I'll check and fix it. Thanks for reporting.
Can you give me the Reapack-link to Ultraschall-API, you are using?
Edit:
You are using the pre-release-reapack-index, which will have problems in the next few days. I recommend to use the official one:
https://github.com/Ultraschall/ultra..._api_index.xml
@all
No one complained about the fact, that I presented the final, but didn't update the Reapack-index file for that. I'm somehow disappointed
Just kidding. Updated index-file.
Last edited by Meo-Ada Mespotine; 04-17-2020 at 02:37 PM.
|
|
|
04-17-2020, 06:57 PM
|
#453
|
Human being with feelings
Join Date: Jan 2020
Location: Forest, VA
Posts: 329
|
Thank you very much!
30 years in live sound during the analog days did not prepare me for DAW's and scripts. But I do enjoy it. Just take awhile to get started again.
Thanks
Warren
|
|
|
04-17-2020, 07:09 PM
|
#454
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Have fun with it. Reaper-scripting is cool.
|
|
|
04-18-2020, 08:47 AM
|
#455
|
Human being with feelings
Join Date: Apr 2014
Posts: 93
|
Hello!
I'm reporting a bug in the RenderProject_RenderTable function : the OnlyMonoMedia flag boolean value is not taken into account.
Here's the code :
1.I create a render table with all my options,
2.I save it to the project, when I check in reaper, it's correctly saved
3.When I call the RenderProject_RenderTable, the rendered file is stereo.
Thanks,
PHP Code:
function RenderAllSelectedItemsThroughMaster() --wav config wav 24bits function render_cfg_string = ultraschall.CreateRenderCFG_WAV(2, 0, 0, 0, false) --Settings of the render table sourceDropDown=32 -- 0 MasterMix, 32 Selected Mediam Items, 64 selected item via master bounds=4 -- 2 TimeSelection, 3 Projects region, 4 Selected Media, 5 Selected Regions Startposition =0 Endposition =0 TailFlag =1 TailMS=0 renderDirectory="D:\\Test\\" filePattern="$item" sampleRate=48000 channels=2 OfflineOnlineRendering=0 ProjectSampleRateFXProcessing =true RenderResample =9 OnlyMonoMedia = true MultiChannelFiles=false dither=0 SilentlyIncrementFilename=false AddToProj=false SaveCopyOfProject=false RenderQueueDelay=false RenderQueueDelaySeconds=0 CloseAfterRender=false --Create the RenderTable RenderTable = ultraschall.CreateNewRenderTable(sourceDropDown, bounds, Startposition, Endposition, TailFlag, TailMS, renderDirectory, filePattern, sampleRate, channels, OfflineOnlineRendering, ProjectSampleRateFXProcessing, RenderResample, OnlyMonoMedia, MultiChannelFiles, dither, render_cfg_string, SilentlyIncrementFilename, AddToProj, SaveCopyOfProject, RenderQueueDelay, RenderQueueDelaySeconds, CloseAfterRender) --Apply the render table to project ultraschall.ApplyRenderTable_Project(RenderTable,false) ultraschall.ShowLastErrorMessage() --Render with the Render table local count, MediaItemStateChunkArray, Filearray = ultraschall.RenderProject_RenderTable(nil, RenderTable, false, false, false)
ultraschall.ShowLastErrorMessage()
return Filearray end
|
|
|
04-18-2020, 10:00 AM
|
#456
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Thanks, I'll have a check.
|
|
|
04-18-2020, 10:19 AM
|
#457
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
New Hotfix available:
Hotfix 1 from 18th of April 2020
Changes:
- Markers: CountNormalMarkers_NumGap - had inner variables exposed -> fixed(thanks to fernsehmuell)
- MediaItems: IsValidMediaItemStateChunkArray - didn't always return true, when MediaItemStateChunkArrays were passed over it -> fixed
- Render: ApplyRenderTable_Project - accidentally reversed true and false in parameter OnlyMonoMedia -> fixed (thanks to aurelien)
- Ultraschall: IsTrackSoundboard - had inner variable exposed -> fixed
- Ultraschall: IsTrackStudioLink - had inner variable exposed -> fixed
- Ultraschall: IsTrackStudioLinkOnAir - had inner variable exposed -> fixed
please update your ReaPacks.
@aurelien
Should be fixed now. Was a problem with ApplyRenderTable_Project, which mistook false as true and true as false. Stupid bug on my side.
|
|
|
04-18-2020, 11:43 AM
|
#458
|
Human being with feelings
Join Date: Apr 2014
Posts: 93
|
Awesome, thanks Mespotine!
|
|
|
04-18-2020, 05:35 PM
|
#459
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Ok, will now post under this new account, to prevent accidental misgendering.
Also means, PMs only to this one.
You can stille use @mespotine to address me
|
|
|
04-19-2020, 03:32 AM
|
#460
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,962
|
Quote:
Originally Posted by mespotine
Have fun with it. Reaper-scripting is cool.
|
Especially, we have immediate gratification, when things work, in an area we are really interested, like making music, and not some code examples from programming books, that makes it big fun.
|
|
|
04-19-2020, 04:52 PM
|
#461
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Ok, boys and girls, I'm back at developing Ultraschall-API.
The first instalment of the US-API 4.1-devcycle will be released probably next week.
Have some big plans for it in preparation and in parts, actual development.
|
|
|
04-19-2020, 10:54 PM
|
#462
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 800
|
Quote:
Originally Posted by Meo-Ada Mespotine
Ok, boys and girls, I'm back at developing Ultraschall-API.
The first instalment of the US-API 4.1-devcycle will be released probably next week.
Have some big plans for it in preparation and in parts, actual development.
|
Yummy!
|
|
|
04-27-2020, 02:43 AM
|
#463
|
Human being with feelings
Join Date: Apr 2014
Posts: 93
|
Hi !
Found a bug in the following function in ultraschall_functions_TrackManagement_Module.lua
PHP Code:
function ultraschall.DeleteTracks_TrackString(trackstring)
Line 1536, when the API is calling this method with more than one track, the tracking argument is "tracknumber1,tracknumber2" and when the reaper.DeleteTrack is called, we get the following :
bad argument #1 to 'DeleteTrack' (MediaTrack expected)
Code is below :
PHP Code:
local valid, count, individual_tracknumbers = ultraschall.IsValidTrackString(trackstring) if valid==false then ultraschall.AddErrorMessage("DeleteTracks_TrackString", "trackstring", "must be a valid trackstring", -1) return false end for i=1, count do reaper.DeleteTrack(reaper.GetTrack(0,individual_tracknumbers[i]-1)) end return true end
Investigated a bit more, as you delete tracks, need to iterate the loop by beginning at the end:
PHP Code:
for i=count, 1, -1 do reaper.DeleteTrack(reaper.GetTrack(0,individual_tracknumbers[i]-1)) end
Last edited by aurelien; 04-27-2020 at 03:51 AM.
|
|
|
04-27-2020, 09:52 AM
|
#464
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Thanks, will fix this asap.
|
|
|
04-27-2020, 06:43 PM
|
#465
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
New Hotfix available:
Hotfix2: 28th of April 2020
- DeveloperTools: Ultraschall State Inspector - extended number of saveslots to 20; didn't correctly store and load gmem-states from the stateslots -> fixed (thanks to lexaproductions)
- TrackManagement: DeleteTracks_TrackString - didn't correctly delete the right tracks, sometimes throwing Lua-error -> fixed (thanks to aurelien)
Please update your ReaPacks.
|
|
|
04-27-2020, 09:27 PM
|
#466
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,076
|
Quote:
Originally Posted by Meo-Ada Mespotine
New Hotfix available:
- DeveloperTools: Ultraschall State Inspector - extended number of saveslots to 20; didn't correctly store and load gmem-states from the stateslots -> fixed (thanks to lexaproductions)
|
Man you have no clue for how long I wanted to have GMEMS in this script. Thank yoooouuuuuuuu!!!!
|
|
|
04-27-2020, 09:38 PM
|
#467
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Quote:
Originally Posted by lexaproductions
Man you have no clue for how long I wanted to have GMEMS in this script. Thank yoooouuuuuuuu!!!!
|
Woman! :P
I also raised the number of saveslots available to 20, as I thought, nine are somehow very limited. Could be helpful as well, the more states for monitoring are needed.
Note to myself:
Definitely need to rewrite it from scratch. The codebase is terrible and messy for the StateInspector... Geez....
Last edited by Meo-Ada Mespotine; 04-27-2020 at 09:43 PM.
|
|
|
04-28-2020, 11:59 PM
|
#468
|
Human being with feelings
Join Date: May 2019
Location: Los Angeles, CA
Posts: 154
|
LOVE this API - thank you!
I was having trouble getting ultraschall.MB to work (nothing would happen) - so I enabled the function to show errors in the Console. The error I received was that I wasn't running Windows. ...but I am running Windows
I tracked it down to ultraschall_functions_ReaperUserInterface_Module, line 1071, where we have:
Code:
if ultraschall.IsOS_Windows()==true then ultraschall.AddErrorMessage("MB", "", "works only on Windows, sorry", 0) return -1 end
...but shouldn't it be instead:
Code:
if ultraschall.IsOS_Windows()~=true...
Meaning, it should error if IsOS_Windows does not return true? I changed this and now it's working great  ...until you push an update, lol!
|
|
|
04-29-2020, 07:45 AM
|
#469
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Oh.. Erhmm.. Will check that and make this bug never happened at all...
Geez... It's always the stupid typos being the annoyed bugs.
By the way, you can use SLEM() as well, which displays the last error message.
|
|
|
04-29-2020, 11:44 AM
|
#470
|
Human being with feelings
Join Date: May 2019
Location: Los Angeles, CA
Posts: 154
|
Quote:
Originally Posted by Meo-Ada Mespotine
Oh.. Erhmm.. Will check that and make this bug never happened at all...Geez... It's always the stupid typos being the annoyed bugs.
|
LOL no problem! Your work is appreciated.
If it makes you feel better - in your response, I thought "SLEM? What does that mean? Why 'SLEM' for an error message?"
yeah...Show...Last...Error...Message...
|
|
|
04-29-2020, 01:36 PM
|
#471
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Funny thing is, as the word sound very much like JAM, I always have Michael Jackson's Jam in my head, when writing this function O_O XD
|
|
|
04-30-2020, 01:54 PM
|
#472
|
Human being with feelings
Join Date: Apr 2014
Posts: 93
|
Quick question, i updated via reapack but i did not get the hotfix, is there something specific to do to get them?
|
|
|
04-30-2020, 05:52 PM
|
#473
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Hmm, it should have been in there. Can you post me the outputs of GetApiVersion?
|
|
|
05-01-2020, 08:43 PM
|
#474
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
New Hotfix available:
- Helperfunctions: IsValidMatchingPattern - wasn't reporting unfinished captures all the time -> improved
- User Interface: MB - didn't work on Windows, though it should only work on Windows -> fixed (thanks to TabbyCat)
Please update your ReaPacks
Last edited by Meo-Ada Mespotine; 05-01-2020 at 10:20 PM.
|
|
|
05-02-2020, 01:29 AM
|
#475
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 800
|
Hi Meo-Ada!
Any news on IsTimeSigmarkersAtPosition and IsTimeSelectionDone?
|
|
|
05-02-2020, 04:52 PM
|
#476
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
IsTimeSigmarkersAtPosition with the next release. With IsTimeSelectionDone, it's returning true if there's a timeselection, right? If yes, will also be in the next one.
|
|
|
05-02-2020, 07:51 PM
|
#477
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Quote:
Originally Posted by TonE
Thanks for caring, here we go.
export_track_names.lua
PHP Code:
-- export track number, track name, fx name, parameter name as text file, TonE greets you :)
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua") -- required for ultraschall
local reaper = reaper
-- construct an array track_names_array = {} function Main( ) -- construct a string result = "" for i=1,reaper.CountTracks() do track_names_array[i] = {}
-- i is track number, starting counting with 1 trackname = ultraschall.GetTrackName(i) track_names_array[i].trackname = trackname
-- fxname = ultraschall.GetTrackName(i) local fromTrack = reaper.GetTrack(0,i-1) if fromTrack ~= nil then local fxcount = reaper.TrackFX_GetCount(fromTrack)
-- first of triple command B0, TrackStateChunk = reaper.GetTrackStateChunk(fromTrack,"",false)
-- second of triple command -- Returns an FXStateChunk from a TrackStateChunk or a MediaItemStateChunk. -- An FXStateChunk holds all FX-plugin-settings for a specific MediaTrack or MediaItem. FXStateChunk = ultraschall.GetFXStateChunk(TrackStateChunk, 1)
if fxcount == 0 then result = result .. i .. "," .. trackname .. "," .. "fx count:0" .. "\n" else for j=1,fxcount do --local ret, fxname = reaper.TrackFX_GetFXName(fromTrack, 0, "") local ret, fxname = reaper.TrackFX_GetFXName(fromTrack, j-1, "") -- if fxname == "" then fxname = "fxname will be here" end track_names_array[i].fxname = fxname -- fxname using 0 it should show first fx at least -- get parameter names from fxname numparams = reaper.TrackFX_GetNumParams(fromTrack, j-1)
-- third of triple command -- integer count = ultraschall.CountParmLearn_FXStateChunk(string FXStateChunk, integer fxid) -- Description: -- Counts already existing Parm-Learn-entries of an FX-plugin from an FXStateChunk. paramslearned = ultraschall.CountParmLearn_FXStateChunk(FXStateChunk, j-1)
for k=1,numparams do --boolean retval, string buf = reaper.TrackFX_GetParamName(MediaTrack track, integer fx, integer param, string buf) ret, paramname = reaper.TrackFX_GetParamName(fromTrack, j-1, k-1, "") --track_names_array[i].paramname = "paramname will be here" -- paramname is the goal here result = result .. i .. "," .. trackname .. "," .. fxname .. "," .."fx count:" .. j .. "," .. paramname .. "," .. "param count:" .. k .. "," .. "paramslearned:" .. paramslearned .. "\n" -- "parm learn:" .. A .. B .. C .. D .. E .. "\n" --j = j - 1
--ultraschall.GetParmLearn_MediaTrack(MediaTrack, fxid, id) --A,B,C,D,E,F,G=ultraschall.GetParmLearn_MediaTrack(reaper.GetTrack(0,0), 1, 1)
end end end end end
end
function export() -- OS BASED SEPARATOR if reaper.GetOS() == "Win32" or reaper.GetOS() == "Win64" then slash = "\\" else slash = "/" end
resource = reaper.GetResourcePath()
-- file_name = reaper.GetTakeName( take ) -- dir_name = resource .. slash .. "Data" .. slash .. "MIDI Sequences" dir_name = reaper.GetProjectPath("") reaper.RecursiveCreateDirectory(dir_name, 0)
-- file = dir_name .. slash .. file_name .. ".txt" file = dir_name .. slash .. "midi_mappings" .. ".txt"
-- CREATE THE FILE -- f = io.open(file, "w") -- io.output(f) --Msg(file)
-- for i, line in ipairs(track_names_array) do -- f:write( tostring( i .. "," .. track_names_array[i].trackname .. "," .. track_names_array[i].fxname .. "," .. track_names_array[i].paramname ) ) -- if i == #track_names_array then break end -- f:write("\n") -- end
-- f:close() -- never forget to close the file
-- Msg("File exported: " .. file)
file2 = dir_name .. slash .. "midi_mappings_result" .. ".txt" f = io.open(file2, "w") io.output(f) f:write( result ) f:close() Msg("File exported: " .. file2) end
function Msg(g) reaper.ShowConsoleMsg(tostring(g).."\n") end
------------------------------- -- INIT -------------------------------
reaper.Undo_BeginBlock() -- Begining of the undo block. Leave it at the top of your main function.
Main( ) -- Execute your main function export()
reaper.Undo_EndBlock("Export track based midi mapping information as CSV", 0) -- End of the undo block. Leave it at the bottom of your main function.
reaper.UpdateArrange() -- Update the arrangement (often needed)
-- end --
|
I've investigated into it.
the following line in your code is the problem:
Code:
paramslearned = ultraschall.CountParmLearn_FXStateChunk(FXStateChunk, j-1)
it should be this way, as you were trying to read the zero'th parmlearn, not the first parmlearn.
Code:
paramslearned = ultraschall.CountParmLearn_FXStateChunk(FXStateChunk, j)
I'll add an error-message, which will warn, if you try to set fxid=0, instead of fxid=1 and higher.
Last edited by Meo-Ada Mespotine; 05-02-2020 at 07:58 PM.
|
|
|
05-03-2020, 01:27 AM
|
#478
|
Human being with feelings
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 800
|
Quote:
Originally Posted by Meo-Ada Mespotine
IsTimeSigmarkersAtPosition with the next release. With IsTimeSelectionDone, it's returning true if there's a timeselection, right? If yes, will also be in the next one.
|
Yes!
Thank you so much, miss!
|
|
|
05-04-2020, 03:37 AM
|
#479
|
Human being with feelings
Join Date: Apr 2014
Posts: 93
|
Quote:
Originally Posted by Meo-Ada Mespotine
Hmm, it should have been in there. Can you post me the outputs of GetApiVersion?
|
I'm getting the following (printing all variables)
400.1 4.00 11th of February 2020 "Aphrodite's Child - Four Horsemen" 2_May_2020
|
|
|
05-04-2020, 11:21 AM
|
#480
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,484
|
Ok, this is weird. I'll check.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 09:42 PM.
|