03-26-2014, 04:40 PM | #81 |
Mortal
Join Date: Dec 2008
Location: France
Posts: 1,969
|
Like. Thanks for the update/port Banned!
|
03-27-2014, 04:59 PM | #82 |
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
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ʎ |
04-16-2014, 08:27 AM | #83 | |||
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
Quote:
Code:
DEVICE_TRACK_COUNT 8 Code:
DEVICE_TRACK_COUNT 1024 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 @oscmsg Quote:
Btw: I guess OSCII-bot does not have something like this (yet)?
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ |
|||
04-17-2014, 06:17 PM | #84 | ||
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
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) ); ); (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. |
||
04-18-2014, 11:09 AM | #85 |
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
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. |
04-22-2014, 07:49 AM | #86 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
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 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. |
04-22-2014, 12:49 PM | #87 | |
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
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. |
|
05-07-2014, 10:04 AM | #88 | |||
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
Quote:
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... 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:
--- 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); - 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ʎ |
|||
05-07-2014, 10:26 AM | #89 |
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
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ʎ |
05-07-2014, 10:30 AM | #90 | |
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ |
|
05-07-2014, 11:23 AM | #91 |
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
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ʎ |
05-07-2014, 12:28 PM | #92 | |||||
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
Quote:
Quote:
Code:
(char = gfx_getchar()) > 0 ? printf("%c", char); Quote:
Quote:
Quote:
|
|||||
05-07-2014, 12:57 PM | #93 | ||
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
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:
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ Last edited by Banned; 05-07-2014 at 01:06 PM. |
||
09-16-2014, 09:39 AM | #94 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
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 ;-) |
09-21-2014, 12:55 AM | #95 |
Human being with feelings
Join Date: Jan 2012
Posts: 104
|
Sorry to ask this, but no future update with support for midi sysex messages?
|
09-28-2014, 01:11 AM | #96 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
Sysex
I need this too. I will take a look if I can add support for it
|
09-28-2014, 01:56 PM | #97 |
Human being with feelings
Join Date: May 2011
Posts: 92
|
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. |
09-29-2014, 04:02 AM | #98 | |
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
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ʎ |
|
09-29-2014, 05:46 AM | #99 | ||
Human being with feelings
Join Date: May 2011
Posts: 92
|
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:
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:
Again, thanks for your reply and all the example code you have already written, that really helps a lot! Regards, Dixo |
||
09-29-2014, 08:05 AM | #100 | |
Human being with feelings
Join Date: May 2011
Posts: 92
|
Quote:
It seems that there are still a lot of concepts that I can't wrap my head around yet... Regards, Dixo |
|
09-29-2014, 08:07 AM | #101 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
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 |
09-29-2014, 09:12 AM | #102 |
Human being with feelings
Join Date: May 2011
Posts: 92
|
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 |
09-29-2014, 11:12 AM | #103 | |
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
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ʎ |
|
09-29-2014, 11:24 AM | #104 |
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
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ʎ |
10-01-2014, 01:12 AM | #105 | ||
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
Quote:
Quote:
You have to select the bank via an OSC-send from OSCII-bot. |
||
10-01-2014, 01:24 AM | #106 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
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 |
10-02-2014, 03:39 AM | #107 | |
Human being with feelings
Join Date: May 2011
Posts: 92
|
Quote:
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... |
|
10-02-2014, 07:26 AM | #108 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
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; } |
10-05-2014, 03:11 PM | #109 |
Human being with feelings
Join Date: Jan 2013
Location: Austria
Posts: 73
|
For sysex support version, see new thread ( http://forum.cockos.com/showthread.php?t=147204 )
|
10-08-2014, 01:49 PM | #110 |
Human being with feelings
Join Date: May 2011
Posts: 92
|
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 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. |
10-09-2014, 05:34 AM | #111 | ||
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
Quote:
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ |
||
10-09-2014, 06:41 AM | #112 |
Human being with feelings
Join Date: May 2011
Posts: 92
|
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
|
11-15-2014, 01:54 PM | #113 |
Human being with feelings
Join Date: Nov 2014
Posts: 4
|
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? |
11-15-2014, 02:42 PM | #114 | ||
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
Code:
@output OSC_to_X32 OSC "127.0.0.1:8000" 0 0 Quote:
__________________
˙lɐd 'ʎɐʍ ƃuoɹʍ ǝɥʇ ǝɔıʌǝp ʇɐɥʇ ƃuıploɥ ǝɹ,noʎ |
||
11-15-2014, 03:35 PM | #115 | |
Human being with feelings
Join Date: Nov 2014
Posts: 4
|
Quote:
|
|
11-15-2014, 07:28 PM | #116 |
Human being with feelings
Join Date: Nov 2014
Posts: 4
|
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.
|
11-16-2014, 07:21 PM | #117 |
Human being with feelings
Join Date: Nov 2014
Posts: 4
|
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.
|
12-13-2014, 03:44 PM | #118 |
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
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...
|
04-18-2015, 03:53 PM | #119 |
Human being with feelings
Join Date: Feb 2007
Location: VA
Posts: 887
|
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? |
04-18-2015, 05:20 PM | #120 | ||
Human being with feelings
Join Date: Mar 2008
Location: Unwired (probably in the proximity of Amsterdam)
Posts: 4,868
|
Quote:
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:
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ʎ |
||
Thread Tools | |
Display Modes | |
|
|