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 - Create your own AU MIDI plugins - OUT NOW!

15354565859103

Comments

  • Hello
    I play any chords randomly , I need to mozaic pass only lowest note of my chords, when i play chords in real time and any chords .
    Please help me if possible for codes.

  • @pejman We 'coders' just discussed that topic some pages ago - but came to the understanding that this can not be done without drawbacks like delaying all played notes and that Mozaic isn't suited for this simple looking but nevertheless clearly complex kind of problem.

  • @_ki said:
    @pejman We 'coders' just discussed that topic some pages ago - but came to the understanding that this can not be done without drawbacks like delaying all played notes and that Mozaic isn't suited for this simple looking but nevertheless clearly complex kind of problem.

    I think a 10 milliseconds capture interval or set with a knob for a note cluster on the input and forward the lowest recent note collected might work as a general utility to toss the upper notes. Not perfect but still useful.

  • @pejman said:
    Hello
    I play any chords randomly , I need to mozaic pass only lowest note of my chords, when i play chords in real time and any chords .
    Please help me if possible for codes.

    You're like my mother-in-law. If you don't get the answer you want, you just keep asking in different ways until you do. :D
    Sorry!

    (You should consider a career in sales. B) )

  • @espiegel123 said:
    I am working on a script that uses TranslateCurve and TranslateScale on a knob value to make the value range and mapping reasonable for setting LFO frequencies in the range of about 0.01 (slow LFOs that take 100 seconds) to 10 (10 cycles per second). I have that part working nicely.

    The freq value gets stored in a variable in a preset.

    My problem is trying to map that floating point number back to the original knob value so that when the preset is recalled that it can set the knob.

    I thought that I might be able to just reverse the process, but that doesn’t quite work.

    Here is the code for processing the knob to get the frequency:
    freqMin=0.01
    freqMax = 10
    CurveFreq=3
    testValue=GetKnobValue testKnob
    temp = TranslateScale testValue,0,127,freqMin,freqMax
    freq = TranslateCurve temp,curveFreq,freqMin,

    I tried a number of things to reverse the process
    floatValue=freq
    rev1 = TranslateCurve floatValue, (1/curveFreq),freqMin,freqMax
    rev2 = TranslateScale rev1,freqMin,freqMax,0,127

    The code above is off by quite a bit for the lowest values in the range. Things are much closer if I set floatValue to freq-freqMin but that is also not quite right. I have tried quite a few other things that don’t work.

    I have a feeling that either I am making a boneheaded error in trying to reverse the process or that it isn’t possible.

    Any ideas? I can always save both the frequency value and the knob value that generated it, but if I can derive the knob value I’d prefer that as it’s more elegant.

    Any ideas?

    Just store the original knob value (0-127) in a separate variable.

  • @McD Okay, i'm on it. I'll try not to put too many aditional features into a first version.

    And i will put a big warning into the documentation that the detection will always delay the bass part agaist the chords of the song by the choosen capture time window will make it sound sloppy.

  • @_ki said:
    @McD Okay, i'm on it. I'll try not to put too many aditional features into a first version.

    And i will put a big warning into the documentation that the detection will always delay the bass part agaist the chords of the song by the choosen capture time window will make it sound sloppy.

    Here’s how the arranger keyboards seem to work... the user submits clusters before the next clock tick of the metronome and uses those notes collected to select a root for the next beats chords. I think a BPM approach might be an option or the small interval of inputs for someone that doesn’t want to get trained by the app like an arranger algorithm does. You learn to submit early on an arranger like the One Man Band app.

  • It’s also possible to convert all notes to their position in the chromatic scale (using Modulo-12) and compare a cluster to a list of chords and always send roots of the input chords which is typical for Techno like Erasure. That guy just thumped our roots and 5ths for bass lines.

  • _ki_ki
    edited December 2019

    I scripted as you initially suggested:

    • Every time a NoteOn or NoteOff comes in, a detection window on N millseconds is triggered.
    • All NoteOns are put into a sorted list (insertion sort... slow but should be ok)
    • All NoteOffs remove its note from the active list, the NoteOff for the last note will also stop the bass note immediately
    • After each detection timing window runs out, the current bass note output is checked and updated. All bass NoteOns/NoteOffs are send in this detection window stage (except for the last notes NoteOff)

    The script uses a timer with 1msec and the window can be set between 1 and 15 msec.

    .

    I am already in testing phase (but must first find all bugs, the list management does not work as expected yet...)

  • wimwim
    edited December 2019

    I did spend some time thinking about and looking for the answers to these questions in the manual, but I’m feeling lazy tonight and thought I’d cheat by asking:

    1. Is it possible to output variables in hex notation in the Log command without a bunch of added code clutter? Like a prefix for the variable or something?
    2. Can I pack a three byte midi message into one array cell, then unpack it later? If so, how? I have a feeling @_ki may have already explained this or something similar, but haven’t been able to find the post.
  • @wim said:
    I did spend some time thinking about and looking for the answers to these questions in the manual, but I’m feeling lazy tonight and thought I’d cheat by asking:

    1. Is it possible to output variables in hex notation in the Log command without a bunch of added code clutter? Like a prefix for the variable or something?
    2. Can I pack a three byte midi message into one array cell, then unpack it later? If so, how? I have a feeling @_ki may have already explained this or something similar, but haven’t been able to find the post.

    I don't think that you can force hex display in the log but that would be a great addition.

    To pack three bytes into a 24-bit integer lets say that your bytes (I am assuming these are unsigned) are J, K and L. To pack them into one 24-bit integer, the equation is in hex
    (J * 0x10000) + (K * 0x100) + (L)

    So, if you had bytes 0xAA, 0xBB, 0xCC, you would get 0xAABBCC

    To unpack, you mask off the parts you don't want and then divide to shift things over. Mozaic has an Integer AND that you can use for masking things. Its operator is &.

    To mask, use zero in the bytes you don't want and FF in the byte you want. For example, to turn 0xAACC into 0xAA00, do 0xAACC & 0xFF00. Now we can divide by 0x100 to shift our byte to the right two place. 0xAA00/0x100 = 0xAA

    Dividing the masked numbers 0x10000 will shift hex numbers four digits to the right and dividing by 0x100 will shift them two. So, 0xAA0000/0x10000 = 0xAA

    If you want the middle byte of 0xAABBCC, do this
    0xAABBCC & 0x00FF00, you end up with 0xBB00
    divide the result by 0x100 to get 0xBB

    You don't need the leading zeros, but I think it makes the code more understandable.

  • wimwim
    edited December 2019

    Thanks @espiegel123! You saved me a bunch of time and effort. I knew one of you real programmers would just straight up know that one. B)

    I’ve done that with integers before - just not with hex.

  • @wim said:
    Thanks @espiegel123! You saved me a bunch of time and effort. I knew one of you real programmers would just straight up know that one. B)

    I’ve done that with integers before - just not with hex.

    Hopefully, I didn't botch something in their. It has been a long day. So, you should do a couple of tests to make sure I didn't make a goof.

  • @wim: btw, if what I said above works, it might be a great thing to add to the wiki page if you have a chance.

  • @espiegel123 said:
    @wim: btw, if what I said above works, it might be a great thing to add to the wiki page if you have a chance.

    Works perfectly. And I will. B)
    Thanks again, you really helped kick off a project I'm pretty excited about if it works.

  • Some feedback regarding the ‚Bass Note of Chord‘ script:
    The logic is working, but as i expected one gets a hell lot of short notes if the analysis window is <12msec. And not only for the note-ons, but also for the note-offs, resulting in audible clicks. With 20ms these mis-analysis problems are gone, but the bass is really laggy.

    Currently every note-on/off triggers the analysis window and therefore if one holds a chord and then releases the lowest note, the second lowest note will be triggered as bass. If one presses an even lower note, while holding the chord, the bass changes to this lower note. If one plays monophonic, the bass echoes that.
    All these ‚effects‘ result from the initial idea of always outputing the lowest note of all pressed notes.

    As i am not a fluent keyboard player, here are the questions that only you can answer :)
    1. If one adds a lower note to a hold chord (maybe even later), should the bass also change ?
    2. If one moves up the lowest note while holding the upper notes, should the bass also follow or should it just stop playing since the initial lowest note is no longer held ?
    3. If one lifts just the lowest note, should the bass then play the next higher hold note ?
    4. Should monophonic play be echoed by the bass output ?

    .

    I won‘t publish the current script as i don‘t like its output, even though it works just as defined. The resulting glitches are infact ‚features‘ resulting from the choosen approach (You are holding it wrong, ie pressing/releasing to slow) - thats not what i thought playing with it will feel.
    I also dislike that releasing a lower note of a chord triggers the next higher one - it sounds odd and un-expected. Or that monophonic play of the ‚pad’ also plays the bass.

    BTW: The Note-Off clicks result from the fact that not all note-offs arrived at the same time. If the analysis time window runs out, a new bass note will be triggered with the lowest remaining note. When the last note-offs of the chord arrive, that bass note is kill again after just some milli seconds resulting in a click.

  • wimwim
    edited December 2019

    I was thinking about this chord / bass-note request some more last night. It occurred to me that the Polythemus might be a solution to this. It has several options for sending additional voices to different channels. One of those is "Keep Lowest". Each voice can be sent to a different channel, so the lowest note could always be sent to one channel, while the rest are sent to another.

    If a bass synth was set to receive on channel 1 only, and a chords synth was set to receive on all channels (or all channels except 1), maybe this would do what @pejman wants. I haven't tried this, and it's been awhile since I used it, but maybe it'll help, or inspire some ideas.

    Doug's video ...

  • _ki_ki
    edited December 2019

    @wim Cool idea, i‘ll try right away how Polythemus behaves regarding this short note problem - and maybe write an simple analysis-script to see if Polythemus introduces a delay :)

    ... some minutes later ...

    Hmm - Choosing just one voice and ‚keep lowest‘ should in my opinion keep only the lowest of multiple notes in channel one - but that‘s not the case. Pressing higher notes still output on channel one, even though already is in use by a lower note :/

    —-
    From the manual:

    There are currently six modes of allocation available in Polythemus which differ in how input midi note on messages are routed to voices.:
    • Next Free – uses the next free voice
    • Round Robin – uses the next sequential voice (e.g. 1,2,1,2 etc in a 2 voice
    mode)
    Keep Lowest – uses the next free voice, but if none available will steal the
    highest note value voice thereby ensuring the lowest note is the last to be
    replaced.

    • Keep Highest – uses the next free voice, but if none available will steal the
    lowest note value voice thereby ensuring the highest note is the last to be
    replaced
    • Random – picks a random voice, stealing any that are currently used.
    • Random not same – picks a random voice but not the one last chosen, stealing
    any that are currently used.
    —-

    So it acts as descibed... If there is just one note allowed, this will be the highest that is ‚stolen‘ by a new note - regardless if the new note is lower or higher than the old one.

    If one sets it up using 8 voices and only routing ch-0 to the bass, then it depends on the pressed-order which note is played on ch-1 (the first) and not the lowest note. And if you only press 3 notes, then ch1-3 will be used and for the next chord ch4-6 without issuing a new bass note on ch-1 . Third 3 note chord will use ch7-8 and for its highest note ch-1...

    .

    Nice idea, but Polythemus doesn‘t help at all for this problem ;)

  • :) I am currently playing around with a version that accompanies the pads with a bass - and got rid of the note sorting etc.

    There are now three timing windows

    • A longest for timeout, started by first note. No bass will be generated if timeout is reached
    • A longer one for two note chords (16msec, additionally bass for two-note-chords can be turned off)
    • A shorter one for > three note chords (1msec)

    These are the new rules, i am playing around with

    • As long as no bass note is playing and and timout is not reached

      • If there are two active notes, schedule a play event with long window.
      • If there are three or more notes, schedule a play event with short window
    • In the scheduled play-event if not yet playing, start the bass note

    • This bass note is held until all notes are released, not at all reacting to changes of notes, the chord etc
  • wimwim
    edited December 2019

    I admire your tenaciousness @_ki. I decided not to even go there after looking into a related request the first time. I concluded the only acceptable solution would have to depend on the assumption that all chord notes would arrive virtually simultaneously, and if there would never be overlapping chords. This would have been the case for chords sent from the chord generating app @pejman originally requested this to be used with. But I wasn't interested in creating something that depended on that narrow assumption and would be dysfunctional for anything else.

    If anyone can make something usable, my money is on you. ;)

  • @wim said:

    @espiegel123 said:
    @wim: btw, if what I said above works, it might be a great thing to add to the wiki page if you have a chance.

    Works perfectly. And I will. B)
    Thanks again, you really helped kick off a project I'm pretty excited about if it works.

    What do you think? That page is getting really long. Should I link a separate Mozaic Coding Tips and Tricks page, or just add a section to the existing page?

  • @wim: it might make sense to have three articles:

    main page with basic info

    Mozaic repository page made from the info currently on the main page

    Tips, tricks and techniques page

    I would chip in but I am currently tied up with something that is gobbling up my high-quality attention.

  • _ki_ki
    edited December 2019

    I think it might be better to keep the list of available scripts on the main page so that novice wiki users can‘t miss it.
    There already had been a PatchStorage link to all scripts on the initial Mozaic wiki page and we still got lots of questions like ‚is there a script for xxx‘ - thats why i categorized them and made the list more prominent.

    Since scripting is done by a minority of Mozaic users, putting the ‚Mozaic scripting tips & tricks‘ onto another wiki page makes sense. I have set up and cross linked the new Mozaic Tips & Tricks page - you just need to fill in the tips :)

  • @McD Hey any Chance One Finger Orchestra could get state saving. It’s one of my favorite scripts but I lose the chord and sequence pattern when reloading a preset in AUM. Thanks in advance...

  • @wim @_ki Thanks for giving this chord to Bass note thing some serious thought. I know nothing about coding but had an idea.... the script “In Order Arp” takes a chord and arpeggiates the notes in order from lowest to highest. Couldn’t that same thought be applied to the Chord to Bass note script idea... Instead of Arp’n the notes, have it play just the lowest note, with transpose, and maybe be able to add note repeats from 1/32 to 1/2, so you could have different baselines from 1 sustained note up to fast 1/32 notes. Also the ability to add Plus/Minus 1 Octave to the bass line so it would alternate between 2 octaves on selected Bass note. I don’t know... just a thought....

  • wimwim
    edited December 2019

    @Poppadocrock said:
    @wim @_ki Thanks for giving this chord to Bass note thing some serious thought. I know nothing about coding but had an idea.... the script “In Order Arp” takes a chord and arpeggiates the notes in order from lowest to highest. Couldn’t that same thought be applied to the Chord to Bass note script idea... Instead of Arp’n the notes, have it play just the lowest note, with transpose, and maybe be able to add note repeats from 1/32 to 1/2, so you could have different baselines from 1 sustained note up to fast 1/32 notes. Also the ability to add Plus/Minus 1 Octave to the bass line so it would alternate between 2 octaves on selected Bass note. I don’t know... just a thought....

    In a nutshell, the problem is in determining what a chord is. If chords always came in with all notes arriving at the same time, of if they were always the same number of notes, and if they never overlap (a new chord starting before the previous has finished playing), then you can reliably determine what a chord is and do something with the notes.

    That just doesn’t happen though, except in rare cases like an app that generates chords with no strum or random and no overlap.

    ISO you have to assume how far apart in time the notes might be, then figure out what to do if chords overlap, etc. Since you can’t see forward in time, this means you have to at a minimum delay doing anything to the chord until all the notes are played. It makes for lousy results.

    It’s one of those things that sounds like it should be simple, but just isn’t.

  • @Poppadocrock said:
    @McD Hey any Chance One Finger Orchestra could get state saving. It’s one of my favorite scripts but I lose the chord and sequence pattern when reloading a preset in AUM. Thanks in advance...

    Sure. I’ll fix it.

  • @Poppadocrock The ‚In Order Arp‘ just plays the notes in the order they arrived, if fed from other sequencers there are a lot of uncertainties which note of a chord arrives first - even if they are issued on the same beat of the sequencer. Its not defined that a sequencer always starts with the lowest note, maybe another sequencer issues them in the order entered into the grid. Or the some intermediate process could re-order the events for the same ‚system tick‘. But for manual play its easy to force up or down arps.

    Adding note repeats is a problem that could be solved by another script, or maybe with Step Poly Arp Unit.

    .

    BTW: I am still working on the „Bass Note“ script , I just couldn't stop myself and added some features. @McD planted the idea that one could check the intervals and in case of inversions output the base note instead of the lowest note. I have this running for 1. and 2. inversion of mayor, minor, diminished and suspended2 three note chords and it fun to play (Its optional btw). I am now working on detecting all three inversions of several four note chords...

    Fun fact: The offsets for the two inversions of an augmented chord are again augmented (all 3 variants have offsets 0,4,8) - so for an offset of 0,4,8 i can‘t detect if this is the normal form, inversion 1 or 2 - and therefore not decide on the bass note.. .

  • @_ki Gotcha, thanks a lot. Yea it was just a thought that I hoped would help in some way.

    Sweet! That Bass note thing has me really excited. The more features the merrier. Can’t wait to see how it turns out. Thank you so much for your time and effort.

    Both you and @wim have been so helpful, and generous on this forum. I sincerely appreciate everything that both of you have done. Cheers!

Sign In or Register to comment.