Old 04-03-2008, 07:34 PM   #1
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 12,586
Default The "how do I?" REAPER plug-in extension thread

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
Justin is offline   Reply With Quote
Old 04-03-2008, 07:46 PM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,000
Default

OK, this is gonna be really lame : but how do I access the Reaper project's items and their takes from the APIs?
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 04-03-2008, 08:09 PM   #3
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 12,586
Default

Quote:
Originally Posted by Xenakios View Post
OK, this is gonna be really lame : but how do I access the Reaper project's items and their takes from the APIs?
Look at "GetTrackMediaItem" in reaper_plugin.h.. there are a few other functions for accessing information about those items, and modifying them. This is supported in v2.149+.


-Justin

Last edited by Justin; 04-04-2008 at 12:27 PM.
Justin is offline   Reply With Quote
Old 04-04-2008, 05:16 AM   #4
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,000
Default

Well, I guess I now know how to :

__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 04-04-2008, 07:37 AM   #5
sws
Code Monkey
 
sws's Avatar
 
Join Date: Sep 2007
Location: Madison, WI
Posts: 851
Default

Howto:

1) Get/set track color?

2) Get/set HW/MIDI input of track?
sws is offline   Reply With Quote
Old 04-04-2008, 11:09 AM   #6
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 12,586
Default

Quote:
Originally Posted by sws View Post
Howto:

1) Get/set track color?

2) Get/set HW/MIDI input of track?

TODO: coming soon


-Justin
Justin is offline   Reply With Quote
Old 05-17-2008, 11:08 PM   #7
Shan
Human being with feelings
 
Shan's Avatar
 
Join Date: Mar 2007
Location: Vancouver
Posts: 2,277
Default

Quote:
Originally Posted by Justin View Post
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
What would be a good starting point for a newbie to add a few new actions or two? I'm an intermediate developer with the AHK scripting language and also the audio programming language called Csound...and I use to input hex values on tiny LCD hardware synth displays back in the day, which was quite the PITA.

Shane
__________________
"Music should be performed by the musician not by the engineer."

Michael Wagener 25th July 2005, 02:59 PM
Shan is offline   Reply With Quote
Old 05-19-2008, 09:48 PM   #8
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,000
Default

Quote:
Originally Posted by Shan View Post
What would be a good starting point for a newbie to add a few new actions or two? I'm an intermediate developer with the AHK scripting language and also the audio programming language called Csound...and I use to input hex values on tiny LCD hardware synth displays back in the day, which was quite the PITA.

Shane
The insert random Ninjam Loop example in the SDK served me well, I've furiously built my code over it in the past couple of months...

It demonstrates how to add new menu entries to the Reaper menu, how to create a simple win32 dialog and handle it's messages, how to import and use the Reaper Extension API functions from Reaper and probably some other points as well...

I could probably make my own source code public if it wasn't such a horrendous mess that would confuse the hell out of anyone looking at it...
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 05-20-2008, 12:20 AM   #9
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Xenakios,

That's great to know - thanks very much for the info

I'll be sure to take a look at that stuff when I'm a bit more conversant with the stuff I'm doing/have-been-doing.

Thanks Xenakios

Deric.
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 05-21-2008, 01:49 AM   #10
Shan
Human being with feelings
 
Shan's Avatar
 
Join Date: Mar 2007
Location: Vancouver
Posts: 2,277
Default

Quote:
Originally Posted by Xenakios View Post
The insert random Ninjam Loop example in the SDK served me well, I've furiously built my code over it in the past couple of months...

It demonstrates how to add new menu entries to the Reaper menu, how to create a simple win32 dialog and handle it's messages, how to import and use the Reaper Extension API functions from Reaper and probably some other points as well...
Thanks Xen! I'll check that out. That is basically how I learnt Csound and AHK scripting. After scratching my head over the syntax etc, I just started to look a good examples of code and things started to fall into place. I'll have a look at that.

Quote:
Originally Posted by Xenakios View Post
I could probably make my own source code public if it wasn't such a horrendous mess that would confuse the hell out of anyone looking at it...
I hear ya on that one mate. I have a few AHK scripts that I wouldn't even show Bevoss cuz they are quite the work of Spaghetti code.

Shane
__________________
"Music should be performed by the musician not by the engineer."

Michael Wagener 25th July 2005, 02:59 PM
Shan is offline   Reply With Quote
Old 05-25-2008, 07:15 AM   #11
shaman
Human being with feelings
 
Join Date: Mar 2008
Posts: 56
Default

Quote:
Originally Posted by Justin View Post
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!
Hi Justin,

I'd like to know how to access time markers.
An ability to read and write their properties such as Position, BPM and time signature would be great. I've seen there is

TimeMap_timeToQN, TimeMap_QNToTime, TimeMap_GetDividedBpmAtTime,

on the todo's list in reaper_plugin_functions.h i think this comes close to what i'm looking?
Still, a function returning a list or array of marker structs and an OnTimeMapUpdate to pump the modified list back into reaper would be better (i think sws would like something for 'normal' markers as well ).


I thought of attacking this FR: http://www.cockos.com/forum/showthread.php?t=4157 as far as i know it has not been resolved yet.
I need a function to recalc the BPM for markers and update them. In fact this function is almost there: 'Markers: Time signature measure from time selection' but the problem with this is that, the markers on both ends are updated, where only the left marker should.
For making a Drag-Drop Time marker completely transparent in Reaper, a TimeMarkerChanged call coming in from Reaper after the drop, would be perfect

cheers!
shaman is offline   Reply With Quote
Old 05-25-2008, 11:18 AM   #12
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,000
Default

Quote:
Originally Posted by shaman View Post

TimeMap_timeToQN, TimeMap_QNToTime, TimeMap_GetDividedBpmAtTime,
I don't know what the 3rd function of these does but the first two are for converting between beats/seconds-based times, taking into account the tempo changes of the project. They both take in a double floating point value and return a double floating point value.

Proper APIs to add/edit/delete markers/regions/time signature+tempo changes would be great!
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 06-26-2009, 09:57 PM   #13
Rubberfrog
Human being with feelings
 
Join Date: Jun 2009
Location: vancouver
Posts: 6
Default For live work.

Quote:
Originally Posted by Justin View Post
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
I'm just starting to get into programming after well...probably 92? C++ seems to make sense. Anyways, what I'm wanting to do is just make it so you can assign a key command (midi)to select a particular track. for effect changes live. Also, so I can nest my other input device, Assign a key command for selecting the the fx slot in the selected track.

Wonderring if you might know of examples I could use, that would be compact just to do that as a starting point.
Rubberfrog is offline   Reply With Quote
Old 06-27-2009, 08:01 AM   #14
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,000
Default

Quote:
Originally Posted by Rubberfrog View Post
I'm just starting to get into programming after well...probably 92? C++ seems to make sense. Anyways, what I'm wanting to do is just make it so you can assign a key command (midi)to select a particular track. for effect changes live. Also, so I can nest my other input device, Assign a key command for selecting the the fx slot in the selected track.

Wonderring if you might know of examples I could use, that would be compact just to do that as a starting point.
You can do actions to select particular tracks easily. (Once you have everything else set up for programming Reaper extensions.) However opening the window of a particular fx in a track isn't supported directly by the Reaper APIS.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 06-27-2009, 07:32 PM   #15
Rubberfrog
Human being with feelings
 
Join Date: Jun 2009
Location: vancouver
Posts: 6
Default

Quote:
Originally Posted by Xenakios View Post
You can do actions to select particular tracks easily. (Once you have everything else set up for programming Reaper extensions.) However opening the window of a particular fx in a track isn't supported directly by the Reaper APIS.
Hmmm... I was kind of assuming that since the fx window opens when you click the effect, the same would be true calling it from the sdk. It's really too bad the commands in the fx browser aren'ts available... I could set up my foot pedal to send midi note on off, for browsing, loading, etc, and still have my hands free for playing.
Rubberfrog is offline   Reply With Quote
Old 09-30-2009, 02:03 PM   #16
klankschap
Human being with feelings
 
Join Date: Feb 2007
Posts: 99
Default

Quote:
Originally Posted by Justin View Post
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
I've got a personal package to create reaper rpp project files.
This works very smooth.
But having native access through the API is very nice indeed.

However:
I'm using OSX 10.6 with python 2.6.2
Would it be possible to get reascript using that as well (for the time being)

Thanks!
Floris
klankschap is offline   Reply With Quote
Old 09-30-2009, 03:14 PM   #17
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,000
Default

Quote:
Originally Posted by klankschap View Post
I've got a personal package to create reaper rpp project files.
This works very smooth.
But having native access through the API is very nice indeed.

However:
I'm using OSX 10.6 with python 2.6.2
Would it be possible to get reascript using that as well (for the time being)

Thanks!
Floris
Why could you not install the latest Python on OS-X? Can't OS-X handle multiple Python versions installed or some other problem like that?
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 10-01-2009, 03:37 PM   #18
liteon
Human being with feelings
 
liteon's Avatar
 
Join Date: Apr 2008
Posts: 510
Default

here is a very interesting hack i've found with reascript. it can be used to dump some extra / hidden information on api functions.

save to dumpfunctions.py and run from reaper :-)

Code:
#------------------------------------------------------------
# dumpfunctions.py
# reascript function parser by l.ivanov
#------------------------------------------------------------
name=chr(90)+chr(73)+chr(90)+chr(73)
ctype=chr(83)+chr(78)+chr(65)+chr(75)+chr(69)
dim=chr(76)+chr(79)+chr(78)+chr(71)
action=chr(76)+chr(73)+chr(75)+chr(69)
user=chr(89)+chr(79)+chr(85)
ctype=ctype.lower()
dim=dim.lower()
action=action.lower()
user=user.lower()
#------------------------------------------------------------
step=20
length=20
startstr=name+" is a very "+dim+" "+ctype+"... \n \n \n /\\"
startstr+=" \n | | \n | | \n"
str0="\\x\\ \n"
str1="/x/ \n"
endstr=" |_| \n o o \n \\_/ \n  | \n  x \n\nHi, i'm "+name
endstr+=" the "+ctype+". \n"
endstr+="Hope you find some good use of ReaScript!"
mbstr="Press ok if "+user+" "+action+" "+name+" the "+ctype
#------------------------------------------------------------
RPR_ShowConsoleMsg("")
def msg(m):
    #--- reaper console
    RPR_ShowConsoleMsg(m)
    #--- or print with shell
    #print m
#------------------------------------------------------------
lstr="";
j=0
while j<step:
    lstr=" "+lstr
    j+=1
msg(startstr)
#------------------------------------------------------------
i=0
while i<length:
    j=0
    tstr="";
    while j<step:
        tstr = " "+tstr
        msg(tstr+str0)
        j+=1
    j=step
    tstr=lstr;
    while j>0:
       msg(tstr[(step-j):]+str1)
       j-=1
    i+=1
#------------------------------------------------------------
msg(endstr)
RPR_MB(mbstr," ",0)
#------------------------------------------------------------
liteon is offline   Reply With Quote
Old 10-01-2009, 03:42 PM   #19
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,387
Default

Quote:
Originally Posted by liteon View Post
here is a very interesting hack i've found with reascript. it can be used to dump some extra / hidden information on api functions.
[img]http://img33.**************/img33/3835/captureyq.png[/img]

Last edited by schwa; 10-01-2009 at 03:45 PM. Reason: less rude snake
schwa is offline   Reply With Quote
Old 10-01-2009, 04:15 PM   #20
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 10,445
Default

Hahaha. SSSSSweet.
__________________
Dialogue/FX Editor & Re-Recording Mixer
(Video)Using Latch Preview
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 10-06-2009, 09:28 AM   #21
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

Quote:
Originally Posted by liteon View Post
here is a very interesting hack i've found with reascript. it can be used to dump some extra / hidden information on api functions.
woo! liteon!? do you have a reascript to dump some extra / hidden information about that (beyond the fact that it's base 64)
Code:
<VST "VSTi: ReaSamplOmatic5000 (Cockos)" "reasamplomatic.dll" 0 ""
bW9zcu5e7f4AAAAAAgAAAAEAAAAAAAAAAgAAAAAAAACVAAAAAQAAAA==
AAAAAAAAAAAAAADwPwAAAAAAAOA//anx0k1iUD8AAAAAAAAAAAAAAA==
AAAA8D+amZmZmZmxP83MzMzMzOs/AAAAAAAAAAAAAAAAAAAAAPyp8Q==
0k1iQD/8qfHSTWJAPwAAAAAAAPA/AAAAAAAAAAAAAAAAAAAAAAAAAA==
AAAA8D8AAAAAAADgPwIAAAAAAAAAAAAAAAAAAAAAAPA/
>
SWS, some news about the wrapper class ? (just asking... I can imagine how you should be busy with the merge).
Or, can someone provide a ccp example messing around (*GetSetObjectState)(void* obj, char* str), i.e. an example that "parses" + updates "str" ?

[edit1] I've done some tests (see previous posts), but I really need to know what/where I should patch...

[edit2] Justin, if you read this... I'd love beeing on the dev side... drinking beers and having good laughs while reading this thread... seeing these guys struggling... Just to let you know: I think that you've invented the perfect off-shoring system, and it's free of course! But it's hard, here, in the south contries (UK, Finland, France, ...)

Last edited by Jeffos; 10-06-2009 at 09:59 AM.
Jeffos is offline   Reply With Quote
Old 10-06-2009, 12:16 PM   #22
sws
Code Monkey
 
sws's Avatar
 
Join Date: Sep 2007
Location: Madison, WI
Posts: 851
Default

Quote:
Originally Posted by Jeffos View Post
SWS, some news about the wrapper class ? (just asking... I can imagine how you should be busy with the merge).
Or, can someone provide a ccp example messing around (*GetSetObjectState)(void* obj, char* str), i.e. an example that "parses" + updates "str" ?
Jeffos, you got it, that parsing class is a bit on hold as I'm working on the merge and some other fancy things.

The Base64 encoding of VST plugin's parameters is unique to the plugin and not really modifiable unless you know the internal data structure of the plugin. Unlikely in 99% of cases.

Take care,
Tim
sws is offline   Reply With Quote
Old 10-06-2009, 10:04 AM   #23
yhertogh
Human being with feelings
 
yhertogh's Avatar
 
Join Date: Nov 2006
Location: Belgium
Posts: 1,461
Default

Quote:
Originally Posted by liteon View Post
here is a very interesting hack i've found with reascript. it can be used to dump some extra / hidden information on api functions.

save to dumpfunctions.py and run from reaper :-)

Code:
#------------------------------------------------------------
# dumpfunctions.py
# reascript function parser by l.ivanov
#------------------------------------------------------------
name=chr(90)+chr(73)+chr(90)+chr(73)
ctype=chr(83)+chr(78)+chr(65)+chr(75)+chr(69)
dim=chr(76)+chr(79)+chr(78)+chr(71)
action=chr(76)+chr(73)+chr(75)+chr(69)
user=chr(89)+chr(79)+chr(85)
ctype=ctype.lower()
dim=dim.lower()
action=action.lower()
user=user.lower()
#------------------------------------------------------------
step=20
length=20
startstr=name+" is a very "+dim+" "+ctype+"... \n \n \n /\\"
startstr+=" \n | | \n | | \n"
str0="\\x\\ \n"
str1="/x/ \n"
endstr=" |_| \n o o \n \\_/ \n  | \n  x \n\nHi, i'm "+name
endstr+=" the "+ctype+". \n"
endstr+="Hope you find some good use of ReaScript!"
mbstr="Press ok if "+user+" "+action+" "+name+" the "+ctype
#------------------------------------------------------------
RPR_ShowConsoleMsg("")
def msg(m):
    #--- reaper console
    RPR_ShowConsoleMsg(m)
    #--- or print with shell
    #print m
#------------------------------------------------------------
lstr="";
j=0
while j<step:
    lstr=" "+lstr
    j+=1
msg(startstr)
#------------------------------------------------------------
i=0
while i<length:
    j=0
    tstr="";
    while j<step:
        tstr = " "+tstr
        msg(tstr+str0)
        j+=1
    j=step
    tstr=lstr;
    while j>0:
       msg(tstr[(step-j):]+str1)
       j-=1
    i+=1
#------------------------------------------------------------
msg(endstr)
RPR_MB(mbstr," ",0)
#------------------------------------------------------------
Hey,

Would you mind dumping this info somewhere in a text file and share it with us/me ?


Thanks

Yves
yhertogh is offline   Reply With Quote
Old 10-06-2009, 10:42 AM   #24
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

... oh! yeah, I forgot belgium among the south countries !

Of course, here it is, Yves, (I had to cut the snake) :

Code:
ZIZI is a very long snake... 
 
 
 /\ 
 | | 
 | | 
 \x\ 
  \x\ 
   \x\ 
    \x\ 
     \x\ 
      \x\ 
       \x\ 
        \x\ 
         \x\ 
          \x\ 
           \x\ 
            \x\ 
             \x\ 
              \x\ 
               \x\ 
                \x\ 
                 \x\ 
                  \x\ 
                   \x\ 
                    \x\ 
                    /x/ 
                   /x/ 
                  /x/ 
                 /x/ 
                /x/ 
               /x/ 
              /x/ 
             /x/ 
            /x/ 
           /x/ 
          /x/ 
         /x/ 
        /x/ 
       /x/ 
      /x/ 
     /x/ 
    /x/ 
   /x/ 
  /x/ 
 /x/ 
 \x\ 
  \x\ 
   \x\ 
    \x\ 
     \x\ 
      \x\ 
       \x\ 
        \x\ 
         \x\ 
          \x\ 
           \x\ 
            \x\ 
             \x\ 
              \x\ 
               \x\ 
                \x\ 
                 \x\ 
                  \x\ 
                   \x\ 
                    \x\ 
                    /x/ 
                   /x/ 
                  /x/ 
                 /x/ 
                /x/ 
               /x/ 
              /x/ 
             /x/ 
            /x/ 
           /x/ 
          /x/ 
         /x/ 
        /x/ 
       /x/ 
      /x/ 
     /x/ 
    /x/ 
   /x/ 
  /x/ 
 /x/ 
 \x\ 
  \x\ 
   \x\ 
    \x\ 
     \x\ 
      \x\ 
       \x\ 
        \x\ 
         \x\ 
          \x\ 
           \x\ 
            \x\ 
             \x\ 
              \x\ 
               \x\ 
                \x\ 
                 \x\ 
                  \x\ 
                   \x\ 
                    \x\ 
                    /x/ 
                   /x/ 
                  /x/ 
                 /x/ 
                /x/ 
               /x/ 
              /x/ 
             /x/ 
            /x/ 
           /x/ 
          /x/ 
         /x/ 
        /x/ 
       /x/ 
      /x/ 
     /x/ 
    /x/ 
   /x/ 
  /x/ 
 /x/ 
 \x\ 
  \x\ 
   \x\ 
    \x\ 
     \x\ 
      \x\ 
       \x\ 
        \x\ 
         \x\ 
          \x\ 
           \x\ 
            \x\ 
             \x\ 
              \x\ 
               \x\ 
                \x\ 
                 \x\ 
                  \x\ 
                   \x\ 
                    \x\ 
                    /x/ 
                   /x/ 
                  /x/ 
                 /x/ 
                /x/ 
               /x/ 
              /x/ 
             /x/ 
            /x/ 
           /x/ 
          /x/ 
         /x/ 
        /x/ 
       /x/ 
      /x/ 
     /x/ 
    /x/ 
   /x/ 
  /x/ 
 /x/ 
 |_| 
 o o 
 \_/ 
  | 
  x 

Hi, i'm ZIZI the snake. 
Hope you find some good use of ReaScript!
Jeffos is offline   Reply With Quote
Old 10-29-2009, 05:45 PM   #25
dea-man
Human being with feelings
 
dea-man's Avatar
 
Join Date: Oct 2009
Posts: 6,131
Default Using 2nd computer for FX

OK, I've put Reaper on both computer's and connected them through ethernet. Now do I open Reaper on both computer's to use the FX via ReaMote?

I like to use my Guitar Rig so do I have to install that on the FX computer, too?

Same with Absynth?

Thank you for the help.
dea-man is offline   Reply With Quote
Old 04-20-2013, 01:38 PM   #26
Celphor
Human being with feelings
 
Join Date: Jan 2013
Location: Austria
Posts: 67
Default CSurf notification about changed input monitor

Hi,

how do I get notified in csurf about a change on an input monitor of a track?

There is no CSurf_SetMonitorChange...

Same with track automation state

Please extend the API :-)

Last edited by Celphor; 04-20-2013 at 01:44 PM. Reason: Added automation
Celphor is offline   Reply With Quote
Old 04-20-2013, 04:07 PM   #27
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,000
Default

Quote:
Originally Posted by Celphor View Post
Hi,

how do I get notified in csurf about a change on an input monitor of a track?

There is no CSurf_SetMonitorChange...

Same with track automation state

Please extend the API :-)
Look here in the csurf api section : https://code.google.com/p/sws-extens...eaper_plugin.h

Automation state seems to be already supported with a dedicated virtual method (albeit just for "current track") and input monitoring notifications appear to be possible to be received via the Extended() call.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 04-20-2013, 04:51 PM   #28
Celphor
Human being with feelings
 
Join Date: Jan 2013
Location: Austria
Posts: 67
Default

Thank you, didn't know about the extened method yet. Will give it a try tomorrow...
Celphor is offline   Reply With Quote
Old 10-04-2009, 02:01 PM   #29
klankschap
Human being with feelings
 
Join Date: Feb 2007
Posts: 99
Default

Quote:
Originally Posted by Justin View Post
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 would be nice to have a function to switch to a specific project tab (and to get the current tab)

F
klankschap is offline   Reply With Quote
Old 10-04-2009, 02:08 PM   #30
Klinke
Human being with feelings
 
Klinke's Avatar
 
Join Date: Jul 2008
Location: Berlin / Germany
Posts: 760
Default

Have you seen

REAPER_PLUGIN_DECLARE_APIFUNCS void *(*EnumProjects)(int idx, char *projfn, int projfnlen); // idx=-1 for "current" project, projfn can be NULL if not interested in filename
REAPER_PLUGIN_DECLARE_APIFUNCS void (*SelectProjectInstance)(ReaProject *proj);

in reaper_plugin_functions.h?

I never tried it till now, but i think they exist for this purpose.
Klinke is offline   Reply With Quote
Old 10-29-2009, 05:42 PM   #31
dea-man
Human being with feelings
 
dea-man's Avatar
 
Join Date: Oct 2009
Posts: 6,131
Default Make Reaper Master /Slave to Korg Triton Sequencer

I think I have it set to where the Triton will Slave to Reaper but I can't get it the other way around. step by step instructions would be appreciated.

Thanks
dea-man is offline   Reply With Quote
Old 10-29-2009, 05:46 PM   #32
yhertogh
Human being with feelings
 
yhertogh's Avatar
 
Join Date: Nov 2006
Location: Belgium
Posts: 1,461
Default

Quote:
Originally Posted by dea-man View Post
I think I have it set to where the Triton will Slave to Reaper but I can't get it the other way around. step by step instructions would be appreciated.

Thanks
This is a developers forum thread. Maybe you want to ask your question in the Reaper Compatibility forum

Yves
yhertogh is offline   Reply With Quote
Old 11-01-2009, 03:43 PM   #33
MikeLacey
Human being with feelings
 
Join Date: Dec 2006
Location: UK
Posts: 762
Default

How do I..."

Two things (sorry)

1 - Call OnCommand from within the MIDI editor
2 - Check if the user chose Cancel when loading a note names file

Oh In ReaScript, of course

Mike
__________________
Mike Lacey, Leicestershire, UK
MikeLacey is offline   Reply With Quote
Old 11-02-2009, 09:08 AM   #34
MikeLacey
Human being with feelings
 
Join Date: Dec 2006
Location: UK
Posts: 762
Default

New MIDI API calls *AND* just like I asked plus a bit more... Thank you very much.

Queries:

MIDIEditorOnCommand is documented as returning bool - and does return TRUE. When does it return !=TRUE?

No flags parameter in MIDIEditorOnCommand(), does that matter?
__________________
Mike Lacey, Leicestershire, UK
MikeLacey is offline   Reply With Quote
Old 12-01-2009, 07:55 AM   #35
ajaym
Human being with feelings
 
Join Date: Aug 2009
Posts: 157
Default Getting track mute/solo state

I decided to port my BCR2000 control surface plugin for Sonar to Reaper. This has been very popular in the Sonar community because it provides quite extensive functionality (search for BCR2000 in www.sourceforge.net for the project and documentation) and now I have Reaper I miss having that functionality. I'll contribute it to the stash when done, of course.

(note: the BCR2000 does NOT support Mackie mode unlike the BCF2000 so this is not an option for BCR users)

After a day or so of reverse-engineering the existing control surface SDK source I was able to modify my code to get the core part of it working, and what I am now doing now is taking the points at which it interfaces to Sonar and changing those to call, as far as possible, the corresponding functions in Reaper.

So far I've been able to get MIDI in and out to the control surface working, and I can programmatically set the MUTE status for a track from the control surface - so the core code is essentially working - but I have now hit a rock and can't figure out from the header files and sample code how you programmatically get a track's mute and solo status BACK from Reaper, because now I need to get the full duplex bit working i.e you toggle mute/solo etc from Reaper and the control surface updates accordingly.

I simply can't find an API that appears to retrieve a track's mute or solo status. What am I missing here?.

There seems to be APIs to get track pan, volume and all the FX parameters, as there are with Sonar, but mute and solo seem oddly missing.

Experimentally I tried calling GetTrackUIVolPan and indeed the values of volume and pan are returned correctly, so they're ok. It's mute, solo, and - come to think of it - record arm as well, for which there are SET APIs but apparently no corresponding GET APIs.

Also, I'm assuming that the model here is identical to Sonar in that Reaper will call the control surface every so often (I think 15Hz refresh is the standard) and that this occurs regardless of whether or not any settings have changed in the Reaper project. It's then up to the control surface code, as it would be in Sonar, to programmatically determine whether any controlled parameter on the surface has changed, Reaper doesn't call you back specifically when the user changes a parameter from Reaper itself, as far as I can see, is this correct?.

Finally, at this stage - though I may find other things as I complete the project - I'm not sure how to manage sends and busses programmatically. In Sonar, tracks have types - standard, master and buss, and you can interrogate or set any of their properties. In Reaper there seems to be just a single master out even if I define multiple hardware outputs and I'm not quite clear how to programmatically control this - what track number, if any, would the master have?.

As for sends, I haven't yet explored the FX APIs but is Reaper treating sends as part of the FX chain programmatically or separately. I couldn't see anything obvious in the SDK APIs for this.

I think it would be a very good idea to document the SDKs, to be honest, because it would really help third parties to develop added value for Reaper. At present it is proving rather challenging to reverse-engineer from the very sparsely-commented sample code. However, I would really appreciate any clarification or assistance that you can provide; I'd love to get this ported over and I think Reaper users would find it useful.
ajaym is offline   Reply With Quote
Old 12-06-2009, 10:45 AM   #36
MikeLacey
Human being with feelings
 
Join Date: Dec 2006
Location: UK
Posts: 762
Default

Would it be possible to implement the functionality implied by these made-up API calls below?

It wouldn't be done precisely like this I suspect, as I don't think we have a MIDINote object, so I'm asking for the functionality rather than these APIs.
Code:
int GetNumSelectedMidiNotes(MIDIEditor)

MIDINote* GetSelectedMidiNote(MIDIEditor,Index)

bool SetSelectedMidiNote(MIDIEditor, MIDINote* mn, param char, newvalue int)
"param" would be things like POS, PITCH, DURATION, VOLUME
__________________
Mike Lacey, Leicestershire, UK
MikeLacey is offline   Reply With Quote
Old 12-15-2009, 02:55 AM   #37
MikeLacey
Human being with feelings
 
Join Date: Dec 2006
Location: UK
Posts: 762
Default Translate between .rpp and raw MIDI data

How do I translate between .rpp MIDI data and raw MIDI data?
__________________
Mike Lacey, Leicestershire, UK
MikeLacey is offline   Reply With Quote
Old 12-15-2009, 06:36 AM   #38
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

hi Mike, I'm not sure of what you're calling "raw data" but if your talking about MIDI_eventlist this http://forum.cockos.com/showpost.php...2&postcount=76 and that http://forum.cockos.com/showthread.php?t=28562 may help.
note: it seems some of the trickeriest guys are directly updating the chuncks..
Jeffos is offline   Reply With Quote
Old 12-15-2009, 07:01 AM   #39
MikeLacey
Human being with feelings
 
Join Date: Dec 2006
Location: UK
Posts: 762
Default

Ooh look at that, can open and worms just everywhere.

Thanks Jeffos, it's not quite the single function call conversion I had in mind but I will look at it.
__________________
Mike Lacey, Leicestershire, UK
MikeLacey is offline   Reply With Quote
Old 12-15-2009, 03:40 PM   #40
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

... about the MIDI_eventlist approach i obviously forget http://forum.cockos.com/showthread.php?t=45430, with a cool example posted by rome. MIDI looks like a brand new place for extensions.. but padre & rome seems in the starting block for that!

Quote:
Originally Posted by MikeLacey View Post
Ooh look at that, can open and worms just everywhere.
What I meant above is that, if I was sure of what I'm doing I won't use the MIDI_eventlist appoach!

I've started digging into midi too.. but directly working with chunks. It's ok for READ and it can answer some your Q's above (see bellow). The few WRITE tests I did: removing cc123, empying, .. seemed also safe but I stopped there: it seemed "too easy to be true" (and schwa didn't talk about that in the thread above, where midi selection is also aksed)
So the few things I can answer you about your Q's in the previous posts are bellow. I only talk about my "C" point of view here, but HTH!

Inside a take's chunk (GetSetObjectState(MediaItem*)), the midi event list looks like:
Code:
e 4781 90 0e 01
e 240 80 0e 00
E 269 90 10 7f
E 240 80 10 00
E 240 b0 7b 00
here 5 events: 2* note on/off on channel 1 and the famous "all notes off" (cc123 on channel 1) that ends midi takes.
- 1st token: dunno yet if it can be different from "e/E". however, lower/upper case distinguish selected events (one of yours Qs)
- 2nd token: *offset* with the previous event or with the begining of the take for the 1st event. it's not really a timing (dunno the english wording..), in short the unit is 1/2560T, e.g. 240 = 1/16. note: working with offset can be nice (copy/paste,..)
- 3 following "bytes" = classical hexa midi coding (one of your Qs, if we're talking about the same "raw data")

beware! in the middle of this gentle midi event list you can face a wicked base64 sysex!
Code:
<X 286306 0
8AECAwQF9w==
>
note: does not work with external midi source file. any tips to complete/correct these info would be appreciated..
Jeffos 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 01:45 AM.


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