Audiobus: Use your music apps together.

What is Audiobus?Audiobus is an award-winning music app for iPhone and iPad which lets you use your other music apps together. Chain effects on your favourite synth, run the output of apps or Audio Units into an app like GarageBand or Loopy, or select a different audio interface output for each app. Route MIDI between apps — drive a synth from a MIDI sequencer, or add an arpeggiator to your MIDI keyboard — or sync with your external MIDI gear. And control your entire setup from a MIDI controller.

Download on the App Store

Audiobus is the app that makes the rest of your setup better.

Mozaic // What is your workflow when it comes to complex scripts?

I am starting to get more engaged with Mozaic and the source code gets more complex. I am thinking about moving the coding process to my mac because it's getting more and more viscous with the build-in Mozaic editor.

Would be great to have an mac editor for Mozaic that can upload scripts via wifi or airdrop.

What is your approach to keep the scripting and testing process fluent?

Edit: Already grabbed KIs Mozaic Scripting Language Support for Code Text Editors

Comments

  • McDMcD
    edited January 2020

    I use a Bluetooth Keyboard and Mouse on the iPad and enter syntax checked text into the Textastic app. Periodically I "select all" in that editor and paste the whole code segment into the Mozaic code window displacing the prior text completely. I immediate save the script and add versioning numbers to the files I save periodically name98, name99, etc. That can be useful to rollback if some new feature just seems to be breaking things. Debugging in Mozaic can sometimes be too frustrating if you can't find your logic flaw.

    I do some runtime testing and I might fix small changes in the Mozaic text window for speed sake but eventually I "select all" and paste the code back into the Textastic Editor before adding any significant amount of additional changes.

    @_Ki created a Mozaic syntax highlighter/checker for Textastic so I bought it.
    Look for the @_ki comment/video on Page 47 of the big Mozaic thread:

    https://forum.audiob.us/discussion/32930/mozaic-create-your-own-au-midi-plugins-out-now/p47

    There's a Vi Editor app for IOS if Vi is your thing. I wrote a lot of scripting tools in Vi over the years and I love its features for find, replace and moving blocks of text around so I might start using the Vi editor since I was given a clue on how to make the apps font larger so I might value editing productivity over syntax high-lighting.

    Textastic has a find/replace capability that I've learned to use for navigating around the code when it gets really large but Vi is supreme for that type of coding flow. Never learned Emacs but maybe there's an app for that. If you come from a Windows world Textastic might be more to your tastes.

    There's also a Textastic App for Macs so you can make @_Ki's syntax checking/highlighting work in that editor as well as the Sublime Editor I think.

    I generally add some new feature and test it. Then code another feature and test. So, cut and paste between editor and Mozaic code windows are the most productive method for me... all on the iPad with keyboard and mouse.

    When I have a version to publish I save it in Textastic with a useful version number extension and upload that script file into the PatchStorage site.

    @_Ki's a total pro and writes the best Mozaic code you'll find to read. He codes like a diamond cutter. He doesn't write an app before he has a designed the GUI for example.

    I also wanted to write on my Mac but I find using files and iCloud or file passing mechanisms were just to slow for me. If we could just export the IOS screen onto the Mac and use cut and paste between the Mac and an IOS app I'd live on my Mac.

    StreamByter code can run on IOS and also on a Mac using the Mac "MidiFire" app. So I could write and test Streambyter scripts on the Mac using a nice keyboard. I liked that. Then I'd move the script over to IOS using iCloud.

  • Similar to @McD I bought a bluetooth keyboard and write the code in Textastic on the iPad. Makes Mozaic coding a lot smoother.

  • Regarding the ‚Language Support for Code Text Editors‘ - i have been informed that with Textastic Mac my code completion does not work, which runs fine with Textastic IOS.

    I am also writing my scripts using a bluetooth keyboard. If the start to get longer, i change to Textastic and copy back and forth like @McD described. In Textastic i got Syntax Highlighting, Syntax Checking, CodeCompletion and fast Navigation to defined Events for Mozaic in addition to the Search/Replace that is missing in Mozaics internal editor.

    I also tried around with Kodex, the minimap is nice - but one can‘t add user defined language definitions.

  • Thanks guys. Appreciate you taking time for this. I see we all are struggling to get along with workarounds. But that's what it is and I am glad to have an app like Mozaic anyway.

    I just realized that it is possible to drag and drop text files from the files app onto the Mozaic editor. The file content gets pasted right at the cursor position. That way I can work on my mac an safe the script as *.txt in iCloud.

    This ist the most direct method I found so far when I want to avoid the clumsy development environment on iOS. And also I think a good way to work with text includes.

    But I will also check out Textastic just for you can't say I did't try... ;)

  • On Mac or P!c you can also try the Sublime3 editor which is supported by „Mozaic Language Support for Code Text Editors“

  • @_ki said:
    On Mac or P!c you can also try the Sublime3 editor which is supported by „Mozaic Language Support for Code Text Editors“

    already have :)

  • edited January 2020

    but it strange somehow the scripts don't work when i drag them from files app. i guess there are some invisible characters in there that screw up the code.

  • FWIW, when I work on my Mac to write long Mozaic scripts, I find it quicker to select all and paste onto a page of the Notes app and then copy from Notes on my iPad than to do anything else.

  • I just tried dragging an ascii text file right into the open code editor of Mozaic, which was loaded as AUv3 inside AUM. You are right that the text content is inserted at the current cursor position. Its a bit cumbersome withh all the hold, drag etc gestures - i prefer to use my bluetooth keyboard to do a select all/copy all (CMD-A, CMD-C) in my text editor and then just a select all/paste (CMD-A, CMD-V) inside Mozaic to replace the current script.

    BTW: Mozaic doesn‘t like some line endings and also has problems with some unicode chars looking visually like spaces. I once had to debug a script made on mac or PC that seemed to load fine when copying the text contents. One could read the code in the editor, but it didn’t start - not even a Log on the first line of an OnLoad worked.

  • @espiegel123 said:
    FWIW, when I work on my Mac to write long Mozaic scripts, I find it quicker to select all and paste onto a page of the Notes app and then copy from Notes on my iPad than to do anything else.

    This was my workflow as well until I remembered that Universal Clipboard is a thing, now I just copy in the Mac and paste in the iPad.

  • I gave it shot with Textatic. The copy an paste works alright. But still an unnecessary baffle.

    What would you guess how likely we will see some tune ups in Mozaic? I would definitely upgrade if it was an in-app purchase option.

  • @jipumarino said:

    @espiegel123 said:
    FWIW, when I work on my Mac to write long Mozaic scripts, I find it quicker to select all and paste onto a page of the Notes app and then copy from Notes on my iPad than to do anything else.

    This was my workflow as well until I remembered that Universal Clipboard is a thing, now I just copy in the Mac and paste in the iPad.

    Thanks! I had no idea.

  • @nuno_agogo said:
    I gave it shot with Textatic. The copy an paste works alright. But still an unnecessary baffle.

    What would you guess how likely we will see some tune ups in Mozaic? I would definitely upgrade if it was an in-app purchase option.

    What would be a "tune up" for you? The developer, @brambos, has a new application ready to drop (Mononoke) and is focused on getting it ready for sale.

  • @McD said:

    @nuno_agogo said:
    I gave it shot with Textatic. The copy an paste works alright. But still an unnecessary baffle.

    What would you guess how likely we will see some tune ups in Mozaic? I would definitely upgrade if it was an in-app purchase option.

    What would be a "tune up" for you? The developer, @brambos, has a new application ready to drop (Mononoke) and is focused on getting it ready for sale.

    right, i saw that here in the forum.

    just thinking about some tweaks on the mozaic editor to make the scripting process a little more accessible. and perhaps a little more flexible ui handling.

    i just imagine that if it was easier to cope with the coding process we would see even more great and useful scripts from the community.

    but yes, it is already a great asset the way it works now. and thanks to @_ki there are some great gems there, too. by the way big up for the in order arp @_ki!

  • @nuno_agogo
    I think an update of the internal editor is unlikely.

    • Adding search/replace or other edit functions would require a new buttons, which need a gui redesign
    • Syntax highlighting would require a mayor rewrite of the text box that is currently used. Text would be needed to be parsed on typing, not only on ‚update‘

    The current editor is good enough for medium sized scripts and one can easily use external editors with more features if scripts get longer.

    .

    I also don‘t think that we get an update with adjustable or configurable layouts. Perhaps not even new fixed layouts, as i assume the possible combinations are already there.
    All gui elements currently use fixed sizes. Pads, knobs, faders and XY have the same dimensions on all layouts. If one would combine for instance 10 faders with 4 knobs this would result in a gap (since the XY is about 2.5 knobs wide). And you can’t combine 16 pads with the XY as there is not enough space. So a redesign of the elements and rewrite of the already optimized drawing code would be needed even for this seemingly simple task.

    .

    In my eyes, Mozaic is a very complete, round package. That doesn‘t mean i don‘t have wishes for language extensions, but i understand that the structural changes needed to implement them would take time to develop and test - and probably bring new bugs to stuff that already worked well.
    That time that is better spend on developing new stuff which brings in fresh money and customers :)

  • @jipumarino said:

    @espiegel123 said:
    FWIW, when I work on my Mac to write long Mozaic scripts, I find it quicker to select all and paste onto a page of the Notes app and then copy from Notes on my iPad than to do anything else.

    This was my workflow as well until I remembered that Universal Clipboard is a thing, now I just copy in the Mac and paste in the iPad.

    Thanks! I had no idea.

  • Markers would be handy for sure. Even if there was no GUI for them and were perhaps only available via external keyboard combos. Like, CMD + SHIFT + 1-9 to set and CMD + 1-9 to recall.

    And/or some quick way to jump back and forth through any @event lines. CMD + any old pair of related symbols would work. Like ( and ), or {}, [], <>, +-, whatever.

    One little gem from vi that doesn't require a Find/Replace GUI is the "super star search". Put the cursor in a word, hit the * key and the editor jumps to the next instance of that word. Probably only practical with external keyboards but such a handy feature in day to day dev life.

  • wimwim
    edited January 2020

    Textastic, BlueTooth keyboard, and @_ki ‘s absotutelyfrigginamazing template code add-in for Textastic is the only way I can keep my head on straight on any large script. One of the best things about it is the ability to pull up a list of all the events in the script, touch the one you want and be taken there instantly. It has also headed off so many unclosed if statements, parenthesis, for loops, etc, that I can’t count them!

    Short scripts under 100 lines or so I just do in Mozaic, but anything bigger and I use Textastic. I make the edits in Textastic, then use the keyboard shortcut keys to dump the whole script into Mozaic. The key sequence is practically automatic at this point. <cmd-a><cmd-c><cmd-Tab><cmd-a><cmd-v>upload. Takes about two seconds.

    @syrupcore said:
    And/or some quick way to jump back and forth through any @event lines. CMD + any old pair of related symbols would work. Like ( and ), or {}, [], <>, +-, whatever.

    Two taps is all it takes to jump to any event in Textastic with @_ki ‘s extension.

  • you're all probably right that with the right workflow it is not as bad as i suspected.

    some convenient key commands would be great in. also for the update to keep the flow going. i know it's all for the lazy :)

  • _ki_ki
    edited January 2020

    @nuno_agogo said:
    i know it's all for the lazy :)

    Yep, thats what i meant: Any editor enhancement will spare us lazy devs 2 seconds, but cost Bram weeks to develop and maintain.
    It took me over 130 hours to develop the ‚Mozaic Language Support’ Sublime3 syntax parser. The parser languge does not have variables or states you could querry, it just defines context transitions based on regular expressions (which i only had limited experience with).
    But after six hours i had a syntax highlighter running. And then i just wanted to know if its possible to do complete syntax checking... I had to come up with lots of work-arounds, it was a really exciting but hard puzzle. And i learned advanced regex B)

  • @_ki - I'm going to buy textastic. Thanks for your hardwork on this.

  • @wim said:
    Textastic, BlueTooth keyboard, and @_ki ‘s absotutelyfrigginamazing template code add-in for Textastic is the only way I can keep my head on straight on any large script. One of the best things about it is the ability to pull up a list of all the events in the script, touch the one you want and be taken there instantly. It has also headed off so many unclosed if statements, parenthesis, for loops, etc, that I can’t count them!

    Short scripts under 100 lines or so I just do in Mozaic, but anything bigger and I use Textastic. I make the edits in Textastic, then use the keyboard shortcut keys to dump the whole script into Mozaic. The key sequence is practically automatic at this point. <cmd-a><cmd-c><cmd-Tab><cmd-a><cmd-v>upload. Takes about two seconds.

    @syrupcore said:
    And/or some quick way to jump back and forth through any @event lines. CMD + any old pair of related symbols would work. Like ( and ), or {}, [], <>, +-, whatever.

    Two taps is all it takes to jump to any event in Textastic with @_ki ‘s extension.

    I’ve had a similar experience with using Textastic and @_ki ’s extension which works great. The limitations for me are my own limited programming experience but fortunately Mozaic is well documented, there’s Textastic, Ki’s work, threads like this, and the many working script examples on patchstorage.com that enable me to create scripts of my own.

    Personally, figuring out the GUI interactions has always been the most challenging aspect to designing the scripts. Working out and getting the sliders, knobs, or pads and their respective labels working first helps quite a lot in developing more complicated scripts. Although just about everyone walks every day without thinking about it, when you try to animate walking you soon learn you have little conscious awareness of how you actually walk as your animated walker looks more like an extra from the Walking Dead 🧟 . Developing a real-time GUI application can be a similar experience.

    For less experienced programmers such as myself, the liberal use of the log command and commenting out code helps in reducing the gap between what the script does and what you want it to do.

Sign In or Register to comment.