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!

1979899100101103»

Comments

  • @pejman said:
    Hi @wim @McD

    Thanks @McD for explanation.

    @wim , From reading your code, I noticed that you sort the notes through a loop .

    I had tried before I asked you my question .
    But not based on loop, but based on being if’s, with 2 array : The first array to collect held notes and the second array to sort them with ( if midinote = x put in x array’s sell), In the middle of the way, I realized that the direction I was going was completely wrong.

    But In the middle of the way, I realized that I needed a lot of (IFs) and I realized that the direction I was going was completely wrong. I was disappointed.

    In this script I was only trying on the first three notes .

    @OnLoad
    FillArray note, -1, 5
    FillArray count, -1, 5

    log {firstnote ➡️}, count[0] , { secondnote➡️}, count[1],{ thirdnote➡️}, count[2], { fortnote➡️}, count[3]
    @End

    @OnMidiNoteOn
    n = MIDINote
    CopyArray n, note[MIDINote] , 1

    Call @counter
    //log {firstnoteON ➡️}, note[0] , { secondnoteON➡️}, note[1],{ thirdnoteON➡️}, note[2], { fortnoteON➡️}, note[3]
    @End

    @OnMidiNoteOff
    n = -1
    CopyArray n, note[MIDINote]
    Call @counter
    //log {firstnoteoff ➡️}, note[0] , { secondnoteoff➡️}, note[1],{ thirdnoteoff➡️}, note[2], { fortnoteoff➡️}, note[3]

    @End

    @counter
    if note[0] = 0
    CopyArray note[0], count[0]
    elseif note[1] = 1
    CopyArray note[1], count[0]
    elseif note[2] = 2
    CopyArray note[2], count[0]
    elseif note[3] = 3
    CopyArray note[3], count[0]
    endif
    if note[0] = 0 and note[1] = 1
    CopyArray note[0], count[0]
    CopyArray note[1], count[1]
    elseif note[0] = 0 and note[2] = 2
    CopyArray note[0], count[0]
    CopyArray note[2], count[1]
    elseif note[0] = 0 and note[3] = 3
    CopyArray note[0], count[0]
    CopyArray note[3], count[1]
    endif

    if note[1] = 1 and note[3] = 3
    CopyArray note[1], count[0]
    CopyArray note[3], count[1]
    endif
    log {firstnote ➡️}, count[0] , { secondnote➡️}, count[1],{ thirdnote➡️}, count[2], { fortnote➡️}, count[3]
    @End

    After you sent me the script, I remembered that there is a script ( Latch and Switch ) by Mark Dammer, that can sort the notes in order in the pads. (Track the notes that are being held down and sort them lowest note to highest note.) , I had worked with this script, but I didn't remember that it could sort the notes .

    But unfortunately, I can't read this script to understand exactly how he did it.

    If you try this patch please set it to replace mode . With pressing shift and latch on/off pad (pad num 12 )

    https://patchstorage.com/latch-and-switch/?
    utm_source=discord&utm_medium=patchbot&utm_campaign=embed

    Just came across this discussion mentioning “Latch and Switch”:
    The sorting algorithm I am using in the script is called “Bubble Sort”. You can find an explanation here:
    https://en.wikipedia.org/wiki/Bubble_sort
    It can be found in the @ShowNotes subroutine.

  • @pejman said:
    Hi everyone.

    Is it possible to create specific channel output in the nodes which contains midi plug-in in aum , through aum itself ?

    It is possible to select a channel for each node's input, but there is no channel selection for its output.

    Is this an AUM question or Mozaic question?

  • @espiegel123 said:

    @pejman said:
    Hi everyone.

    Is it possible to create specific channel output in the nodes which contains midi plug-in in aum , through aum itself ?

    It is possible to select a channel for each node's input, but there is no channel selection for its output.

    Is this an AUM question or Mozaic question?

    Hi @espiegel123 ❤️.

    This is an AUM question .

  • @pejman said:

    @espiegel123 said:

    @pejman said:
    Hi everyone.

    Is it possible to create specific channel output in the nodes which contains midi plug-in in aum , through aum itself ?

    It is possible to select a channel for each node's input, but there is no channel selection for its output.

    Is this an AUM question or Mozaic question?

    Hi @espiegel123 ❤️.

    This is an AUM question .

    You might want to ask in an AUM related thread

  • Hi , @catherder
    Thanks for sort information , The topic is very interesting for me, I will definitely study it .

  • wimwim
    edited June 9

    @pejman, the answer is No. You cannot set the midi channel that is output from an AUM channel without other plugins. Atom itself can send on any channel you want, however.

  • Hi , @wim.

    Do you mean atom pianoroll 2 ?
    I use atom 1 .

  • edited June 9

    @wim.

    @wim said:

    @pejman said:
    @wim .

    I'm glad you understand what I mean.

    Here you go @pejman. This should work as far as I understand your request:

    @Description
    Track the notes that are being held down and sort them lowest note to highest note.
    NOTE: This is designed to only handle a SINGLE MIDI CHANNEL at a time.
    @End
    
    @OnLoad
      noteCount = 0
      FillArray heldNotes,-1
    @End
    
    @OnMidiNoteOn
      note = MIDINote
      Call @AddNote
      Call @SortNotes
      Call @LogNotes
    @End
    
    @OnMidiNoteOff
      note = MIDINote
      Call @RemoveNote
      Call @SortNotes
      Call @LogNotes
    @End
    
    @AddNote
      // Add a note to the stack
      heldNotes[noteCount] = note
      Inc noteCount
    @End
    
    @RemoveNote
      // Remove a note from the stack
      r = 0
      found = NO
      
      // Read through the stack until the note is found.
      // Once found, replace that with the next note in the stack
      // until there are no more notes (note = -1).
      repeat
        if heldNotes[r] = note
          found = YES
          Dec noteCount
        endif
        
        if found
          heldNotes[r] = heldNotes[r+1]
        endif
        Inc r  
      until heldNotes[r] = -1 or r = 1023
    @End
    
    @SortNotes
      // Sort the stack by copying the notes
      // in lowest-to highest order into a temporary array
      // then replace the active array with the temporary array
      
      // Exit if there are no notes left in the stack
      if noteCount = 0
        Exit
      endif
      
      FillArray tmp, -1
      sortCount = noteCount
      
      for s = 0 to (sortCount-1)
        Call @GetLowest
        tmp[s] = lowest
        note = lowest
        Call @RemoveNote
      endfor
      
      CopyArray tmp,heldNotes
      // noteCount has been decreasing as we remove already
      // copied notes, so we need to restore it here.
      noteCount = sortCount
    @End
    
    @GetLowest
      if noteCount = 0
        Exit
      endif
      
      lowest = 128
      for l = 0 to (noteCount - 1)
        if heldNotes[l] < lowest
          lowest = heldNotes[l]
        endif
      endfor
    @End
    
    @LogNotes
      if noteCount > 0
        Log {=== Start Note Array Contents ===}
        for l = 0 to (noteCount - 1)
          Log {[}, l, {] }, (NoteName heldNotes[l],YES), { (}, heldNotes[l], {)}
        endfor
        Log {===  End Note Array Contents  ===}
        Log { }
      else
        Log {No held notes.}
        Log { }
      endif
    @End
    

    Based on this script that you kindly wrote for me, I have two more requests from you. 🙏🙏.

    1, log only highest note in separate log .
    2 , sort notes in highest to lowest note ( mirroring ) . And log .

    I'm going to extract them from the script and send them to another plugin.

    I would be very grateful if you would do me this favor again.🙏.

  • @pejman said:
    Hi , @wim.

    Do you mean atom pianoroll 2 ?
    I use atom 1 .

    Yes, I meant Atom 2. I don't think Atom 1 can send on any other channel.

  • wimwim
    edited June 9

    @pejman said:
    Based on this script that you kindly wrote for me, I have two more requests from you. 🙏🙏.

    1, log only highest note in separate log .
    2 , sort notes in highest to lowest note ( mirroring ) . And log .

    I'm going to extract them from the script and send them to another plugin.

    I would be very grateful if you would do me this favor again.🙏.

    You really don't need much special to get these two different logs. Check the @LogNotes event.

    • Rather than for l = 0 to (notecount - 1), just count the opposite direction: for l = (notecount - 1) to 0
    • The highest note is: heldnotes[notecount - 1].

    I hope that helps.

  • @wim ,
    Very thanks . It works. ❤️🙏.

  • edited June 17

    @wim .
    Hi wim .
    I want to create one strummer ( like guitar ) patch with your chord tracking notes patch .

    I have added some code lines to your script , I marked them with this sign (🔺).

    There is problem ( overlapping start notes in octave with original notes ) with formula in delay send note for octave .
    SendMIDINoteOn 0, heldNotes[l]+12, ve[l] , l* delay + (l + 1 * delay)

    I try it with delay 50 for example .
    I play for first time note C1 , then add E1 and then add G1 .

    According to the above code, their octave have been add to them in the order that you can see them in the screenshot.

    I have tried many formulas in delay send note section , but none of them have been successful. Please help me to know what formula I should write to make what I expect to happen.

    Naturally, I expect that by increasing or decreasing the delay that I have created by knob No. 0, the delay of the notes relative to each other from the lowest note to the highest note , will decrease or increase in an equal proportion every time I play a chord or note to note. I add or subtract from the previous one.

    @Description
    Track the notes that are being held down and sort them lowest note to highest note.
    NOTE: This is designed to only handle a SINGLE MIDI CHANNEL at a time.
    @End

    @OnLoad
    noteCount = 0
    FillArray heldNotes,-1
    SetShortName {strumer}
    delay = 50
    @End

    @OnMidiNoteOn
    note = MIDINote
    ve = MIDIVelocity //🔺
    Call @AddNote
    Call @SortNotes
    Call @LogNotes
    @End

    @OnMidiNoteOff
    note = MIDINote
    Call @RemoveNote
    Call @SortNotes
    Call @LogNotes
    @End

    @OnKnobChange //🔺
    delay = Round TranslateScale (GetKnobValue 0), 0, 127, 0, 100
    LabelKnob 0, delay
    Call @LogNotes

    @End

    @AddNote
    // Add a note to the stack
    heldNotes[noteCount] = note
    Inc noteCount
    @End

    @RemoveNote
    // Remove a note from the stack
    r = 0
    found = NO

    // Read through the stack until the note is found.
    // Once found, replace that with the next note in the stack
    // until there are no more notes (note = -1).
    repeat
    if heldNotes[r] = note
    found = YES
    Dec noteCount
    endif

    if found
    heldNotes[r] = heldNotes[r+1]
    endif
    Inc r
    until heldNotes[r] = -1 or r = 1023
    @End

    @SortNotes
    // Sort the stack by copying the notes
    // in lowest-to highest order into a temporary array
    // then replace the active array with the temporary array

    // Exit if there are no notes left in the stack
    if noteCount = 0
    Exit
    endif

    FillArray tmp, -1
    sortCount = noteCount

    for s = 0 to (sortCount-1)
    Call @GetLowest
    tmp[s] = lowest
    note = lowest
    Call @RemoveNote
    endfor

    CopyArray tmp,heldNotes
    // noteCount has been decreasing as we remove already
    // copied notes, so we need to restore it here.
    noteCount = sortCount
    @End

    @GetLowest
    if noteCount = 0
    Exit
    endif

    lowest = 128
    for l = 0 to (noteCount - 1)
    if heldNotes[l] < lowest
    lowest = heldNotes[l]
    endif
    endfor
    @End

    @LogNotes
    if noteCount > 0
    Log {=== Start Note Array Contents ===}
    for l = 0 to (noteCount - 1)
    Log {[}, l, {] }, (NoteName heldNotes[l],YES), { (}, heldNotes[l], {)} //🔺🔺🔺
    SendMIDINoteOn 0, heldNotes[l], ve[l] ,l * delay
    SendMIDINoteOn 0, heldNotes[l]+12, ve[l] , l * delay + (l + 1 * delay)
    SendMIDINoteOff 0, heldNotes[l], 0 , l*delay +10
    SendMIDINoteOff 0, heldNotes[l]+12, 0 , l * delay + (l + 1 * delay)
    endfor
    Log {=== End Note Array Contents ===}
    else
    Log {No held notes.}
    endif
    @End

  • Is there anyone who can help me in this matter?

Sign In or Register to comment.