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

Reply
 
Thread Tools Display Modes
Old 06-02-2020, 11:58 AM   #521
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Ok, will have a look. At least, were slowly getting there
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-02-2020, 05:21 PM   #522
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

I've tried it, it works perfectly. Can you open the Render to file dialog during before execution of the script and see, whether it shows under "Time bounds" 2 regions or just one ?

Edit:

This is the project I use:
Code:
<REAPER_PROJECT 0.1 "6.11/x64" 1591144039
  RIPPLE 0
  GROUPOVERRIDE 0 0 0
  AUTOXFADE 1
  ENVATTACH 1
  POOLEDENVATTACH 0
  MIXERUIFLAGS 11 52
  PEAKGAIN 1
  FEEDBACK 0
  PANLAW 0.70794578438414
  PROJOFFS 0 0 0
  MAXPROJLEN 0 600
  GRID 3455 8 0.015625 8 1 0 1 0
  TIMEMODE 5 5 5 30 0 -1 8
  PANMODE 3
  CURSOR 39.54246191038607
  ZOOM 17.77835688615414 195 0
  VZOOMEX 6 0
  USE_REC_CFG 1
  RECMODE 1
  SMPTESYNC 0 30 100 40 1000 300 0 0 1 0 0
  LOOP 0
  LOOPGRAN 0 4
  RECORD_PATH "\Media" ""
  <RECORD_CFG
    ZXZhdxgBAA==
  >
  <APPLYFX_CFG
    ZXZhdyAD
  >
  RENDER_FILE "c:\test2"
  RENDER_PATTERN $region
  RENDER_FMT 0 2 48000
  RENDER_1X 0
  RENDER_RANGE 5 0 0 1 0
  RENDER_RESAMPLE 9 0 1
  RENDER_ADDTOPROJ 0
  RENDER_STEMS 0
  RENDER_DITHER 0
  TIMELOCKMODE 0
  TEMPOENVLOCKMODE 0
  ITEMMIX 0
  DEFPITCHMODE 589824 0
  TAKELANE 1
  SAMPLERATE 48000 0 0
  <RENDER_CFG
    ZXZhdxgDAA==
  >
  LOCK 1
  <METRONOME 6 2
    VOL 0.25 0.125
    FREQ 800 1600 1
    BEATLEN 4
    SAMPLES "" ""
    PATTERN 2863311530 2863311529
  >
  GLOBAL_AUTO -1
  TEMPO 120 4 4
  PLAYRATE 1 0 0.25 4
  SELECTION 39.54246191038607 49.21714675901539
  SELECTION2 39.54246191038607 49.21714675901539
  MASTERAUTOMODE 0
  MASTERTRACKHEIGHT 30 0
  MASTERPEAKCOL 16576
  MASTERMUTESOLO 0
  MASTERTRACKVIEW 1 0.6667 0.5 0.5 0 0 0 0 0 0
  MASTERHWOUT
  MASTER_NCH 6 2
  MASTER_VOLUME 1 0 -1 -1 1
  MASTER_FX 1
  MASTER_SEL 0
  <MASTERPLAYSPEEDENV
    EGUID {C554022C-B3D0-455F-B2E7-90294AB7CFC7}
    ACT 0 -1
    VIS 0 1 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 0 -1 -1
  >
  <TEMPOENVEX
    EGUID {60F06397-419C-4BC3-B8EB-8C9F29172EC0}
    ACT 0 -1
    VIS 1 0 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 1 -1 -1
  >
  MARKER 1 22.74421181186993 test_region 9 0 1 R {FB5FB20C-DF59-46B3-96AD-04B51B47DC26}
  MARKER 1 36.02339273872001 "" 9 0 1 R
  MARKER 2 39.54246191038607 "" 9 0 1 R {05D5E2DA-61A7-4D3D-B357-A679D0C8C844}
  MARKER 2 49.21714675901539 "" 9 0 1 R
  <PROJBAY
  >
  <TRACK {658455D1-946B-41DB-9BFC-F23EBF6460F5}
    NAME TestTrack
    PEAKCOL 33530462
    BEAT -1
    AUTOMODE 0
    VOLPAN 1 0 -1 -1 1
    MUTESOLO 0 0 0
    IPHASE 0
    PLAYOFFS 0 1
    ISBUS 0 0
    BUSCOMP 0 0 0 0 0
    SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0
    FREEMODE 0
    SEL 0
    REC 0 0 0 0 0 0 0
    VU 2
    TRACKHEIGHT 0 0 0
    INQ 0 0 0 0.5 100 0 0 100
    NCHAN 2
    FX 1
    TRACKID {658455D1-946B-41DB-9BFC-F23EBF6460F5}
    PERF 0
    MIDIOUT -1
    MAINSEND 1 0
    <ITEM
      POSITION 24.5187905724003
      SNAPOFFS 0
      LENGTH 1.39001910316939
      LOOP 0
      ALLTAKES 0
      FADEIN 3 0 0 3 0 -1
      FADEOUT 3 0 0 3 0 1
      MUTE 0
      SEL 0
      IGUID {4046AADA-28FA-4127-88E7-B06EDF2A8616}
      IID 1
      NAME " - stem"
      VOLPAN 1 0 1 -1
      SOFFS 0.83343896141851
      PLAYRATE 1 1 0 -1 0 0.0025
      CHANMODE 0
      GUID {BC9C3FFB-9B1D-42CC-82D8-F3664F6ABF7D}
      <SOURCE WAVE
        FILE "\Media\reaper_stems-004.wav"
      >
    >
    <ITEM
      POSITION 46.96722005003182
      SNAPOFFS 0
      LENGTH 1.39001910316939
      LOOP 0
      ALLTAKES 0
      FADEIN 3 0 0 3 0 -1
      FADEOUT 3 0 0 3 0 1
      MUTE 0
      SEL 1
      IGUID {976973DA-34BA-4B96-B80F-B8E9FA363E01}
      IID 2
      NAME " - stem"
      VOLPAN 1 0 1 -1
      SOFFS 0.83343896141851
      PLAYRATE 1 1 0 -1 0 0.0025
      CHANMODE 0
      GUID {0576858C-FDC2-42E8-B932-EF038CB861FD}
      <SOURCE WAVE
        FILE "\Media\reaper_stems-004.wav"
      >
    >
  >
  <EXTENSIONS
    <SWSAUTOCOLOR
      {00000000-0000-0000-0000-000000000000} 0 "" "" ""
      {658455D1-946B-41DB-9BFC-F23EBF6460F5} 33530462 "" "" ""
    >
    <XENAKIOSCOMMANDS
      REFTRACK 0 0 1 "0"
    >
  >
  <EXTSTATE
    <ULTRASCHALL_MAGICROUTING
      LASTCOUNTTRACKS 1
      STEP recording
    >
  >
>
and here the script:

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

  render_cfg_string = ultraschall.CreateRenderCFG_WAV(2, 0, 0, 0, false)
  
  --Settings of the render table
  sourceDropDown=0 -- 0 MasterMix, 32 Selected Mediam Items, 64 selected item via master
  bounds=5 -- 2 TimeSelection, 3 Projects region, 4 Selected Media, 5 Selected Regions
  Startposition =0
  Endposition = 0
  TailFlag =1
  TailMS=0
  renderDirectory="c:\\test2"
  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(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.ApplyRenderTable_Project(RenderTable,false)

AP={ultraschall.RenderProject_RenderTable(nil, RenderTable)}
SLEM()
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

Last edited by Meo-Ada Mespotine; 06-02-2020 at 05:28 PM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-02-2020, 09:39 PM   #523
foxAsteria
Human being with feelings
 
foxAsteria's Avatar
 
Join Date: Dec 2009
Location: Oblivion
Posts: 10,255
Default

Quote:
Originally Posted by Jason Brian Merrill View Post
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.
Should be a totally manual action, no? Never automatic, just when you want? I just meant I would include it in a custom action I use for incrementing file versions and queuing a render.
__________________
foxyyymusic
foxAsteria is offline   Reply With Quote
Old 06-03-2020, 04:19 AM   #524
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

Quote:
Originally Posted by foxAsteria View Post
Should be a totally manual action, no? Never automatic, just when you want? I just meant I would include it in a custom action I use for incrementing file versions and queuing a render.
I would like it automatic so I don't have to remember. It could also be a startup action though.

I dont want to have to think of it. I would love it for just looking back at a library of presets and templates. As long as it gets organized nicely, I think it would be great
Jae.Thomas is offline   Reply With Quote
Old 06-03-2020, 06:52 AM   #525
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

Quote:
Originally Posted by foxAsteria View Post
Should be a totally manual action, no? Never automatic, just when you want? I just meant I would include it in a custom action I use for incrementing file versions and queuing a render.
those are also fantastic ideas
Jae.Thomas is offline   Reply With Quote
Old 06-07-2020, 05:06 PM   #526
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

New release
4.1.002 - "The Buzzcocks - Why can't I touch it" - 8th of June 2020

Has now 1146 functions, with 17 new ones

new in this release:
  • Video window-Toggle Fullscreen
    You can now toggle the video-window fullscreen/non-fullscreen via VideoWindow_FullScreenToggle.
  • Activate/Deactivate Mute-envelopes
    Wasn't possible until now: activation and deactivation of Mute-Envelopes, as otherwise you cannot write to them.
  • MuteActions more stable
    They should now set mute-envelope-points properly, no matter of mute-env-armstate and/or automation-mode.
  • Project-Diffs-Developertool
    Reimplemented, so it shows only the diff-lines now.
  • Benchmarking-functions
    You can have multiple benchmark-slots, so benchmarking multiple values at the same time is now possible.
    That way, you can benchmark the whole script and individual functions in one go.
  • Item Buttons can be now toggled
    Now, you can toggle the buttons shown at the top of the MediaItem, like mute, FX, Envelopes, etc. Change them in one go, to have different "profiles"
    of MediaItem-buttons, that reflect the usecases of your different projects.
  • PreventUIRefresh and RestoreUIRefresh
    Like Reaper's own PreventUIRefresh, but prevents accidental misuse of its counter, as the counting up is done by PreventUIRefresh and the "reset" of a
    PreventUIRefresh can be undone by RestoreUIRefresh.
    When using RestoreUIRefresh(true), all ultraschall.PreventUIRefresh-calls are reset, so the user-interface of Reaper is useable again.
  • bugfixes and readdition of accidentally deleted function..oops

New features in 4.1.002
  • Benchmarking: Benchmark_GetAllStartTimesAndSlots - returns the starttimes of all current benchmark-measuring-slots as a handy table(index=slot number)
  • Envelope Management: SetEnvelopeState_Act - sets bypass and automation-items-behavior
  • Envelope Management: SetEnvelopeState_DefShape - sets the default-envelope shapes and pitch-snap-settings
  • Envelope Management: SetEnvelopeState_LaneHeight - sets the height and compacted state of an envelope
  • Envelope Management: SetEnvelopeState_Vis - sets the visibility-state of an envelope
  • Mute Management: ActivateMute - activates a mute-envelope of a track
  • Mute Management: ActivateMute_TrackObject - activates a mute-envelope of a track
  • Mute Management: DeactivateMute - deactivates a mute-envelope of a track
  • Mute Management: DeactivateMute_TrackObject - deactivates a mute-envelope of a track
  • Take Management: GetTake_ReverseState - returns, if a take is reversed or not
  • User Interface: GetItemButtonsVisible - gets the individual item-buttons visible/invisible-state
  • User Interface: GetPreventUIRefreshCount - the number of times you need to restore UI-refresh
  • User Interface: PreventUIRefresh - prevents refreshing of the user-interface, more solid, than Reaper's own PreventUIRefresh-function
  • User Interface: RestoreUIRefresh - restores a prevented UI-refreshing
  • User Interface: SetItemButtonsVisible - sets the individual item-buttons visible/invisible
  • User Interface: VideoWindow_FullScreenToggle - toggles full-screen-state of the video-processor-window(requested by vectorwarrior)

    Changes from 4.1.001 to 4.1.002
  • Benchmarking: Benchmark_GetStartTime - has now additional optional parameter slot to get the starttime of a certain benchmarking-slot(requested by rstockm)
  • Benchmarking: Benchmark_MeasureTime - has now additional optional parameter slot, with which you can store multiple measurings into different slots, for more benchmarks than just one(requested by rstockm)
  • Developer Tools: ultraschall_developertool_Project_State_Diffs_Moni tor.lua - improved so it now only shows changed lines and therfore proper diffs
  • Docs: Reaper internals - updated to Reaper 6.11, SWS 2.11.0 and JS-extension 1.215; added accidentally missing functions
  • Docs: US-docs - functionname's last ) was not bold for some reason -> fixed
  • Envelope Management: GetEnvelopeState_DefShape - added missing descriptions for returnvalues for pitch-snap
  • GUI: Scythe - loads its libraries from UserPlugins\ultraschall_api\3rd_party_modules\Scyt he\ now, so it shouldn't get in conflict with user's own installation of a Scythe-instance
  • Marker Management: CountNormalMarkers - optimized speed
  • Marker Management: GetAllMarkersBetween - parameters can be nil now, allowing to be used for projectstart and projectend
  • Marker Management: GetAllRegionsBetween - parameters can be nil now, allowing to be used for projectstart and projectend
  • Marker Management: EnumerateNormalMarkers - optimized speed
  • Marker Management: SetNormalMarker - optimized speed
  • Marker Management: DeleteNormalMarker - optimized speed
  • Marker Management: IsMarkerNormal - optimized speed
  • Mute Management: GetNextMuteState - returns now the mutestate, even if no mute-envelope is active
  • Mute Management: GetNextMuteState_TrackObject - returns now the mutestate, even if no mute-envelope is active
  • Mute Management: GetPreviousMuteState - returns now the mutestate, even if no mute-envelope is active
  • Mute Management: GetPreviousMuteState_TrackObject - returns now the mutestate, even if no mute-envelope is active; didn't return envIDX correctly -> fixed
  • Mute Management: ToggleMute - sets now mute-envelope point regardless of env-recarm or automation-mode; activates inactive mute-envelopes now as well
  • Mute Management: ToggleMute_TrackObject - sets now mute-envelope point regardless of env-recarm or automation-mode; activates inactive mute-envelopes now as well
  • Project Files: GetProject_MarkersAndRegions - supports now returning regions-states of selected and region render-matrix; fixed bugs with selected regions not recognized(thanks to aurelien)
  • 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)
  • SetRender_SaveCopyOfProject - got accidentally deleted, readded it now (thanks to aurelien)

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

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-29-2020, 05:03 PM   #527
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

New huge update comin in soon...

If you have some bugs that need to be fixed before that, now is your chance.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-30-2020, 06:26 PM   #528
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Refining the last bits and pieces. Perfect time to tease you with new features:

First thing first.

This has been requested and I was stunned, that it's not existing yet:

Alias-renaming of FX-plugins. So I made such get/set-functions for TrackFX and TakeFX.

How does it look?



Trust me, you always wanted scrolltext in your fx-plugin's names ^^
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-30-2020, 06:30 PM   #529
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

This one resulted from a request on being able to programmatically set the default's theme-parameters, without having to use the theme-adjuster.

I made some functions to influence them.

AND

I made a theme-parameter-monitor, which not only displays the current values, but also, what has been changed by the theme-adjuster.
And of course you can change them in the monitor directly as well. That's part of properly fullfilled decadence XD




This works for all themes, who use theme-parameters, so it could be a cool debugging tool as well for theme-developers.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-30-2020, 06:34 PM   #530
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

And one for our metadata-fans. I made functions including documentation and validity-checks for the new metadata-features of Reaper.



Yes you could do it using Reaper's native functions, quite easily.

But why not using functions, who do the painful stuff for you: ^^
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-01-2020, 09:43 AM   #531
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

New release!

4.1.003 - "Premier" - 1st of July 2020

Has now 1200 functions, with 54 new ones

new in this release:
  • Theme Parameter Access and monitoring script
    Since Reaper 6, Cockos added the option of influencing a theme via so called theme-parameters. One such example is WhiteTie's Default Reaper6-Theme,
    which can be influenced via the theme-adjuster.
    And here's the thing: this can not only be influenced, it can also be programmed.
    So if you wanted to write scripts, who automatically adjust things without having to use the theme-adjuster, by using GetAllThemeLayoutParameters, ApplyAllThemeLayoutParameters, GetAllThemeLayoutParameters, GetThemeParameterIndexByDescription,
    GetThemeParameterIndexByName, SetThemeParameterIndexByDescription and SetThemeParameterIndexByName.
    And if you want to know, which theme-parameters can be set and which values are the right ones, the developer-package includes now a Theme-Parameter monitoring script.
    With that, you can see altered parameters(in Reaper's default v6 theme, for instance) and use the aforementioned functions to influence them accordingly.
    Just run the "Script: ultraschall_Add_Developertools_To_Reaper.lua"-script after installing the update and there you have it.
    One huge step into theme-customization...
  • MetaData
    Since Reaper has metadata-export-capabilities now, I've added nice and handy functions to get and set them, including docs and everything.
    The rendering-functions also allow now switching on the metadata-embedding, so there's no excuse anymore to not use it.
  • LangPack Compare-script
    This is probably useful for translators among you. I wrote a script, which compares two ReaperLangPack-files and returns the differences between the two into the clipboard.
    That way you can compare the most recent official LangPack with a former one and can see immediately, what has been added/altered and into where, so you can update your translation accordingly.
    Just run the "Script: ultraschall_Add_Developertools_To_Reaper.lua"-script after installing the update and there you have it.
  • Envelope Activation
    When working with envelopes, especially when scripting, you can not really work with envelopes, unless they are activated. Funny enough: there's no "Activate"Envelope"-function in Reaper's own API.
    So I tried to find ways around it.
    With ActivateEnvelope(good for send-envelopes), ActivateTrackPanEnv, ActivateTrackPreFXPanEnv, ActivateTrackPreFXVolumeEnv, ActivateTrackTrimVolumeEnv, ActivateTrackVolumeEnv you can activate most of
    the most important envelopes and therefore script them.
    Some are still missing, so I hope, I can add the missing ones too...
  • TrackManager
    It has been requested in the feature-request subforum and the general-forum: functions for the trackmanager.
    Thing is, it is quite useful, but there are simply no actions available for it, even though having shortcuts set to some of the basics can be very handy.
    So I added TrackManager_ClearFilter, TrackManager_OpenClose, TrackManager_ShowAll, TrackManager_SelectionFromProject, TrackManager_SelectionFromList, TrackManager_SetFilter who allow you to script many
    of the ui-elements of the track manager.
  • Lokasenna's Gui Lib v2
    now part of Ultraschall-API. Just run the function Lokasenna_LoadGuiLib_v2, which loads the GUI-Lib version deployed with Ultraschall-API including all its classes and the rest is the same as you are used to.
    There's nothing to worry, if you've already installed Lokasenna's GuiLib v2, as the version I deploy is independent of it.
    So you can safely use both on one system.
  • Ignore-Audio checkbox of video-items
    This is requested from time to time again, so I finally added it: the possibility to set the "ignore audio"-checkbox of a video-item.
    GetItem_Video_IgnoreAudio and SetItem_Video_IgnoreAudio are the functions of your choice.
  • Setting Aliasnames for FX-plugins
    Not available in the regular API, but in Ultraschall-API. This has been requested shortly before this release, a way to set the alternative/alias name of track and item-fx.
    A demofile US_Api_Examples_SetAliasNamesOfFX-Plugins.lua shows, what you can do with it...
  • SetTimeUnit
    Allows setting the timeunit of the transportfield, the ruler and the alternative ruler. Good for toggling through-actions...
  • Image Handling
    ResizeJPG, ConvertPNG2JPG and ConvertJPG2PNG give you more control over managing different image-files.
  • Bugfixes and other stuff
    For rendering, FXChains(as requested), updated nomenclature of functions, SLEM allows now getting more than just the last error-message, etc, etc



    New features in 4.1.003
  • Developer Tools: Developer LangPack - added developer-langpack for Reaper 6.12c
  • Developer Tools: ultraschall_developertool_Theme_Parameter_Monitor. lua - monitor and manipulate theme-parameters(like from the default Reaper6-theme)
  • Developer Tools: ultraschall_developertool_Compare_LangPacks.lua - allows you to select two ReaperLangPack-files and puts missing/changed entries from each file into the clipboard
  • Envelopes: ActivateEnvelope - activates an envelope, so it can be shown in the arrangeview(thanks to sexan; requested by daniellumertz)
  • Envelopes: ActivateTrackPanEnv - activates the pan-envelope lane of a track
  • Envelopes: ActivateTrackPanEnv_TrackObject - activates the pan-envelope lane of a trackobject
  • Envelopes: ActivateTrackPreFXPanEnv - activates the pre-fx-pan-envelope lane of a track
  • Envelopes: ActivateTrackPreFXPanEnv_TrackObject - activates the pre-fx-pan-envelope lane of a trackobject
  • Envelopes: ActivateTrackPreFXVolumeEnv - activates the pre-fx-volume-envelope lane of a track
  • Envelopes: ActivateTrackPreFXVolumeEnv_TrackObject - activates the pre-fx-volume-envelope lane of a trackobject
  • Envelopes: ActivateTrackTrimVolumeEnv - activates the trim-volume-envelope lane of a track
  • Envelopes: ActivateTrackTrimVolumeEnv_TrackObject - activates the trim-volume-envelope lane of a trackobject
  • Envelopes: ActivateTrackVolumeEnv - activates the volume-envelope lane of a track
  • Envelopes: ActivateTrackVolumeEnv_TrackObject - activates the volume-envelope lane of a trackobject
  • Envelopes: GetTakeEnvelopeUnderMouseCursor - returns the take-envelope currently under the mouse
  • FXManagement: GetTakeFX_AlternativeName - gets the alternative/aliasname of a takefx(requested by dimtok)
  • FXManagement: GetTrackFX_AlternativeName - gets the alternative/aliasname of a trackfx(requested by dimtok)
  • FXManagement: SetTakeFX_AlternativeName - sets the alternative/aliasname of a takefx(requested by dimtok)
  • FXManagement: SetTrackFX_AlternativeName - sets the alternative/aliasname of a takefx(requested by dimtok)
  • GUI: Lokasenna's Gui Lib v2 - added his Gui-Lib v2 into Ultraschall-API; will not affect other possible GuiLib-installations on the current Reaper-installation
  • GUI: Lokasenna_LoadGuiLib_v2 - loads Lokasennas Gui-Lib and all available classes into your script
  • Image Handling: ResizeJPG - resizes jpgs to new jpgs
  • Image Handling: ConvertPNG2JPG - converts png into jpg
  • Image Handling: ConvertJPG2PNG - converts jpg into png
  • MediaItem Management: GetItem_Video_IgnoreAudio - gets the current state of the ignore audio-checkbox of a video-source of a MediaItem's take(requested by earhax)
  • MediaItem Management: SetItem_Video_IgnoreAudio - sets the state of the ignore audio-checkbox of a video-source of a MediaItem's take(requested by earhax)
  • Metadata Management: Metadata_BWF_GetSet - gets, sets BWF-metadata-tags from/in the current project
  • Metadata Management: Metadata_CART_GetSet - gets, sets CART-metadata-tags from/in the current project
  • Metadata Management: Metadata_CUE_GetSet - gets, sets CUE-metadata-tags from/in the current project
  • Metadata Management: Metadata_ID3_GetSet - gets, sets ID3-metadata-tags from/in the current project
  • Metadata Management: Metadata_INFO_GetSet - gets, sets INFO-metadata-tags from/in the current project
  • Metadata Management: Metadata_IXML_GetSet - gets, sets IXML-metadata-tags from/in the current project
  • Metadata Management: Metadata_VORBIS_GetSet - gets, sets VORBIS-metadata-tags(for Opus/Ogg-files) from/in the current project
  • Render Management: GetRender_AddRenderedFilesToProject - gets the checkbox-state for add rendered items to new tracks in project-checkbox in the Render to File-dialog
  • Render Management: GetRender_EmbedMetaData - gets the checkbox-state for embed-metadata in the Render to File-dialog
  • Render Management: GetRender_NoSilentFiles - gets the checkbox-state for "Do not render files that are likely silent"-checkbox in the Render to File-dialog
  • Render Management: GetRender_TailLength - gets the current taillength, as set in the Render to File-dialog
  • Render Management: SetRender_AddRenderedFilesToProject - gets the checkbox-state for add rendered items to new tracks in project-checkbox in the Render to File-dialog
  • Render Management: SetRender_EmbedMetaData - sets the checkbox for embed-metadata in the Render to File-dialog
  • Render Management: SetRender_NoSilentFiles - sets the checkbox-state for "Do not render files that are likely silent"-checkbox in the Render to File-dialog
  • Render Management: SetRender_TailLength - sets the current taillength, as set in the Render to File-dialog
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-01-2020, 09:43 AM   #532
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

  • Theme Management: ApplyAllThemeLayoutParameters - applies changes theme-layout parameters to the current theme; use GetAllThemeLayoutParameters to get an alterable table
  • Theme Management: GetThemeParameterIndexByDescription - gets the theme parameter's values by its description
  • Theme Management: GetThemeParameterIndexByName - gets the theme parameter's values by its name
  • Theme Management: SetThemeParameterIndexByDescription - sets the theme parameter's values by its description
  • Theme Management: SetThemeParameterIndexByName - sets the theme parameter's values by its name
  • Track Management: GetAllVisibleTracks_Arrange - returns all tracks currently visible in viewable part of the arrange-view
  • Track Manager: TrackManager_ClearFilter - clears the filter of the opened track manager(requested by Monomirror)
  • Track Manager: TrackManager_OpenClose - open, closes and toggles opening of the track manager(requested by Monomirror)
  • Track Manager: TrackManager_ShowAll - shows all tracks of the opened track manager(requested by Monomirror)
  • Track Manager: TrackManager_SelectionFromProject - sets the selection of the opened track manager to the track-selection of the project(requested by Monomirror)
  • Track Manager: TrackManager_SelectionFromList - sets the track-selection of the project into the track-selection of the opened track manager(requested by Monomirror)
  • Track Manager: TrackManager_SetFilter - sets the filter of the opened track manager(requested by Monomirror)
  • User Interface: GetTrackManagerHWND - gets the tcp of the trackmanager, if opened
  • User Interface: SetTimeUnit - sets the timeunit for transport, ruler and secondary ruler
  • User Interface: TCP_SetWidth - allows setting a new width of the tcp(initial code by amagalma, thanks for that )
  • Video Management: ProjectSettings_GetVideoFramerate - gets the currently set project's video-framerate
  • Video Management: ProjectSettings_SetVideoFramerate - sets the currently set project's video-framerate and optionally the default for new projects

    Changes from 4.1.002 to 4.1.003
  • API: Requirements - requires now JS-extension 1.215
  • API: titles will now be references to FarScape-episode-titles, until I conquered the farscape of Gui-development
  • Docs: GetRender_AutoIncrementFilename - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: GetRender_EmbedMetaData - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: GetRender_EmbedStretchMarkers - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: GetRender_NoSilentFiles - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: GetRender_OfflineOnlineMode - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: GetRender_ProjectSampleRateForMix - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: GetRender_QueueDelay - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: GetRender_ResampleMode - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: GetRender_SaveCopyOfProject - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: Reaper Internals - updated to Reaper 6.12, fixed nonconverted markdown-links
  • Docs: SetRender_AutoIncrementFilename - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: SetRender_EmbedMetaData - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: SetRender_EmbedStretchMarkers - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: SetRender_NoSilentFiles - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: SetRender_OfflineOnlineMode - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: SetRender_ProjectSampleRateForMix - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: SetRender_QueueDelay - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: SetRender_ResampleMode - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • Docs: SetRender_SaveCopyOfProject - moved in the index to Rendering Projects -> Render Settings, where I would expect such functions
  • GFX: GFX_Init - produced nil-error, when the optional-parameters weren't set due missing default-values on my side -> fixed
  • Error Management: error-messages - optional boolean errormessages include now, which is the default value when using nil
  • Error Management: ShowLastErrorMessage - allows now to access the messages before the last one as well
  • Error Management: SLEM - allows now to access the messages before the last one as well
  • Envelopes: ActivateMute - had wrong returnvalue in errormessages for parameter track -> fixed
  • Envelopes: DeactivateMute - had wrong returnvalue in errormessages for parameter track -> fixed
  • FXManagement: GetFXStateChunk - had numerous problems so I reimplemented it from scratch; returns now the linenumber at which the found FXStateChunk starts in the passed StateChunk
  • Helper functions: OpenURL - didn't work on Linux -> fixed
  • MediaItem Management: SelectMediaItems_MediaItemArray - updates now arrangeview, so selected items are now visible as such
  • ReaMote: AutoSearchReaMoteClients - renamed from AutoSearchReaMoteSlaves; the old name is still available but deprecated
  • Render Management: AddRenderPreset - added option for embed-metadata-checkbox
  • Render Management: ApplyRenderTable_Project - added option for embed-metadata-checkbox
  • Render Management: ApplyRenderTable_ProjectFile - added option for embed-metadata-checkbox
  • Render Management: CreateNewRenderTable - added option for embed-metadata-checkbox
  • Render Management: GetRenderTable_Project - added option for embed-metadata-checkbox
  • Render Management: GetRenderTable_ProjectFile - added option for embed-metadata-checkbox
  • Render Management: GetRenderPreset_RenderTable - added option for embed-metadata-checkbox
  • Render Management: GetRenderToFileHWND - didn't return render to file-dialog-hwnd on recent Reaper-versions -> fixed
  • Render Management: IsValidRenderTable - added option for embed-metadata-checkbox
  • Render Management: RenderProject_RenderTable - added option for embed-metadata-checkbox
  • Render Management: SetRenderPreset - added option for embed-metadata-checkbox
  • Routing Management: GetAllAUXSendReceives - could produce a nil-error and returned wrong track-guid, PLEASE CHECK, IF YOUR ROUTING-CODE IS BUGGY NOW AND REPORT BACK2ME, Thanx! -> fixed
  • TrackGroups: GetTrackGroupFlagsState - updated nomenclature to Reaper's new one
  • TrackGroups: GetTrackGroupFlags_HighState - updated nomenclature to Reaper's new one
  • TrackGroups: SetTrackGroupFlagsState - updated nomenclature to Reaper's new one
  • TrackGroups: SetTrackGroupFlags_HighState - updated nomenclature to Reaper's new one
  • Theme Management: GetAllThemeLayoutNames - didn't return themelayout index 0 -> fixed
  • Theme Management: GetAllThemeLayoutParameters - didn't return themeparameter index 0; had off-by-one error in retval index -> fixed
  • User Interface: GetHWND_ArrangeViewAndTimeLine - returns now tracklistwindow-tcp as well; didn't find TCP-hwnd when TCP was on the right side of the arrange-view -> fixed(thanks to Edgemeal)

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

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-01-2020, 05:53 PM   #533
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Another question: would anyone of you want to have functions for dealing with take-markers in a more extensive way than the native functions allow? Export/Import for instance?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-05-2020, 09:16 PM   #534
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Hi Mespotine, thanks for all the help here in the forum , this is probably a FAQ but if someone tries to run a script I made with your API how can I make to show a message to he/she download it?



I imagine I have to put an if condition after
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")
In case this file don't exist....

Last edited by daniellumertz; 07-05-2020 at 10:21 PM. Reason: I write first "I made without your API" what I wanted to write is "with your API"
daniellumertz is offline   Reply With Quote
Old 07-05-2020, 09:45 PM   #535
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Quote:
MetaData

This uses render right ? Or is it data injection as in my BWF scripts ?

PS : very impressive all these new functions... you are way advanced on your time ! :P
X-Raym is offline   Reply With Quote
Old 07-06-2020, 01:01 AM   #536
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Quote:
Originally Posted by X-Raym View Post
This uses render right ? Or is it data injection as in my BWF scripts ?

PS : very impressive all these new functions... you are way advanced on your time ! :P
Yes, they get/set the fields in the Edit-Metadata-dialog of Render to File, so they are put into the file after rendering.

I have more stuff to go. One thing that almost made it in this version(so I'm teasing here right now ^^ ) is programming the batch-file-converter.
According to schwa, this also supports setting metadata to already existing files, so if I can make this work, I'll add metadata-export for already rendered files as well.

Edit: btw, if I remember correctly, you had problems with using FXStateChunks as some of these functions were buggy. If yes, could you give them another try? I fixed numerous noob-bugs (or better, I got rid of them by completely reimplementing some functions ) so the functions should now be more stable.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

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

Quote:
Originally Posted by daniellumertz View Post
Hi Mespotine, thanks for all the help here in the forum , this is probably a FAQ but if someone tries to run a script I made with your API how can I make to show a message to he/she download it?



I imagine I have to put an if condition after
dofile(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")
In case this file don't exist....
Code:
if reaper.file_exists(reaper.GetResourcePath().."/UserPlugins/ultraschall_api.lua")==false then
  reaper.MB("Sorry, needs Ultraschall-API to work", "Missing extension", 0)
  return
end
I'll add a template-script, which does the checks for you at some point, but hadn't the time to do it yet.
This template-script will not only check, if Ultraschall-API is existing but also if it's the right version, so you can request a certain minimum version.

I may add that for other extensions and Reaper as well, so you can check for the right versions of everything. Needs some more time til I'm finished with it.

XRaym also has some scripts, who use Ultraschall-API, so he can probably show you, how he's done it, including a way of giving the user the ReaPack-index-file-url so it can be installed quite quickly.

I may think about adding a "Do you want to install Ultraschall-API via ReaPacj"-feature as well in my template script, but again, this needs some more time to work as flawlessly and stable as possible.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-06-2020, 03:20 PM   #538
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
XRaym also has some scripts, who use Ultraschall-API, so he can probably show you, how he's done it, including a way of giving the user the ReaPack-index-file-url so it can be installed quite quickly.
.
That seems cool, if I know the name of the scripts I could study it, and if X-raym allow use it heheh


Thanks the code works!
I think I finished my first script may post this or next week in the forum, will test it a little more. ( is just an script to accelerate the process of sending tracks to a bus for selected amount of time, copying the automation in volume and pan to the send automation (as most of my mixes involves a lot of automation ))
daniellumertz is offline   Reply With Quote
Old 07-06-2020, 04:24 PM   #539
lexaproductions
Human being with feelings
 
Join Date: Jan 2013
Posts: 1,126
Default

By the way, is it just me or are all the links from your first post broken?
lexaproductions is offline   Reply With Quote
Old 07-07-2020, 05:31 AM   #540
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

O_O

Will investigate this...hold on...

Edit: fixed. Thanks lexaproductions
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

Last edited by Meo-Ada Mespotine; 07-07-2020 at 05:37 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-08-2020, 01:53 PM   #541
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

New Hotfix available:
  • Examplescripts: US\_Api\_Examples\_Render\_Current\_Project.lua - updated to the more recent rendering-functions(used the first and outdated ones)
  • Examplescripts: US\_Api\_Examples\_Render\_Project.lua - updated to the more recent rendering-functions(used the first and outdated ones)
  • Examplescripts: US\_Api\_Examples\_Render\_Region\_of\_current\_Pr oject.lua - updated to the more recent rendering-functions(used the first and outdated ones)
  • Rendering: RenderProject - produced error, when a project's timeselection start&end where stored "backwards"; rendercfg for secondary rendering didn't work and caused havoc in numerous functions -> fixed (thanks to elzoido)

Please update your ReaPacks...
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-08-2020, 09:01 PM   #542
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

Just a friendly bump for this.., it's been almost a year.
https://forum.cockos.com/showpost.ph...&postcount=270

Also still no SetParmMIDIPLink_FXStateChunk ?
Would be nice to have an "Add" version as well for when there is not an entry already present.

Oh, by the way, the Render Management stuff is really nice!

Thanks
Anton9 is offline   Reply With Quote
Old 07-09-2020, 02:35 AM   #543
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

I still have it on my mind and theoretically it's not a problem.
I just have the difficulty deciding how the parameters should be designed.

There are basically three parts of ParameterModulation(as you can see in the dialog of it) and they are stored in one datastructure in tracks altogether.

So what I want is three functions who represent the three parmmods, but managing the parsing and altering the data structure is a real mess.

I could make it work by just making one function for all parmmodulation but this would mean dozens of parameters who all need to be set.
So even if you don't need LFO, you would need to set it and, to be able to set it, you would always need to get all the attributes before that.
This would be a mess for you to handle but make it possible for me to handle the difficult datastructure.

So it's more like, three handy set-functions that I couldn't handle or one parmmodulation-function, that you couldn't handle.

It's complicated and I'm not happy with all my ideas so far...
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-09-2020, 05:08 AM   #544
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Thinking about it some more, I could use an attempt, that would work like RenderTables for the rendering-functions, means: you have a table, with all possible settings for parmmodulation and you set it as you wish and commit it to the track somehow.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-09-2020, 06:12 AM   #545
aurelien
Human being with feelings
 
Join Date: Apr 2014
Posts: 95
Default

Hi mespotine , just updated your lib, small bug in ultraschall_functions_Render_Module.lua

You forgot to test if EmbedMetadata was null or not in CreateNewRenderTable, hence making the function unusable

It was :
PHP Code:
  if  type(EmbedMetadata)~="boolean" then ultraschall.AddErrorMessage("CreateNewRenderTable""CloseAfterRender""#28: must be a boolean", -30) return end 
Should be :

PHP Code:
  if EmbedMetadata~=nil and type(EmbedMetadata)~="boolean" then ultraschall.AddErrorMessage("CreateNewRenderTable""CloseAfterRender""#28: must be a boolean", -30) return end 
Thanks,

Last edited by aurelien; 07-09-2020 at 06:17 AM.
aurelien is offline   Reply With Quote
Old 07-09-2020, 10:28 AM   #546
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Ah, thanks. Will fix it when I'm back home.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-09-2020, 03:47 PM   #547
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Hotfix 2 - 10th of July 2020

Changes:
- Rendering: CreateNewRenderTable - did not allow EmbedMetadata being optional -> fixed(thanks to aurelien)

Please update your ReaPacks
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-09-2020, 10:55 PM   #548
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Thinking about it some more, I could use an attempt, that would work like RenderTables for the rendering-functions, means: you have a table, with all possible settings for parmmodulation and you set it as you wish and commit it to the track somehow.
That actually sounds like it could be a pretty good idea.., maybe try it and see how it goes.

Thanks
Anton9 is offline   Reply With Quote
Old 07-10-2020, 04:38 AM   #549
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Hotfix 3: 10th of July 2020

Hotfixes seems to be not available for some reason so I remade the hotfix and it should work now definitely.

Please update your ReaPacks...

@Anton9
Ok, I will think about how to do it that way. This approach could be a good way for the future, when the devs may add new options as well...
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 07-10-2020, 07:46 PM   #550
Anton9
Human being with feelings
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 1,340
Default

Awesome I'll look forward to it.

Thanks
Anton9 is offline   Reply With Quote
Old 07-21-2020, 08:22 AM   #551
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

New release!

4.1.004 - "I, E.T." - 21st of July 2020

Has now 1215 functions, with 15 new ones

new in this release:
  • Background Copying
    You can now copy files in the background(as additional defer-loops) within your script, while you do other stuff in your main defer-loops.
    You can set a buffer-size, which means, how much shall be copied per defer-cycle to balance between transfer-speed and possible Reaper-GUI-lags.
  • TimeToMeasures
    This allows you to convert a time in seconds to measures. I've used it in one script to set pre-roll(which only accepts measures) to a length in seconds.
  • RenderCodes for FFMPEG 4.1.3 on Windows
    If you've installed FFMPEG 4.1.3 in your Reaper-installation, you have additional output-render-formats available. I've added docs for these renderstring-settings now as well.
  • Updated docs, examplescripts and bugfixes

    New features in 4.1.004
  • Docs: Concepts: Background Copying - decribes, how to program the background-copying-queue
  • FileManagement: CopyFile_AddFileToQueue - add files to the background-copying-queue
  • FileManagement: CopyFile_FlushCopiedFiles - flush the files from the copied list of the background-copying-queue
  • FileManagement: CopyFile_GetBufferSize - get the current copying-buffer size of the background-copying-queue
  • FileManagement: CopyFile_GetCopiedStatus - returns the current copy-status of a file in the background-copying-queue
  • FileManagement: CopyFile_GetCurrentlyCopiedFile - get the currently copied file in the background-copying-queue
  • FileManagement: CopyFile_GetCurrentlyRunningCopyInstances - get amount of currently running background-copying-instances
  • FileManagement: CopyFile_GetPausedState - get paused state of the background-copying-queue
  • FileManagement: CopyFile_GetRemainingFilesToCopy - get the remaining files in the background-copying-queue
  • FileManagement: CopyFile_IsCurrentlyCopying - returns, if background-copying is currently copying
  • FileManagement: CopyFile_Pause - toggle pausing of the background-copying-instances
  • FileManagement: CopyFile_SetBufferSize - set the new copying-buffer-size of the background-copying-queue
  • FileManagement: CopyFile_StartCopying - start copying all files in the background-copying-queue
  • FileManagement: CopyFile_StopCopying - stop copying the files in the background-copying-queue
  • Helper Functions: TimeToMeasures - converts a time to measures
  • Project Management: GetProject_MetaDataStateChunk - gets the statechunk from a project, which holds all metadata

Changes from 4.1.003 to 4.1.004
  • Docs: Reaper Internals - updated to Reaper 6.13
  • Docs: render-codes - added codes, who are available after having FFMPEG 4.1.3 installed
  • Docs: VideoProcessor-docs - added detailed description for @param and reworked code-examples, as they didn't work previously(thanks to Eliseat)
  • Examplescripts: US_Api_Examples_Render_Current_Project.lua - updated to the more recent rendering-functions(used the first and outdated ones)
  • Examplescripts: US_Api_Examples_Render_Project.lua - updated to the more recent rendering-functions(used the first and outdated ones)
  • Examplescripts: US_Api_Examples_Render_Region_of_current_Project.l ua - updated to the more recent rendering-functions(used the first and outdated ones)
  • File Management: ReadBinaryFile_Offset - produced nil-error, when offset was after file's end; returned false in case of an error, even though it should return integer -> fixed
  • File Management: ReadBinaryFileFromPattern - returned false in case of an error, even though it should return integer -> fixed
  • File Management: ReadBinaryFileUntilPattern - returned false in case of an error, even though it should return integer -> fixed
  • MediaItems: RippleCut - moving of markers didn't work; added optional parameter which allows optionally moving markers as well
  • Rendering: CreateNewRenderTable - did not allow EmbedMetadata being optional -> fixed(thanks to aurelien)
  • Rendering: RenderProject - produced error, when a project's timeselection start&end where stored "backwards"; rendercfg for secondary rendering didn't work and caused havoc in numerous functions -> fixed (thanks to elzoido)




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

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-18-2020, 07:35 AM   #552
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

It's looking quite good for parameter-modulation in the next release.
Wish me luck, as I'm just three or four finished functions away from making it happen.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-18-2020, 09:57 AM   #553
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

How does your background copy works (in few words) ?


I use calls to native CLI OS functions to copy files (lile Copy on windows), with reaper.execute().


It has the advantages of being fast and doesnt take much RAM (I used to have some Lua functions which read all the file content and write it somewhere else. This can take quite some RAM for big files).


And good luck for param mod. No one either succeeded before :P
X-Raym is offline   Reply With Quote
Old 08-18-2020, 10:36 AM   #554
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Quote:
Originally Posted by X-Raym View Post
How does your background copy works (in few words) ?
Add files to the copying queue with

Code:
 integer current_copyqueue_position = ultraschall.CopyFile_AddFileToQueue(string filename, string targetfilename, boolean overwrite)

Check if background-copying is currently running:

Code:
 boolean retval = ultraschall.CopyFile_IsCurrentlyCopying()
and if not, start copying:
Code:
integer instance_number = ultraschall.CopyFile_StartCopying()
For more details, check the docs on that:

https://mespotin.uber.space/Ultrasch...ground_Copying

who give you more control including pausing, stopping background copying as well as the current state, the current file to be copied.
You can also let multiple background-copying-instances copy without Reaper slowing down by using CopyFile_StartCopying() multiple times(up to 1024 minus the number of defer-cycles you need in your script).

In the next update, I'll add an example-script of a simple file-manager in the style of norton commander, so you can see, what is possible with it. ^^

Quote:
And good luck for param mod. No one either succeeded before :P
You are talking to the one, who made programming rendering of projects in Lua possible for the first time in the history of cinema



Edit:

Here's a gif of the mentioned file-commander I made. It still has some UI bugs, as the progress-percentage of the background-copying is only updated, when I change the file-selection, but it shows already, that copying in the background+other ui-stuff in the foreground is possible within one script:

__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

Last edited by Meo-Ada Mespotine; 08-18-2020 at 10:59 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-18-2020, 11:20 PM   #555
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Thx for the infos ^^


What about on your code side (from a scripter to another) ? :P Do you copy using chunks of file and lua native i.o with coroutines ?


(A file manager ! damn... you are really pushing it further and further).
X-Raym is offline   Reply With Quote
Old 08-19-2020, 05:32 AM   #556
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

No coroutines. As you can have up to 1024 defer-loops in a script, I make use of them.
They copy it chunkwise and if you choose chunks not too big and start more copying-instances(aka defer-loops for copying) then you get quite a decent copying performance without blocking Reaper's UI,as Reaper can do its UI-management in between switching defer-loops without a problem.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-19-2020, 07:38 AM   #557
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Wait what ? we can have 1024 loops ?


I wasn't aware of that.... I don't even see why we would nee more than one (apart in your particular case)...


Hmmm... You are teaching me something there.



Can you make a very extra simple exemple of a script with dummy functions to show what a multiple defer loop script looks like ?
X-Raym is offline   Reply With Quote
Old 08-19-2020, 08:02 AM   #558
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

You should read my docs more often


This one, which defers up to 1024 instances of the main-function, though you can use 1024 different functions as well, whatever suits your needs.
Just set the maxdeferloops to the number of instances you want and you can see, how much faster the variable A will be updated.
You just need to take care of race-conditions and such, when using multiple defer-loops or keep them strictly separated from each other on a technical basis.

Code:
maxdeferloops=1 -- set this to the number of defer-loops you want
                -- this will affect the speed of increasing the variable A
                -- and all, because the main-function runs with maxdeferloops instances

A=0
function main()
  A=A+1
  reaper.ClearConsole()
  reaper.ShowConsoleMsg(A)
  reaper.defer(main)
end

for i=1, maxdeferloops do
  main()
end
Usecases are many. For instance, you can have a script with a lokasenna-GUI, which itself is one defer-loop(maybe more, but he probably used coroutines for that) and have multiple other defer-loops to do other stuff as well without slowing down the lokasenna-GUI itself.
So you can do background-copying, background-monitoring, background event managing while still having a performing gui.

You can also use this to split up massive calculation-stuff into multiple defer-loops, like my background copying, so Lua blocks Reaper's UI-thread only as sort as necessary.

Another thing: You can even jump between different deferring functions:

the following jumps under certain conditions between main and main2
Code:
A=0

function main2()
  A=A+1
  reaper.ClearConsole()
  reaper.ShowConsoleMsg("I'm in main2: "..A)
  if A<30 then reaper.defer(main2) else A=0 reaper.defer(main) end
end

function main()
  A=A+1
  reaper.ClearConsole()
  reaper.ShowConsoleMsg("I'm in main: "..A)
  if A<30 then reaper.defer(main) else A=0 reaper.defer(main2) end
end

main()
Really helpful in some special occasions as well.

Funfact: you can not only have up to 1024 different defer-loops but also atexit-ed-functions
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...

Last edited by Meo-Ada Mespotine; 08-19-2020 at 08:10 AM.
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-19-2020, 08:16 AM   #559
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

BTW: ParmModulation is working. I just need to tie up some things here and there to deal with some of Reaper's behavior but it's quite easy to do.

So I will release it as pre-release within a few days or so, so you can test it, before I officially release it to the public.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 08-19-2020, 12:34 PM   #560
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Thx for detailed explaination. this looks like a nice way to not block UI without using complex coroutines.Some of my script could take advantage of this.
X-Raym 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 02:54 AM.


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