 |
|
|
10-25-2020, 02:22 PM
|
#601
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,962
|
Well, it is easy, I will do next time I will play around, above was my experiment for today.
16 bits from above 30384, calculator shows its 16-bit binary representation, the first 8 bits (from left to right) give its cc value, here 118. Next 4 bits give B, meaning it is a CC event. The last 4 bits give its midi channel, 0 meaning midi channel 1.
PHP Code:
118...... B... 0...
0111 0110 1011 0000
It is just cutting, converting, outputting. I would think Reaper api or ultraschall api should already have lots of functions doing those steps, one only needs to know where. I can do it if no one does it until then. Thanks for the quick response as always, and your great work of course.
|
|
|
10-25-2020, 04:03 PM
|
#603
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,962
|
Writing out to csv I did already using this:
PHP Code:
parm_idx, parmname, midi_note, checkboxflags = ultraschall.GetParmLearn_FXStateChunk(FXStateChunk, j, k)
if midi_note == nil
then midi_note = -1
value = -1
evtype = -1
channel = -1
else
value = (midi_note & 0xFF00) >> 8
evtype = (midi_note & 0x00F0) >> 4
if evtype == 11 then evtype = "cc" end
channel = (midi_note & 0x000F) + 1
end
Next and more important step will be the way back, csv_import_midi_mappings.lua
Next weekend maybe.
|
|
|
10-25-2020, 04:14 PM
|
#604
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Take your time. The next Ultraschall-Api update will not be before december.
|
|
|
10-25-2020, 04:34 PM
|
#605
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,962
|
Found some interesting behaviour.
midi_note from my code above has in certain cases the value 0, even if I have no midi mapping learned there. Not sure what is causing this, I would expect a nil value instead.
Or CountParmLearn_FXStateChunk has some misbehaviour somewhere, counting as 1 where it should count 0 because nothing is learned in those fx.
My example use case is as follows:
PHP Code:
paramslearned = ultraschall.CountParmLearn_FXStateChunk(FXStateChunk, j)
|
|
|
10-25-2020, 05:13 PM
|
#606
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Can you post the FXStateChunk that counts wrong and the one that counts right(for both, midinote and CountParmLearn_FXStateChunk).
Maybe it's some edgecases I didn't catch.
|
|
|
10-25-2020, 05:13 PM
|
#607
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,962
|
This is what I have so far for exporting all midi mappings as csv file (.txt but in csv format), in case someone wants to try it out. It gives you a list of all track numbers, track names, fx names, fx parameters and if any of those parameters are midi mapped (only cc and notes so far, osc excluded for now), if mapped showing also the mapping. The file is exported into the project directory, so you should save your project first. I hope your computer will not explode. No warranties of course. Have fun.
export_midi_mappings_as_csv.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, "")
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)
paramslearned = ultraschall.CountParmLearn_FXStateChunk(FXStateChunk, j)
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, "")
-- integer parm_idx, string parmname, integer midi_note, integer checkboxflags, optional string osc_message = ultraschall.GetParmLearn_FXStateChunk(string FXStateChunk, integer fxid, integer id)
parm_idx, parmname, midi_note, checkboxflags = ultraschall.GetParmLearn_FXStateChunk(FXStateChunk, j, k)
if midi_note == nil
then midi_note = -1
value = -1
evtype = -1
channel = -1
else
value = (midi_note & 0xFF00) >> 8
evtype = (midi_note & 0x00F0) >> 4
if evtype == 11 then evtype = "cc" end
if evtype == 9 then evtype = "note" end
channel = (midi_note & 0x000F) + 1
end
result = result .. i .. "," .. trackname .. "," .. fxname .. "," .."fx count:" .. j .. "," .. paramname .. "," .. "param count:" .. k .. "," .. "paramslearned:" .. paramslearned .. "," .. "midi mapping:" .. midi_note .. "," .. "event type:" .. evtype .. "," .. "value:" .. value .. "," .. "channel:" .. channel .. "\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()
dir_name = reaper.GetProjectPath("")
reaper.RecursiveCreateDirectory(dir_name, 0)
file = dir_name .. slash .. "midi_mappings" .. ".txt"
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 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 --
|
|
|
10-25-2020, 11:13 PM
|
#608
|
Human being with feelings
Join Date: Oct 2018
Posts: 367
|
I'm having some issues with ultraschall.RenderProject, with inconsistent lengths and delays being introduced. The script I'm using is here and I provided some examples of what I'm seeing below. Also fyi I'm rendering 3 instances of the same audio file to 3 instances of Reatune and there are no other plugins present
ultraschall.RenderProject not rendering to the time selection:
ultraschall.RenderProject introducing delays compared to the native render, very prominent with Online Render and more subtle with Full-Speed Offline Render:
I'm not sure if these two issues are related or not, if I snip off the extra length and drag it over I can see it's not a perfect fit for the delays so I'm not sure what's going on
|
|
|
10-26-2020, 02:56 AM
|
#609
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Can you post the projectfile as well?
|
|
|
10-26-2020, 10:30 AM
|
#610
|
Human being with feelings
Join Date: Oct 2018
Posts: 367
|
It's 2.4 MB, I'll email it to you
Last edited by pandabot; 10-26-2020 at 10:36 AM.
|
|
|
10-26-2020, 11:29 AM
|
#611
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Thanks, I will have a look. But please be patient with me as I'm currently taking a break from coding a little.
But I hope, I can reproduce and find the issue.
Btw, could you check, whether this also happens, when you use the action for rendering the project using last render settings(don't remember the exact name of it right now but you'll find it)?
If the same thing happens with that action, then it's a Reaper-bug, otherwise the problem lies somewhere else.
|
|
|
10-26-2020, 11:44 AM
|
#612
|
Human being with feelings
Join Date: Oct 2018
Posts: 367
|
Quote:
Originally Posted by Meo-Ada Mespotine
Btw, could you check, whether this also happens, when you use the action for rendering the project using last render settings(don't remember the exact name of it right now but you'll find it)?
If the same thing happens with that action, then it's a Reaper-bug, otherwise the problem lies somewhere else.
|
I don't know what action you're referring to, this only happens when using the api call though. Rendering the normal way through Reaper works fine
|
|
|
10-26-2020, 12:33 PM
|
#613
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
There is a dedicated action, that you can call to start the rendering right away, without having to go through the Render to file dialog. It uses the Render-settings you have currently set.
This is the one I use for my render functions as well. I first set all the Render-settings and then run the render-action.
I think it should be findable using the words "render last" or "render recent" in the actionlist.
I'm currently afk, so I can't check right now...
I need the actionlist available online so I can look through it evern when I'm afk...
Edit:
If you find the action, just run it. If the result is as you expect it, the problem is in my functions probably.
Last edited by Meo-Ada Mespotine; 10-26-2020 at 12:42 PM.
|
|
|
11-09-2020, 01:20 PM
|
#614
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,999
|
Hey Mespo,
do you have any idea if "key snap" in the MIDI editor (all the way down) can be changed via configvar? I couldn't find it in your docs.
|
|
|
11-09-2020, 02:13 PM
|
#615
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Easiest is to run my config var displayer script which is part of the developer tools of Ultraschall-Api and change the setting.
If anything pops up in the ReaScript-console, then it's probably the candidate.
Change the setting numerous times as sometimes changeing a certain configvar changes another once.
|
|
|
11-09-2020, 03:20 PM
|
#616
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Hmm, seems like they are stored in the reaper.ini
reaper.ini->[midiedit] -> snapflags
|
|
|
11-10-2020, 02:30 AM
|
#617
|
Human being with feelings
Join Date: Apr 2014
Posts: 93
|
Hello Mespotine,
The CreateNewRenderTable doesn't take the OnlyMonoMedia & MultiChannel boolean into account anymore, reaper is not changing the checkbox.
Apply the render settings and check the render window.
Code below :
PHP Code:
function RenderAllSelectedItems() --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 =0 TailMS=0 renderDirectory=renderDirectoryUser 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) ultraschall.ShowLastErrorMessage()
--Apply the render table to project ultraschall.ApplyRenderTable_Project(RenderTable) ultraschall.ShowLastErrorMessage() --Render with the Render table --integer count, array MediaItemStateChunkArray, array Filearray = ultraschall.RenderProject_RenderTable(optional string projectfilename_with_path, optional RenderTable RenderTable, optional boolean AddToProj, optional boolean CloseAfterRender, optional boolean SilentlyIncrementFilename) local count, MediaItemStateChunkArray, Filearray = ultraschall.RenderProject_RenderTable(nil, nil, false, true, false) ultraschall.ShowLastErrorMessage()
return Filearray end
Thanks!
|
|
|
11-10-2020, 06:57 AM
|
#618
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Ok, will have a look, as this is a serious issue.
|
|
|
11-10-2020, 11:39 AM
|
#619
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,999
|
Quote:
Originally Posted by Meo-Ada Mespotine
Hmm, seems like they are stored in the reaper.ini
reaper.ini->[midiedit] -> snapflags
|
Thanks! Just checked, unfortunately that value doesn't seem recognized by GetIntConfigVar().
EDIT: sorry, wrong! That's the value, thanks again!
|
|
|
11-10-2020, 11:44 AM
|
#620
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Yeah, it can't be set unfortunately.
|
|
|
11-10-2020, 12:07 PM
|
#621
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,999
|
Yeah and after toggling the key snap in the ME, unfortunately the value doesn't change. So I'm not 100% sure if that's the value we are looking at.
|
|
|
11-10-2020, 01:30 PM
|
#622
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 11,965
|
@Stevie
The value can be retrieved with MIDIEditor_GetSetting_int using "scale_enabled", but surprisingly (to me) it seems it can't be set using corresponding MIDIEditor_SetSetting_int (at least didn't work for me and not listed in description).
Maybe worth a FR?
Last edited by nofish; 11-10-2020 at 01:36 PM.
|
|
|
11-11-2020, 03:15 AM
|
#623
|
Human being with feelings
Join Date: Oct 2017
Location: Black Forest
Posts: 4,999
|
Ahh thanks nofish, I completely forgot about that command!
Yes, an FR would be a good idea in this case.
|
|
|
11-13-2020, 11:24 AM
|
#624
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Quote:
Originally Posted by pandabot
I'm having some issues with ultraschall.RenderProject, with inconsistent lengths and delays being introduced. The script I'm using is here and I provided some examples of what I'm seeing below. Also fyi I'm rendering 3 instances of the same audio file to 3 instances of Reatune and there are no other plugins present
ultraschall.RenderProject not rendering to the time selection:
ultraschall.RenderProject introducing delays compared to the native render, very prominent with Online Render and more subtle with Full-Speed Offline Render:
I'm not sure if these two issues are related or not, if I snip off the extra length and drag it over I can see it's not a perfect fit for the delays so I'm not sure what's going on
|
Ok, I can confirm this and I'm on this bug.
Edit1: Hmm, it seems to be only in RenderProject but not in RenderProject_RenderTable.
Even worse, the set starttime doesn't change somewhere inbetween my code. So I think, it's a Reaper-bug and I can't trigger it reliably...
Edit2:
Found the culprit. Reaper produces different filelength when rendering out wavs.
When you render the project using the settings in the Render-to-File-dialog, you render them out as online-render. This file is slightly longer.
But RenderProject renders the project out as offline-render. This file is slightly shorter.
This seems to be only the case with WAV.
So, how do you solve it, until the issue is solved in Reaper?
You get a RenderTable, using GetRenderTable_Project
https://mespotin.uber.space/Ultrasch...rTable_Project
You set the table-entries
RenderTable["Startposition"]=startposition of the time-selection
RenderTable["Endposition"]=endposition of the time-selection
alternatively you can set
RenderTable["Bounds"]=2
which sets the bounds to the time-selection.
Now you render the project out using another rendering-function: RenderProject_RenderTable
https://mespotin.uber.space/Ultrasch...ct_RenderTable
So the code for the render-function in your script could be:
Code:
function render(fileName)
-- get the current project's render-settings
RenderTable=ultraschall.GetRenderTable_Project()
-- create render-configuration-string for wav
local renderConfigurationString = ultraschall.CreateRenderCFG_WAV(thirtyTwoBitsFloatingPoint(),
largeFilesAreAutoWavSlashWave64(),
writeBwfIsCheckedAndIncludeProjectFilenameIsUnchecked(),
doNotIncludeMarkersOrRegions(),
doNotEmbedTempo())
local startsel, endsel = reaper.GetSet_LoopTimeRange2(0, false, false, 0, 0, false) -- get the time-selection
-- alter the render-table
RenderTable["Startposition"]=startsel -- set the start of the time-selection
RenderTable["Endposition"]=endsel -- set the end of the time-selection
RenderTable["RenderString"]=renderConfigurationString -- set output-format to wav
RenderTable["OfflineOnlineRendering"]=2 -- set to online-rendering
RenderTable["RenderFile"]="/Users/Panda/Desktop/" -- set output-directory
RenderTable["RenderPattern"]=fileName..".wav" -- set the output-filename
-- now, let's render it out
ultraschall.RenderProject_RenderTable(nil, RenderTable, false, closeTheRenderWindowWhenDone(), silentlyIncreaseTheFilenameIfItAlreadyExists())
end
Here's the bugreport I opened up: https://forum.cockos.com/showthread....05#post2364505
Last edited by Meo-Ada Mespotine; 11-13-2020 at 05:09 PM.
|
|
|
11-13-2020, 11:55 PM
|
#625
|
Human being with feelings
Join Date: Oct 2018
Posts: 367
|
Whoa I appreciate your work on this, I didn't expect it to be this deep
|
|
|
11-14-2020, 04:09 AM
|
#626
|
Human being with feelings
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 3,962
|
Quote:
Originally Posted by pandabot
Whoa I appreciate your work on this, I didn't expect it to be this deep
|
ultraschall api, deeper than the deep.  Or Deaper.
|
|
|
11-22-2020, 01:47 PM
|
#627
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Question to all scripters using Ultraschall-API:
Do you use any of the ini-files included in UserPlugins/ultraschall_api/IniFiles ?
I'm currently cleaning Ultraschall-API up to reduce its size and want to remove as many of the huge files as possible(and add small and helpful functions to deal with the same information instead) and I don't want to break your scripts by deleting them.
The other way could be deleting them, releasing the next update and wait for the complaints to come in(would be bad style).
|
|
|
11-22-2020, 05:53 PM
|
#628
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,546
|
I don't use any of this.
I guess if I need this, it wouldn't be the whole list, just few keys. So it could be just online doc somewhere but no need for download.
IMHO, every thing which is pure documentation should be kept online. (ultraschall_api\DocsSourcefiles and others in misc)
|
|
|
11-22-2020, 08:07 PM
|
#629
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Quote:
Originally Posted by X-Raym
IMHO, every thing which is pure documentation should be kept online. (ultraschall_api\DocsSourcefiles and others in misc)
|
I have plans for these docs-files, so they'll actually stay.
I've resized in many other ways so Ultraschall-Api is now 50% smaller from the next release on.
|
|
|
11-23-2020, 12:56 AM
|
#630
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,546
|
What are plans for doc files ?
AlsonI checked the lua sourve code and the full doc is above each function with custom Markup etc.
This seems quite verbose, especially as there is external files to store these.
I assume that these are generated by what is in the lua files, but usually parser will change the format, on in this case it is still xml. So you will save doc size by 50% by directly writing into your usdoc files and remove coments from the lua files.
Also, the HTMl files could be 50% lighter without inline CSS.
The lighter it will be, the less handy to manage and to collaborate :P
|
|
|
11-23-2020, 04:52 AM
|
#631
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Quote:
Originally Posted by X-Raym
AlsonI checked the lua sourve code and the full doc is above each function with custom Markup etc.
This seems quite verbose, especially as there is external files to store these.
I assume that these are generated by what is in the lua files,
...
|
Nope, the docs for the Ultraschall-Api functions are only in the Lua-files, so I can update them immediately where they are. Having them in an external file to update docs is a workflow nightmare. Had external file some time ago for the docs already. Never will return to that.
My plans? Would spoil the surprise, don't you think? :P
|
|
|
11-23-2020, 07:49 AM
|
#632
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,546
|
Quote:
Nope, the docs for the Ultraschall-Api functions are only in the Lua-files,
|
The simple existence of this page and usdocfiles contradicts this :P The ultraschall functions docs aren't just in the lua files. They are also on the HTML ones and usdocfiles (at least at first sight).
My naïve proposition is to have doc directly in HTML without having to write the data elsewhere,
or at least having way less verbose comment sections in the lua files, just like LuaDOC is using to generate complex html files (without having to have xml markup written - or even xml files)
I surely miss something ? What is the advantage of using custom XML rather than HTML markup to write the doc which will be output as HTML in the end ? What is the role of the usdocfiles if not only generate the final HTML output ?
|
|
|
11-23-2020, 04:23 PM
|
#633
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
The function's docs are stored with the functions.
What you are referring to is the docs for the concepts page, which describes installing and usage of the Ultraschall-Api in general.
Have a look into the file. There's no function called "FinalWords" in Ultraschall-Api.
I know you are eager to optimize Ultraschall-Api but please leave that job to me. It might not seem like that, but I actually know what I'm doing.
Quote:
My naïve proposition is to have doc directly in HTML without having to write the data elsewhere,
or at least having way less verbose comment sections in the lua files, just like LuaDOC is using to generate complex html files (without having to have xml markup written - or even xml files)
I surely miss something ? What is the advantage of using custom XML rather than HTML markup to write the doc which will be output as HTML in the end ? What is the role of the usdocfiles if not only generate the final HTML output ?
|
Docs are easier to write, to maintain, to parse.
I can use the USDocML-files to create all sorts of tools without having to bother with parsing an html-file.
I can create a new html-docs with any style I desire without having to break tools needing the docs and breaking, because their parser doesn't work anymore.
You see, if I would only have HTML in there, I would be stuck in a certain format forever or, I write an HTML-parser just to get the juices out of my own HTML-file.
You see, I had an HTML-file once, written by hand in the early days. That was utterly ugly to work with and made documentation slow as hell. Especially updating it.
Having the docs in the parts where I need them(beside the functions) I can update the docs right away, without having to open up the html-file in another editor, searching for it, adding the docs, checking if the formatting is still right and not messed up by some html/css-fuckup I certainly hate.
It slows me down. My docs-system, as weird as it may seem to you, is what allows me to write and update functions and docs together do fast.
I've been to all kind of systems. They were all bad or hard to use or need external dependencies. Like LuaDoc would need it.
To give you a hint, what I really have in my mind:
I want to get rid of deploying the documentation via ReaPack and creating it only, when someone opens the documentation. So if someone never needs the docs(users) the docs will never be created, but if you run the action for opening the docs, they will be created once and then kept until the next update.
This creation is already in there but still too slow. You don't want to wait 2 minutes for the creation of all docs.
So, if you actually want to help me in solving it, I just need one function:
ultraschall.ConvertMarkdownToDocs()
All of the Lua-only-markdown-converters out there have three problems:
a) not compatible with the license of Ultraschall-API
b) not converting properly, as Markdown is full of edge-casey bugs
c) both.
I once tried to write one and I gave up. That's the only thing from keeping me generating the docs when needed only with a generating-time of 10 secs maximum.
That's what I was working on 1 1/2 years ago already to get rid of the huge html-files.
PS: Doing it as XML instead of USDocML is ugly, not practically useable. All layouts I could come up with would be cluttered and I couldn't actually see, what is documented.
I need something for a human like me, not something that's not handleable at all. Sure it would be easier to handle for converters but not for me as a coder and documentator.
And to find a parser, that has a compatible license, isn't bigger in size than the entire documentation and actually handlable(remember, I want to actually create the docs on the user's computer so it must work fast) is a completely different story.
And it still doesn't solve the problem of a markdown-parser.
The stuff there is right now is the best I could bring on. Everything else is a developer-workflow-clusterf**k which I want to avoid.
I'm not doing this because I'm too lazy to take some css/html5-courses. I'm doing it as it is the fastes workflow I could find and it supports me, rather than creating obstacles in my way.
Edit:
Hope I wasn't too bitchy about that(if yes, sorry for that). It's just, that you are a little too pushy about the whole documentation-thing recently and this frustrates me kind of.
Last edited by Meo-Ada Mespotine; 11-23-2020 at 06:10 PM.
|
|
|
11-23-2020, 06:13 PM
|
#634
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,546
|
Be sure that I didn't want to undermine your work or expertise on this,
I'm just trying to help in brainstorming this optimization case. Facing custom formats for eg raise legit curiosity, you have to aknowledge that 😋
But I'm not into the project, I just emit hypothesis based on my own experience and knowledge (which will be more the HTML side), with what I can understand. In the end, you are the only one to see the full picture there, so I can get that my ideas are out of place.
You are 100% confident so we (ultraschall users) for sure will let you make the magic happen on your own terms, and I will not be an obstacle. The results can only be good! 😎
And with all the stuffs you make, be sure that I will not be the one to call you lazy, for any reason !
|
|
|
11-23-2020, 06:22 PM
|
#635
|
Human being with feelings
Join Date: Apr 2013
Location: France
Posts: 9,546
|
Quote:
Originally Posted by Meo-Ada Mespotine
Hope I wasn't too bitchy about that(if yes, sorry for that). It's just, that you are a little too pushy about the whole documentation-thing recently and this frustrates me kind of.
|
This was really just playful teasing really, I didn't want to make you uncomfortable.
This doc case isn't that important, it is already usable, so it is just nip ticking. Sorry if it was inappropriate.
'Was just trying to help somehow, that's why I submitted your project to reapack.com and wrote a readme for your repo.
I let you code in peace now ! and thx for your great work
|
|
|
11-23-2020, 06:33 PM
|
#636
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
No problem. Thanks
|
|
|
11-24-2020, 04:07 PM
|
#637
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Ok guys and girls ans varieties inbetween: Due an unreported change in a Reaper-function(GetAppVersion, whose returned string has changed its formatting), Ultraschall-API will probably break on Reaper 6.16.
I'm on a fix but it will take a few days and I either
a) raise the needed Reaper version to 6.16(faster to do) or
b) I include a workaround compatible to Reaper 6.02-Reaper6.15(takes longer)
Haven't decided yet.
Sigh...
|
|
|
11-29-2020, 12:41 PM
|
#638
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
New release!
4.2.001 - "Pink Floyd - High Hopes" - 1st of December 2020
Has now 1351 functions, with 9 new ones
new in this release:- StuffMIDIMessage and KB.ini-functions
You can now convert the KEY-entry-codes of shortcuts(as stored in the reaper-kb.ini) into their text representation: CharacterCodes_ReverseLookup_KBIni
This is also possible, if you use StuffMIDIMessage to send control-messages, as these can be converted now into their
text-representation as well: CharacterCodes_ReverseLookup
Multiple keymaps supported.
Oh, and did I mention, you can now also get all currently set shortcuts as a handy table? Optionally with factory-default shortcuts?
Now I did: KBIniGetAllShortcuts
- Metadata for AIFF, APE and XMP
As of Reaper 6.16, you can add metadata for AIFF, APE and XMP as well. I also updated the other metadata-functions to
feature the lastest metadata-features Reaper can offer.
And yes, this includes also support for the new Media Explorer-tags.
- ConfigVars support in StateInspector
That's right: you can now monitor config-vars in the StateInspector as well. I also removed the fact that I accidentally
deleted your saved slots with each updated.
How come, you didn't tell me that, huh? 
- CleanUp and Speedup
I made Ultraschall-API much smaller by removing tons of useless files and improving storage of other files by magnitude.
To give you a number: Ultraschall-API is 50% smaller compared to the previous release.
It also loads now 30% faster, so starting scripts using Ultraschall-API is now close to lightspeed.
- Various Bugfixes
The render-string-functions didn't work properly with floats. Mostly fps-settings were affected. Now it's working.
Also the StuffMIDIMessage-docs is improved now and more precise.
New features in 4.2.001- ConfigFile Management: KBIniGetAllShortcuts - returns all shortcuts of the currently running Reaper-instance as a handy table
- Helper functions: CharacterCodes_ReverseLookup - converts the StuffMIDIMessage-bytes(with parameter mode=1) into their character-representation
- Helper functions: CharacterCodes_ReverseLookup_KBIni - converts the first two bytes of the KEY-entries in reaper-kb.ini into their character-representation
- Helper functions: RFR - (ReturnFirstRetvals) allows you to get only the first x return-values of a function
- Helper functions: RLR - (ReturnLastRetvals) allows you to get only the last x return-values of a function
- Helper functions: RRR - (ReturnRangeRetvals) allows you to get only a range of all return-values of a function
- Metadata: Metadata_AIFF_GetSet - gets/sets the AIFF-metadata of the current project
- Metadata: Metadata_APE_GetSet - gets/sets the APE-metadata of the current project
- Metadata: Metadata_XMP_GetSet - gets/sets the XMP-metadata of the current project
Changes from 4.1.007 to 4.2.001
- API: Loadspeed - sped up loading-speed of API by 30%
- DeveloperTools: Config Var Displayer - improved layout for monospaced ReaScript-console-font
- Developer Tools: State Inspector - supports now config-vars; reduced needed files to save space; ini-file accidentally overwritten when updating API via ReaPack -> fixed
- Docs: Concepts - split installation and usage of Ultraschall-API into two chapters; removed the hotfix-chapter(was outdated); corrected download-link
- Docs: Config-Vars - added mac-only-configvars(thanks to cfillion)
- Docs: Example-videos - removed
- Docs: Reaper Internals - updated to Reaper 6.17
- Docs: StuffMIDIMessage-docs - rewrote it as it contained many many errors
- Helper functions: LimitFractionOfFloat - removed roundit-parameter(if you need it, give me a hint); more stable now.
- IniFiles: Reaper-ActionList_v5_96.ini - removed, can be produced using developertool ultraschall_developertool_ActionlistToIni-Converter.lua
- Ini-Files: Reaper-factory-default-KEY-Codes_for_reaper-kb_ini.ini - corrected some mistakes
- Metadata: Metadata_BWF_GetSet - added new tags as of Reaper 6.16
- Metadata: Metadata_ID3_GetSet - added new tags as of Reaper 6.16
- Metadata: Metadata_INFO_GetSet - added new tags as of Reaper 6.16
- Metadata: Metadata_IXML_GetSet - added new tags as of Reaper 6.16
- Metadata: Metadata_VORBIS_GetSet - added new tags as of Reaper 6.16
- Misc: Docs-gfx - removed them from the misc-folder(were redundant)
- Misc: Developer-langpack removed - use ultraschall_developertool_LangPack2Developer_langp ack_converter.lua to create one
- Misc: Reaper 5 developer translationpack - removed
- Misc: Notifications-sound - removed
- Misc: Reaper-KEY-Codes_for_reaper-kb_ini.ini - removed, use CharacterCodes_ReverseLookup instead to get the codes
- Misc: ShowVars_Toggle.txt - removed(was redundant)
- Misc: StuffMidiMessage-AllMessages_Englisch_Windows.ini - removed, use CharacterCodes_ReverseLookup instead to get the codes
- Rendering: CreateRenderCFG_OGG - didn't allow for 1.0 vbr-setting in certain edge-cases -> fixed
- Rendering: CreateRenderCFG_Opus - didn't create correct bitrate in string -> fixed
- Rendering: various create-render-cfg-function - parameter fps didn't always produce the correct fps-values -> fixed
- Rendering: various functions - had parameter fps incorrectly documented as integer though it's number -> fixed
Please update it via ReaPack using: https://github.com/Ultraschall/ultra..._api_index.xml
|
|
|
11-30-2020, 03:15 AM
|
#639
|
Human being with feelings
Join Date: Apr 2014
Posts: 93
|
Quote:
Originally Posted by Meo-Ada Mespotine
Ok, will have a look, as this is a serious issue.
|
Hi Mespotine,
Congrats on the new release and thanks for keeping this project alive.
Is the createnewrendertable bug is fixed in this new release? Had a look at release notes but can't find anything.
Thanks !
|
|
|
12-01-2020, 07:30 AM
|
#640
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,479
|
Quote:
Originally Posted by aurelien
Hi Mespotine,
Congrats on the new release and thanks for keeping this project alive.
Is the createnewrendertable bug is fixed in this new release? Had a look at release notes but can't find anything.
Thanks !
|
Aargh, I think I forgot. I'll fix it asap.
|
|
|
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 05:21 PM.
|