Old 11-03-2009, 02:08 PM   #1
Anton9
Mortal
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 32
Default ReaScript Regions ?

Hey guys..,

Is there any way to select a named region using ReaScript ?
Is there any way of popping up the midi learn dialog box for last tweaked fx parameter through ReaScript ?
If not.., Schwa, Justin.., could we please get these ?
Anyone have some script examples of the new MIDI api functions ?
I really hope that the MIDI side of the api will continue to grow.., Id love to be able to select and manipulate notes and their properties through ReaScript

Thanks,
Anton
Anton9 is offline   Reply With Quote
Old 11-03-2009, 02:31 PM   #2
MikeLacey
Mortal
 
MikeLacey's Avatar
 
Join Date: Dec 2006
Location: Leicestershire, England
Posts: 426
Default

Hi,

Here's a script using the new MIDIEditor functions. It works but it's not what you'd call polished.

Code:
#
# LoadNoteNames.pl
# ver 0.2

use strict;
use warnings;

use constant OPEN_MIDI_ITEM => 40109;
use constant LOAD_NOTE_NAMES => 40409;
use constant DRUM_DIAMONDS_VIEW => 40450;
use constant HIDE_UNUSED_UNNAMED_ROWS => 40454;
use constant FILE_CLOSE_WINDOW => 2;
use constant MSGBOX_YESNO => 4;
use constant MSGBOX_YES => 6;
use constant MSGBOX_NO => 7;

my $ret_val;

RPR_Main_OnCommand(OPEN_MIDI_ITEM,0);

my $med = RPR_MIDIEditor_GetActive();

$ret_val = RPR_MIDIEditor_OnCommand($med, LOAD_NOTE_NAMES);

$ret_val = RPR_ShowMessageBox("Did The Load Succeed?","Load Notes Names", MSGBOX_YESNO);

if($ret_val == MSGBOX_YES){
    $ret_val = RPR_MIDIEditor_OnCommand($med, DRUM_DIAMONDS_VIEW);
    $ret_val = RPR_MIDIEditor_OnCommand($med, HIDE_UNUSED_UNNAMED_ROWS);
} else {
    $ret_val = RPR_MIDIEditor_OnCommand($med, FILE_CLOSE_WINDOW);
}

exit 0;
The functions are documented in the Wiki.

I don't know of a way to do the selection and MIDI dialogue tasks - someone else might. Meanwhile have a look at the MIDIEditor_OnCommand() function, if you can do it with a MIDI Editor menu option or action, you can do it with that.
__________________
Mike Lacey, Leicestershire, UK
MikeLacey is offline   Reply With Quote
Old 11-04-2009, 11:38 AM   #3
Anton9
Mortal
 
Anton9's Avatar
 
Join Date: Jun 2009
Location: Earth
Posts: 32
Default

Mike,

Thank you for the example and thank you for all the work your doing in the Wiki

Anton
Anton9 is offline   Reply With Quote
Old 11-04-2009, 12:01 PM   #4
MikeLacey
Mortal
 
MikeLacey's Avatar
 
Join Date: Dec 2006
Location: Leicestershire, England
Posts: 426
Default

My pleasure Anton.
__________________
Mike Lacey, Leicestershire, UK
MikeLacey 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 07:05 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.