Differences
This shows you the differences between two versions of the page.
| streambyter_force_channel [2020/03/05 07:14] – created StreamByter: Force Channel _ki | streambyter_force_channel [2020/03/05 07:15] (current) – Added code _ki | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| < | < | ||
| + | # === Force Midi Channel with GUI === | ||
| + | # Version: | ||
| + | # Author: -ki | ||
| + | # | ||
| + | # Instructions: | ||
| + | # Use the slider for channel setup and then store/ | ||
| + | # the settings together with the hosts session. | ||
| + | # | ||
| + | # ——— No need to modify anything in the script itself ——- | ||
| + | # ———————-———————-———————————————————————- Alias & Define | ||
| + | alias F0 SYSEX_MSG | ||
| + | |||
| + | alias MT MIDI_CMD | ||
| + | alias MC MIDI_CHANNEL | ||
| + | alias M0 MIDI_DATA | ||
| + | alias M3 MIDI_SL_NUM | ||
| + | |||
| + | alias Q1 out_slider | ||
| + | alias I0 out_channel | ||
| + | |||
| + | define SYSEX_SLIDER_MSG F0 7D 01 | ||
| + | define SYSEX_END_INJECT F7 +I | ||
| + | |||
| + | # ———————-———————-———————————————————————- All except sysex | ||
| + | if MIDI_CMD < SYSEX_MSG | ||
| + | math MIDI_DATA = MIDI_CMD + out_channel | ||
| + | end | ||
| + | |||
| + | # ———————-———————-———————————————————————- Slider Sysex | ||
| + | |||
| + | if MIDI_DATA == SYSEX_SLIDER_MSG | ||
| + | if MIDI_SL_NUM == 1 | ||
| + | math out_channel = out_slider - 1 | ||
| + | set LB1 out_slider +D | ||
| + | end | ||
| + | end | ||
| + | |||
| + | # ———————-———————-———————————————————————- Initialization | ||
| + | if LOAD | ||
| + | # Persistant slider vars | ||
| + | assign out_slider = 10 +P | ||
| + | math out_channel = out_slider - 1 | ||
| + | | ||
| + | # Label and scale the sliders | ||
| + | set Q0 Force_Channel +BUTTON | ||
| + | set Q1 Output_CH 1 $16 | ||
| + | set Q2 +HIDE | ||
| + | set Q3 +HIDE | ||
| + | set Q4 +HIDE | ||
| + | set Q5 +HIDE | ||
| + | set Q6 +HIDE | ||
| + | set Q7 +HIDE | ||
| + | | ||
| + | set SLIDER_DISPLAY 1 | ||
| + | set LB0 SOutput_CH | ||
| + | set LB1 out_slider +D | ||
| + | end | ||
| </ | </ | ||