Talk to other MIDI Designer users about MIDI Designer, iOS MIDI and related topics. Or share layouts, pages, and ideas.

Also check out the Facebook Group.

Of course, if you want to send us an email, feel free.

MIDI Designer
Design your perfect MIDI controller for iPad, iPhone and iPod touch.
Fixed-width font for StreamByter editor - MIDI Designer Q&A

Fixed-width font for StreamByter editor

0 votes
asked Oct 11 in Suggestions (Already Implemented) by 5din (590 points)
recategorized Nov 4 by MIDI Designer Team (Dan)
will do thanks. If you don't see this in the very next beta -- whenever it happens -- send an email from in the App or comment here to remind us, please.
I guess that could help.  Between the smaller window and SB deleting spaces and tabs used to help set off indents, I find it is much easier to work in a separate editor, then copy the code over.  As your code gets more complicated, no way you will find a missing or misplaced END in that edit window (yep, lost hours on both of those, among others).  Also, this way you can keep a copy of your last good code, so you can roll back when something goes wrong.
@jkhiser Thanks, that's very practical advice—are there any particular iOS-based editors you'd recommend?
Dan said I should have added that.  I just use the built in Notes app.  Have different folders for different projects, then different individual notes hold different code fragments, multi-line notes, named ticks, etc.  And if you have a Mac - you get seamless synchronizing with computer, so you can work on the large screen then paste it into MDP2.
I'm surprised that the notes app doesn't mess up the text, but I definitely defer to JK, as I talk about using SB but rarely use it. I would think that something like Textastic would be better if you're using a Bluetooth keyboard with your iPad. But if the built-in notes app works, you definitely can't beat that convenience.
Notes is actually pretty good at stripping off formatting if you do not need it.  I do a lot of work in numbers, both for SB code and in named ticks.  Paste and match style in Notes will clean it all off.  One limiter is that Notes does not have a smart search and replace (such as carriage return), which means jumping over to Word.
Upcoming Beta (waiting for Apple approval) has the fix. Great call, thanks.
Dan, thanks for another near-instantaneous turnaround!  The new fixed-width font is already proving to be a MAJOR improvement when reviewing SB code that's already in a layout.  

I agree with jkhiser about SB's various idiosyncrasies (it's bizarre that SB deletes whitespace at all).  However, this one small change still helps a lot.

1 Answer

0 votes

Use BBEdit App

I believe SB code uses fixed width font when viewing in MDP. i don't recommend changing it.

I use BBEdit to write and view code on my mac. It has a free version ideal for SB coding and easy to use. It is a real code editor, but for SB I just use it to type and align code, then I use SB to find and correct errors.

It is extremely convenient and provides easy multi-line indenting to match SB code when inserted in MDP. Easy to print with line numbers and markup. Easy to copy and paste into MDP SB Rules and vice-versa. Notes and Word doesn't provide multi-line code formatting. Using tabs one line at a time is not natural for coding.

Sample code straight from BBEdit:

IF M0 == F0 7D 01 00 # Received Master General LCD message 
   MAT J0 = 0
   MAT J1 = 0
   MAT J2 = 0
   IF MA == 30-39 # Stepper LCD valid value
       MAT J0 = MB - 30 # J0 is units value 
       MAT J1 = J0 * A  # J1 is tens value
      IF MB ==30-39                    # stepper value > 9
           MAT J2 = MB - 30 
           MAT J2 = J1 + J2 # tens + units 
       ELSE                                        # stepper value < 10
           MAT J2 = J0
       SND B8 09 J5 #CC 9 09 J5 = Mast Gen digit value (1 to 99)

answered Oct 20 by dsabou2062 (2,000 points)
Thanks.  It sounds like by the time you checked, the newest version of MDP2 had already been updated in response to this suggestion (thanks again, Dan!).