Go Back   Cockos Incorporated Forums > Other Software Discussion > OSCII-bot forum

Reply
 
Thread Tools Display Modes
Old 03-26-2014, 04:40 PM   #81
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

Like. Thanks for the update/port Banned!
Jeffos is offline   Reply With Quote
Old 03-27-2014, 04:59 PM   #82
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Jeffos View Post
Like. Thanks for the update/port Banned!
You're very welcome. I have already used your script to create workarounds for two different issues where REAPER have hardware sending 'problematic' NRPNs (see here and here). Without it, I probably wouldn't even have tried to do that using OSCII-bot. So a big thanks to yourself again!

Btw, especially when converting MIDI input to MIDI output, it seems useful to have *two* sets of msg1, msg2, msg3 'special' vars in OSCII-bot, so you could use one set for parsing MIDI input, and the other for constructing MIDI output. Now, whenever you construct a MIDI message, you lose the last incoming message, so you'd have to store its values manually, copying back and forth. So how about adding something like msg1out, msg2out, msg3out? Does that make sense?
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 04-16-2014, 08:27 AM   #83
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Veto View Post
But i can only get it to work from track 1-8, probably only a config thing.
Quote:
Originally Posted by Veto View Post
[...] values equivalent to the selected track number (currently only between 1-8, has something to do with the Track Bank i feel)
Yes, probably. In the .ReaperOSC configuration file you use (*not* the Default.ReaperOSC file !!!), change the number of tracks that make up a 'bank':
Code:
DEVICE_TRACK_COUNT 8
... to something like:
Code:
DEVICE_TRACK_COUNT 1024
(or more, if you're that kind of guy. )
Quote:
Originally Posted by Veto View Post
I was wrong, string to int conversion is not needed. [...]
Hmm, the workaround you use (looking at the 'binary' message patterns) sort of works, but not in corner cases (e.g. with multiple selected tracks, unselecting the last selected track, it does not show the last selected track anymore...). I figure it would needs something like a stack to remember the order in which tracks have been selected to make it bug-proof.

But, in any case, I still would like to know how to get an integer value from a numeric parameter value sent as a string... because that's also what I want to do in OSCII-bot (v0.2) scripts, but I can't seem to figure out how to do so.

As with LugNut/Veto's example above, the more general issue is that REAPER's OSC Console Surface feature outputs some important *numeric* values as *strings*: e.g. last selected track number, track bank number, parameter bank number, last touched effect track number, last touched effect slot number. (Afaik we're not able to get these numbers as int (or float) values directly. This seems to be by design; I would suppose it is to accommodate displaying the values in e.g. OSC control apps for touch screen devices. Perhaps I should also request some enhancements to the OSC Control Surface implementation, but I guess that's a separate issue...)

Can anyone show some simple example code for OSCII-bot that extracts an int value from a string (which contains only that value), sent as parameter of an OSC message by REAPER? For example, for this action description / pattern (as in Default.ReaperOSC):
Code:
TRACK_NUMBER s/track/number/str
There are some comments in Justin's sample_script.txt example (included in OSCII-bot v0.2 download) which seem relevant:
@oscmsg
Quote:
// oscparm(x,v) will get parameter value x, setting v to $'f', $'i', $'s', or 0 if invalid, etc. if $'s', you can get individual chars from the string using ((str_offs<<16) + parm_idx)
... which seems to be what I need, but I can't seem to figure out how to actually use this to extract an int value from a parameter which is (formatted as) a string. Can anyone give a little demonstration?

Btw:
Quote:
Originally Posted by Justin View Post
[...] in pre9 you can now embed/extract raw (and optionally big-endian) ints/shorts/floats/doubles as floats as well... [...]
I guess OSCII-bot does not have something like this (yet)?
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 04-17-2014, 06:17 PM   #84
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Banned View Post
Quote:
@oscmsg
// oscparm(x,v) will get parameter value x, setting v to $'f', $'i', $'s', or 0 if invalid, etc. if $'s', you can get individual chars from the string using ((str_offs<<16) + parm_idx)
Ok, I figured some of this string stuff out... and now have a little script that can be used to monitor the OSC output from REAPER, which is quite cool for debugging:

Code:
///////////////////////////////////////////////////////////////////////////////
// ReaperOSC-Log.txt
// (by Banned)
// v0.1
// script for OSCII-bot v0.2
// For logging the output of an 'OSC Control Surface' configuration from REAPER
///////////////////////////////////////////////////////////////////////////////

// Use an OSC Control Surface configuration in REAPER which is 
// configured to *send* OSC messages to this network address/port:
@input localhost OSC "localhost:9000" // localhost = 127.0.0.1 (IPv4)

@oscmsg 
oscmatch("*") ? (
    fmt0 = oscstr;
    printf("\n[OSC output from REAPER] %s");
    
    x = 0; // reset: parameter value number
    v = 0; // reset: parameter value type
    while(
        // oscparm(x,v) will get parameter value x, setting v to $'f', $'i', $'s', or 0 if invalid, etc.
        fmt0 = oscparm(x,v);
        
        x && v ? printf(", "); // when multiple values are received, add a comma between the values
        
        v == $'f' ? printf(" [f] %f"); // $'f' = 102 (ascii) = float type parameter value
        
        v == $'i' ? printf(" [i] %d"); // $'i' = 105 (ascii) = int type parameter value
        
        // you would expect that this one-liner would work, too; but unfortunately, it does not... :(
//      v == $'s' ? printf(" [s] %s"); // $'s' = 115 (ascii) = string type parameter value
        
        // ... so we have to get the characters in the string one by one :(
        v == $'s' ? (
            printf(" [s] "); // $'s' = 115 (ascii) = string type parameter value
            
            // if $'s', you can get individual chars from the string using ((str_offs<<16) + parm_idx)
            str_offs = 0; // reset offset to start at first character in string
            oscparm_val_str = ""; // reset: create empty string to copy in characters one by one
            while(
                fmt0 = oscparm((str_offs<<16) + x, s); // get an individual character from the string
            //  fmt0 ? printf("%c"); // print string, one ascii character at a time
                fmt0 ? str_setlen(oscparm_val_str, (strlen(oscparm_val_str)+1)); // increase string length by one character
                str_setchar(oscparm_val_str, str_offs, fmt0); // copy another character into string
                str_offs += 1; // increment offset: move to next character in string
                fmt0; // return character (0 = string termination)
            );
            
            fmt0 = oscparm_val_str;
            printf("%s"); // now we finally have the entire string, print it
            
            // THIS PART DOES NOT WORK !?!
            // if the string contains an integer numeric value, print it
//          matchi("*%d*", oscparm_val_str) ? printf("\n==> parameter value is formatted as string, but contains a numeric value: %d");
        );
        
        x += 1; // next parameter value
        v; // return parameter value type (0 = invalid, last parameter value reached on previous loop cycle already)
    );
);
However, I'm still stuck at the end: I'm failing to get an int (or float) value from the string using matchi(), see line 54 (commented out). This now only gives me a single digit, the last one found in the string. I would have expected that I can get integer numbers of multiple digits into the fmt0 variable like this too, though (since that's how it seems to work with oscmatch(), which aliases to matchi(parm, oscparm). Can anyone help out and tell me what I'm missing here?

(Also, any other suggestions for improvements are very welcome!)
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ

Last edited by Banned; 04-17-2014 at 09:03 PM.
Banned is offline   Reply With Quote
Old 04-18-2014, 11:09 AM   #85
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Ok, I think I finally got it, much thanks to ijijn's hint here.

Here's what I did (the commented out part between /* and */ now does what I wanted to achieve):
Code:
///////////////////////////////////////////////////////////////////////////////
// OSC-input-logger.txt
// (by Banned)
// v0.2
// script for OSCII-bot v0.2
///////////////////////////////////////////////////////////////////////////////

// For logging the output of an 'OSC Control Surface' configuration from REAPER,
// make sure that it sends OSC messages to the network address/port defined here:
@input localhost OSC "localhost:9000" // localhost = 127.0.0.1 (IPv4)

@oscmsg 
oscmatch("*") ? (
    fmt0 = oscstr;
    printf("\n[OSC input] %s"); // print OSC message address (without parameters; see below)
    
    x = 0; // reset: parameter value number
    v = 0; // reset: parameter value type
    while(
        // oscparm(x,v) will get parameter value x, setting v to $'f', $'i', $'s', or 0 if invalid, etc.
        fmt0 = oscparm(x,v);
        
        x && v ? printf(", "); // when multiple values are received, add a comma between the values
        
        v == $'f' ? printf(" [f] %f"); // $'f' = 102 (ascii) = float type parameter value
        
        v == $'i' ? printf(" [i] %d"); // $'i' = 105 (ascii) = int type parameter value
        
        // you would expect that this one-liner would work, too; but unfortunately, it does not... :(
//      v == $'s' ? printf(" [s] %s"); // $'s' = 115 (ascii) = string type parameter value
        // ... so we have to get the characters in the string one by one :(
        v == $'s' ? (
            printf(" [s]"); // $'s' = 115 (ascii) = string type parameter value
            
            // if $'s', you can get individual chars from the string using ((str_offs<<16) + parm_idx)
            str_offs = 0; // reset offset to start at first character in string
            strcpy(oscparm_val_str, ""); // reset: create empty string to copy in characters one by one
            //oscparm_val_str = ""; // reset: create empty string to copy in characters one by one
            while(
                fmt0 = oscparm((str_offs<<16) + x, s); // get an individual character from the string
            //  fmt0 ? printf("%c"); // print string, one ascii character at a time
                fmt0 ? str_setlen(oscparm_val_str, str_offs+1); // increase string length by one character, padding with space
                str_setchar(oscparm_val_str, str_offs, fmt0); // copy another character into string
                str_offs += 1; // increment offset: move to next character in string
                fmt0; // return character (0 = string termination)
            );
            
            fmt0 = oscparm_val_str;
            strlen(oscparm_val_str) ? printf(" %s"); // now we finally have the entire string, print it (if its length is not 0)
/*          
            // THIS PART DOES NOT QUITE WORK AS EXPECTED...
            // if the string contains a numeric value, print it (NB: this misses numbers preceded by '.' in the string; e.g. track name is "Instr. 15")
            // THIS GIVES THE USER STRING SLOT NUMBER :(
//          matchi("*+f*", oscparm_val_str) ? printf("\n==> parameter value is formatted as string, but contains a numeric value: %f\n");
            // THIS MISSES THE SIGN FOR NEGATIVE VALUES :( -- but it's good enough for unsigned values
//          matchi("*?%f*?", oscparm_val_str) ? printf("\n==> parameter value is formatted as string, but contains a numeric value: %f\n");
            
            matchi("*?-*?%f*?", oscparm_val_str) ? ( // first, try to match for a negative value (i.e. directly preceded with '-' character)
                fmt0 *= -1; // apply negative sign
                printf("\n==> parameter value is formatted as string, but contains a numeric value: %f");
            ) : ( // else, just try to match a value
                matchi("*?%f*?", oscparm_val_str) ? printf("\n==> parameter value is formatted as string, but contains a numeric value: %f\n");
            );
*/      );
        
        x += 1; // next parameter value
        v; // return parameter value type (0 = invalid, last parameter value reached on previous loop cycle already)
    );
);
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ

Last edited by Banned; 04-18-2014 at 12:29 PM.
Banned is offline   Reply With Quote
Old 04-22-2014, 07:49 AM   #86
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,115
Default

OSCII-bot 0.3 is up, with all of the modernized string support from JSFX. It also has mutable literal strings (unlike JSFX), and some other goodies that ended up in ReaScript/EEL, such as eval() support:

Code:
#foo = "var = ";
#foo += "32";
eval(#foo); // var = 32
Also included is tcp_connect(), gfx_init(), etc. I need to make OSCII-bot generate documentation too... Maybe for 0.31.

Edit: here's some documentation: http://www-dev.cockos.com/oscii-bot/oscii-bot-doc.html (updated with string info)

Last edited by Justin; 04-22-2014 at 09:23 AM.
Justin is offline   Reply With Quote
Old 04-22-2014, 12:49 PM   #87
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Justin View Post
OSCII-bot 0.3 is up, with all of the modernized string support from JSFX. It also has mutable literal strings (unlike JSFX), and some other goodies that ended up in ReaScript/EEL, such as eval() support:

Code:
#foo = "var = ";
#foo += "32";
eval(#foo); // var = 32
Also included is tcp_connect(), gfx_init(), etc. I need to make OSCII-bot generate documentation too... Maybe for 0.31.

Edit: here's some documentation: http://www-dev.cockos.com/oscii-bot/oscii-bot-doc.html (updated with string info)
Oh, some cool stuff there! Thanks!!

I just made some string related functions, but I can now probably throw them out again.

Adding the ability to create custom GUIs from OSCII-bot scripts is excellent; I was going to suggest that - and not only because console logging can be pretty harsh on the CPU. Pretty cool demo script showing I/O there, too (although not quite readable, hehe). Will definitely need to dive deeper into that stuff...

Would it perhaps make sense to add something like the @slider stuff from JS's generic UI, too? That may be an easier (although less flexible, of course) approach to adding some visual feedback and/or control to the user.

The OMNI snooping thing looks quite useful, too.

A little suggestion: when pressing the escape key, OSCII-bot quits (at least, on my Mac it does). Imho it should be slightly more persistent.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ

Last edited by Banned; 04-22-2014 at 12:55 PM.
Banned is offline   Reply With Quote
Old 05-07-2014, 10:04 AM   #88
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Banned View Post
I just made some string related functions, but I can now probably throw them out again.
Actually, good thing I didn't, as I still very much need them. I did rewrite them a bit using the new features in v0.3, though, while getting a bit more comfortable with the syntax.
Quote:
Originally Posted by Banned View Post
Adding the ability to create custom GUIs from OSCII-bot scripts is excellent; I was going to suggest that - and not only because console logging can be pretty harsh on the CPU. Pretty cool demo script showing I/O there, too (although not quite readable, hehe). Will definitely need to dive deeper into that stuff...
I have been playing with the "show-io.txt" demo script a bit, it was quite useful to learn a bit about the gfx* features.

While this was mainly an exercise just for fun, I have also adapted it a bit, hopefully enhancing its usefulness for other purposes than simple demonstration (= profit!). In doing so, I have removed a bit (but not all!) of the fun graphics stuff - so it is definitely not intended as a replacement for it. Check out my MonitorMIDI+OSC-IO.txt script here.

The main things that I thought made sense to add, were:

- (Most importantly): display not only the address of OSC messages, but also their parameter(s) value(s) and type(s);

- Creating some user defined functions for getting parameter values as strings (to help with the above), which seems to be quite fundamental to parsing OSC messages;

- An adapted layout, with different message types on separate 'lines', which seems more suitable for visualizing MIDI to OSC / OSC to MIDI conversion; the line for MIDI input is displayed at the top, followed by OSC output, then OSC input, and finally MIDI output. This way you can more easily see both what comes in and what goes out, both for MIDI and OSC.

- Color coding - just because it's awesome. Things were getting a bit too much old school monochrome terminal.

- When receiving many messages in a short time span (e.g. on action to 'refresh' all console surfaces), the messages were pasted on top of previous ones, which frustrated readability. As a quick and dirty solution (which works ok in most cases, less so for some larger fonts / font sizes), a filled black rectangle is now drawn over a line before drawing a new message on the same line. However, since it also seems useful to somehow be able to see that there are multiple messages arriving in a short time, I chose to make it slightly transparent.

- I added a timer/counter to the fade-to-black effect, so the speed can be tweaked (i.e. slowed down), and enhanced it with a bit of blurring: frustrating readability just enough to be fun, while still being somewhat useful -- but sorry, the rotation and resize blitting just *had* to go...
Quote:
Originally Posted by Banned View Post
The OMNI snooping thing looks quite useful, too.
Although indeed *very* useful, the downside to this approach seems to be that it seems to be impossible to see which device any specific message is going to / coming from (please correct me if I'm wrong!).

For example, since I wanted to display MIDI messages in a more human readable format (e.g. "[MIDI input] Channel 5 CC#7 value: 100") than raw bytes (which of course do not provide much additional information, since we already have OSCII-bot showing those in the bottom left corner), I initially intended to integrate the sophisticated 14 bit CC# pairs / (N)RPN message parsing from JeffOS' MIDI2OSC script into this one.

But then I soon realised that in order to reliably parse such messages consisting of multiple parts, we would need to be able to discriminate between originating devices. For example, when receiving value almost simultaneously for channel 1, CC# 7 from one device and channel 1, CC# 39 from another device, the script (in hi-res mode) could (incorrectly) interpret them as a single pair of MSB/LSB CC# messages to make up one 14-bit value, because we can't tell which device was the source of the individual messages.
Quote:
Originally Posted by Banned View Post
A little suggestion: when pressing the escape key, OSCII-bot quits (at least, on my Mac it does). Imho it should be slightly more persistent.
Somewhat related: conversely, OSCII-bot does *not* quit when a GUI window created by a script has focus. I guess it would make sense to always pass computer keyboard commands like CMD+Q (Mac) / ALT+F4 (Windows) on to the main app window (another one: CMD+` does work to cycle from the main window to the first script window, but then stops working, so you can't cycle through all of the application windows). Also, GUI windows created by a script can't be closed or minimized using the usual OS-specific keyboard shortcuts. Shouldn't they?

---

Some remarks about the current implementation/documentation:

- Is gfx_update() perhaps called *automatically* in the @timer section? The documentation mentions: "Once the graphics window is open, gfx_update() should be called periodically." However, the graphics functions seem to work just fine without doing so, and calling gfx_update() in fact results in a syntax/compile error. :-/

- I can't seem to get gfx_getchar() to work either. Am I missing anything, or is it perhaps bugged / not yet implemented? For example, this code (placed in the @timer section, or anywhere else) seems to do absolutely nothing (regardless of which window has focus):
Code:
char = gfx_getchar() ? printf("%c", char);
- While this hardly surprising, it isn't quite self-evident that the graphics coordinate system starts at the top of the window with x = 0, and y = 0 at the left. (I pretty much typed all the code I thought I needed for drawing VU meters before testing to see if it actually worked, only to find out that it worked *almost perfectly: it was upside down. ) I figure that deserves to be mentioned somewhere.

- The reference for gfx_setfont() mentions: "After calling gfx_setfont(), gfx_texth may be updated to reflect the new average line height." Wouldn't it be more useful to have something like gfx_texth to reflect the *maximum* line height? (Or is there perhaps another easy way to find that out?)

- Imho it would be pretty useful if we could get the window dimensions, and set the GUI window position in relation to the screen. Currently, when creating multiple GUI windows, they always seem overlap on (re)loading scripts.

- I managed to crash or hang OSCII-bot a couple of times on loading scripts with invalid syntax. Will email in some sample code and (OS X) crash reports to support later.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-07-2014, 10:26 AM   #89
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default VU meter script

Here's another script for OSCII-bot v0.3, which may be useful for demonstration (of how OSC message parsing, OSC to MIDI conversion, and custom GUI drawing can be done using OSCII-bot), or perhaps even actual use (e.g. if you have a spare screen at the other end of your recording room, something like this could be useful): VUmeters.txt. The .zip download also includes a .ReaperOSC configuration file for REAPER's OSC Control Surface feature, optimised to use with this script (the Default configuration should also work just fine, though).

As the name suggests, this script draws a bunch of VU meters on the screen (with track names / numbers) and absolute or musical time as a bonus. The number of meters can be configured, and the window allows resizing so you can make them any size you want. The meter color goes from green to yellow to red over certain levels - but can also be configured to use trippy rainbow colors instead.

The script can also send MIDI CC# out, so if you have a MIDI controller with a bunch of LEDs or other visual value indicators, you can use it as a VU meter strip as well (tested on my BCR-2000, but should be able to work with most MIDI controllers; not yet optimized though, so be aware that it may sends a *lot* of MIDI data!). Or maybe control a light show with it...
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-07-2014, 10:30 AM   #90
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by EcBaPr View Post
if anyone is skilled with scripting i was wondering if they could write me a script for oscii-bot ?
Here's a little script that should - hopefully - do what you want. See the comments inside for some hints regarding setup and configuration, I hope it makes enough sense to figure out what to do. Of course just ask if anything is unclear, doesn't work, etc. Cheers!
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-07-2014, 11:23 AM   #91
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default MIDI to Virtual Keyboard script

And yet another script that may be useful for demonstration and/or actual use: MIDItoVKB.txt. This .zip download also includes a .ReaperOSC configuration file for REAPER's OSC Control Surface feature, optimised to use with this script (again, the Default configuration should also work just fine).

This script takes MIDI from the configured input(s), and sends it to REAPER as OSC messages, where it arrives as MIDI again at the Virtual Keyboard. This e.g. allows you to send MIDI from one system to another system running REAPER over the local network. I'd figure this would also be a good starting point for a script to process MIDI before hitting REAPER (e.g. change MIDI channel, invert note velocity, convert velocity to CC#, etc.). Perhaps useful for porting some JS MIDI effects to the world outside of REAPER ( / ReaJS, which unfortunately doesn't exist on OS X, afaik).
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 05-07-2014, 12:28 PM   #92
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,115
Default

Quote:
Originally Posted by Banned View Post
- Is gfx_update() perhaps called *automatically* in the @timer section? The documentation mentions: "Once the graphics window is open, gfx_update() should be called periodically." However, the graphics functions seem to work just fine without doing so, and calling gfx_update() in fact results in a syntax/compile error. :-/
Sorry, yes, the docs are wrong (gfx_update() is used by some other EEL/gfx related things, I should remove it from the OSCII-bot docs).
Quote:
- I can't seem to get gfx_getchar() to work either. Am I missing anything, or is it perhaps bugged / not yet implemented? For example, this code (placed in the @timer section, or anywhere else) seems to do absolutely nothing (regardless of which window has focus):
Code:
char = gfx_getchar() ? printf("%c", char);
Try this:
Code:
(char = gfx_getchar()) > 0 ? printf("%c", char);
(your code was parsed as: char = (gfx_getchar() ? printf("%c", char)); which is not what you want)

Quote:
- While this hardly surprising, it isn't quite self-evident that the graphics coordinate system starts at the top of the window with x = 0, and y = 0 at the left. (I pretty much typed all the code I thought I needed for drawing VU meters before testing to see if it actually worked, only to find out that it worked *almost perfectly: it was upside down. ) I figure that deserves to be mentioned somewhere.
This is standard for most Windows and Linux systems, but I guess OS X is the exception...
Quote:
- The reference for gfx_setfont() mentions: "After calling gfx_setfont(), gfx_texth may be updated to reflect the new average line height." Wouldn't it be more useful to have something like gfx_texth to reflect the *maximum* line height? (Or is there perhaps another easy way to find that out?)
Or it should just be "the line height".

Quote:
- I managed to crash or hang OSCII-bot a couple of times on loading scripts with invalid syntax. Will email in some sample code and (OS X) crash reports to support later.
I look forward to these!
Justin is offline   Reply With Quote
Old 05-07-2014, 12:57 PM   #93
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by Justin View Post
Try this:
Code:
(char = gfx_getchar()) > 0 ? printf("%c", char);
(your code was parsed as: char = (gfx_getchar() ? printf("%c", char)); which is not what you want)
Oh, I see.. I was expecting it to be something simple like that. I'm such a noob. Thanks, that code works as expected.

The next question, then, would be if it is somehow possible to capture keyboard input even when a script window does not have focus? For example, when using OSCII-bot in conjunction with REAPER, I'm assuming the user would typically have focus on a window belonging to REAPER, but may want to use some keys to control an OSCII-bot script. Since I am guessing this is not currently possible, please consider this as another FR.
Quote:
This is standard for most Windows and Linux systems, but I guess OS X is the exception...
Yeah - Apple either doesn't really know what they want, or came around, apparently: iOS does it one way, OS X another. I guess I must have been doing OS X the last time I was using x/y coordinates.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ

Last edited by Banned; 05-07-2014 at 01:06 PM.
Banned is offline   Reply With Quote
Old 09-16-2014, 09:39 AM   #94
Celphor
Human being with feelings
 
Join Date: Jan 2013
Location: Austria
Posts: 53
Thumbs up MIDI reconnect and init

Hi,

first of all: What a great and nifty tool! That what was I am looking for. Thank you very much Justin!

I have some questions:

1) When a device is connected after startup (or reconnected), how can I manage to initialize it correctly? I don't see a way to place a callback or hook function.

2) Can the program be started in background/deamon mode? If I close the window it will go to background. Is there a command line switch to achive this?

3) Can the gfx window be frame/borderless? I'm thinking of a function like the volume bar on a TV that's popping up shortly when making a change.

Thanks in advance and happy hacking OSC ;-)
Celphor is offline   Reply With Quote
Old 09-21-2014, 12:55 AM   #95
Tronic
Human being with feelings
 
Join Date: Jan 2012
Posts: 91
Default

Sorry to ask this, but no future update with support for midi sysex messages?
Tronic is offline   Reply With Quote
Old 09-28-2014, 01:11 AM   #96
Celphor
Human being with feelings
 
Join Date: Jan 2013
Location: Austria
Posts: 53
Default Sysex

I need this too. I will take a look if I can add support for it
Celphor is offline   Reply With Quote
Old 09-28-2014, 01:56 PM   #97
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 51
Default

I just started dabbling with oscii-bot. I am interested in getting a BCR2000 to work as a dedicated plugin parameter interface, with working parameter feedback. I envision the BCR to have a static layout with controls for my favorite plugins (e.g. EQ, Compressor, etc), and it should control the plugins of the last touched/selected track.

Using the excellent monitor script by Banned I can see what messages Reaper sends out to the control surface, and I notice that Reaper does not automatically send out the values of the plugin parameters when a different track is selected.
This means that the control surface will not synchronize its indicators (e.g. the LED rings on the BCR) and its current values to the values of the plugin until the knobs are actually turned, causing the values to jump to whatever the control surface had stored for that value.

How is this supposed to work? Should the OB script explicitly query all relevant plugin parameters when a new track is selected if that is even possible? Or is there a smarter/simpler way to get Reaper so send the current parameter values?

Maybe I am looking at this the wrong way, I have only just started looking at using OSC in Reaper.
Any help is much appreciated.

Last edited by dixo; 09-28-2014 at 02:39 PM.
dixo is offline   Reply With Quote
Old 09-29-2014, 04:02 AM   #98
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by dixo View Post
How is this supposed to work? Should the OB script explicitly query all relevant plugin parameters when a new track is selected if that is even possible? Or is there a smarter/simpler way to get Reaper so send the current parameter values?.
Hi dixo,

What you describe is (more or less) possible (I'm occasionally using a BCR-2000 like that myself); the behavior depends on what configuration you're using for the OSC Control Surface setup. Note that you are now dealing with *multiple* selections: one for REAPER, and one for the control surface. Flexible as this may be, it sounds like you would want to change the "DEVICE_FOLLOWS" setting to "REAPER", so one follws the other - perhaps that makes most sense to you, at leat initially. Read the comments in the Default.ReaperOSC file for more info and related settings.

Glad to hear the logging script is useful to you, btw. But, as a disclaimer: I'm not 100% certain one can say that REAPER isn't sending something only because the script fails to show it.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 09-29-2014, 05:46 AM   #99
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 51
Thumbs up

Hi Bannned,

Thanks for your reply. I am currently studying the script you wrote for the Peavey StudioMix, that teaches me a lot about what can be done with oscii-bot.

Quote:
Originally Posted by Banned View Post
Note that you are now dealing with *multiple* selections: one for REAPER, and one for the control surface. Flexible as this may be, it sounds like you would want to change the "DEVICE_FOLLOWS" setting to "REAPER", so one follws the other - perhaps that makes most sense to you, at leat initially. Read the comments in the Default.ReaperOSC file for more info and related settings.
I am not completely sure that I fully understand what you are saying here.
The setup that I hope to create is as follows:
- I will use a Icon Qcon Pro as my main control surface. It has the motorized faders, transport controls, jog, scribble strips etc. Initially I will probably try to get it working with either the native mode (the Qcon has a Reaper mode in the latest firmwares!) or the Klinke MCU dll but maybe one day I'll try to write an oscii-bot script like you did for the StudioMix to get greater control over the behaviour.
- The BCR2000 will be dedicated to control my most used plugins (Eq, some synths, compressors, reverb, etc). When I select a track in Reaper, or by pressing the select button on the Qcon, the BCR should show the plugin parameter settings for that track, and control them. This would reduce the navigation between various plugins: all important parameters of my favourite ones are available at the same time. It also allows me to label the knob assignments using tape or paper overlays, the assignment is static.
The mapping of MIDI CC's from the BCR to the actual FX parameter OSC strings (and vice versa) should be handled by the script. No clue yet how complex that would be, and how static or dynamic that mapping actually is (e.g. not sure if the order of my favourite plugins would always be the same for all my tracks...).
- Eventually I may want to add a tablet with TouchOSC or similar to add display features and maybe interface to other plugins that I use less often (e.g. exotic VSTi synths).

Does this make sense? And do you see fundamental problems implementing it?

Quote:
Originally Posted by Banned View Post
Glad to hear the logging script is useful to you, btw. But, as a disclaimer: I'm not 100% certain one can say that REAPER isn't sending something only because the script fails to show it.
If the logging script does not catch those events, wouldn't that mean that any osc-to-midi script I would write would miss them too?

Again, thanks for your reply and all the example code you have already written, that really helps a lot!

Regards,
Dixo
dixo is offline   Reply With Quote
Old 09-29-2014, 08:05 AM   #100
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 51
Default

Quote:
Originally Posted by Banned View Post
Note that you are now dealing with *multiple* selections: one for REAPER, and one for the control surface. Flexible as this may be, it sounds like you would want to change the "DEVICE_FOLLOWS" setting to "REAPER", so one follws the other - perhaps that makes most sense to you, at leat initially. Read the comments in the Default.ReaperOSC file for more info and related settings.
Thinking about this some more I think I may start to see what you are getting at. I was under the impression that Reaper always was the central authority on track selections, and that a control surface could send a message to ask Reaper to select a track, which Reaper would then communicate back to all control surfaces. So, Reaper being the central entity controlled and reflected by all control surfaces. Are you saying that it works differently, and that Reaper and control surfaces can have an independent and thus different notion of track selection?
It seems that there are still a lot of concepts that I can't wrap my head around yet...

Regards,
Dixo
dixo is offline   Reply With Quote
Old 09-29-2014, 08:07 AM   #101
Celphor
Human being with feelings
 
Join Date: Jan 2013
Location: Austria
Posts: 53
Default

Hi,

you have to check these variables in the selected OSC property file and set it to the right amount your controller supports:

DEVICE_FX_COUNT 8
DEVICE_FX_PARAM_COUNT 16
DEVICE_FX_INST_PARAM_COUNT 16

You should see messages in the log starting with fx or fxinst for the selected track or track/@/fx(inst) if you use bank switching
Celphor is offline   Reply With Quote
Old 09-29-2014, 09:12 AM   #102
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 51
Default

Ok, so what seem to I understand so far is that Reaper can communicate simultaneously with multiple control surfaces that all have their own bank sizes (for tracks, effects, fx parameters etc.). These devices can send bank select commands to select a different group of tracks etc. Reaper then maps the track/fx/param number within that bank to its own internal notion, independently for each surface. So, track 9 in Reaper can be track 1, bank 2 on a 8-fader surface and track 3, bank 2 on a 6-fader surface and Reaper will keep track of the current mapping for each surface. Is that right, or am I completely mistaken now?

When selecting a track in Reaper that is not in the current bank of the device, will Reaper suppress any events for that track to the device, or will it send the proper bank select to select the track on the device? Or is this controlled by the "Reaper follows device/Device follows Reaper" setting?
It looks like I need to do some experiments...

My apologies for all the questions, there is so much I don't understand and so much to learn. Thanks for all the information!

Regards,
Dixo
dixo is offline   Reply With Quote
Old 09-29-2014, 11:12 AM   #103
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by dixo View Post
Ok, so what seem to I understand so far [...]. Is that right, or am I completely mistaken now?

[...]
Exactly right! Seems like you're wrapping your head around some important concepts already, just keep going.
Quote:
Originally Posted by dixo View Post
It looks like I need to do some experiments...

My apologies for all the questions, there is so much I don't understand and so much to learn. Thanks for all the information!
Feel free to ask, but indeed, at this point I'd recommend - more than anything else - to just do some experimenting while (re-)reading the comments in the default config file.
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 09-29-2014, 11:24 AM   #104
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by dixo View Post
I am currently studying the script you wrote for the Peavey StudioMix, that teaches me a lot about what can be done with oscii-bot.
Cool. Similarly, learning what OSCII-bot can do was my excuse for writing it, heh. Note that some parts of it are specificly intended for testing on a BCR-2000, as that was what I use(d) or testing it - as I don't even have a StudioMix myself. I should perhaps create a similar script to demonstrate a basic setup that people can customize a bit, specifically for the BCR-2000...
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 10-01-2014, 01:12 AM   #105
Celphor
Human being with feelings
 
Join Date: Jan 2013
Location: Austria
Posts: 53
Default

Quote:
Originally Posted by dixo View Post
So, track 9 in Reaper can be track 1, bank 2 on a 8-fader surface and track 3, bank 2 on a 6-fader surface and Reaper will keep track of the current mapping for each surface. Is that right, or am I completely mistaken now?
Dixo
Absolutly correct.

Quote:
Originally Posted by dixo View Post
When selecting a track in Reaper that is not in the current bank of the device, will Reaper suppress any events for that track to the device, or will it send the proper bank select to select the track on the device?
Dixo
No. The data for the current track is always sent with no regard if it's in the selected bank or not. This data starts with track/... only while the data for the tracks in the bank start with track/<tracknumber>/...

You have to select the bank via an OSC-send from OSCII-bot.
Celphor is offline   Reply With Quote
Old 10-01-2014, 01:24 AM   #106
Celphor
Human being with feelings
 
Join Date: Jan 2013
Location: Austria
Posts: 53
Default Sysex

As discussed earlier in this thread, sysex support is urgently required to make OSCII-bot the perfect tool.

I extended it for myself to allow sysex sending. This is an easy task when using a string.

To receive sysex I need a special section (like @sysex). Easy too. What I didn't find out is the how to map data from C++ to the EEL memory.
I could put the data in a string, but that's not working, because strings are NULL-terminated in EEL.

Does anybody now how to achieve this? :

@sysex

// Data is stored in memory at sysexmsg and length in sysexmsg_length
// Access data

sysexmsg[0] == 0xF0 ? (
... bla bla

);

--- and ---

@init

buf = 23;
buf[0] = 0xF0;
..
buf[n] = 0xF7;

sendsysex(buf, n);


--

A function like this exists in JSFX, so Justin, if you won't copy it yourself, could you be so kind and hand over a sniplet ?

Thanks in advance
Celphor is offline   Reply With Quote
Old 10-02-2014, 03:39 AM   #107
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 51
Default

Quote:
Originally Posted by Celphor View Post
No. The data for the current track is always sent with no regard if it's in the selected bank or not. This data starts with track/... only while the data for the tracks in the bank start with track/<tracknumber>/...

You have to select the bank via an OSC-send from OSCII-bot.
Ah, I see. Thanks! In the meantime I have been experimenting and reading example code and I think I am starting to understand how Reaper is communicating with control surfaces using OSC.
This oscii-bot is a fantastic tool and I am looking forward to make my BCR do exactly what I want. Could take a while though...
dixo is offline   Reply With Quote
Old 10-02-2014, 07:26 AM   #108
Celphor
Human being with feelings
 
Join Date: Jan 2013
Location: Austria
Posts: 53
Default

Ok, I found out how to access the memory in EEL2 internally.

EEL_F NSEEL_CGEN_CALL scriptInstance::_testmethod(void *opaque, EEL_F *buf, EEL_F *len) {
scriptInstance *_this = (scriptInstance*)opaque;
if (_this)
{
unsigned int addr = *buf;
EEL_F **blocks = ((compileContext*)_this->m_vm)->ram_state.blocks;
unsigned int whichblock = addr / NSEEL_RAM_ITEMSPERBLOCK;
unsigned int offset = addr % NSEEL_RAM_ITEMSPERBLOCK;
EEL_F *block = blocks[whichblock];
EEL_F *x = 0;
if (block) {
x = block + offset;
}

_this->DebugOutput("test buf: %x", buf);
_this->DebugOutput("test x: %f", x);
_this->DebugOutput("test *x: %f", *x);
}
return 0.0;
}
Celphor is offline   Reply With Quote
Old 10-05-2014, 03:11 PM   #109
Celphor
Human being with feelings
 
Join Date: Jan 2013
Location: Austria
Posts: 53
Default

For sysex support version, see new thread ( http://forum.cockos.com/showthread.php?t=147204 )
Celphor is offline   Reply With Quote
Old 10-08-2014, 01:49 PM   #110
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 51
Default

I have been experimenting a lot with various .ReaperOSC files, but keep running into stuff that does not work.
That could mean I don't understand how all of this works (most likely), or that there is something strange with Reaper OSC.

The track related stuff seems to work more or less as I expected, but I can't seem to get the FX related stuff working well.

I want my device to behave like it can only handle a single track, but multiple FX with multiple parameters at all.
Whenever I select a track I want my device to show the parameters of all the FX in that track.

So, I defined:

Code:
DEVICE_TRACK_COUNT 1
DEVICE_FX_COUNT 16
DEVICE_FX_PARAM_COUNT 32
DEVICE_FX_INST_PARAM_COUNT 32

DEVICE_TRACK_BANK_FOLLOWS MIXER
DEVICE_TRACK_FOLLOWS LAST_TOUCHED

TRACK_NAME s/track/@/name
TRACK_NUMBER s/track/@/number/str

FX_NAME s/fx/@/name

FX_PARAM_NAME  s/fx/@/fxparam/@/name
FX_PARAM_VALUE s/fx/@/fxparam/@/value/str
FX_PARAM_VALUE n/fx/@/fxparam/@/value
I expected Reaper to send the names and values of all the FX and FX parameters upon track change: the new track is always outside the current bank of the device (track bank size is 1) and the FX bank has place for data from multiple FX and FX parameters.
But it doesn't work, Reaper does not send any FX parameters at all.

Can anyone explain why? How does Reaper decide when it has to send FX and FX parameter info? What am I doing wrong?

All help will be greatly appreciated!

Last edited by dixo; 10-08-2014 at 01:56 PM.
dixo is offline   Reply With Quote
Old 10-09-2014, 05:34 AM   #111
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by dixo View Post
I have been experimenting a lot with various .ReaperOSC files, but keep running into stuff that does not work.
That could mean I don't understand how all of this works (most likely), or that there is something strange with Reaper OSC.

The track related stuff seems to work more or less as I expected, but I can't seem to get the FX related stuff working well.
Indeed, it's probably some misconfiguration in your end - this sort of stuff typically works just fine. However, do note that this thread is about OSCII-bot, not about REAPER's OSC capabilities. So perhaps let's move the discussion elsewhere?
Quote:
Originally Posted by dixo View Post
I expected Reaper to send the names and values of all the FX and FX parameters upon track change: the new track is always outside the current bank of the device (track bank size is 1) and the FX bank has place for data from multiple FX and FX parameters.
But it doesn't work, Reaper does not send any FX parameters at all.

Can anyone explain why? How does Reaper decide when it has to send FX and FX parameter info? What am I doing wrong?

All help will be greatly appreciated!
Haven't replicated your setup (not in studio atm), but it seems that you have to include the track number in your message patterns - even though you only use a single track per bank - if you want the current effect selection to update when switching *tracks* (as opposed to switching *effects*).
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 10-09-2014, 06:41 AM   #112
dixo
Human being with feelings
 
dixo's Avatar
 
Join Date: May 2011
Posts: 51
Default

Hi Banned, you are right, sorry about that. I have created a new topic in the Reaper - Midi and other protocols section: http://forum.cockos.com/showpost.php...95&postcount=1
dixo is offline   Reply With Quote
Old 11-15-2014, 01:54 PM   #113
mertznet
Human being with feelings
 
Join Date: Nov 2014
Posts: 4
Default Possible to avoid "bundle" mode?

I am working on using OSCII bot to convert MIDI messages into OSC to control my X32 Rack mixer. I am finding that if I send a single OSCsend statement in response to a MIDI command, things work properly. If I issue more than one OSCsend in response to a single MIDI command though, the OSC command becomes a bundle and gets ignored by the X32. I have tried a number of things but haven't been able to develop a workaround.

I hope this makes sense. Any suggestions or recommendations?
mertznet is offline   Reply With Quote
Old 11-15-2014, 02:42 PM   #114
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by mertznet View Post
I am working on using OSCII bot to convert MIDI messages into OSC to control my X32 Rack mixer. I am finding that if I send a single OSCsend statement in response to a MIDI command, things work properly. If I issue more than one OSCsend in response to a single MIDI command though, the OSC command becomes a bundle and gets ignored by the X32. I have tried a number of things but haven't been able to develop a workaround.

I hope this makes sense. Any suggestions or recommendations?
When configuring an OSC output, you can (optionally) specify the maximum packet size. Perhaps try setting this to zero to prevent OSCII-bot from sending OSC messages as bundles, doing something like (adjust where appropriate):

Code:
@output OSC_to_X32 OSC "127.0.0.1:8000" 0 0
Quoted from Justin's sample script:
Quote:
// @output lines:
// usage:
// @output devicenameforcode OSC "127.0.0.1:8000" [maxpacketsize] [sleepamt]
// @output devicenameforcode MIDI "substring match" [skip]

// maxpacketsize is 1024 by default, can lower or raise depending on network considerations
// sleepamt is 10 by default, sleeps for this many milliseconds after each packet. can be 0 for no sleep.

@output localhost OSC "127.0.0.1:8000"
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned is offline   Reply With Quote
Old 11-15-2014, 03:35 PM   #115
mertznet
Human being with feelings
 
Join Date: Nov 2014
Posts: 4
Default

Quote:
Originally Posted by Banned View Post
When configuring an OSC output, you can (optionally) specify the maximum packet size. Perhaps try setting this to zero to prevent OSCII-bot from sending OSC messages as bundles, doing something like (adjust where appropriate):

Code:
@output OSC_to_X32 OSC "127.0.0.1:8000" 0 0
Quoted from Justin's sample script:
Thanks for the suggestion. Alas, I already tried that. I am not sure if there is some other code that could be sent to command OSCII bot to start a new "line". Almost like "\n" is for printing commands.
mertznet is offline   Reply With Quote
Old 11-15-2014, 07:28 PM   #116
mertznet
Human being with feelings
 
Join Date: Nov 2014
Posts: 4
Default

I did manage a clumsy and inelegant workaround. I found that if I put the second oscsend statement inside @timer and kept the first oscsend statement inside @midimsg I could make it work. However, I had to add a chunk of code to keep the @timer one from running right away. At least it works. It would be so much nicer to avoid the ugly workaround.
mertznet is offline   Reply With Quote
Old 11-16-2014, 07:21 PM   #117
mertznet
Human being with feelings
 
Join Date: Nov 2014
Posts: 4
Default

It seems the best workaround I was able to come up with is to put all OSCsend statements into the @timer section. Then set up the code so that the sends are essentially queued up and only one executes on each timer pass. This approach seems to be the most elegant method of working around the "bundle" quirk with my X32.
mertznet is offline   Reply With Quote
Old 12-13-2014, 03:44 PM   #118
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,115
Default

Try using 1 for the max packet size, rather than 0, the latter may be interpreted as "use default", off the top of my head...
Justin is offline   Reply With Quote
Old 04-18-2015, 03:53 PM   #119
flipotto
Human being with feelings
 
flipotto's Avatar
 
Join Date: Feb 2007
Posts: 514
Default

Hey, Ok so I downloaded and run this, I copy banned's monitorMIDI+OSC-IO.txt to appdata folder.
The program runs with a black window.
I don't know how to load different programs with this.
Nor how to get the midiosc monitor to work.
I have and osc control surface output to 127.0.0.1:9000 but nothing shows up in the monitor window, when I move a slider.

What am I doing wrong?
__________________
KeyMce/GenMce - pc keyboard/midi to Mackie control emulation (built with ahk). Also - an ahk script to build your own midi programs.
flipotto is offline   Reply With Quote
Old 04-18-2015, 05:20 PM   #120
Banned
Human being with feelings
 
Banned's Avatar
 
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
Default

Quote:
Originally Posted by flipotto View Post
Hey, Ok so I downloaded and run this, I copy banned's monitorMIDI+OSC-IO.txt to appdata folder.
The program runs with a black window.
I don't know how to load different programs with this.
Well, apparently, you did - that black window is entirely expected.

You load different scripts simply by putting them in your scripts folder (~/Library/Application Support/OSCII-bot folder on Mac OS X, and for Windows on that AppData you mentioned, I assume).
Quote:
Originally Posted by flipotto View Post
Nor how to get the midiosc monitor to work.
I have and osc control surface output to 127.0.0.1:9000 but nothing shows up in the monitor window, when I move a slider.

What am I doing wrong?
Could be a number of things, I guess... fwiw, it still works fine here:



Perhaps try uncommenting line 10:
Code:
//@input osc_localhost	OSC "localhost:9000" // localhost = 127.0.0.1 (IPv4)
-->
Code:
@input osc_localhost	OSC "localhost:9000" // localhost = 127.0.0.1 (IPv4)
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ
Banned 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 04:41 PM.


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