Closed rsjaffe closed 9 years ago
Could test preset name to do automatic updating when a new version of MIDI2LR comes out, but I'm not sure that's worth the effort.
For example, could request all preset names. Identify the one corresponding to MIDI2LR preset, then check version part of name, update if needed.
From @thegouger on September 15, 2015 13:58
Cool - I'll think about building a generic system for setting presets through SysEx messages (a lot of MIDI controllers can be customized in this way)
From @dusipuffi on September 16, 2015 18:9
hi, for arturia beatstep Sysex codes for programing here http://www.untergeek.de/2014/11/taming-arturias-beatstep-sysex-codes-for-programming-via-ipad/ I think, that put values on knobs solves this problem https://github.com/thegouger/MIDI2LR/issues/17
Yeah, programming the controller can solve lots of issues. For example, the encoders on the BCF2000 and BCR2000 can be set to wider ranges than the default 127, allowing finer control. And the encoders can also be velocity-sensitive--fast rotation causes greater changes per degree of rotation than does slow rotation. This could help with some of the settings that have broad ranges.
This will be deferred for a while, since the same functionality is already present in the Mountain Utilities application. (http://mountainutilities.eu)
See #31
From @rsjaffe on September 13, 2015 17:44
Certain settings could improve the interface between the MIDI controller and MIDI2LR, such as making switches momentary instead of toggle.
This would involve sending SysEx messages that are appropriate for the given controller. Behringer's BCF2000 and BCR2000 are fairly common for this application because they're cheap. The following should work for the Behringer. The MIDI messages are based on the documentation from Mountain Utilities version 1.2.7.
I don't have the compiler or enough knowledge of the JUCE library to test this myself, so regard this as a suggested implementation that might need some refining.
Everything with digits mixed with capital letters is hexadecimal. Lower case letters are nibbles that need to be replaced with a value, based on the information given after the hex string. lines of periods is where character data goes.
All SysEx messages for the BCF and BCR have the following format
F00020320x1yccddF7
, where 0x is the device ID (0..15). 0x can be replaced with 7F, which is "any id". 1y is model ID, where 14 is BCF2000 and 15 is BCR2000. 1y can be replaced with 7F, which is "any model". cc is the command, dd is the data (zero or more bytes), F7 is the end of SysEx line.Step 1.
Ask for system model.
F00020320x7F01F7
the x is replaced by the device ID for the attached controller.If a Behringer is attached, you'll receive a response distinguishing the BCF from BCR, such as
F00020320x1y02.............F7
, where the data after 02 will be something like BCF2000 1.10 and 1y will be replaced by 14 or 15, depending upon the model..This step determines which file is used for programming the Behringer.
Step 2.
Send program from appropriate text file (e.g., BCF2000.txt). If can't identify the controller or the controller has an identity that doesn't have a corresponding text file, show an error to the user and abandon the programming effort. When programming, one SysEx is sent per line of text, as follows:
F00020320x1y20mmll.............F7
, where 0x is the device ID, 1y the model (14 or 15). mm and ll comprises the line number, where ll is the LSB in the form 0bbbbbbb, and mm is the MSB as 0bbbbbbb. The first line is line 0.The Behringer will reply to each line with
F00020320x1y21mmlleeF7
, where x,y,m,and l have the same meaning as in the message sent, and ee is the error code. If ee is 00, all is well, and can continue on. If ee is non-zero, should send one more line with the text $end , then set the Behringer back to one of its presets, e.g.,F00020320x1y2200F7
selects preset 1 (the preset on the Behringer is numbered 1-32, but in SysEx is numbered 0-31, so 00 represents preset 1). Selecting a preset wipes out what was sent, which is what we want to do in case of an error.Instructions to users
I would instruct users to edit the second-to-last line of the txt file (currently $store 2) if they want the preset in another slot besides number 2. Also, would rely on the user to select the correct preset on their controller rather than sending a "change to preset" command from the application, as there may be use cases in which the user needs a different preset from the one programmed by the application.
Copied from original issue: thegouger/MIDI2LR#44