Old 08-03-2020, 03:33 PM   #681
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Ah ok, so you need a way to detect if a track is still set to multichannel, right?

I would suggest having a look at RPR_GetMediaTrackInfo_Value and RPR_SetMediaTrackInfo_Value, where you can see and set I_RECINPUT, which holds the number of input-channels for recording.

Maybe this is what you're looking for.

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

PS: Welcome to the forum
__________________
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-03-2020, 03:40 PM   #682
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 WalkerC View Post

https://ibb.co/D1BvGz2

From the picture above, I have 5 track that record in the same time.
Now I notice that all 5 channels saving into a single .WAV file
I thought each track has its own .WAV file, so 5 tracks will have 5 channels.

So now my question would be: Is it possible to have 5 different .wav files generated and 1 for each track?
I don't think it's a single. wav file because they are named differently:


edit:
Do you have your soundcard's inputs assigned to Reaper inputs correctly?
(Options > Preferences (> Audio) > Device > Enable inputs)

Last edited by nofish; 08-03-2020 at 04:00 PM.
nofish is offline   Reply With Quote
Old 08-03-2020, 04:52 PM   #683
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Is it possible in any kind, to access via CPP/extension-API the audio-engine?
So I could pipe audio directly to external stuff?

Or would VST-Pluing be the way to go?

I'm just wonder, if it would be possible to hook music-programming-languages like SuperCollider into Reaper but JSFX isn't the way to go as far as I can tell...
__________________
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-04-2020, 07:42 AM   #684
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 Meo-Ada Mespotine View Post
Is it possible in any kind, to access via CPP/extension-API the audio-engine?
So I could pipe audio directly to external stuff?

Or would VST-Pluing be the way to go?

I'm just wonder, if it would be possible to hook music-programming-languages like SuperCollider into Reaper but JSFX isn't the way to go as far as I can tell...
Unfamiliar with SuperCollider but I think (on Windows) ReaRoute should work to send Reaper audio to SuperCollider as it seems to support ASIO driver.
(Personally I also use SAR for inter-app audio routing.)

edit:
A cross-platform solution would be JACK.
nofish is offline   Reply With Quote
Old 08-04-2020, 08:13 AM   #685
WalkerC
Human being with feelings
 
Join Date: Jul 2020
Posts: 5
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Ah ok, so you need a way to detect if a track is still set to multichannel, right?

I would suggest having a look at RPR_GetMediaTrackInfo_Value and RPR_SetMediaTrackInfo_Value, where you can see and set I_RECINPUT, which holds the number of input-channels for recording.

Maybe this is what you're looking for.

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

PS: Welcome to the forum
Is more like: Force reaper start record, stop, start record stop...

And thanks for the Welcome
WalkerC is offline   Reply With Quote
Old 08-04-2020, 09:15 AM   #686
WalkerC
Human being with feelings
 
Join Date: Jul 2020
Posts: 5
Default

Guys, I just found out that the Action "Record: Start new files during recording"

can I enable or disable this from API?
WalkerC is offline   Reply With Quote
Old 08-04-2020, 11:10 AM   #687
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by WalkerC View Post
Guys, I just found out that the Action "Record: Start new files during recording"

can I enable or disable this from API?
Native Actions (from the [Main] section of the Action List) can be called via Main_OnCommand: https://www.extremraym.com/cloud/rea...Main_OnCommand

Since I saw you mentioning Python API in another post, you're probably looking for this:
Code:
RPR_Main_OnCommand(40666, 0)
40666 is the Action Command ID of "Record: Start new files during recording".
__________________
ReaLauncher
solger is offline   Reply With Quote
Old 08-10-2020, 10:15 AM   #688
ChocolateHawkins
Human being with feelings
 
Join Date: Jul 2016
Posts: 78
Default

Can anyone tell me if there's a way to make the currently-being-edited parameter show up in its own window or docked and large? I use a few controllers to tweak channel strips via Realearn and I'd love to have something come up that shows what I'm currently tweaking and the values. I DO have the items in the TCP and you can see them there, but I'd love if it were its own window and larger.

EDIT: Looks like I found a script to do it! Display Last Touched Parameter be Edgemeal

Last edited by ChocolateHawkins; 08-10-2020 at 12:50 PM.
ChocolateHawkins is offline   Reply With Quote
Old 08-18-2020, 04:40 PM   #689
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

just for my curiosity, how much more complex is making extensions than scripts? (Not planning to do, just would like to see/read a little about hahaha)


i know is c++ I tried code once in JUCE c++ and couldn't handle the complexity hahah barely could create an hello world, to much to me as being more like a hobby create scripts :P ...
daniellumertz is online now   Reply With Quote
Old 08-22-2020, 01:12 PM   #690
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 daniellumertz View Post
just for my curiosity, how much more complex is making extensions than scripts? (Not planning to do, just would like to see/read a little about hahaha)


i know is c++ I tried code once in JUCE c++ and couldn't handle the complexity hahah barely could create an hello world, to much to me as being more like a hobby create scripts :P ...
cfillion once posted a bare-bone Reaper extension example:
https://gist.github.com/cfillion/f32...63abb1eda41400
nofish is offline   Reply With Quote
Old 08-25-2020, 09:35 AM   #691
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Is it possible to load and play/stream audiofiles in JSFX? For sampling purposes and manipulation via JSFX.
__________________
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-30-2020, 03:27 PM   #692
lexomir
Human being with feelings
 
lexomir's Avatar
 
Join Date: Oct 2018
Posts: 39
Default

Reaper VST API question:

I'm trying to get my plugin's fx guid (via IReaperHostApplication).

Does anybody understand the 'fxdsp' input of IReaperHostApplication::getReaperParent?

Code:
class IReaperHostApplication : public Steinberg::FUnknown
{
public:
	...
        // get parent track(=1), take(=2), project(=3), fxdsp(=4), trackchan(=5)
	virtual void* PLUGIN_API getReaperParent(uint32 w) = 0; 
	...
};
lexomir is offline   Reply With Quote
Old 09-24-2020, 08:47 AM   #693
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default Open 2nd project on recently opened list

Is there a way to open the 2nd project listed on my recently opened list please ?

Thanks guys !
Coachz is online now   Reply With Quote
Old 09-24-2020, 08:58 AM   #694
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Read the desired recent project from reaper.ini (SWS has BR_Win32_GetPrivateProfileString for this, the data is stored in the "Recent" section in keys recent01 to recent50) and open it using Main_openProject.
cfillion is offline   Reply With Quote
Old 09-24-2020, 02:33 PM   #695
Lubalin
Human being with feelings
 
Join Date: May 2020
Posts: 11
Default

I'm frustrated by the fact that, no matter what the vertical zoom level, it always scrolls one track at a time. So when you're zoomed all the way out, scrolling feels super slow.

I've got 130 tracks and it takes 10 swipes of the scroll wheel to go from one end to the other.

I'd like to setup something like, either the scroll wheel moves by pixels instead of tracks, OR the number of tracks it scrolls by increases when I'm more zoomed out.

Problem is you can assign a script to scrollwheel, but afaict there's no way to know if the input was to scroll up or down...

Any ideas? Thanks!
Lubalin is offline   Reply With Quote
Old 09-24-2020, 03:16 PM   #696
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 Lubalin View Post
Problem is you can assign a script to scrollwheel, but afaict there's no way to know if the input was to scroll up or down...
Check the 'Skip next action if...' actions.
https://forum.cockos.com/showthread.php?t=184243

And welcome to Reaper forums!

edit:
Above would be a way if you assign two seperate scripts (for scroll up/down).
nofish is offline   Reply With Quote
Old 09-24-2020, 10:59 PM   #697
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

for seeing if the mouse wheel is up or down

Code:
is_new_value,filename,sectionID,cmdID,mode,resolution, val = reaper.get_action_context()
if is_new_value then
    if val > 0 then
      --Do your thing when the mouse w goes up
    else
      --Do your thing when the mouse w goes down
    end
end
also got this idea from some of juliansanders. thx julian
daniellumertz is online now   Reply With Quote
Old 09-25-2020, 11:29 AM   #698
Lubalin
Human being with feelings
 
Join Date: May 2020
Posts: 11
Default

Thank you nofish and daniellumertz!

Got it working
Lubalin is offline   Reply With Quote
Old 09-25-2020, 12:00 PM   #699
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default

Quote:
Originally Posted by cfillion View Post
Read the desired recent project from reaper.ini (SWS has BR_Win32_GetPrivateProfileString for this, the data is stored in the "Recent" section in keys recent01 to recent50) and open it using Main_openProject.
Thanks so much for the great tip. Got it working.

Important detail
https://forum.cockos.com/showpost.ph...03&postcount=2

Code:
inipath = reaper.get_ini_file()

--integer retval, string stringOut reaper.BR_Win32_GetPrivateProfileString(string sectionName, string keyName, string defaultString, string filePath)

r1, recent = reaper.BR_Win32_GetPrivateProfileString("Recent", "recent04", "Error", inipath)

reaper.Main_openProject(recent)
Coachz is online now   Reply With Quote
Old 09-27-2020, 01:05 PM   #700
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default How to store a pressed toolbar button ?

I have a toolbar button that indicates Tracking or Mastering mode and want a way to get Reaper to remember the pressed or un-pressed state of the toolbar button when Reaper closes and reopens. Is that possible ? Thanks as always !!
Coachz is online now   Reply With Quote
Old 09-27-2020, 01:26 PM   #701
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by Coachz View Post
I have a toolbar button that indicates Tracking or Mastering mode and want a way to get Reaper to remember the pressed or un-pressed state of the toolbar button when Reaper closes and reopens.
Is that possible ?
I guess like in this example by saving the button state as Extstate and loading the script (or Extstate) again at startup: https://forums.cockos.com/showthread.php?t=213727
__________________
ReaLauncher

Last edited by solger; 09-27-2020 at 01:37 PM. Reason: typo
solger is offline   Reply With Quote
Old 09-27-2020, 02:49 PM   #702
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default

Quote:
Originally Posted by solger View Post
I guess like in this example by saving the button state as Extstate and loading the script (or Extstate) again at startup: https://forums.cockos.com/showthread.php?t=213727
Thanks solger, that helped me a lot !
Coachz is online now   Reply With Quote
Old 10-02-2020, 06:14 AM   #703
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default GetMediaSourceFileName for mp3 source ?

Anyone know how to GetMediaSourceFileName for mp3 too ?
Coachz is online now   Reply With Quote
Old 10-02-2020, 08:10 AM   #704
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by Coachz View Post
Anyone know how to GetMediaSourceFileName for mp3 too ?
It works for mp3 sources too.

Code:
local item   = reaper.GetSelectedMediaItem(0, 0)
local take   = reaper.GetActiveTake(item)
local source = reaper.GetMediaItemTake_Source(take)
local fn     = reaper.GetMediaSourceFileName(source, '')
cfillion is offline   Reply With Quote
Old 10-02-2020, 08:13 AM   #705
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default

Quote:
Originally Posted by cfillion View Post
It works for mp3 sources too.
Ahh, you're right! Thanks, Is there a way to convert the mp3 files to wav and update the label on the media item to match the source filename cfillion ? Have a great one !
Coachz is online now   Reply With Quote
Old 10-02-2020, 08:20 AM   #706
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by Coachz View Post
Ahh, you're right! Thanks, Is there a way to convert the mp3 files to wav and update the label on the media item to match the source filename cfillion ? Have a great one !
To change the take name:

Code:
reaper.GetSetMediaItemTakeInfo_String(take, 'P_NAME', 'the new take name', true)
cfillion is offline   Reply With Quote
Old 10-02-2020, 09:36 AM   #707
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC
Posts: 12,770
Default

Quote:
Originally Posted by cfillion View Post
To change the take name:

Code:
reaper.GetSetMediaItemTakeInfo_String(take, 'P_NAME', 'the new take name', true)
Thanks again. That worked great !
Coachz is online now   Reply With Quote
Old 10-15-2020, 12:28 PM   #708
kartalex
Human being with feelings
 
Join Date: Dec 2015
Posts: 172
Default

Hi guys, I guess this thread is a better place for my question.

I am trying to make my own extension for Reaper in C++. Every time I build my source (it works!) I need to restart Reaper for reloading dll.

Is there a way to reload extension without restarting Reaper?
kartalex is offline   Reply With Quote
Old 10-15-2020, 04:45 PM   #709
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

No.​​
cfillion is offline   Reply With Quote
Old 11-06-2020, 01:48 AM   #710
Repaer
Human being with feelings
 
Repaer's Avatar
 
Join Date: Aug 2009
Location: France
Posts: 93
Default

Hi everyone!

I'm looking for a way to make a simple script that would remove just a few milliseconds of audio in front and at the end of the selected takes. How can I do that?
__________________
http://www.florian-calmer.com/
Repaer is offline   Reply With Quote
Old 11-06-2020, 08:43 AM   #711
Hartley Mays
Human being with feelings
 
Join Date: Sep 2009
Location: Cincinnati, Ohio
Posts: 307
Default sysex string compare?

Hello,

I have a Rodgers 535 midi organ that I use with VSTi's to record songs. It's very convenient with two manuals and a pedalboard on different channels. It has stop and coupler switches that I want to use to change settings within Reaper, but unfortunately it sends sysex strings for those controls. I've researched but haven't been able to find any examples of how to define, code, and compare sysex strings in LUA (or any other language) so I can convert them into CC's.

The entire sysex string is around 30 bytes long, but the unique stop settings are only about 5 bytes of the message, so, also, is there a way to just compare part of the sysex string to a hard coded value?

Is LUA the best language for this or what would be easiest?

Thanks,
Hartley
Hartley Mays is offline   Reply With Quote
Old 11-12-2020, 04:07 PM   #712
mrelwood
Human being with feelings
 
mrelwood's Avatar
 
Join Date: Nov 2006
Location: Finland
Posts: 1,528
Default Last touched parameter?

Hi guys! I'm having trouble with the "last touched parameter" on many of my plugins. It simply points to a different and an unrelated slider. The actual operable sliders are drawn graphics, but they all have their slider_automate(slider(x)) in place.

I have noticed that having gaps in the slider numbering is a pretty sure way of getting this issue. But on my EQall JS plugin, all the sliders are neatly in order, yet the last touched parameter of slider1 points to slider 40.

Any tips on how to make it point to the correct parameter?

Edit: A closer look into the orded in which I was running the slider_automate commands revealed that in some occasions it indeed ran the command for all 40 sliders. The last one that was processed naturally remained as the last touched parameter. I was able to go around this and to make it work!
__________________
______Announcing__mrelwood plugins______
.. MacBook Pro 16" Late '19 .. Scarlett 6i6, Saffire Pro 24 DSP (+ADA8000) .. FCA610 .. EVE SC207 .. Focal: Shape 65, Alpha 65, CMS 40, Listen Pro ..

Last edited by mrelwood; 11-13-2020 at 04:58 PM.
mrelwood is offline   Reply With Quote
Old 11-18-2020, 10:58 AM   #713
tglanfield
Human being with feelings
 
Join Date: Nov 2020
Posts: 11
Default

Quote:
Originally Posted by Urban Musiq View Post
Can so help me decode this base64 string? I only get garbage when decoding these strings for a test plugin with only 1 parameter ("gain=1.0"):
Code:
<REAPER_PRESET_LIBRARY `VSTi: abc`
  <PRESET `Default`
    RZaZMu5e7f4AAAAAAgAAAAEAAAAAAAAAAgAAAAAAAAAEAAAAAQAAAAAAEAAAAIA/AERlZmF1bHQAEAAAAA==  //1.0
  >
The base64 in JS plugin RPL files decodes quite nicely:

echo OTEuMDAwMDAwIDAuMDAwMDAwIDAuMDAwMDAwIDIuMDAwMDAwID AuMDAwMDAwIC0gLSAtIC0gLSAtIC0gLSAtIC0gLSAtIC0gLSAt IC0gLSAtIC0gLSAtIC0gLSAtIC0g | base64 -d
91.000000 0.000000 0.000000 2.000000 0.000000 - - - - - - - - - - - - - - - - - - - - - - - - -

I'm guessing the VST RPL data is binary
tglanfield is offline   Reply With Quote
Old 11-22-2020, 01:10 PM   #714
Synaptic Schism
Human being with feelings
 
Synaptic Schism's Avatar
 
Join Date: Oct 2020
Posts: 9
Default

Only noticed this thread now, hope I can get some help.

How do I save a RfxChain?

I'm able to get the track state chunk but how do I isolate and save the fx chain? I checked a script by MPL but unfortunately, the results are inconsistent. Out of 67 tracks, the code I got from MPL works saves 6 of the 67 tracks. The other 61 return no fxs at all and don't get saved.

Thank you in advance.
Synaptic Schism is offline   Reply With Quote
Old 11-22-2020, 01:56 PM   #715
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 Synaptic Schism View Post
Only noticed this thread now, hope I can get some help.

How do I save a RfxChain?

I'm able to get the track state chunk but how do I isolate and save the fx chain? I checked a script by MPL but unfortunately, the results are inconsistent. Out of 67 tracks, the code I got from MPL works saves 6 of the 67 tracks. The other 61 return no fxs at all and don't get saved.

Thank you in advance.
You install Ultraschall-API, which has a nice set of functions to deal with the FX-part of a statechunk.

Here's the documentation-chapter for the introduction of them:
https://mespotin.uber.space/Ultrasch...X_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 11-22-2020, 03:11 PM   #716
Synaptic Schism
Human being with feelings
 
Synaptic Schism's Avatar
 
Join Date: Oct 2020
Posts: 9
Default

That was brilliant and it's working! Thank you so much. Next step finding how to save track templates!

(If anyone has a hint, let me know!)
Synaptic Schism is offline   Reply With Quote
Old 11-22-2020, 04:56 PM   #717
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Use the function reaper.GetTrackStateChunk to get the statechunk, push it through the function StateChunkLayouter:
https://mespotin.uber.space/Ultrasch...eChunkLayouter

and save the resulting string with WriteValueToFile
https://mespotin.uber.space/Ultrasch...iteValueToFile
__________________
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 11-23-2020, 02:07 AM   #718
Synaptic Schism
Human being with feelings
 
Synaptic Schism's Avatar
 
Join Date: Oct 2020
Posts: 9
Default

Thank you so much. Everything is working and it was quite a learning experience!
Synaptic Schism is offline   Reply With Quote
Old 11-23-2020, 04:18 PM   #719
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

You're welcome
__________________
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-01-2020, 05:30 AM   #720
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow / Tbilisi
Posts: 909
Default

Hello, guys!
I tried to write my first script, because "SWS/S&M: Delete active take and source file in selected items (no undo)" didn't work.
And it turn reaper fall, when i try to save or run this script.
Saving have access, i can see after reopen, but after run nothing happens and reaper falls again.
May be could anybody help?

Code:
item = reaper.GetSelectedMediaItem(0,0)
take = reaper.GetActiveTake( item )
src = reaper.GetMediaItemTake_Source( take )
track = reaper.GetMediaItem_Track( item )
 reaper.DeleteTrackMediaItem( track, item )
 reaper.PCM_Source_Destroy( src )
AZpercussion 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 05:30 PM.


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