Old 05-12-2021, 04:46 PM   #361
daeavelwyn
Human being with feelings
 
daeavelwyn's Avatar
 
Join Date: Dec 2014
Posts: 597
Default Good implementation of MIDI get key sig

Hi,

Actually, there is no way to get a key sig in Reaper using API.

as mentioned here : https://forum.cockos.com/showpost.ph...43&postcount=1

So a way to get this : http://midi.teragonaudio.com/tech/midifile/key.htm

Would really solved lots of my problems :-/
daeavelwyn is offline   Reply With Quote
Old 05-16-2021, 10:07 AM   #362
nvk
Human being with feelings
 
nvk's Avatar
 
Join Date: Jul 2019
Posts: 156
Default

It would be really nice with this new media explorer stuff to be able to preview files in the same way with the ReaScript API. Something like

reaper.MediaExplorerPreviewStart(filePath)
reaper.MediaExplorerPreviewPause()
reaper.MediaExplorerPreviewStop()

reaper.GetMediaExplorerInfo_Value(parmname)
reaper.SetMediaExplorerInfo_Value(parmname, newvalue)

D_STARTOFFS : double * : preview offset in source media, in seconds
D_VOL : double * : preview volume, 0=-inf, 0.5=-6dB, 1=+0dB, 2=+6dB, etc
D_PLAYRATE : double * : preview playback rate, 0.5=half speed, 1=normal, 2=double speed, etc
D_PITCH : double * : preview pitch adjustment in semitones, -12=one octave down, 0=normal, +12=one octave up, etc
B_PPITCH : bool * : preserve pitch when changing playback rate
B_REPEAT: bool * : playback repeat on/off
I_TEMPOMATCH: int *, 0=Tempo match off, 1=Tempo match on, 2=Tempo match half, 3=Tempo Match double
I_DSTCHAN = int *, index, &1024=mono, otherwise stereo pair, hwout:&512=rearoute, -1 for selected track or first track named "Media Explorer Preview"


I could see this opening up a ton of possibilities for scripts. If an ID was assigned to each file being played back so that multiple files could be played and manipulated at the same time you could make a sampler as well. I would absolutely make something that would take advantage of this if it were possible.
nvk is offline   Reply With Quote
Old 05-16-2021, 01:58 PM   #363
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Quote:
Originally Posted by nvk View Post
It would be really nice with this new media explorer stuff to be able to preview files in the same way with the ReaScript API. ....
+1
and add it to reajs while your at it as file_riff don't work.
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 05-16-2021, 11:10 PM   #364
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

Quote:
Originally Posted by nvk View Post
It would be really nice with this new media explorer stuff to be able to preview files in the same way with the ReaScript API. Something like
yep yep ! would be really nice!
__________________
🙏🏻
deeb is offline   Reply With Quote
Old 05-16-2021, 11:16 PM   #365
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default req: InsertTrackAtIndex should have a "folderdepth" argument

otherwise even for a fraction of second the nested tracks hierarchy will be changed with undesired results.

Something like:
reaper.InsertTrackAtIndex(integer idx, integer I_FOLDERDEPTH, boolean wantDefaults)

----
I_FOLDERDEPTH : int * : folder depth change, 0=normal, 1=track is a folder parent, -1=track is the last in the innermost folder, -2=track is the last in the innermost and next-innermost folders, etc
__________________
🙏🏻
deeb is offline   Reply With Quote
Old 06-04-2021, 11:52 PM   #366
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default Req: API for openFXbrowser in specif tab

So that we can open the fxbrowser with a specific selected category:
- Instrument
or
- all plugins
or
- custom folders , etc

Currently i am need to open directly the Instrument tab, but this would be useful for other scenarios, example:

- Open FXbrowser My folders Compressors
- Open FXbrowser My folders Synths
etc
__________________
🙏🏻
deeb is offline   Reply With Quote
Old 06-05-2021, 03:15 AM   #367
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by deeb View Post
So that we can open the fxbrowser with a specific selected category:
- Instrument
or
- all plugins
or
- custom folders , etc

Currently i am need to open directly the Instrument tab, but this would be useful for other scenarios, example:

- Open FXbrowser My folders Compressors
- Open FXbrowser My folders Synths
etc

Using modified code by Edgemeal:
Code:
-- Selects the fourth item in the open FX Browser list ("VST3i" in my system)
local item_nr = 6
local add_fx_hwnd = reaper.JS_Window_Find( "Add FX to: ", false )
if add_fx_hwnd then
  local tree_hwnd = reaper.JS_Window_FindChild( add_fx_hwnd, "Tree1", true )
  local nodes = {}
  local hNode = reaper.JS_WindowMessage_Send(tree_hwnd, "0x110A", 0x0, 0,0,0) -- first root node
  while(hNode > 0) do
    nodes[#nodes+1] = hNode
    local hChild = reaper.JS_WindowMessage_Send(tree_hwnd, "0x110A", 0x4, 0,hNode,0) -- child node
    while(hChild > 0) do
      nodes[#nodes+1] = hChild
      hChild = reaper.JS_WindowMessage_Send(tree_hwnd, "0x110A", 0x1, 0,hChild,0) -- next child
    end
    hNode = reaper.JS_WindowMessage_Send(tree_hwnd, "0x110A", 0x1, 0,hNode,0) -- next root 
  end
  reaper.JS_WindowMessage_Send(tree_hwnd, "0x110B", 0x9, 0,nodes[item_nr],0)
end

The only limitation is that you can't select by name as there is no way to get them. You can only select by index.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 06-05-2021, 07:49 AM   #368
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

^^ thank you amalgama! this does not work on my system; OSX Catalina! being by number would be totally fine!
__________________
🙏🏻
deeb is offline   Reply With Quote
Old 06-05-2021, 08:12 AM   #369
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Quote:
Originally Posted by deeb View Post
^^ thank you amalgama! this does not work on my system; OSX Catalina! being by number would be totally fine!

Oh, pity! I don't think it could work on any other OS than Windows... So, I give a +1 for your FR
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 06-07-2021, 01:57 AM   #370
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default req: reaper.TrackFX_setFXName

^^ thank you!

Another thing:

I could not find a way to rename FX Instance of a plugin by API like we can manually do.

Did i miss it?

if this is confirmed , would be nice to have an set function for that, so that instead of having a name like: my_amazing_compressor_blabla listed in the fxchain we could rename it to - Compressor

This way we could clear the fxchain with more abstracted and clear/simpler names like:

Eq
Compressor
Gate
Synth
Sampler
etc
__________________
🙏🏻

Last edited by deeb; 06-07-2021 at 02:46 AM.
deeb is offline   Reply With Quote
Old 06-07-2021, 10:50 AM   #371
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 deeb View Post
^^ thank you!

Another thing:

I could not find a way to rename FX Instance of a plugin by API like we can manually do.

Did i miss it?

if this is confirmed , would be nice to have an set function for that, so that instead of having a name like: my_amazing_compressor_blabla listed in the fxchain we could rename it to - Compressor

This way we could clear the fxchain with more abstracted and clear/simpler names like:

Eq
Compressor
Gate
Synth
Sampler
etc
Maybe using this from Ultraschall-API?

Get Alternative Names:
https://mespotin.uber.space/Ultrasch...lternativeName
https://mespotin.uber.space/Ultrasch...lternativeName

Set Alternative Names:
https://mespotin.uber.space/Ultrasch...lternativeName
https://mespotin.uber.space/Ultrasch...lternativeName
__________________
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-07-2021, 10:21 PM   #372
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

Thank you Meo-Ada Mespotine! meanwhile i have done it my self with chunk editing but just concerned with VST and so not so complete as yours! i might revert to yours ! I wish i didn't spend the time doing it

Still i would prefer this by a direct API call from reaper instead of chunk editing!

I wonder: why your functions are not in X-Raym reaper api? would be useful!

Thank you again!
__________________
🙏🏻
deeb is offline   Reply With Quote
Old 06-08-2021, 12:31 AM   #373
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Quote:
Originally Posted by deeb View Post
I wonder: why your functions are not in X-Raym reaper api? would be useful!

Because there are not registered as extension API, so doc isn't generated by reaper generate doc feature :P


Also, ultraschall doc is quite massive and often updated so it is better to have its dedicated website, managed right from the author
X-Raym is offline   Reply With Quote
Old 06-08-2021, 04:05 AM   #374
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

We once tried to make it work but there were too many complications.
For instance, X-Raym's docs is a conversion of the original api-docs, so it's missing stuff like retval/parameter-descriptions, which is crucial in many of my functions.
So X-Raym's docs would need to be reworked massively, without loosing the easyness of generating it.

At some point, I might do another attempt of reworking my docs to be as convenient as X-Raym's including search and such, but I simply lack the time to do it currently.
__________________
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-10-2021, 12:54 AM   #375
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

^^ i see! thank you both!
__________________
🙏🏻
deeb is offline   Reply With Quote
Old 06-10-2021, 07:52 AM   #376
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default req: Set P_EXT for TakeFX, TrackFX

so that we can Set auxiliary data and get this benefit like we already can for other Elements: like track, sends , media items, etc

Something like:

getSetTrackFX_Info_Value(tr, index, "P_EXT", ..)
getSetTakeFX_Info_Value(tr, index, "P_EXT", ..)

edit: to be more clear
__________________
🙏🏻

Last edited by deeb; 06-12-2021 at 11:22 PM.
deeb is offline   Reply With Quote
Old 06-14-2021, 02:51 PM   #377
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default Item Set Source BPM

Item Properties Set Source BPM, as you can't always work out the rate.

__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 06-14-2021, 10:25 PM   #378
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default freeze and leave Fx intact after FX IDX (n)

Ideally i would like the existance of PRE and POST FX Chains and so when freezing i could call an action like: freeze leaving POST FX.

But Since world is perfectly Unperfect, i would still live better if i could freeze tracks leaving intact in the rendered material the FX after a certain FX index, so in an initial FXChain like this:

FX Chain:
1: ReaSynth
2: ReaDelay
3: My_ultra_cpu_and_PDC_hungryFX
4: ReaEQ
5: ReaComp

After i call a function like: reaper.Freeze(3), everything until this IDX: 3 would be rendered and the FXChain would keep FX after that IDX so the Fxchain in the freezed material would be like:
1: ReaEQ
2: ReaComp

The benefit of this is that we could freeze material and the CPU hungry FX while being able to keep the mixing FX in place.

Another implementation could be, a dummy Plugin which purpose is to set the start position of POST Chain in the FXChain, but nothing compares with PRE and POST Chain visually independent in the FX panel, which i requested Here
__________________
🙏🏻

Last edited by deeb; 06-14-2021 at 10:39 PM.
deeb is offline   Reply With Quote
Old 06-16-2021, 06:42 PM   #379
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default Item Properties SET Source BPM or Measure beats

This is a simple tempo change but if there is a variable tempo map from a live recording there will be a lot more changes. I'm using the same source item that is reaper.InsertMedia( item_source, 0) -- 8) if I use the "8=try to match tempo 1x," I can't calculate the "D_STARTOFFS" & "D_LENGTH" from the source's original bpm so I use "0=add to current track" and use these:


reaper.Main_OnCommand(42375, 0) -- Item properties: Set item timebase to beats (auto-stretch at tempo changes)

reaper.Main_OnCommand(42376, 0) -- Media item: Clear and recalculate auto-stretch at project tempo changes

but that don't work and the only way is to manually set Item Properties > Playback rate > Set > Source BPM:[120] or Measure beats[2.0.00]

__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak
MusoBob is offline   Reply With Quote
Old 09-08-2021, 09:05 AM   #380
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

^^^
Quote:
Originally Posted by MusoBob View Post
...
that would be very welcome. Some kind of function like:

stretchItemToTempo(itemGUID,tempo)
__________________
🙏🏻

Last edited by deeb; 10-07-2021 at 08:37 AM.
deeb is offline   Reply With Quote
Old 09-13-2021, 03:01 AM   #381
Burtan
Human being with feelings
 
Join Date: Jan 2013
Location: Bochum, Germany
Posts: 103
Default

Please add more options to manipulate midi data sent to tracks/fx. Like sending data directly to certain fx or listening to input data. I think both is not possible right now?
Burtan is offline   Reply With Quote
Old 11-01-2021, 04:54 AM   #382
Rodilab
Human being with feelings
 
Rodilab's Avatar
 
Join Date: Jan 2021
Location: Paris
Posts: 255
Default

Hi,

GetThingFromPoint() is a new great tool !
But, imo, it's incomplete.

It would be great to have more information in arrange, ruler, midi editor and transport windows.
Like :
  • arrange.item.take
  • arrange.item.take_marker
  • arrange.item.stretch_marker
  • arrange.envelope.point
  • arrange.envelope.segment
  • arrange.envelope.empty
  • ruler.region
  • ruler.marker
  • ruler.tempo
  • ruler.timeline
  • etc...

Thanks for reading
Rodilab is offline   Reply With Quote
Old 11-19-2021, 01:33 AM   #383
Rodilab
Human being with feelings
 
Rodilab's Avatar
 
Join Date: Jan 2021
Location: Paris
Posts: 255
Default

Hi

Something to Count, Get and Set FX Parameters Modulations would be very useful.

Thanks for reading
Rodilab is offline   Reply With Quote
Old 11-19-2021, 05:51 AM   #384
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

I'm not sure this threads is that handy to handle API feature request; they should probably get considered as any other request and get their own FR thread, so each one can have proper discussion (and attention :P)
X-Raym is offline   Reply With Quote
Old 11-19-2021, 12:24 PM   #385
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 Rodilab View Post
Hi

Something to Count, Get and Set FX Parameters Modulations would be very useful.

Thanks for reading
Something like this?
https://mespotin.uber.space/Ultrasch...g_Introduction

Part of Ultraschall-Api.
__________________
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 12-06-2021, 03:48 AM   #386
deeb
Human being with feelings
 
deeb's Avatar
 
Join Date: Feb 2017
Posts: 4,812
Default

Quote:
Originally Posted by X-Raym View Post
I'm not sure this threads is that handy to handle API feature request; they should probably get considered as any other request and get their own FR thread, so each one can have proper discussion (and attention :P)
i agree! probably in both places. Here has a satelite thread for the FR forum.
__________________
🙏🏻
deeb is offline   Reply With Quote
Old 12-10-2021, 10:58 AM   #387
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 308
Default Action or API to open session offline with no prompts

Given this is basically an API wish, submitting it here:

For scripts that have to process many sessions (e.g. I have one that builds a master tempo map from all the subprojects in the session, having to open each one, as I don't really want to parse the rpp manually) -- it would be nice to have a way to open a project in a new tab with the effects offline, and suppressing the "Project Load Warning" dialog. Either an action to open selected subproject offline with no prompts, or offline support for Main_openProject would be great.
paaltio is offline   Reply With Quote
Old 12-10-2021, 11:28 AM   #388
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@paaltio


Code:
I don't really want to parse the rpp manually

Not sure what you mean by manually, but we have a parser @Reateam


https://github.com/ReaTeam/ReaScripts/wiki/RPP-Parser


Tempo env chunk isn't too complex:


Code:
  <TEMPOENVEX
    EGUID {385705B7-32FD-45DF-9B08-E18E65E315A0}
    ACT 0 -1
    VIS 1 0 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 1 -1 -1
    PT 0.000000000000 120.0000000000 1 65537 0 1
  >

65537 is time signature, encoded with 65536 * ts_denominator + ts_numerator. So time signature 1/1 is 65536 * 1+ 1 = 65537, and time signature 4/4 is 65536 * 4 + 4 = 262148.


We may need to open a new thread to discuss about this without being too much off topic.



Note : this thread isn't the best place for FR, check discussion above
X-Raym is offline   Reply With Quote
Old 12-10-2021, 01:51 PM   #389
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 308
Default

Thanks, that looks like a very good parser! I'll probably give it a go at some point. I had some rounding error issues (stuff shifting slightly from measure lines etc.) with tempo map manipulation years back when I tried direct chunk editing in Python, and there's just generally less headache when being able to use the tried and true TimeMap functions etc.. but for the flexibility I suppose this is worth getting back into. Anyway as you mentioned a bit off topic, so moving on!

Quote:
Originally Posted by X-Raym View Post
@paaltio


Code:
I don't really want to parse the rpp manually

Not sure what you mean by manually, but we have a parser @Reateam


https://github.com/ReaTeam/ReaScripts/wiki/RPP-Parser


Tempo env chunk isn't too complex:


Code:
  <TEMPOENVEX
    EGUID {385705B7-32FD-45DF-9B08-E18E65E315A0}
    ACT 0 -1
    VIS 1 0 1
    LANEHEIGHT 0 0
    ARM 0
    DEFSHAPE 1 -1 -1
    PT 0.000000000000 120.0000000000 1 65537 0 1
  >

65537 is time signature, encoded with 65536 * ts_denominator + ts_numerator. So time signature 1/1 is 65536 * 1+ 1 = 65537, and time signature 4/4 is 65536 * 4 + 4 = 262148.


We may need to open a new thread to discuss about this without being too much off topic.



Note : this thread isn't the best place for FR, check discussion above
paaltio is offline   Reply With Quote
Old 12-24-2021, 04:59 AM   #390
edkashinsky
Human being with feelings
 
Join Date: Dec 2021
Posts: 61
Default adding SetProjectLength() function

Hello, guys! It would be really nice if you added SetProjectLength() function in your API to set project length from my code.
I would like to repeat logic from Ableton in my Reaper configuration: when I import a media item in my project, I want to limit the project length by the longest media item. And now I can't do that. It's kind of weird because I can get the length of the project using GetProjectLength() function, but I can't set it.

Last edited by edkashinsky; 12-24-2021 at 05:57 AM.
edkashinsky is offline   Reply With Quote
Old 12-24-2021, 11:28 AM   #391
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 edkashinsky View Post
Hello, guys! It would be really nice if you added SetProjectLength() function in your API to set project length from my code.
I would like to repeat logic from Ableton in my Reaper configuration: when I import a media item in my project, I want to limit the project length by the longest media item. And now I can't do that. It's kind of weird because I can get the length of the project using GetProjectLength() function, but I can't set it.
The length is calculated by the content of the project, so it's not an attribute that you could set per se, but rather is influenced by how long the contents of the project are.
So if you want to set its length, simply cut away everything after the length of the longest mediaitem.

So if you know/can find out, what length you want in your project, the rest should be easy to do with a few lines of code using cutting away everything between the length you want and the current project length. So after that, the newly "set" length remains.

I assume, you want the length being seen from project-start to the new project-length, with no "start-offsets" involved?
__________________
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 12-25-2021, 04:01 AM   #392
edkashinsky
Human being with feelings
 
Join Date: Dec 2021
Posts: 61
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
The length is calculated by the content of the project, so it's not an attribute that you could set per se, but rather is influenced by how long the contents of the project are.
So if you want to set its length, simply cut away everything after the length of the longest mediaitem.

So if you know/can find out, what length you want in your project, the rest should be easy to do with a few lines of code using cutting away everything between the length you want and the current project length. So after that, the newly "set" length remains.

I assume, you want the length being seen from project-start to the new project-length, with no "start-offsets" involved?
Oh, I see. Most likely, I was wrong about this function. I was referring to the option "Limit project length, stop playback/recording at" in the project settings window. I would like to control this option from my code. In other words, I want to dynamically limit horizontal scaling to the longest media item or the farthest media item in a project.
As I understand, now I don't have this opportunity in API
edkashinsky is offline   Reply With Quote
Old 12-25-2021, 08:32 AM   #393
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Ahhh, this is actually possible, using ConfigVars, specifically this one:
https://mespotin.uber.space/Ultrasch...tml#projmaxlen

Here's an introduction on how to get/set configvars:
https://mespotin.uber.space/Ultrasch...l#Introduction
__________________
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 12-25-2021, 11:49 AM   #394
edkashinsky
Human being with feelings
 
Join Date: Dec 2021
Posts: 61
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Ahhh, this is actually possible, using ConfigVars, specifically this one:
https://mespotin.uber.space/Ultrasch...tml#projmaxlen

Here's an introduction on how to get/set configvars:
https://mespotin.uber.space/Ultrasch...l#Introduction
Wow!!! It looks exactly the way I need it! Thank you so much!
P.S. So my API request can be declined))
edkashinsky is offline   Reply With Quote
Old 01-09-2022, 07:14 AM   #395
MathieuC
Human being with feelings
 
Join Date: Apr 2021
Location: Brest, France
Posts: 52
Default Need a way to catch action ID / event hook

Hi here,

To avoid using reaper.defer() it would really be easier if we could catch action Id from user workflow.

actionState, actionActualToggleState=reaper.eventHook(action_id _table,action_toggle_state)

Where :
  • actionState is a boolean with 1 = action is triggered 0 = action is not trigderred
  • actionActualToggleState = 1 action toggle state is on, 0 = action toggle state is off, -1 no toggle action
  • action_id_table = a table containing actions we want to monitor, for example MyActions={"40125","_cb53ee8e9f82d449b0012d7f7befc 4a2","_SWS_AWTOGGLECLICKTRACK"}
  • action_toggle_state = 0 if we want to toggle off, 1 if we want to toggle on.
__________________
Various scripts can be found here : https://github.com/MathieuCGit -- Donation is always welcome : https://paypal.me/MathieuCONAN -- or buy me a coffee : https://www.buymeacoffee.com/mathieucgit
MathieuC is offline   Reply With Quote
Old 01-09-2022, 11:51 AM   #396
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 MathieuC View Post
Hi here,

To avoid using reaper.defer() it would really be easier if we could catch action Id from user workflow.

actionState, actionActualToggleState=reaper.eventHook(action_id _table,action_toggle_state)

Where :
  • actionState is a boolean with 1 = action is triggered 0 = action is not trigderred
  • actionActualToggleState = 1 action toggle state is on, 0 = action toggle state is off, -1 no toggle action
  • action_id_table = a table containing actions we want to monitor, for example MyActions={"40125","_cb53ee8e9f82d449b0012d7f7befc 4a2","_SWS_AWTOGGLECLICKTRACK"}
  • action_toggle_state = 0 if we want to toggle off, 1 if we want to toggle on.
I'm not sure if I understand, what has defer to do with it and what behavior of defer do you hope to avoid, using eventHook()?
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 01-09-2022, 02:53 PM   #397
MathieuC
Human being with feelings
 
Join Date: Apr 2021
Location: Brest, France
Posts: 52
Default

Hi Meo-Ada Mespotine,

a quick look into the forum let me get examples :

https://forum.cockos.com/showthread.php?t=261061
https://forum.cockos.com/showthread.php?t=225037
https://forum.cockos.com/showthread.php?t=261193

The idea is to catch specific action (like zoom, split, recording state,etc..) to avoid running the entire script in the background.

I guess we could do a kind of event hook with defer function, but a native way to just catch actions id would be really easier to trig stuff we need while user needs.
__________________
Various scripts can be found here : https://github.com/MathieuCGit -- Donation is always welcome : https://paypal.me/MathieuCONAN -- or buy me a coffee : https://www.buymeacoffee.com/mathieucgit
MathieuC is offline   Reply With Quote
Old 01-09-2022, 04:41 PM   #398
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Quote:
Originally Posted by MathieuC View Post
I guess we could do a kind of event hook with defer function, but a native way to just catch actions id would be really easier to trig stuff we need while user needs.
So (alternatively named) you want callbacks for ReaScripts?
That would be nice indeed, +1.
nofish is offline   Reply With Quote
Old 01-09-2022, 05:49 PM   #399
MathieuC
Human being with feelings
 
Join Date: Apr 2021
Location: Brest, France
Posts: 52
Default

Quote:
Originally Posted by nofish View Post
So (alternatively named) you want callbacks for ReaScripts?
That would be nice indeed, +1.

Yes, another way to talk about the same idea
__________________
Various scripts can be found here : https://github.com/MathieuCGit -- Donation is always welcome : https://paypal.me/MathieuCONAN -- or buy me a coffee : https://www.buymeacoffee.com/mathieucgit
MathieuC is offline   Reply With Quote
Old 06-26-2022, 10:10 AM   #400
wave
Human being with feelings
 
Join Date: Oct 2021
Posts: 33
Default

Not sure this is the right place to ask for it but it seems so.

Could we have API getters and setters for FX and Chain oversampling rates?
wave 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 12:40 PM.


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