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.

Request new Mozaic Scripts *HERE*

1575859606163»

Comments

  • edited August 7

    @wim said:
    @jjpl2001, here's an example that I think probably does the same thing as your script, though without the XY pad display. I added an on/off button just because I prefer not to assume things should always be running.

    @OnLoad
      // LFO default settings
      min = 0
      max = 127
      lowNote = 69  // A3
      highNote = 93 // A5
      
      if (Unassigned init)
        init = YES
        speed = 500 // half a Hz.
        state = 0
        SetKnobValue 0, (TranslateScale speed,100,3000,0,127)
        run = YES  // change to NO to not automatically start on load
      endif
      
      // GUI
      LabelKnob 0, {Speed}
      LabelPad 0, {Start/Stop}
      LatchPad 0, run
      
      // Set timer interval and start the timer
      SetTimerInterval speed
      if run
        StartTimer
      endif
    @End
    
    @OnTimer
      // Check the value of x and send corresponding MIDI note on
      if state = 0
        SendMIDINoteOn 1, lowNote, 127 // A3
        SendMIDINoteOff 1, lowNote, 127 // A3
        state = 1
      elseif state = 1
        SendMIDINoteOn 1, highNote, 127 // A5
        SendMIDINoteOff 1, highNote, 127 // A5
        state = 0
      endif
    @End
    
    @OnKnobChange
      if LastKnob = 0
        v = GetKnobValue 0
        speed = TranslateScale v, 0, 127, 100, 2000
        SetTimerInterval speed
        ResetTimer
      endif
    @End
    
    @OnMidiCC
      // Check for MIDI CC 01
      if MIDIByte2 = 1
        if MIDIByte3 < 64
          speed = 1000
        else
          speed = 3000
        endif
        Call @MyLFOSetup
      endif
    @End
    
    @OnPadDown
      if LastPad = 0
        run = not run
        LatchPad 0,run
        if run
          StartTimer
        else
          StopTimer
        endif
      endif
    @End
    
    
    @Description
    This script sends alternating notes based on a timer that is set by the speed knob.
    @End
    

    Thank you very much, your corrections and insights helped me to improve my code.

    https://patchstorage.com/piano-led-visualizer-rotary-sim-alternate/
    https://patchstorage.com/piano-led-visualizer-rotary-sim-sweep-v1-0/

    After some rework I eded up with 2 versions that will do the trick.

    The first code is alternating 2 notes at both ends of my keyboard's LED Strip.

    @OnLoad 
      // Default settings
      currentNote = 29  // MIDI note for F1
      Note01 = 29       // F1 note
      Note02 = 98       // D7 note
      SusNote = 95      // B6 note
      speed = 625       // Default speed in milliseconds (corresponding to 0.8 Hz)
      SpeedFast = 0.8 * 2
      SpeedLow = 6 * 2    
      sustainState = 0  // Sustain pedal state
    
      // Set timer interval and start the timer
      SetTimerInterval speed
      StartTimer
    @end
    
    @OnTimer
      // Send the current note
      SendMIDINoteOn 1, currentNote, 127
      SendMIDINoteOff 1, currentNote, 127
    
      // Alternate the note
      if currentNote = Note01  // If current note is F1
        currentNote = Note02   // Switch to D7
      else
        currentNote = Note01   // Switch to F1
      endif
    @end
    
    @OnMidiCC
      // Check for MIDI CC 01 (modwheel) to control speed
      if MIDIByte2 = 1
        // Map the modwheel value to a speed range of 0.8 Hz to 6 Hz
        modwheelValue = MIDIByte3
        speedHz = TranslateScale modwheelValue, 0, 127, SpeedLow, SpeedFast
        speed = Round(1000 / speedHz)  // Convert Hz to milliseconds
        SetTimerInterval speed
      endif
    
      // Check for MIDI CC 64 (sustain pedal)
      if MIDIByte2 = 64
        if MIDIByte3 >= 64 and sustainState = 0
          SendMIDINoteOn 1, SusNote, 127  // B6 Note On
          sustainState = 1
        elseif MIDIByte3 < 64 and sustainState = 1
          SendMIDINoteOff 1, SusNote, 0   // B6 Note Off
          sustainState = 0
        endif
      endif
    @end
    
    @Description
    This script alternates between sending MIDI notes F1 and D7 periodically. The speed of alternation is controlled by the incoming MIDI CC 01 (modwheel), ranging from approximately 0.8 Hz to 6 Hz. The script also detects the sustain pedal (MIDI CC 64) and sends a single B6 note on when pressed and a single B6 note off when released. The notes are sent with a velocity of 127 on MIDI channel 1.
    @end
    

    The second code turns on a trail of notes at one side of the Keyboard's LED strip

    @OnLoad 
      // Default settings
      currentNote = 92    // Start with D6
      startNote = 92      // Starting note (D6)
      endNote = 98        // Ending note (D7)
      speed = 625/4         // Default speed in milliseconds (corresponding to 0.8 Hz)
      SpeedLow = 0.8 * 2 * 4
      SpeedFast = 6 * 2 * 3.5
      SustNote = 29
      sustainState = 0    // Sustain pedal state
    
      // Set timer interval and start the timer
      SetTimerInterval speed
      StartTimer
    @end
    
    @OnTimer
      // Send the current note
      SendMIDINoteOff 1, currentNote-1, 127
      SendMIDINoteOn 1, currentNote, 127
    
      // Move to the next note
      currentNote = currentNote + 1
      if currentNote > endNote
        currentNote = startNote
      endif
    @end
    
    @OnMidiCC
      // Check for MIDI CC 01 (modwheel) to control speed
      if MIDIByte2 = 1
        // Map the modwheel value to a speed range of 0.8 Hz to 6 Hz
        modwheelValue = MIDIByte3
        speedHz = TranslateScale modwheelValue, 0, 127, SpeedLow, SpeedFast
        speed = Round(1000 / speedHz)  // Convert Hz to milliseconds
        SetTimerInterval speed
      endif
    
      // Check for MIDI CC 64 (sustain pedal)
      if MIDIByte2 = 64
        if MIDIByte3 >= 64 and sustainState = 0
          SendMIDINoteOn 1, SustNote, 127  // B6 Note On
          sustainState = 1
        elseif MIDIByte3 < 64 and sustainState = 1
          SendMIDINoteOff 1, SustNote, 0   // B6 Note Off
          sustainState = 0
        endif
      endif
    @end
    
    @Description
    This script sequentially turns on and off MIDI notes from D6 to D7. The speed of the sequence is by the incoming MIDI CC 01 (modwheel), ranging from approximately 0.8 Hz to 6 Hz. The script also detects the sustain pedal (MIDI CC 64) and sends a single B6 note on when pressed and a single B6 note off when released. The notes are sent with a velocity of 127 on MIDI channel 1.
    @end
    

    Here is the end result
    https://youtu.be/NAIaEoDAVyY

  • Nice job @jjpl2001 👍🏼

  • Is there a script that will quantise incoming midi velocities to a certain range, eg. 100 to 127? in this example, any incoming note below 100 will be output at a value of 100, and any incoming note above 100 will be output at the same velocity as its input value.

  • That’s going to be easy. You can also do it easily with MIDI Curves.

  • wimwim
    edited September 11

    @Gavinski said:
    Is there a script that will quantise incoming midi velocities to a certain range, eg. 100 to 127? in this example, any incoming note below 100 will be output at a value of 100, and any incoming note above 100 will be output at the same velocity as its input value.

    https://patchstorage.com/midi-scaler-v1-0/

    It doesn't do "clipping" as you describe though. It compresses the full range proportionally into the given range.

Sign In or Register to comment.