Old 11-18-2017, 10:09 AM   #81
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

This one works:
Code:
match (msg2, sprintf(#dest, slSlider1)) ? (
This one doesn't:
Code:
match (msg2, sprintf(#dest, "slSlider%d", 1)) ? (
I kinda understand the reason why it isn't working (slSlider1 becomes a string "slSlider1", while msg2 becomes a string "16", so they don't match), but can't figure out how to fix that. Any help would be appreciated.

Last edited by fundorin; 11-18-2017 at 10:31 AM.
fundorin is offline   Reply With Quote
Old 11-18-2017, 11:51 AM   #82
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Ended up using this code, where 16 is the number of the first fader and 23 is the last one:
Code:
    
16<=msg2<=23 ? (
        ccValue = msg2 - 15;
        send_soft_fader(ccValue);
        );
Not as elegant as I wanted, but, it's smaller than before, at least.
fundorin is offline   Reply With Quote
Old 11-18-2017, 12:29 PM   #83
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by fundorin View Post
This is the code that controls tracks volume with faders (adapted from midimix script):
Do you really want to have multiple messages sent if multiple sliders are set to the same value ?

You can set array values in the @init section and use them later.

Beware of that in EEL arrays work similar as string slots !!!

a[i] is just a shortcut for 0[a+i], meaning there is a single array 0[...] and you need to do something like

a=1000;
a[0] = 1;
a[1] = 11;
a[2] = 111;

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 11-18-2017 at 12:40 PM.
mschnell is offline   Reply With Quote
Old 11-18-2017, 12:40 PM   #84
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 124
Default

Fundorin
Suggest taking a look at Raymond Radet's advice at https://www.extremraym.com/en/reascript-guidelines and especially the code hierarchy of need at https://www.extremraym.com/en/reascr...rarchy_of_Need before writing too much code all at once.

Compact code is beloved of some programmers, but sometimes it is better to be functionally sound and easy to understand, especially when someone else wants to read your code, or even you look back at your own code a few weeks later.

There are lots of tutorials there too that may help the EEL2 and scripting learning if wishing for Lua. There's also EEL2 coding examples to learn from in https://github.com/X-Raym/REAPER-ReaScripts. "Good luck" once again and great to see progress now possible for the Novation!

Last edited by goldenarpharazon; 11-18-2017 at 01:16 PM. Reason: Better advice given Lua prior knowledge & preference
goldenarpharazon is offline   Reply With Quote
Old 11-18-2017, 12:46 PM   #85
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Quote:
Originally Posted by mschnell View Post
Do you really want to have multiple messages sent if multiple sliders are set to the same value ?
What do you mean? My code is sending single osc message per slider.

Quote:
Originally Posted by mschnell View Post
a=1000;
a[0] = 1;
a[1] = 11;
a[2] = 111;
I've tested this method instead of using separate variables for each silder right now. Works, but the way of declaring an array is awful.

You can't write something like this:
slSlider=10;

slSlider[1] = {16,17,18,19,20,21,22,23};
or
slSlider[] = {16,17,18,19,20,21,22,23};
or
slSlider[] = 16,17,18,19,20,21,22,23;

Didn't work for me, at least. Tried many possible combinations to declare an array, using one (two, apparently, cause the offset should be declared too) line of the code.
fundorin is offline   Reply With Quote
Old 11-18-2017, 01:17 PM   #86
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

What is the name of this command in .reaperOSC?
I've tried TRACK_MONITOR, but that's not it.

Even added toggle method to my custom .reaperOSC.
Neither toggle or boolean worked.

Code:
TRACK_MONITOR b/track/monitor b/track/@/monitor 
TRACK_MONITOR t/track/monitor t/track/@/monitor
P.S. Forgot to mention that I'm interested in a command for tracks in banks, not for selected track.

Last edited by fundorin; 11-18-2017 at 02:05 PM.
fundorin is offline   Reply With Quote
Old 11-18-2017, 02:28 PM   #87
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by fundorin View Post
What do you mean? My code is sending single osc message per slider.
Nope. If all slSlider... variables contain the same value, multiple messages will be sent (or none).

I would do

msg2 == slSlider1 ? (
send_soft_fader(1);
) : msg2 == slSlider2 ? (
...



-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 11-18-2017, 02:31 PM   #88
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,797
Default

Quote:
Originally Posted by fundorin View Post
What do you mean? My code is sending single osc message per slider.


I've tested this method instead of using separate variables for each silder right now. Works, but the way of declaring an array is awful.

You can't write something like this:
slSlider=10;

slSlider[1] = {16,17,18,19,20,21,22,23};
or
slSlider[] = {16,17,18,19,20,21,22,23};
or
slSlider[] = 16,17,18,19,20,21,22,23;

Didn't work for me, at least. Tried many possible combinations to declare an array, using one (two, apparently, cause the offset should be declared too) line of the code.
try:
Code:
slSlider = 10; // address of list
mem_set_values(slSlider, 16, 17, 18, 19, 20, 21, 22, 23);
Justin is offline   Reply With Quote
Old 11-18-2017, 02:32 PM   #89
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by fundorin View Post
...Didn't work for me, at least. Tried many possible combinations to declare an array, using one (two, apparently, cause the offset should be declared too) line of the code.
Of course not. None of this is according to the EEL specs.

The most convenient (and sustainable) way to do this in OSCII-bot scripts is reading the configuration from a file into appropriate arrays.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 11-18-2017, 02:37 PM   #90
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by Justin View Post
mem_set_values(slSlider, 16, 17, 18, 19, 20, 21, 22, 23);
Great ! Seemingly a new function in 0.4/0,5. ( -> "Undefined behavior if used with more than 32767 variables." )
Does this also work for strings ? mem_set_values(slstrings, "abc", "cde", "fgh");
Lets try....

Yep !!!

Great, very handy !

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 11-18-2017 at 02:44 PM.
mschnell is offline   Reply With Quote
Old 11-18-2017, 02:40 PM   #91
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Quote:
Originally Posted by mschnell View Post
Nope. If all slSlider... variables contain the same value, multiple messages will be sent (or none).

I would do

msg2 == slSlider1 ? (
send_soft_fader(1);
) : msg2 == slSlider2 ? (
...
Current code:
Code:
		// VOLUME SLIDERS
		slSlider1<=msg2<=slSlider8 ? (
			ccValue = msg2 - 15;
			send_soft_fader(ccValue);
		);

Code:
        slSlider1<=msg2<=slSlider8 ? (
This line checks if any of the faders were triggered by user, with the number that is within range of 16-23. Those numbers are transmitted by faders.

Code:
            ccValue = msg2 - 15;
This one takes CC value of the triggered fader and deducts a number, so that the resulting number would be 1-8, depending on which controller was moved.

Code:
            send_soft_fader(ccValue);
        );
Now, we initiate a function, which sends OSC action "f/action/%d/cc/soft" with a number 1-8 in place of %d, depending on which fader was moved.

I don't see any flaws in this code.



P.S. Thanks, Justin. It seems like memsets will still be needed for my script. Ok. That's fine with me.
I wish, though, that there wouldn't be any need of declaring the offset.

Does this method also means that one should use "mem_get_values(slSlider[1]" to read value instead of simple "slSlider[1]", for example?

Last edited by fundorin; 11-18-2017 at 02:50 PM.
fundorin is offline   Reply With Quote
Old 11-18-2017, 02:52 PM   #92
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by fundorin View Post
I don't see any flaws in this code.
I(f it's provided, that all slSlider.. values are different, no problem at all.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 11-18-2017, 03:03 PM   #93
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Quote:
Originally Posted by mschnell View Post
I(f it's provided, that all slSlider.. values are different, no problem at all.
Even if only two variables were declared in the init section (1 and 8), those rest values aren't needed for this code, cause incoming messages will match the declared range between 1 and 8.

Last edited by fundorin; 11-18-2017 at 03:11 PM.
fundorin is offline   Reply With Quote
Old 11-18-2017, 04:48 PM   #94
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Is there a way to run some code on midi port reopen?
I'm running a couple of commands at oscii-bot startup, which are shutting down all LEDs, switching the default mode, displaying text on LCD and other.
This all works when oscii-bot is started after the console.
But, if the console was turned on while oscii-bot is already running, one needs to active oscii-bot's window and press "script reload" button.
I'd prefer that the @init part of the script was executed each time when midi port is reopened. Is it possible?

Meanwhile, I'm trying to set the function running when SYSEX is received from the surface.

I know which sysex the surface is sending. Tracked it via midi-ox.
This is the one - "\xF0\x00\x20\x29\x03\x03\x12\x00\x02\x00\x01\x01\ xF7".
When I'm trying to log oscstr contents, this is the symbol that I'm getting: ð
With this code in @midimsg section:
Code:
printf("%s", oscstr);
What code should I use instead to display proper sysex message in console?

Last edited by fundorin; 11-18-2017 at 05:11 PM.
fundorin is offline   Reply With Quote
Old 11-19-2017, 01:00 AM   #95
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by fundorin View Post
Is there a way to run some code on midi port reopen?
This obviously would be viable.

As a workaround it might be possible to do some "ping" communication: Send a message in @timer - say any second - , receive the answer and react by setting some state, and in @time watch and reset that state.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 11-19-2017, 01:06 AM   #96
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by fundorin View Post
... "\xF0\x00\x20\x29\x03\x03\x12\x00\x02\x00\x01\x01\ xF7"....
this is the symbol that I'm getting: ð
The SysEX string you receive does not contain a single printable character. So you need to handle it's characters (bytes) in a binary way:

e.g. (for single bytes containing a value 0..127, as defined here -> http://www.gweep.net/~prefect/eng/re.../midispec.html ):

i = 0;
x = str_getchar(oscstr, i, 'cu');
...


(In fact I don't know what type 'c' is supposed to do (-64..+64 ???) , as seemingly any SysEX needs to have bit 7 = 0. I also don't know if/how the types larger than one byte will strip off the bits 7 from the multiple bytes ).
-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 11-19-2017 at 02:51 AM.
mschnell is offline   Reply With Quote
Old 11-19-2017, 04:29 AM   #97
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,797
Default

Quote:
Originally Posted by fundorin View Post
What code should I use instead to display proper sysex message in console?
If you want to display sysex in hex, you could use:

Code:
function format_hex(str_in) local(str_out, pos, len) ( 
  strcpy(str_out=#,""); 
  len=strlen(str_in);
  pos=0;
  while (pos<len) (
    strcat(str_out,sprintf(#,"%02x ",str_getchar(str_in,pos)));
    pos+=1;
  );
  str_setlen(str_out,strlen(str_out)-1); // returns str_out
);

printf("%s\n",format_hex(sysex_message));
(untested but ought to work...)
Justin is offline   Reply With Quote
Old 11-19-2017, 04:31 AM   #98
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,797
Default

Quote:
Originally Posted by fundorin View Post
Is there a way to run some code on midi port reopen?
Hmm yeah that's a good FR -- maybe add a @init_midi section which gets executed after @init, and after any other MIDI device reconnects... Edit: or better yet, a way to query the last open time for a device would be better.

Last edited by Justin; 11-19-2017 at 04:44 AM.
Justin is offline   Reply With Quote
Old 11-19-2017, 06:38 AM   #99
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Yeah. That would be nice.
Can I also ask for the right click menu of the tray button with the following options:

enable/disable oscii-bot
log osc in/out
log midi in/out
reload script
run at startup
run minimized
exit
fundorin is offline   Reply With Quote
Old 11-19-2017, 10:01 AM   #100
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

This is what I get in log window, using Justin's sysex convert function:



And this is the code that I'm using to print the word "sysex", when incoming OSC message is equal to the string from log.
The thing is that it doesn't work as it should. What am I missing here, guys?

Code:
@midimsg 
// logMidi();
sysex_message = oscstr;
printf("%s\n",format_hex(sysex_message));
format_hex(sysex_message) == "f0 00 20 29 03 03 12 00 02 00 01 01 f7" ? ( // React to this when console is turned on
    printf("sysex");
    // slStartup();
);
fundorin is offline   Reply With Quote
Old 11-19-2017, 01:59 PM   #101
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,797
Default

You can't use == for strings (except in certain instances but you shouldn't rely on that), you must use strcmp(#string,"value")==0.

BTW, I've updated https://cockos.com/oscii-bot/ with a git repository of oscii-bot source, with some changes since 0.5 (in case you have a compiler and want to use it before I can put together a release).
Justin is offline   Reply With Quote
Old 11-19-2017, 03:03 PM   #102
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

Could you, please, comment this code for me, cause I want to write an opposite function, which will convert osc string's parameters into hex, which would be then sent to the surface's LCD. I want to write it myself, but don't quite understand what's happening inside the function.

Code:
function format_hex(str_in) local(str_out, pos, len) ( 
  strcpy(str_out=#,""); 
  len=strlen(str_in);
  pos=0;
  while (pos<len) (
    strcat(str_out,sprintf(#,"%02x ",str_getchar(str_in,pos)));
    pos+=1;
  );
  str_setlen(str_out,strlen(str_out)-1); // returns str_out
);
Code:
  strcpy(str_out=#,"");
This line copies str_in contents into temp string, right?

Code:
  len=strlen(str_in);
This one counts the number of characters in str_in and used as the end of the while cycle?

Code:
pos=0;
This one sets the initial position for while cycle?

Code:
strcat(str_out,sprintf(#,"%02x ",str_getchar(str_in,pos)));
This one I don't quite understand, tbt. I feel like it's concatenating characters from temp string, one by one, to str_out string, converting them into (?) hex, cause %x is used in sprintf to convert into hex?

Code:
pos+=1;
Iterating through the characters of the temp string "#", till the number matches len?

Code:
str_setlen(str_out,strlen(str_out)-1); // returns str_out
Why do we need to use str_setlen function? Isn't str_out length already known to us and it should be 2(4?) times smaller than srt_in? Why -1?
fundorin is offline   Reply With Quote
Old 11-19-2017, 04:02 PM   #103
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by fundorin View Post
which will convert osc string's parameters into hex, which would be then sent to the surface's LCD.
Sorry I suppose some misconception here.

To move strings retrieved from OSC to Midi SysEX you don't need Hex.

You just need to copy the appropriate bytes. I.e. part of the source string to part of the target string, using strcpy_substr(), strcpy_from() or do a loop with str_getchar() and str_setchar().

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 11-19-2017, 04:20 PM   #104
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

I don't think that I understand you clearly.
For example, I have the following string: "s/track/name" with an argument "Legendary Track".
What I need is to construct the following sysex message and feed it to the surface:

\xF0\x00\x20\x29\x03\x03\x12\x00\x02\x00 //sysex header
\x02\x02\x01 // clear the line of the LCD (not exactly, but, though)
\x01\x017\x01 // set cursor position as character 17
\x04 // start text
{osc argument in hex}
\x00 //end text
\xF7 //sysex end

I would also need to check if argument's size is less than 8 characters. If more, all vowels and spaces should be removed. If string is still more than 8 characters, first 7 characters and the last one, if it's a number, should be converted to hex and sent to the controller.

P.S. Instead of clearing the whole line of the LCD, which is 144 characters long, with sysex command (second part of the message), I would first fill the place where the text should be displayed, with a string of spaces, like this " ", to clear it from the text that was displayed there before and send the actual text right after.

Last edited by fundorin; 11-19-2017 at 04:33 PM.
fundorin is offline   Reply With Quote
Old 11-19-2017, 10:41 PM   #105
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by fundorin View Post
all vowels and spaces should be removed.
That means that you need to work on each single character.

Hence (as I said in the previous message), you need to do a loop including something like

Code:
  c = str_getchar(oscstr, i, 'c');
  i += 1;
  ...
  ... ? (
    str_setchar(sysexstr, j, c, 'c');
    j += 1;
  );
-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 11-19-2017, 10:47 PM   #106
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by mschnell View Post
x = str_getchar(oscstr, i, 'cu');
...
(In fact I don't know what type 'c' is supposed to do (-64..+64 ???) , as seemingly any SysEX needs to have bit 7 = 0. I also don't know if/how the types larger than one byte will strip off the bits 7 from the multiple bytes ).
Silly me:
Of course here str_getchar does not know that it works on SysEX data, but is just a general string function. So the working of the type attribute is obvious ('c' -> -128 ... +127).

Hence to extract somthing else then unsigned bytes from SysEX, dedicated user code is needed to be done, handling the always zero upper bits of the bytes.

-Michael
__________________
www.boa-sorte.de

Last edited by mschnell; 11-20-2017 at 08:36 AM.
mschnell is offline   Reply With Quote
Old 11-20-2017, 03:36 AM   #107
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 124
Default

Quote:
Originally Posted by Justin View Post
BTW, I've updated https://cockos.com/oscii-bot/ with a git repository of oscii-bot source, with some changes since 0.5 (in case you have a compiler and want to use it before I can put together a release).
There are a couple of outstanding reliability bugs in OSCII-bot itself too if they could be dealt with as well? Thanks
See
1. https://forum.cockos.com/showthread.php?t=189074 (duplicate of https://forum.cockos.com/showthread.php?t=172325 )
and
2. https://forum.cockos.com/showthread.php?t=172324
goldenarpharazon is offline   Reply With Quote
Old 11-20-2017, 07:25 AM   #108
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

First one isn't a bug. It's, actually, a very handy behaviour.
There is tons of software which minimizes to tray via [x] close button.
fundorin is offline   Reply With Quote
Old 11-20-2017, 08:10 AM   #109
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,797
Default

Quote:
Originally Posted by goldenarpharazon View Post
There are a couple of outstanding reliability bugs in OSCII-bot itself too if they could be dealt with as well? Thanks
See
1. https://forum.cockos.com/showthread.php?t=189074 (duplicate of https://forum.cockos.com/showthread.php?t=172325 )
and
2. https://forum.cockos.com/showthread.php?t=172324
Yeah #1 is a feature, and #2 is now fixed in git. Edit: #2 also now fixed in v0.6.

Last edited by Justin; 11-20-2017 at 08:31 AM.
Justin is offline   Reply With Quote
Old 11-20-2017, 08:34 AM   #110
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,797
Default

Quote:
Originally Posted by fundorin View Post
Is there a way to run some code on midi port reopen?
In v0.6, just released:
Code:
(tmp = get_device_open_time(dev)) > dev_last_time ? (
  dev_last_time = tmp;
  printf("reinitializing dev\n"); // executes on initial open and any subsequent re-opens
  // ... midisend(dev);
);
Justin is offline   Reply With Quote
Old 11-20-2017, 08:43 AM   #111
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Quote:
Originally Posted by fundorin View Post
First one isn't a bug. It's, actually, a very handy behaviour.
It would be nice if minimizing could be triggered in an unattended system, e.g. via a command line parameter or a line in a script.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 11-20-2017, 08:53 AM   #112
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

In which section of the script should I put this code?
I want slStartup() function to run on midi port reopen.
When placed in to @init section, code run just once, on start of the oscii-bot, or when "script reload" is pressed.
Am I wrong, thinking that "dev" variable is an alias for device name? Tried leaving it as dev and renaming to my midi device in alias.

Code:
(tmp = get_device_open_time(midi_in)) > dev_last_time ? (
  dev_last_time = tmp;
  printf("reinitializing dev\n"); // executes on initial open and any subsequent re-opens
  slStartup();
  // ... midisend(dev);
);
fundorin is offline   Reply With Quote
Old 11-20-2017, 08:55 AM   #113
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,797
Default

Quote:
Originally Posted by fundorin View Post
In which section of the script should I put this code?
I want slStartup() function to run on midi port reopen.
When placed in to @init section, code run just once, on start of the oscii-bot, or when "script reload" is pressed.
Am I wrong, thinking that "dev" variable is an alias for device name? Tried leaving it as dev and renaming to my midi device in alias.

Code:
(tmp = get_device_open_time(midi_in)) > dev_last_time ? (
  dev_last_time = tmp;
  printf("reinitializing dev\n"); // executes on initial open and any subsequent re-opens
  slStartup();
  // ... midisend(dev);
);
@timer preferably
Justin is offline   Reply With Quote
Old 11-20-2017, 10:00 AM   #114
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

-del-
fundorin is offline   Reply With Quote
Old 11-20-2017, 11:42 AM   #115
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 124
Default

Quote:
Originally Posted by mschnell View Post
It would be nice if minimizing could be triggered in an unattended system, e.g. via a command line parameter or a line in a script.

-Michael
Verrei has already given a command line solution to this at
https://forum.cockos.com/showpost.ph...40&postcount=3
One could imagine doing the same with other "windows automation" type tools.
goldenarpharazon is offline   Reply With Quote
Old 11-20-2017, 02:50 PM   #116
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

I'm running nircmd from oscii-bot's folder with "oscii-bot minimized.cmd".
This is what's inside it:
"nircmd.exe exec hide OSCII-bot.exe"
Pretty simple trick.
fundorin is offline   Reply With Quote
Old 11-23-2017, 12:03 PM   #117
zacki
Human being with feelings
 
zacki's Avatar
 
Join Date: Feb 2013
Location: Germany
Posts: 124
Thumbs up

Quote:
Originally Posted by Justin View Post
Receiving SysEx: @midimsg, msg1/msg2/msg3 will be 0, oscstr will be set to the SysEx data (oscstr will be -1 if it's not a sysex)

Sending SysEx: use midisend_str(device,#sysexdata_as_string);
Thank you sooo much for implementing SysEx into OSCII-bot! I’ve been looking for so long on a way of building a gateway between a Yamaha 01V96 and an OSC-Device. So far my first tests with a script were very pleasing. Just for fun and for learning to better coding. Keep up the good work

__________________
Some of my favourite posts: 1 2 3 --- to be continued...

Last edited by zacki; 11-23-2017 at 12:28 PM. Reason: added gif
zacki is offline   Reply With Quote
Old 12-05-2017, 07:50 AM   #118
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 6,453
Default

Great !
The "OSC Dialogue" feature works perfectly for me, too.

-Michael
__________________
www.boa-sorte.de
mschnell is offline   Reply With Quote
Old 12-06-2017, 01:20 AM   #119
fundorin
Banned
 
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554
Default

How can one map ranges in EEL2?

My encoder sends values 1-24, when rotated clockwise and values 64-80 for counter clockwise.
I need the script to convert 1-24 range to 0.1-1 and 64-80 to minus 0.1-1, so that it would be possible to use acceleration of the encoder.

UPD. Solved with a straightforward method: take away 63 from the number in range 64-80, divide the result by 24 and change the sign to minus.
Anyway, r/scrub action doesn't support acceleration, and "Transport: Scrub/jog (MIDI CC relative/absolute only)" action isn't reacting properly, though I'm sending the values right. Does this action support values, other than 1?

UPD2. The following settings solved my issue with r/scrub action sensitivity. Though the jog function is absent, I can now simply divide value by greater numbers to get the needed sensitivity for the jog mode of the encoder.
https://i.imgur.com/XiZ7Uxa.png

UPD3. Aaaand it doesn't work like it should. I don't understand the behavior. It seems like faster rotation of the encoder gives more precise scrubbing/jogging. According to Reaper's log, lower values move cursor faster.
I'm going to read the manual about scrub/jog settings, cause this logic doesn't seem right to me.

UPD4. Seems like this scrub issue is more than three years old - https://forum.cockos.com/showthread.php?t=139051
Another issue from 2012 (post #33) - https://forum.cockos.com/showthread.php?t=98673

Last edited by fundorin; 12-06-2017 at 01:55 PM.
fundorin is offline   Reply With Quote
Old 12-07-2017, 05:49 AM   #120
goldenarpharazon
Human being with feelings
 
Join Date: Feb 2016
Posts: 124
Default

Anything to be learnt from Banned's Peavey StudioMix script or its users?

Banned tries a scrub approach in EEL2 code that maybe wasn't functionally what was wanted (perhaps the issues you are finding or similar?) then "avoiding the scrubbing function altogether, using a set of REAPER actions to move the playback cursor"
goldenarpharazon 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:11 AM.


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