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

Reply
 
Thread Tools Display Modes
Old 05-04-2020, 11:21 AM   #481
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Ok, this is weird. I'll check.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-04-2020, 11:22 AM   #482
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Quote:
Originally Posted by tompad View Post
Thank you so much, miss!
Thank you
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-04-2020, 05:16 PM   #483
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Quote:
Originally Posted by aurelien View Post
I'm getting the following (printing all variables)
400.1 4.00 11th of February 2020 "Aphrodite's Child - Four Horsemen" 2_May_2020
Are you sure, that you didn't get the hotfixes? Everything looks like, you got them. If the functions still don't work as expected, then there must be another bug in them.

You can check by using ultraschall.MB, which I fixed a bug in.

Code:
ultraschall.MB("Test")
SLEM()
If you use Windows and you can use the function Windows without an error-message popping up, the hotfixes work as expected.
If it complains, that you can use the function only on Windows, then the hotfixes don't work.

On Mac it's the other way around, means: if you run the function and get an error-message, everything works as expected.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-05-2020, 02:29 AM   #484
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

PHP Code:
ultraschall_hotfixes.lua:503attempt to compare nil with number 
Yeah it seems i did not get all the fixes , i did a full reinstall through reapack and still getting the error

I've looked in the ultrashall_hotfixes.lua and i can find the updated DeleteTracks_TrackString function, but it's not used when i call the method

Last edited by aurelien; 05-05-2020 at 02:40 AM.
aurelien is offline   Reply With Quote
Old 05-05-2020, 02:44 AM   #485
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Ok, can you insert into the ultraschall_hotfixes.lua something like

reaper.MB("Test", "bla", 0)

and see, whether it gets displayed when running the API?

If not, I need to investigate further.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-05-2020, 02:45 AM   #486
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

Yes it gets displayed correctly !
aurelien is offline   Reply With Quote
Old 05-05-2020, 03:34 AM   #487
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Ok, can you add reaper.MB("Test", "bla", 0) into DeleteTracks_TrackString and see, if it gets displayed, when you try to use this function?
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-05-2020, 03:42 AM   #488
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

Yes it doesn't get called, i guess the hotfix function override is not working

I don't know much about lua, so i don't know what is missing and why the hotfix function is not called
aurelien is offline   Reply With Quote
Old 05-05-2020, 03:46 AM   #489
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Ok, at least it gives me a hint:

a) The Hotfixes are loaded

but

b) the functions in it get overwritten for some reason.

That means the download itself seem to work, but something else happens, that shouldn't.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-05-2020, 03:50 AM   #490
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Ok, I found the bug. Will upload a fix within a few minutes...

Edit: or not....
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-05-2020, 03:59 AM   #491
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

I cannot reproduce it. On my system, everything works as expected.

What happens when you try to call DeleteTracks_TrackString? Does it show an error message? Does it still behave, as before(the buggy way)?
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-05-2020, 08:13 AM   #492
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

Really interesting, i did put messages in the two DeleteTracks_TrackString functions:
1.hotfix function
2.trackmodule function

When i call directly :
ultraschall.DeleteTracks_TrackString("1")

-> I get the hotfix message.

When i call this function:
ultraschall.RenderProject_RenderTable(nil, nil, false, true, false)

-> I get the trackmodule message, so the hotfix function is not called in this case.

Looks like an include problem, i did the following, my scripts using ultrashall have the following line:
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")

The DeleteTracks_TrackString that is called in this file, is not the hotfix one
ultraschall_functions_Render_Module.lua

Last edited by aurelien; 05-05-2020 at 08:36 AM.
aurelien is offline   Reply With Quote
Old 05-06-2020, 08:58 AM   #493
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

@aurelien
Ah, now I get it!

RenderProject_RenderTable wasn't fixed in hotfixes, only ApplyRenderTable_Project, as this was the function causing your problems.

I use ApplyRenderTable_Project in RenderProject_RenderTable, so this is probably the cause of confusion in here.

Means: RenderProject_RenderTable should work properly now.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-11-2020, 11:35 AM   #494
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

4.1.001 - "Radiohead - Spectre"

Has now 1129 functions, with 18 new ones

new in this release:
  • Automation Items
    You can get all automation-items as well as deleting the ones you want to delete.
    That's right, you can now safely delete one programmatically!
  • Rendering functions
    Support now the new rendering options of Reaper 6.10: embedding Take markers as well as Do not render files that are likely silent.
    Note: Reaper 6.10 has a bug, which prevents simultaneously from setting Add to Project and Do not render files likely silent-checkboxes of the Render to File-dialog. Fixed in later versions of Reaper.
  • SetTrack_LastTouched
    Allows you to set a track as last touched, which wasn't possible before.
  • SetTrack_Trackheight_Force
    Sets the trackheight of a track to any height you like, including heights not allowed by the theme.
    That way, you can set the trackheight to e.g. 1px, allowing you better organisation of your arrangeview's tracks.
  • CollapseTrackHeight
    Speaking of trackheight, this function collapses tracks to the minimum height allowed by the currently selected theme.
  • GFX_GetDropFile
    Call it frequently when having opened your gfx-window, and it will return drag'n'dropped files as well as the dropping-position within the gfx.init-window. No need to fiddle it out by yourself.
  • ActionsList_GetSelectedActions
    Returns all selected entries from the opened actionlist, including Action Command Ids, texts, etc.
    Kudos to Edgemeal, who wrote the initial version of it.
  • IsTimeSigmarkerAtPosition
    Already implemented for markers and regions, I added it for time-signature-markers as well.
    Returns, if a time-signature-maker is at a certain position.
  • and more plus bugfixes

Kudos to Lokasenna and to Xenakios. Hope you both return at some point to the Reaper-community.

New features in 4.1.001
  • Actions: ActionsList_GetSelectedActions - gets the selected actions from the opened Action List(prototype code provided by Edgemeal. Thank you!)
  • Automation Items: AutomationItems_GetAll - returns all automation-items of the current project
  • Automation Items: AutomationItem_Delete - deletes an automation-item, including the option of retaining the envelope-points
  • Envelopes: GetAllTakeEnvelopes - returns all TakeEnvelopes in the current project
  • Envelopes: GetAllTrackEnvelopes - returns all TrackEnvelopes in the current project
  • GFX-Management: GFX_GetDropFile - gets the last dropped files from the gfx-window, including the drop-coordinates(requested by rstockm)
  • Helperfunctions: Benchmark_GetStartTime - returns the last starttime of the currently running benchmark-measure(requested by rstockm)
  • Helperfunctions: Benchmark_MeasureTime - starts/resets a benchmark-measure(requested by rstockm)
  • Helperfunctions: EscapeMagicCharacters_String - escapes the magic-characters, used for pattern matching, from a string, so it can be used without triggering "magic"-pattern-matching-features
  • Marker Management: IsTimeSigmarkerAtPosition - returns, if at a position/measure is a time-signature marker(requested by tompad)
  • MediaItems: MediaItems_Outtakes_AddSelectedItems - adds selected items into the outtakes-vault; this allows you to store outtakes of recordings easily
  • MediaItems: MediaItems_Outtakes_GetAllItems - gets all outtakes-items stored in the outtakes-vault
  • MediaItems: MediaItems_Outtakes_InsertAllItems - inserts all outtakes-items stored in the outtakes-vault into a project
  • ProjectManagement: IsTimeSelectionActive - returns, if there's a time-selection(requested by tompad)
  • Track Management: CollapseTrackHeight - collapses the height of a track to the minimum height, as defined by the theme
  • Track Management: GetTrackByTrackName - search tracknames follwing a certain pattern or for a certain name
  • Track Management: SetTrack_LastTouched - sets a track to be last-touched track
  • Track Management: SetTrack_Trackheight_Force - sets the trackheight of a track and allows setting heights beyond the limitations set by the theme
  • Web Interface: WebInterface_GetInstalledInterfaces - returns all installed webinterfaces(webrc) of the current Reaper installation, custom and Reaper-defaults

Changes from 4.00 to 4.1.001
  • API: GetApiVersion - updated docs to reflect the current behavior
  • DeveloperTools: ultraschall_Add_Developertools_To_Reaper.lua - weren't installed using this action -> fixed
  • 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)
  • Docs: Reaper-Internals - updated to Reaper 6.10, JS-extension 1.002
  • Docs: Render-Presets - updated to Reaper 6.10
  • Docs: Routing_001_Introduction - corrected typo
  • Docs: ShowMenu - falsely claimed, that y-coordinates on Mac are buggy because they are reversed -> corrected
  • FX-Management: CountParmLearn_FXStateChunk - added error-message, when fxid==0, as the first fxid must be 1 or higher(thanks to TonE)
  • Helperfunctions: IsValidMatchingPattern - wasn't reporting unfinished captures all the time -> improved
  • Markers: CountNormalMarkers_NumGap - had inner variables exposed -> fixed (thanks to fernsehmuell)
  • MediaItems: GetAllSelectedMediaItems - returns now an MediaItemStateChunkArray as well
  • MediaItems: IsValidMediaItemStateChunkArray - didn't always return true, when MediaItemStateChunkArrays were passed over it -> fixed
  • Project Management: GetProject_AddMediaToProjectAfterRender - added "do not likely silently files"-setting
  • Project Management: GetProject_RenderStems - added Embed take markers-setting
  • Project Management: SetProject_AddMediaToProjectAfterRender - added "do not likely silently files"-setting
  • Project Management: SetProject_RenderStems - added Embed take markers-setting
  • Render: AddRenderPreset - supports new Embed Take-markers; added missing information to docs
  • Render: ApplyRenderTable_Project - supports new Embed Take-markers and no silent render-features; improved Embed stretch-markers support; accidentally reversed true and false in parameter OnlyMonoMedia -> fixed (thanks to aurelien)
  • Render: CreateNewRenderTable - supports new Embed Take-markers and no silent render-features
  • Render: GetRenderPreset_RenderTable - supports new Embed Take-markers
  • Render: GetRenderTable_Project - supports new Embed Take-markers and no silent render-features; improved Embed stretch-markers support
  • Render: GetRenderTable_ProjectFile - supports new Embed Take-markers and no silent render-features; improved Embed stretch-markers support
  • Render: IsValidRenderTable - supports new Embed Take-markers and no silent render-features; improved Embed stretch-markers support
  • Render: SetRenderPreset - supports new Embed Take-markers; added missing information to docs
  • TrackManagement: DeleteTracks_TrackString - didn't correctly delete the right tracks, sometimes throwing Lua-error -> 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 it via ReaPack using: https://github.com/Ultraschall/ultra..._api_index.xml
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-11-2020, 12:24 PM   #495
tompad
Human being with feelings
 
Join Date: Jan 2010
Location: Fjugesta, Sweden
Posts: 476
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
4.1.001 - "Radiohead - Spectre"

Has now 1129 functions, with 18 new ones

new in this release:
  • IsTimeSigmarkerAtPosition
    Already implemented for markers and regions, I added it for time-signature-markers as well.
    Returns, if a time-signature-maker is at a certain position.
GREAT! Thanks!
__________________
ToDoList Obliques MusicMath Donation Some of mine and my friends music projects on Spotify
tompad is offline   Reply With Quote
Old 05-11-2020, 01:31 PM   #496
WarrenG
Human being with feelings
 
WarrenG's Avatar
 
Join Date: Jan 2020
Location: Forest, VA
Posts: 36
Default

After Update I receive the following error:

https://raw.githubusercontent.com/Ul...les/Scythe_Set v3 library path.lua:
HTTP response code said error (22): The requested URL returned error: 400 Bad Request

Are you modifying the API presently, Is that why the error?

W
WarrenG is offline   Reply With Quote
Old 05-11-2020, 01:40 PM   #497
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Quote:
Originally Posted by WarrenG View Post
After Update I receive the following error:

https://raw.githubusercontent.com/Ul...les/Scythe_Set v3 library path.lua:
HTTP response code said error (22): The requested URL returned error: 400 Bad Request

Are you modifying the API presently, Is that why the error?

W
Hmm, this shouldn't be...I'll have a look at that...

Edit: found the bug

Edit2: Ok, should work now...
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper

Last edited by Meo-Ada Mespotine; 05-11-2020 at 01:48 PM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-11-2020, 01:56 PM   #498
WarrenG
Human being with feelings
 
WarrenG's Avatar
 
Join Date: Jan 2020
Location: Forest, VA
Posts: 36
Default

Great! Works perfect now, nice update thank you very much.

W
WarrenG is offline   Reply With Quote
Old 05-11-2020, 01:58 PM   #499
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Quote:
Originally Posted by WarrenG View Post
Great! Works perfect now, nice update thank you very much.

W
You're welcome
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-12-2020, 07:15 AM   #500
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

Hi i've updated to the latest version, i'm getting a freeze/ infinite loop in the following function :
function ultraschall.RenderProject_RenderTable(projectfilen ame_with_path, RenderTable, AddToProj, CloseAfterRender, SilentlyIncrementFilename)

Any idea ? Is there something to update on my side ?

Maybe because of this ?
- Rendering functions
Support now the new rendering options of Reaper 6.10: embedding Take
markers as well as Do not render files that are likely silent.
Note: Reaper 6.10 has a bug, which prevents simultaneously from
setting Add to Project and Do not render files likely
silent-checkboxes of the Render to File-dialog. Fixed in later
versions of Reaper.
aurelien is offline   Reply With Quote
Old 05-12-2020, 09:22 AM   #501
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

@aurelien:
Ooops, I accidentally deleted an important function. I fixed it, so it should work now.


@all
Hotfix I available:

Changes:
- SetRender_SaveCopyOfProject - got accidentally deleted, readded it now (thanks to aurelien)

Please update your ReaPacks.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-12-2020, 09:57 AM   #502
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

Great it's fixed!

Everything seems fine now between hotfixes and all

Thank you so much for your work.
aurelien is offline   Reply With Quote
Old 05-12-2020, 10:08 AM   #503
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Quote:
Originally Posted by aurelien View Post
Great it's fixed!

Everything seems fine now between hotfixes and all

Thank you so much for your work.
You're welcome. And thanks for your feedback, even though I hate making mistakes
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-16-2020, 04:46 PM   #504
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Ok, Boys n Girls, in the next devcycle, I would love to finish up FXStateChunk-Management as well as ParameterLearn/Modulation/LFO.

As I know, that some of you need this and some of the currently existing Ultraschall-API-functions in that regards have issues, I would love to ask for your help with that.

So, if you want to help me getting this stuff working up and running, please say: Hell Yeah!

(Want to finally get rid of this ToDo-List-entry.)
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-19-2020, 03:17 AM   #505
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

Hi Mespotine,
Another issue in:
RenderProject_RenderTable

The function is ignoring the "Bounds" parameter : I'm able to successfully set-up my render table with "CreateNewRenderTable", but when I'm calling RenderProject_RenderTable with my rendertable : it's always rendering "items" and not regions for example.

And I'm getting the reaper error : "No Time Selection or no regions active", even when i have a selected time/region.

Last edited by aurelien; 05-19-2020 at 03:39 AM.
aurelien is offline   Reply With Quote
Old 05-19-2020, 04:08 AM   #506
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Can you give me a code-snippet which shows this behavior?
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-19-2020, 06:39 AM   #507
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

Here it is, just create a region and select it, then run this code without selecting any item.
You'll get the reaper error "No Time Selection or no regions active"

If you select many items, reaper will render every item and not the region, not respecting the render table setup.

PHP Code:
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")

function 
RenderSelectedRegionsTest()
    --
wav config wav 24bits function 
    
render_cfg_string ultraschall.CreateRenderCFG_WAV(2000false)
    
    --
Settings of the render table
    sourceDropDown
=-- 0 MasterMix32 Selected Mediam Items64 selected item via master
    bounds
=-- 2 TimeSelection3 Projects region4 Selected Media5 Selected Regions
    Startposition 
=0
    Endposition 
=0
    TailFlag 
=1
    TailMS
=0
    renderDirectory
=renderDirectoryUser
    filePattern
="$region"
    
sampleRate=48000
    channels
=2
    OfflineOnlineRendering
=0
    ProjectSampleRateFXProcessing 
=true
    RenderResample 
=9
    OnlyMonoMedia 
=false
    MultiChannelFiles
=false
    dither
=0
    SilentlyIncrementFilename
=false
    AddToProj
=false
    SaveCopyOfProject
=false
    RenderQueueDelay
=false
    RenderQueueDelaySeconds
=0
    CloseAfterRender
=true
    
    
--Create the RenderTable
    RenderTable 
ultraschall.CreateNewRenderTable(sourceDropDownboundsStartpositionEndpositionTailFlagTailMSrenderDirectoryfilePatternsampleRatechannelsOfflineOnlineRenderingProjectSampleRateFXProcessingRenderResampleOnlyMonoMediaMultiChannelFilesditherrender_cfg_stringSilentlyIncrementFilenameAddToProjSaveCopyOfProjectRenderQueueDelayRenderQueueDelaySecondsCloseAfterRender)
    --
Apply the render table to project
    ultraschall
.ApplyRenderTable_Project(RenderTable,false)
    
ultraschall.ShowLastErrorMessage()
    
    --
Render with the Render table
    renderAddtoProj
=false
    renderCloseAfterRender
=true
    renderSilentlyIncrementFilename 
=false
    local count
MediaItemStateChunkArrayFilearray ultraschall.RenderProject_RenderTable(nilRenderTablerenderAddtoProjrenderCloseAfterRenderrenderSilentlyIncrementFilename)
    
    
Msg("number of file du filearray:" .. count)
    
ultraschall.ShowLastErrorMessage()

    return 
Filearray
end


function MainTest()
    
ret=reaper.MB("Export selected regions""Export selected regions "4)

    --
ret 6 when yes is clicked
    
if ret==6 then

            filearray
=RenderSelectedRegionsTest()
            for 
i,file in ipairs(filearray) do
                
Msg("Done file " .. i)

            
end
        
    
else
        return
    
end
end

MainTest
() 
aurelien is offline   Reply With Quote
Old 05-21-2020, 05:48 AM   #508
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Quote:
Originally Posted by aurelien View Post
Here it is, just create a region and select it, then run this code without selecting any item.
You'll get the reaper error "No Time Selection or no regions active"

If you select many items, reaper will render every item and not the region, not respecting the render table setup.

PHP Code:
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")

function 
RenderSelectedRegionsTest()
    --
wav config wav 24bits function 
    
render_cfg_string ultraschall.CreateRenderCFG_WAV(2000false)
    
    --
Settings of the render table
    sourceDropDown
=-- 0 MasterMix32 Selected Mediam Items64 selected item via master
    bounds
=-- 2 TimeSelection3 Projects region4 Selected Media5 Selected Regions
    Startposition 
=0
    Endposition 
=0
    TailFlag 
=1
    TailMS
=0
    renderDirectory
=renderDirectoryUser
    filePattern
="$region"
    
sampleRate=48000
    channels
=2
    OfflineOnlineRendering
=0
    ProjectSampleRateFXProcessing 
=true
    RenderResample 
=9
    OnlyMonoMedia 
=false
    MultiChannelFiles
=false
    dither
=0
    SilentlyIncrementFilename
=false
    AddToProj
=false
    SaveCopyOfProject
=false
    RenderQueueDelay
=false
    RenderQueueDelaySeconds
=0
    CloseAfterRender
=true
    
    
--Create the RenderTable
    RenderTable 
ultraschall.CreateNewRenderTable(sourceDropDownboundsStartpositionEndpositionTailFlagTailMSrenderDirectoryfilePatternsampleRatechannelsOfflineOnlineRenderingProjectSampleRateFXProcessingRenderResampleOnlyMonoMediaMultiChannelFilesditherrender_cfg_stringSilentlyIncrementFilenameAddToProjSaveCopyOfProjectRenderQueueDelayRenderQueueDelaySecondsCloseAfterRender)
    --
Apply the render table to project
    ultraschall
.ApplyRenderTable_Project(RenderTable,false)
    
ultraschall.ShowLastErrorMessage()
    
    --
Render with the Render table
    renderAddtoProj
=false
    renderCloseAfterRender
=true
    renderSilentlyIncrementFilename 
=false
    local count
MediaItemStateChunkArrayFilearray ultraschall.RenderProject_RenderTable(nilRenderTablerenderAddtoProjrenderCloseAfterRenderrenderSilentlyIncrementFilename)
    
    
Msg("number of file du filearray:" .. count)
    
ultraschall.ShowLastErrorMessage()

    return 
Filearray
end


function MainTest()
    
ret=reaper.MB("Export selected regions""Export selected regions "4)

    --
ret 6 when yes is clicked
    
if ret==6 then

            filearray
=RenderSelectedRegionsTest()
            for 
i,file in ipairs(filearray) do
                
Msg("Done file " .. i)

            
end
        
    
else
        return
    
end
end

MainTest
() 
It seems like you pass a wrong parameter to CreateNewRenderTable:

Code:
    --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)
    SLEM()
returns "param: RenderFile - error #7: must be a string"

Because of that, RenderTable is nil, and cannot be applied using ApplyRenderTable (use SLEM directly after it to get the error).
Therefore the rendering function is using the rendersettings from the current project, as passing parameter "RenderTable" as nil tells the function to use the current project's rendersettings.

PS: You can use print() instead of Msg(), when using Ultraschall-API. That way you don't need to include Msg into your scripts time and again.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper

Last edited by Meo-Ada Mespotine; 05-21-2020 at 05:58 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-25-2020, 01:32 AM   #509
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

Thanks Mespotine !
Check this updated code, the rendertable is correctly initialized and doesn't return any error, i can print value of the rendertable for example.

However the ultraschall error is the following :
"RenderProject_RenderTable"
error : rendering aborted
errcode:-2

PHP Code:
function RenderSelectedRegionsTest()
    --
wav config wav 24bits function 
    
render_cfg_string ultraschall.CreateRenderCFG_WAV(2000false)
    
    --
Settings of the render table
    sourceDropDown
=-- 0 MasterMix32 Selected Mediam Items64 selected item via master
    bounds
=-- 2 TimeSelection3 Projects region4 Selected Media5 Selected Regions
    Startposition 
=0
    Endposition 
=0
    TailFlag 
=1
    TailMS
=0
    renderDirectory
=renderDirectoryUser
    filePattern
="$region"
    
sampleRate=48000
    channels
=2
    OfflineOnlineRendering
=0
    ProjectSampleRateFXProcessing 
=true
    RenderResample 
=9
    OnlyMonoMedia 
=false
    MultiChannelFiles
=false
    dither
=0
    SilentlyIncrementFilename
=false
    AddToProj
=false
    SaveCopyOfProject
=false
    RenderQueueDelay
=false
    RenderQueueDelaySeconds
=0
    CloseAfterRender
=true
    Msg
("create")
    --
Create the RenderTable
    RenderTable 
ultraschall.CreateNewRenderTable(sourceDropDownboundsStartpositionEndpositionTailFlagTailMSrenderDirectoryfilePatternsampleRatechannelsOfflineOnlineRenderingProjectSampleRateFXProcessingRenderResampleOnlyMonoMediaMultiChannelFilesditherrender_cfg_stringSilentlyIncrementFilenameAddToProjSaveCopyOfProjectRenderQueueDelayRenderQueueDelaySecondsCloseAfterRender)
    
SLEM()
    
    
Msg(RenderTable["CloseAfterRender"]) --return true so renderTable is correct
    
    
--Apply the render table to project
    ultraschall
.ApplyRenderTable_Project(RenderTable,false)
    
SLEM()
    
    --
Render with the Render table
    renderAddtoProj
=false
    renderCloseAfterRender
=true
    renderSilentlyIncrementFilename 
=false
    local count
MediaItemStateChunkArrayFilearray ultraschall.RenderProject_RenderTable(nilRenderTablerenderAddtoProjrenderCloseAfterRenderrenderSilentlyIncrementFilename)
    
    
SLEM()

    return 
Filearray
end


function MainTest()
    
ret=reaper.MB("Export selected regions""Export selected regions "4)

    --
ret 6 when yes is clicked
    
if ret==6 then

            filearray
=RenderSelectedRegionsTest()
            for 
i,file in ipairs(filearray) do
                
Msg("Done file " .. i)

            
end
        
    
else
        return
    
end
end

MainTest
() 
Thanks for your support


Edit : investigated a bit more in your code, I'm entering in this test, something must prevent Reaper rendering the objects and adding tracks
PHP Code:
    -- if no track has been addedthe rendering was aborted by userinteraction or error
    
if reaper.CountTracks(0)==OldTrackNumber 
    then 
        reaper
.MB("Test""bla"0)
        
aborted=true 
    end 

Last edited by aurelien; 05-25-2020 at 02:35 AM.
aurelien is offline   Reply With Quote
Old 05-26-2020, 04:37 PM   #510
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 2,518
Default

Heaven Yeah!
TonE is offline   Reply With Quote
Old 05-26-2020, 05:58 PM   #511
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

@aurelien
Could you give me an example project, which triggers this behavior?


@TonE
Quote:
Originally Posted by TonE View Post
Heaven Yeah!
No chance, I already work on the Hell-feature, which excludes use of Heaven
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-27-2020, 06:54 AM   #512
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

Here's the code, it's quite close to the old one, create a region, select it and launch the script, it should render all the selected regions.

Fun fact: if i save the render table using ApplyRenderTable_Project, and then using RenderProject_RenderTable with nil arguments(to render last settings) : it works.

If i pass the same RenderTable to RenderProject_RenderTable : there's the following error, something is messing with the RenderTable but i don't know what exactly.

"RenderProject_RenderTable"
error : rendering aborted
errcode:-2

PHP Code:
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")

function 
RenderSelectedRegionsTest()
    --
wav config wav 24bits function 
    
render_cfg_string ultraschall.CreateRenderCFG_WAV(2000false)
    
    --
Settings of the render table
    sourceDropDown
=-- 0 MasterMix32 Selected Mediam Items64 selected item via master
    bounds
=-- 2 TimeSelection3 Projects region4 Selected Media5 Selected Regions
    Startposition 
=0
    Endposition 
=0
    TailFlag 
=1
    TailMS
=0
    renderDirectory
=renderDirectoryUser
    filePattern
="$region"
    
sampleRate=48000
    channels
=2
    OfflineOnlineRendering
=0
    ProjectSampleRateFXProcessing 
=true
    RenderResample 
=9
    OnlyMonoMedia 
=false
    MultiChannelFiles
=false
    dither
=0
    SilentlyIncrementFilename
=false
    AddToProj
=false
    SaveCopyOfProject
=false
    RenderQueueDelay
=false
    RenderQueueDelaySeconds
=0
    CloseAfterRender
=true

    
--Create the RenderTable
    RenderTable 
ultraschall.CreateNewRenderTable(sourceDropDownboundsStartpositionEndpositionTailFlagTailMSrenderDirectoryfilePatternsampleRatechannelsOfflineOnlineRenderingProjectSampleRateFXProcessingRenderResampleOnlyMonoMediaMultiChannelFilesditherrender_cfg_stringSilentlyIncrementFilenameAddToProjSaveCopyOfProjectRenderQueueDelayRenderQueueDelaySecondsCloseAfterRender)
    
SLEM()
        
    --
Apply the render table to project
    ultraschall
.ApplyRenderTable_Project(RenderTable,false)
    
SLEM()
    
    --
Render with the Render table
    renderAddtoProj
=false
    renderCloseAfterRender
=true
    renderSilentlyIncrementFilename 
=false
    local count
MediaItemStateChunkArrayFilearray ultraschall.RenderProject_RenderTable(nilRenderTablerenderAddtoProjrenderCloseAfterRenderrenderSilentlyIncrementFilename)
    
    
SLEM()

    return 
Filearray
end


function MainTest()
    
ret=reaper.MB("Export selected regions""Export selected regions "4)

    --
ret 6 when yes is clicked
    
if ret==6 then

            filearray
=RenderSelectedRegionsTest()
            for 
i,file in ipairs(filearray) do
                
Msg("Done exporting " .. i)

            
end
        
    
else
        return
    
end
end

MainTest
() 
aurelien is offline   Reply With Quote
Old 05-27-2020, 09:29 AM   #513
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Ok, but could you still send me a project file which exhibits the problem? So I can work and check under exactly your conditions. I currently suspect an edge-case-error on my side, but I'll see, if that's really the case.

Oh..and...ehrm...maybe a stupid question but, how do I select a region? I never work with regions so I have no idea how to do it.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper

Last edited by Meo-Ada Mespotine; 05-27-2020 at 09:45 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-28-2020, 03:38 AM   #514
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 45
Default

To select a region, just right click on the region and click "Select Region"

I'm sharing you a project, you just have to launch the script included in the zip files, the region is already selected.
Attached Files
File Type: zip Test_Ultraschall.zip (23.1 KB, 4 views)
aurelien is offline   Reply With Quote
Old 05-29-2020, 03:04 PM   #515
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Ok, I look into it.

Some notes: You don't need to do

ultraschall.ApplyRenderTable_Project(RenderTable,false)

when you use

local count, MediaItemStateChunkArray, Filearray = ultraschall.RenderProject_RenderTable(nil, RenderTable, renderAddtoProj, renderCloseAfterRender, renderSilentlyIncrementFilename)

unless you want the applied settings to be permanent in the project.

So best is, either use

ultraschall.ApplyRenderTable_Project(RenderTable,f alse)
count, MediaItemStateChunkArray, Filearray = ultraschall.RenderProject_RenderTable(nil, nil, renderAddtoProj, renderCloseAfterRender, renderSilentlyIncrementFilename)

which will set the RenderTable and tells RenderProject_RenderTable to use the currently applied render-settings(in this case the ones from the RenderTable), which is good, if the applied RenderTable-settings shall remain or you use directly

count, MediaItemStateChunkArray, Filearray = ultraschall.RenderProject_RenderTable(nil, RenderTable, renderAddtoProj, renderCloseAfterRender, renderSilentlyIncrementFilename)

The latter one will use RenderTable-settings only for this one render and restore the previous ones again, if you pass a RenderTable to it. Use this one, if you don't want the RenderTable-settings to remain after the render.
By using either one of them, you speedup the rendering-process, as applying RenderTable takes some time and in your code, you set the same RenderTable twice, taking longer in the process.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-29-2020, 04:06 PM   #516
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

Hotfix 2 available.

Changes:
  • Render: ApplyRenderTable_Project - had problem, when applied twice in a script -> fixed(thanks to aurelien)
  • Render: ApplyRenderTable_ProjectFile - had problem, when applied twice in a script -> fixed(thanks to aurelien)

Please update your ReaPacks.


@aurelien
Found the bug, which was an edge case bug, you accidentally stumbled upon with ApplyRenderTable_Project.
Should work now, I hope.

PS: Thanks to you, the function GetProject_MarkersAndRegions supports now reading the region-selection-state of a region in a projectfile. Will be part of the next update
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper

Last edited by Meo-Ada Mespotine; 05-29-2020 at 04:49 PM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 05-30-2020, 08:26 AM   #517
Jason Brian Merrill
Human being with feelings
 
Jason Brian Merrill's Avatar
 
Join Date: Jun 2006
Location: Northeastern PA, USA
Posts: 21,118
Default

I don't know if I would want to install an entire suite of things to make this happen (although your work is fucking amazing) but I would love to be able to:

- auto save fx chains, presets, fxp, track templates, automation clip shapes, input fx chains all into respective folders either under the project itself, or in the regular reaper presets/track templates folder. Or both, ideally.

So basically the folder would be like this (similar for all)

Fxchains (regularly saved Fxchains)
- per project
- *Songname*
- guitar
- *songname*track*date of save*
- *songname*track*date of save*
- *songname*track*date of save*
- vocals
- *songname*track*date of save*
- *songname*track*date of save*
- *songname*track*date of save*
- drums
- *songname*track*date of save*
- *songname*track*date of save*
- *songname*track*date of save*
- *Songname*
- guitar
- *songname*track*date of save*
- *songname*track*date of save*
- *songname*track*date of save*
- vocals
- *songname*track*date of save*
- *songname*track*date of save*
- *songname*track*date of save*
- drums
- *songname*track*date of save*
- *songname*track*date of save*
- *songname*track*date of save*

and then in the project file directory:

- fxchains
-- Guitar
---*track*date of save*
---*track*date of save*
---*track*date of save*
-- Vocals
---*track*date of save*
---*track*date of save*
---*track*date of save*
-- Drums
---*track*date of save*
---*track*date of save*
---*track*date of save*


There would be a way to wait for changes, and then save presets on exits, making new ones if there's a change.

There would also be a way to delete old files to get out of the way, or to zip all but the recent files up. Maybe a choice to pick each one.

somehow the script would need to be comprehensive but uncluttered. lol
__________________
Beliefs do not require respect. People do.

Last edited by Jason Brian Merrill; 05-30-2020 at 08:36 AM.
Jason Brian Merrill is online now   Reply With Quote
Old 05-30-2020, 09:14 AM   #518
foxAsteria
Human being with feelings
 
foxAsteria's Avatar
 
Join Date: Dec 2009
Location: Oblivion
Posts: 7,512
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Post this into my Ultraschall-Api Thread with a detailed explanation how exactly you would want it and how you do it currently with the clicking the UI of Reaper.
I think this sounds like a good candidate for Ultraschall-Api functions so your post over there is Featurerequest and reminder in one post
Well thanks Mespotine, that was a pretty old request, but basically I just wanted a way to save presets/patches for all plugins used in a project at once, but saved as generic .fxp (or .vst for VST3) files so that they could be imported into other DAWs.

To do it manually is insane (click + in each plugin window, export .fxp/.vst, type all the info), so normally I would just freeze all tracks and export the audio. But sometimes it would be very helpful to continue editing the fx in the new DAW instead of committing them, or perhaps I'd want to transfer a live setup which has no recorded audio to another DAW. Don't think entire Reaper Fx Chains can be exported to other DAWs, but it's not too much trouble to import the necessary presets if they're organized.

Pretty much as JBM describes, all they need is track name and number, date and project name. I'd want it organized like:
Projectname Folder / Project Version Folder (if there are numbers at the end of the name; e.g I use Reaper's versioning which puts _xx style version numbers at the end, but others might vary this manually. Either way, the top folder shouldn't contain a bunch of versions of each project; the versions should be folders inside each project folder) "Track#_Trackname - Fx#_Fxname." That way everything is right there in the project/version folder and I don't have to do much directory-diving.

Icing on the cake would be if this were a single action for the whole project. I automatically queue an mp3 render each time I version a project for convenience and posterity, so it would be great to also be saving preset versions at the same time.

And yea, the script could check for changes between the last saved version and simply copy it over to the new folder if there were none if that saved some cpu time.

I personally don't need this for fx chains, as I simply copy/paste those between project tabs when needed.

Thanks again!
__________________
My Wyyyrd Music
foxAsteria is offline   Reply With Quote
Old 05-30-2020, 09:26 AM   #519
Jason Brian Merrill
Human being with feelings
 
Jason Brian Merrill's Avatar
 
Join Date: Jun 2006
Location: Northeastern PA, USA
Posts: 21,118
Default

I would DEFINITELY suggest that it does it on exit. We don't need another autosave function that might mess shit up in the middle of a project.
__________________
Beliefs do not require respect. People do.
Jason Brian Merrill is online now   Reply With Quote
Old 05-30-2020, 03:24 PM   #520
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 279
Default

I see what I can do. Needs some research but I hope, I can pull it off(though no promises yet).
But FX-Management is still very limited in Ultraschall-API, so more functionality would be really nice.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1111 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper
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:24 AM.


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