Closed sbmechanics closed 7 years ago
Confirmed. Need to add a select
field for the CC value (0..120)
Relevant bytes appear to be 134-149. Bytes 134-141 already correspond to the function type (GCX 1-4 / Sequencer / MIDI Channel), where the data lies in 142-149. A dump of a current setup shows in the attached, which corresponds to 142-147 handling CC 51-56, 148 handling GCX loop 1, and 149 handling CC 59.
I believe this is the fix, starting at line 783 of main.js:
} else {
// MIDI Controller #
for (var i = 0; i < 121; i++) {
$(sprintf('<option value="%d">MIDI Controller #%d</option>', i, i)).appendTo($detailSel); }
$btn.find('.switchFunctionDetail').parent().show();
$btn.find('.transmitCC').parent().show();
$btn.find('.switchType').parent().show();
}
Changes include show (not hide) on line 789 (.switchFuntionDetail), and changing i+1 to I at at line 786. Imports and exports appear to work and match correct GCP dumps. I don't have a reference for what the sequencer should look like.
I'll get it in tonight. The S3 outage has prevented deploying this afternoon.
No rush on my account. I have it working in test, and even if I didn't, this is hobby, not work. Thanks again.
Made another change for your consideration.
In Instant Access, a momentary switch type cannot be simultaneously used with Transmit CC.
In main.js, two sections are changed to selectively hide the Transmit CC button:
if(gcp.config.switchType[btnNum] == 1){
$btn.find('.transmitCC').parent().hide();
} else {
$btn.find('.transmitCC').parent().show();
}
Also,
$btn.find('.switchType').change(function(){
gcp.config.switchType[btnNum] = +$(this).val();
renderFcnDetail();
}).val(gcp.config.switchType[btnNum]);
For aesthetics, this could also use a reordering of the Transmit CC and Switch Type labels in index.html.
Curious to hear your thoughts.
Yep that makes sense. Let me know if the PR changes makes sense.
Looked and I think the PR changes are correct.
In Configuration, Instant Access, when a button is set to a MIDI channel, a field should exist that specifies the CC number to be transmitted.