Can we have StreamByter sub-routines implemented?

0 votes
asked Feb 19, 2024 in Suggestions (Implemented) by the-elf (1,190 points)
recategorized Mar 11, 2024 by MIDI Designer Team (jkhiser)
You don't need a leading zero except on M0C, as MC is the message channel, not 13th byte of message.
OK, I am not familiar with M0C - so far
Beware M$08 and M$09 - SB throws an error on them!
Good catch, added to list of problem reports.
I saw that sub-routines are implemented in the new Beta. THANK YOU!!!

I've updated one of my Layouts to test the implementation, and all seems well. When the updated version makes it out into the wild I will re-release my Layout

2 Answers

0 votes
 
Best answer
Implemented in 10.2.0
answered Mar 11, 2024 by MIDI Designer Team (jkhiser)
selected Mar 12, 2024 by the-elf
0 votes

Use MidiFire StreamByter


StreamByter in MDP is a limited version of the MidiFire StreamByter. MidiFire SB accepts Subroutines and Defines. It is available in the app store and provides input and output interfaces with MDP and other virtual and physical devices for Control and Interface. It includes several Modules to facilitate MIDI routing, design, and programming. Contact me if you need help getting started. I have been using MidiFire for several years.

Attached is a view of my latest "Scene" for Midi Clock Control. and Display that I am currently working on finishing and publishing. Features iI includes are Midi Clock Input, Midi Tempo Control and Measured Display, and Beat Display. SBs are renamed StreamByter Modules. It includes an interface from an external Midi Clock Source, although the Dynamic Clock can be configured to provide the Clock Source within the iPad or Mac. It also provides programmed loopback capabilities.

https://audeonic.com/midifire/manual/#mod_byter

Copied from the manual:

Macros and Subroutines

Version 2.0 introduces two new code features; DEFINE and SUBROUTINE

The DEFINE rule lets you give any sequence of code tokens a name and then use that name further in the code instead of typing in the original text. This is similar to a #define in C but no parameters. Like the C version, you can have DEFINES that refer to previous DEFINES.

DEF[INE] <name> <some code>

It is essentially a find/replace. Best explained by example:

IF LOAD
  DEFINE MSG0 M0
  DEFINE CHAN_VOLUME B0 07
  DEFINE CHAN_VOLUME_MIN MSG0 == CHAN_VOLUME 00
END

IF CHAN_VOLUME_MIN
END

The SUBROUTINE rule allows you to create code subroutines (with arguments) that you can call from elsewhere in your code.

SUB[ROUTINE] <name> [<args>] ... lines of code ... END

Images
MIDI Fire Beats Tempo SB.png
MIDI Fire Beats Tempo SB.png
answered Feb 20, 2024 by dsabou2062 (3,570 points)
edited Feb 20, 2024 by dsabou2062
Much appreciate the input. Thank you!

I do have the 'full' StreamByter on my iPad, but I've never used it. I'm not really comfortable having to implement virtual MIDI ports. The last thing I need is to break what I have right now!

Involving it would mean that MD Layouts would not be standalone - it would require users to both have the full SB, and install the SB code separately *and* make use of virtual MIDI ports (if I'm understanding its use correctly). That's a lot to take in for most 'casual' users.

Better, IMHO, if we can simply have an updated version of SB within MD. It's neat, standalone, and transparent to users.
I agree only partially. MidiFire offers more than just StreamByter. It is easy to configure and use with MDP. You won't know it is thereother then to activate it. See my post for a Metronome using StreamByter. https://mididesigner.com/qa/9825/metronome-hack-using-midifire-dynamic-clock?show=9825#q9825

The thing I worry about is it doesn't appear it is active anymore. It is out of date and I get no responses on Audionics forum. But as long as it is on Apple's app, it is what it is.
BTW, It is an invaluable troubleshooting tool. Using Event Monitors before and after an SB module in MidiFire is the best way to troubleshoot SB code even if it is to be used in MDP input and output rules.
Clever stuff.

I can't see a use for MF (or SB separate to MD) in my world. All I need to do is edit a few devices over MIDI. Everything else I can handle within MD, or in Cubase or Cantabile, including monitoring.
...