Old 07-01-2020, 09:19 PM   #641
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Is possible to get the time that the user is seeing in the Midi editor? I searched the reaper api, ultraschall, other scripts, actions that have something related to what the is visible but haven't found, I may not know what exactly keyword to look for...
daniellumertz is offline   Reply With Quote
Old 07-09-2020, 04:56 AM   #642
Metrobot
Human being with feelings
 
Join Date: Feb 2018
Posts: 205
Default Are Instructions available for Lokasenna_Pedal Steel.lua?

Hello
What is the Lokasana Pedal Steel.lua and how do I use it?
I loaded it up and it looks interesting.
I looked up Lokasenna and found that he/she is no longer with Reaper?
So I figured I'd ask here.
-M
Metrobot is offline   Reply With Quote
Old 07-09-2020, 05:09 AM   #643
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Do you have a link to the script?
__________________
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, 07:02 AM   #644
Metrobot
Human being with feelings
 
Join Date: Feb 2018
Posts: 205
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Do you have a link to the script?
Hello Meo,
I checked the "About this package" In Reapack and it says:
"Provides a small toolbar for inserting MIDI keyswitches and setting velocities, intended for use with Tod's Pedal Steel library for Kontakt."
O don't know how to link to the script but it looks as though it may be null and void if it's specific to a Kontakt Library.
-M
Metrobot is offline   Reply With Quote
Old 07-09-2020, 08:40 AM   #645
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by Metrobot View Post
What is the Lokasana Pedal Steel.lua and how do I use it?
Here's the thread about the Lokasenna_Pedal Steel script: https://forum.cockos.com/showthread.php?p=2141684
And here's the link to Tod's Pedal Steel Kontakt library (also linked in the first post): https://todsvirtualinstruments.com/
__________________
ReaLauncher
solger is offline   Reply With Quote
Old 07-09-2020, 09:10 AM   #646
Metrobot
Human being with feelings
 
Join Date: Feb 2018
Posts: 205
Default

Quote:
Originally Posted by solger View Post
Here's the thread about the Lokasenna_Pedal Steel script: https://forum.cockos.com/showthread.php?p=2141684
And here's the link to Tod's Pedal Steel Kontakt library (also linked in the first post): https://todsvirtualinstruments.com/
Thank you very much Solger.
-M
Metrobot is offline   Reply With Quote
Old 07-09-2020, 09:14 AM   #647
solger
Human being with feelings
 
solger's Avatar
 
Join Date: Mar 2013
Posts: 5,844
Default

Quote:
Originally Posted by daniellumertz View Post
Is possible to get the time that the user is seeing in the Midi editor? I searched the reaper api, ultraschall, other scripts, actions that have something related to what the is visible but haven't found, I may not know what exactly keyword to look for...
Just to clarify: can you post a screenshot which shows to what you're referring to, exactly?

Because I'm not sure if you're referring to getting the time values of the start and end point of the current visible content range.
Or to something else (like, for instance, how many measures or minutes:seconds the current visible range is long)?
__________________
ReaLauncher
solger is offline   Reply With Quote
Old 07-09-2020, 09:39 AM   #648
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by solger View Post
Just to clarify: can you post a screenshot which shows to what you're referring to, exactly?

Because I'm not sure if you're referring to getting the time values of the start and end point of the current visible content range.
Or to something else (like, for instance, how many measures or minutes:seconds the current visible range is long)?
Actually I think can be any of these two things you cited, EDIT: If I get time values of the start and end point of the current visible content range I get the other by (end - start) so the first one hehe

I just need these two values


Maybe JS api???
daniellumertz is offline   Reply With Quote
Old 07-18-2020, 10:09 AM   #649
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by daniellumertz View Post
Actually I think can be any of these two things you cited, EDIT: If I get time values of the start and end point of the current visible content range I get the other by (end - start) so the first one hehe

I just need these two values


Maybe JS api???
up

but my new question is if exists some function to set project rate?

I can use the actions increase playrate by ... but would be better an function for that
daniellumertz is offline   Reply With Quote
Old 07-18-2020, 12:20 PM   #650
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

CSurf_OnPlayRateChange
cfillion is offline   Reply With Quote
Old 07-18-2020, 01:35 PM   #651
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by cfillion View Post
CSurf_OnPlayRateChange
thx dn't know how I missed that looked the api like 4 - 6 times for it
daniellumertz is offline   Reply With Quote
Old 07-18-2020, 01:44 PM   #652
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

I also miss that stuff time and again as well, as such functions have OnSurf and not SetBla in their name
__________________
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-19-2020, 07:51 AM   #653
edwar64896
Human being with feelings
 
Join Date: May 2009
Location: Melbourne, Australia
Posts: 12
Default Programmaically create RPP project

I'm looking to build a workflow tool that includes Reaper - Is there a spec for the RPP file format available?

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

No. I 'm working on one but it's complicated and many details in them.
__________________
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-19-2020, 01:05 PM   #655
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Location: Berlin
Posts: 2,164
Default

Quote:
Originally Posted by daniellumertz View Post
Actually I think can be any of these two things you cited, EDIT: If I get time values of the start and end point of the current visible content range I get the other by (end - start) so the first one hehe

I just need these two values


Maybe JS api???
Hi daniel, did you manage to get the start and end point of the visible area?
I'm curious how you did it, I found a way for MeMagic but it's quite "hacky".

Btw, you can make the "zoom vertically to content inside user view area" action you wanted very easily now with MeMagic. (Open the script and set use_toolbar_context_only to true)
FeedTheCat is offline   Reply With Quote
Old 07-19-2020, 01:36 PM   #656
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by FeedTheCat View Post
Hi daniel, did you manage to get the start and end point of the visible area?
I'm curious how you did it, I found a way for MeMagic but it's quite "hacky".

Btw, you can make the "zoom vertically to content inside user view area" action you wanted very easily now with MeMagic. (Open the script and set use_toolbar_context_only to true)
Hi FTC!!

I haven't managed to find a way, :/

I haven't being following yours updates this week as I got some extra work, but it is in my schedule to try the new versions!! I will do this week ( maybe tommorow and let you know! thanks for them! )

What was the way you find ?
I suspect that using JS api(as there is many functions regarding windows and mouse positions) may have some options for that, but I never dig it much deep to know...
daniellumertz is offline   Reply With Quote
Old 07-19-2020, 02:05 PM   #657
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Location: Berlin
Posts: 2,164
Default

Quote:
Originally Posted by daniellumertz View Post
What was the way you find ?
The start position is saved in CFGEDITVIEW inside the active editor item. When you use the action "Scroll view right" it scrolls exactly one page. That's how you get the end position.
FeedTheCat is offline   Reply With Quote
Old 07-19-2020, 03:41 PM   #658
LarrySeyer
Human being with feelings
 
LarrySeyer's Avatar
 
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
Default Action at end of a looped region?

I'm writing a custom script in Lua.

I need a particular function to run when the playcursor reaches the end of a looped region....just before it loops back to play again.

Does anyone know how to program a function execute at the end of a loop/repeat/region?

Thank you!

Larry

Last edited by LarrySeyer; 07-19-2020 at 03:49 PM.
LarrySeyer is offline   Reply With Quote
Old 07-19-2020, 05:24 PM   #659
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by LarrySeyer View Post
I'm writing a custom script in Lua.

I need a particular function to run when the playcursor reaches the end of a looped region....just before it loops back to play again.

Does anyone know how to program a function execute at the end of a loop/repeat/region?

Thank you!

Larry
So I don't know how to properly make an script run in background, something with defer and atexit....


but for the loop and play cursor position
Code:
start_loop, end_loop = reaper.GetSet_LoopTimeRange( false, false, 0, 0, false )
cursor_pos = reaper.GetCursorPosition()
  if cursor_pos == end_loop then
    --do your thing here
  end
daniellumertz is offline   Reply With Quote
Old 07-19-2020, 08:15 PM   #660
LarrySeyer
Human being with feelings
 
LarrySeyer's Avatar
 
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
Default

Quote:
Originally Posted by daniellumertz View Post
So I don't know how to properly make an script run in background, something with defer and atexit....


but for the loop and play cursor position
Code:
start_loop, end_loop = reaper.GetSet_LoopTimeRange( false, false, 0, 0, false )
cursor_pos = reaper.GetCursorPosition()
  if cursor_pos == end_loop then
    --do your thing here
  end
OK thanks Daniel!

Anyone else know how to integrate the above code using defer and atexit?
LarrySeyer is offline   Reply With Quote
Old 07-20-2020, 06:02 AM   #661
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Read everything you need to know about defer-cycles in this post: https://forum.cockos.com/showpost.ph...2&postcount=21

More detail information: https://forum.cockos.com/showpost.ph...99&postcount=7 (but it's already advanced information)
__________________
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-20-2020, 06:14 AM   #662
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
Read everything you need to know about defer-cycles in this post: https://forum.cockos.com/showpost.ph...2&postcount=21

More detail information: https://forum.cockos.com/showpost.ph...99&postcount=7 (but it's already advanced information)
thx mespotine will give a look ! yesterday I was trying to understand it maybe it will help !
daniellumertz is offline   Reply With Quote
Old 07-20-2020, 06:35 AM   #663
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

Another thing is, that you cannot do

Code:
cursor_pos == end_loop then
as the positions are float-values who cannot be compared that way, as floats have all sorts of rounding-issues who could lead to the comparison failing.
It works with integers without a problem, though.

I remember that someone wrote a way to compare them in one thread, but I don't remember which one it was...
__________________
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-22-2020, 12:08 AM   #664
LarrySeyer
Human being with feelings
 
LarrySeyer's Avatar
 
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
Default I found something that works

This seems to work just fine:

Code:
function at_trigger_point_do_something()
	local play_position = reaper.GetPlayPosition()
	if play_position >= trigger_point then
		do_something()
		return
	end
        reaper.defer(at_trigger_point_do_something)
end

at_trigger_point_do_something()
===

In case someone else needs to know how to do this.
LarrySeyer is offline   Reply With Quote
Old 07-22-2020, 02:54 PM   #665
thrice
Human being with feelings
 
Join Date: Feb 2020
Posts: 15
Default

How can I dynamically call a function from within JSFX? I.E. simply trying to switch between sin and cos in this example, tried multiple ways but nothing's worked so far.
Code:
desc:Master Param Controller
//tags: utility gain stereo
//author: JAyre

slider1:0<-0,100,50>P1Mix
slider2:0<0,2,1{sin,cos}>Math Function


in_pin:left input
in_pin:right input
out_pin:left output
out_pin:right output

@init
math_functions = 0;

@slider
mathfn = slider2;

@block
math_functions[0] = sin;
math_functions[1] = cos;
fn = math_functions[0];
currentValue = fn(play_position);
//currentValue = eval("sin(0.1);");

//currentValue = (eval("sin(play_position)") + 0.5) * 100;
slider1 = currentValue;
sliderchange(1);
thrice is offline   Reply With Quote
Old 07-22-2020, 04:50 PM   #666
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Could this thread stay a bit more on topic perhaps (i.e. about Reaper C++ extensions)?
nofish is offline   Reply With Quote
Old 07-22-2020, 04:58 PM   #667
LarrySeyer
Human being with feelings
 
LarrySeyer's Avatar
 
Join Date: Sep 2006
Location: Bastrop, Tx
Posts: 169
Default

Quote:
Originally Posted by nofish View Post
Could this thread stay a bit more on topic perhaps (i.e. about Reaper C++ extensions)?
From Justin’s very first post on this thread:

Quote:
If anybody wants to know how to do a particular task using the plug-in extension API, ask it here and we will either tell you, or interpret it as a request for that particular API!

-Justin
It is my understanding these questions are all valid with regards to his original post.
LarrySeyer is offline   Reply With Quote
Old 07-22-2020, 05:14 PM   #668
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Well REAPER plugin-extensions are a different thing than ReaScript and JSFX (as seen in this sub forum's name 'ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum').
I just find it rather difficult to gather infos about plugin-extensions if this thread also contains quite a few questions which are actually about scripting and JSFX which imo don't really belong here.
nofish is offline   Reply With Quote
Old 07-22-2020, 05:25 PM   #669
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,621
Default

But has been for a long time, though.

And as some Lua-parts have become extensive and therefore extensions themselves, Justin's initial intention what an extension is has become "overtaken by time", I suppose.

Though I agree, that some specific Lua and JSFX-questions should be asked in their own threads. Not to keep this one "On-Topic" but rather to gain more attraction and therefore more answers to it with more focus on that specific problem.
It's easier to follow a certain thread if it's in its own one, rather split into multiple posts in here.

So for quick questions, I would say, this thread is ok. But everything that needs more than two posts to answer back and forth, it's probably more useful in their own thread, for practicality. Especially for developer-generations to come and search this 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 07-22-2020, 05:38 PM   #670
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
But has been for a long time, though.

And as some Lua-parts have become extensive and therefore extensions themselves, Justin's initial intention what an extension is has become "overtaken by time", I suppose.

Though I agree, that some specific Lua and JSFX-questions should be asked in their own threads. Not to keep this one "On-Topic" but rather to gain more attraction and therefore more answers to it with more focus on that specific problem.
It's easier to follow a certain thread if it's in its own one, rather split into multiple posts in here.

So for quick questions, I would say, this thread is ok. But everything that needs more than two posts to answer back and forth, it's probably more useful in their own thread, for practicality. Especially for developer-generations to come and search this forum.
Sorry, I disagree.
Lua is still scripting- and not extension-related, how 'extensive' it may be.

Last edited by nofish; 07-22-2020 at 05:44 PM.
nofish is offline   Reply With Quote
Old 07-22-2020, 08:56 PM   #671
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

I didn't notice this topic was for extensions and not scripts, my bad, asked a lot here hahaha but always with good answers

Should I create a thread for future questions? I posted here normally for quick questions instead of having to create a thread for them...
daniellumertz is offline   Reply With Quote
Old 07-23-2020, 05:51 AM   #672
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

On another thought, for quick questions, maybe a 'The "how do I?" ReaScript/JSFX thread', or even seperate ones for ReaScript and JSFX (which might also be stickied) would be a good idea?

Last edited by nofish; 07-23-2020 at 06:01 AM.
nofish is offline   Reply With Quote
Old 07-23-2020, 10:21 PM   #673
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by nofish View Post
On another thought, for quick questions, maybe a 'The "how do I?" ReaScript/JSFX thread', or even seperate ones for ReaScript and JSFX (which might also be stickied) would be a good idea?
seems good to me, but i'm new here heheh
daniellumertz is offline   Reply With Quote
Old 07-24-2020, 10:46 AM   #674
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
seems good to me, but i'm new here heheh
Duration of being a forum member doesn't (shouldn't at least) make opinions more/less valid imo.
Anyway, here we go:
https://forum.cockos.com/showthread.php?t=240303
nofish is offline   Reply With Quote
Old 07-28-2020, 11:26 AM   #675
Beastmode Beats
Human being with feelings
 
Join Date: May 2017
Posts: 236
Default

How do we create a new command ID (or substitute) for custom actions containing multiple actions that must be imploded in the cycle action editor?
Beastmode Beats is offline   Reply With Quote
Old 07-28-2020, 11:44 AM   #676
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 1,992
Default

Quote:
Originally Posted by Beastmode Beats View Post
How do we create a new command ID (or substitute) for custom actions containing multiple actions that must be imploded in the cycle action editor?
if I understood what you were saying

reaper.NamedCommandLookup( command_name )
daniellumertz is offline   Reply With Quote
Old 08-03-2020, 08:36 AM   #677
WalkerC
Human being with feelings
 
Join Date: Jul 2020
Posts: 5
Default

How do I automate record from multi tracks every few seconds
and each channel into individual .WAV file
by using Python API?

Do you have some idea which Function I should use?

Thanks
WalkerC is offline   Reply With Quote
Old 08-03-2020, 12:29 PM   #678
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 Beastmode Beats View Post
How do we create a new command ID (or substitute) for custom actions containing multiple actions that must be imploded in the cycle action editor?
You mean by replace something like _RS783B834b83B with _ThisIsMyCommandID ?
__________________
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, 12:31 PM   #679
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 WalkerC View Post
How do I automate record from multi tracks every few seconds
and each channel into individual .WAV file
by using Python API?

Do you have some idea which Function I should use?

Thanks
I have no idea what exactly you mean. Can you create a short LiceCap of how you do it manually up until now, so I can see, which steps you need to take?
__________________
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, 02:52 PM   #680
WalkerC
Human being with feelings
 
Join Date: Jul 2020
Posts: 5
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
I have no idea what exactly you mean. Can you create a short LiceCap of how you do it manually up until now, so I can see, which steps you need to take?

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?
WalkerC is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 06:22 PM.


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