Loopy Pro: Create music, your way.

What is Loopy Pro?Loopy Pro is a powerful, flexible, and intuitive live looper, sampler, clip launcher and DAW for iPhone and iPad. At its core, it allows you to record and layer sounds in real-time to create complex musical arrangements. But it doesn’t stop there—Loopy Pro offers advanced tools to customize your workflow, build dynamic performance setups, and create a seamless connection between instruments, effects, and external gear.

Use it for live looping, sequencing, arranging, mixing, and much more. Whether you're a live performer, a producer, or just experimenting with sound, Loopy Pro helps you take control of your creative process.

Download on the App Store

Loopy Pro is your all-in-one musical toolkit. Try it for free today.

Request new Mozaic Scripts *HERE*

1404143454669

Comments

  • Yeah i forgot tto include the [i].

  • _ki_ki
    edited September 2021

    Excourse on arrays

    As @wim and @McD mentioned, an array is is just a list of valued associated with a name, where each value is stored at a specific index. To access a specific element of the array, the notation is varname[index]. The indices start with 0, so the 8th stored value is found at varname[7]. In Mozaic all variable names define arrays, when using a variable without the [index] notation, like in channel = 3, the 0th arrray index is used.

    There are several methods the list of values, obviously one could use

      colors[0] = 1
      colors[1] = 3
      colors[2] = 5
      colors[3] = 7
      colors[4] = 9
    

    and set each element individually - which will get lengthy if lots of elements need to be set.

    .

    To set adjacent elements one can use the array assignment syntax

      colors[0] = [1,3,5,7,9]
      colors[4] = [11,13,15,17,19]
    

    One can assign as many adjacent elements as one wants - but for better readability it‘s recommended to split the assignement into several lines as shown in the above example. There is an internal limit, as the maximum line length of Moazic is about 250 characters and in the Mozaic language commands don’t span over several lines.

    If only setting a limited number of elements and starting with the 0th entry use the shorter
    version colors = [1,3,5,7,9,11,13,15,17,19] without the square brackets on the left side of the assignment.

    .

    If there is a mathematical expression that determines the value, one could use a for loop to set the values:

      for i = 0 to 7
        colors[i] = i*2 +1
      endfor
    

    .

    If lots of elements (or all of them) need to be set to the same value one can use the
    FillArray varname[index], value, count Mozaic command.
    The example sets the value 7 to the elements [0] to [15] and the value 9 to the elements [16] to [31] :

      FillArray colors[0], 7, 16
      FillArray colors[16], 9, 16
    

    If count is omitted, the whole array of 1024 elements is filled with the given value.

    .

    If there is a repetition in the values, one can use the CopyArray source[index], dest[index], count Mozaic command:

      colors[0] = [1,3,5,7,9,11,13,15,17]
      for i = 1 to 15
        FillArry colors[i*8],   colors[0], 8
      endfor
    

    The first 8 elements are filled using array assignment and then the sequence is copied over to [8] to [15], [16] to [24] and so on.

    .

    .

    @AlmostAnonymous For your usecase of managing color and state of the LaunchPad Pro MK3 i recommend using two array with the padnumber as index. and not a folded version with an index increment of 2.

    .

    The topic of packing three values into a single integer and unpacking this single value back into three values was only relevant for the NoteStateArray which is the only Mozaic array with 2048 entries. The workaround was shorter than to use several variables (in that case 6 variables with 1024 elements) and then add if conditions which of the variables to access for which of the indices.

    The Mozaic tips and tricks wiki page contains many tips for the Mozaic scripting language.

  • Nice tutorial, @_Ki. Thank you for investing your time on this.

  • Wow. Thank you @_ki. I already read the stuff in the tips and tricks. This helped a lot more.
    Granted, a ton of this went over my head, but its pointing me in the right direction.
    (you should see the code i already have written....embarrassing but it works)

  • Probably a stupid question, so excuse me, but i havent found the answer. How do you manage and organize presets in Mozaic?. For example save a preset under a certain category.

  • @tahiche Unfortunately there is only a single ‚User Patches’ folder without subfolders. I added icon prefixes in front of the patch names to classify them into several sorted groups. Load patch, save patch with prefix, delete original patch - this took a while…. but worked out well in the long run.

  • @_ki said:
    @tahiche Unfortunately there is only a single ‚User Patches’ folder without subfolders. I added icon prefixes in front of the patch names to classify them into several sorted groups. Load patch, save patch with prefix, delete original patch - this took a while…. but worked out well in the long run.

    Thanks for the answer.
    Would you mind explaining how these were created?. I have a huge mess in the presets,

  • _ki_ki
    edited September 2021

    @tahiche The „lKeyHelper0.9b7b“ folder and its single patch was imported from a zip file that contained the patch inside a sub-folder named lKeyHelper0.9b7b. Since the b7b is a bit unusual i suppose that had been a unicode character for an icon.

    Also your „Mozaic“ folder was imported, because i don‘t have that in my installation. „MIDI Filters“ is a standard folder, but i‘m missing the „Generative“ standard folder in your screenshot.

    .

    This „hidden“ way to create sub-folders is not really supported, as they only are a side-effect of the zip unpacker Bram uses for importing.

    I don‘t know if a) one is able to delete files in these extra folders and b) if the folder will be deleted when it‘s empty. (Perhaps better first load the patch and save it which will place it into the „User Patches“ folder)

    .

    The „Backup Presets“ button top-right in the stand-alone Mozaic probably will only save the „User Patches“ folder to a zip file, which you could import after a fresh install. This would remove all extra folders and presets, including the „Mozaic“ one.
    To keep the Mozaic folder over a fresh install, you need to still have the zip that created it, or manually move all its patches to the „User Patches“ folder as described above before doing the backup and re-install.

  • @_ki said:
    @slicetwo

    With a trick ‚mis-using‘ the NoteName function, Moazic can display the letters A-G. To add the H, an extra IF was needed:

    .

    Exchange all 3 occurences of the line
    LabelKnob 0,{Bank }, (bank + 1) or LabelKnob knob,{Bank }, (bank + 1)
    with
    Call @RedrawBankKnob

    And add the following user-function

    @RedrawBankKnob
      if bank = 7
        LabelKnob 0,{Bank H}
      else
        ABCDEFG = [9,11,0,2,4,5,7]    
        LabelKnob 0,{Bank }, (NoteName ABCDEFG[bank], NO)
      endif
    @End
    

    BTW: The first occurence of the LabelKnob 0 inside the If Unassigned isn‘t needed, as the knob label is set afterwards

    Howdy. I'm reworking my rig to include an Octatrack, which has twice the banks as the Digi series. Apparently, I need to send bank change messages, too, from Mozaic, but I'm unsure of how to do that based on the script you helped me work out. Any ideas?

  • Check out SendMIDIBankSelect - page 71 of the manual. 👍🏼

  • Hi Everyone,

    I just picked up Mozaic on the suggestion of another user and I’m impressed with the possibilities . But I’m new to the programming language, and it’s been awhile since I’ve learned one.

    I initially got it because I’m using AUM with a knobby controller, the DJ Tech Tools MIDI Fighter Twister, and I want the controller encoders to reflect the state of the AUM project once I load it. As you know, this works fine on DAWs, but AUM doesn’t send MIDI out that way. I am not able to effectively use the touchscreen when I'm playing with other people (I wear gloves for a hand condition and switch between a guitar and a Linnstrument), so the MIDI Fighter Twister is my only control.

    Using Mozaic's knob layout (layout 1), I want to map 16 knobs to the 16 knobs on my MFT.
    I then want to map the 16 knobs in Mozaic to different parameters in AUM and in AUv3 plugins I use in different sessions.

    The goal is that when I load a new project in AUM, the state of things like channel levels and filter positions will be reflected on the MIDI Fighter Twister, which I can then use to control things in real time.

    In AUM I’ve routed the MFT in to Mozaic, and Mozaic out to the MFT. I have then routed Mozaic to MIDI control in AUM.

    I’ve done the knob tutorial in the manual, and have it controlling both the channel 1 volume in AUM and reflected on the bottom left encoder on my MFT.

    Here’s what’s not happening: Mozaic isn’t “hearing” the command from the MFT and passing it to AUM, and it’s not updating settings in AUM on launch. I have to grab the knob in Mozaic in order for it to take charge of the volume in AUM.

    I imagine that’s just a couple lines of code but I am not seeing an obvious solution in the manual.

    So to sum up:

    1. I need Mozaic to hear CC12 coming from my MIDI Fighter Twister, update its knob that is mapped to CC12, and also update the parameter mapped to CC12 in AUM (in this case, channel 1 volume).

    2. When I load a session, I want all the settings in the session that are connected with Mozaic to update their status on my MFT, so I can see what they are and I don't get "jumps" when I grab the knobs.

    Thanks for any suggestions you might have.

  • wimwim
    edited October 2021

    @JES000000 said:
    1. I need Mozaic to hear CC12 coming from my MIDI Fighter Twister, update its knob that is mapped to CC12, and also update the parameter mapped to CC12 in AUM (in this case, channel 1 volume).

    Are you sending relative or absolute cc's from the encoder? The implementation will be different depending on this.

    Also, do you need to see visual feedback and/or interact with the knobs in the Mozaic UI? Or can it just sit silently in the background?

  • @JES000000
    Here's an example script that assumes absolute CC's and that you don't need any GUI interaction. Seems to work, but I can't test it with a Twister. Anyway, maybe it'll give you some ideas or spark discussion.

    @Description
    Route Twister to this script, then to AUM control and also back to the Twister
    Note: Although this version of the script allows for different channels, it does not allow for different channel/CC combinations. For instance, it won't work right if yoiu have the same CC on two different channels.
    @End
    
    @OnLoad
    
      // This if block only executes on a new load, not from a saved session
      if Unassigned init
        init = YES
        FillArray values, -1, 128
        FillArray channels, -1, 128
      endif
    
      // If loading from a saved session this should update the twister
      for idx = 0 to 127
        if values[idx] <> -1
          SendMIDICC channels[idx], idx, values[idx]
        endif
      endfor
    
    @End
    
    @OnMidiCC
      // store the incoming CC value and channel
      values[MIDIByte2] = MIDIByte3
      channels[MIDIByte2] = MIDIChannel
    
      SendMIDIThru
    @End
    
  • Thanks Wim. I will try it out. The Mozaic script will be in the background. I need to visually interact with AUM and the Twister.

  • wimwim
    edited October 2021

    @JES000000 said:
    Thanks Wim. I will try it out. The Mozaic script will be in the background. I need to visually interact with AUM and the Twister.

    If you adjust anything in AUM, it will not be reflected back to the Twister. For instance, if you control a fader with the Twister, then move that same fader in AUM, you're outta luck. They will get out of sync and there's no way around that.

  • edited October 2021

    Thanks. So to clarify, my order of work is this once I have the template up and running would be

    Build synth sounds I like.
    Make AUM projects.
    Map performance parameters and channel volumes to Mozaic/MFT
    Only use Mozaic/MFT to control sounds when playing.

  • wimwim
    edited October 2021

    @JES000000 said:
    Thanks. So to clarify, my order of work is this once I have the template up and running would be

    Build synth sounds I like.
    Make AUM projects.
    Map performance parameters and channel volumes to Mozaic/MFT
    Only use Mozaic/MFT to control sounds when playing.

    This should work then. I think.

    If you need to be able to have the same CC on different channels coming from the Twister, the script would need to be enhanced a little bit. Right now if you had CC22 on both midi channel 1 and midi channel 2 it wouldn't work right.

    [edit] If you're sending relative CC values rather than absolute, then this script will be of no use.

  • Thanks again. Alas, no luck. On load, the session does not update the MFT. I’ve mapped CC12 to track 1 volume. The MFT can change track volume but isn’t registering in Mozaic. Changes to the knob on Mozaic show up on the MFT and also change the track volume Here’s my script in case there are obvious errors.

    @OnLoad
    Log {Welcome to Mozaic}
    ShowLayout 1
    LabelKnobs {MFT}
    LabelKnob 0, {ch1 vol}
    @End

    @OnKnobChange
    if LastKnob = 0
    setting = GetKnobValue 0
    SendMIDICC 0, 12, setting // send out CC#7 on channel 0
    endif
    @End

    @Description
    Route Twister to this script, then to AUM control and also back to the Twister
    Note: Although this version of the script allows for different channels, it does not allow for different channel/CC combinations. For instance, it won't work right if yoiu have the same CC on two different channels.
    @End

    @OnLoad

    // This if block only executes on a new load, not from a saved session
    if Unassigned init
    init = YES
    FillArray values, -1, 128
    FillArray channels, -1, 128
    endif

    // If loading from a saved session this should update the twister
    for idx = 0 to 127
    if values[idx] <> -1
    SendMIDICC channels[idx], idx, values[idx]
    endif
    endfor

    @End

    @OnMidiCC
    // store the incoming CC value and channel
    values[MIDIByte2] = MIDIByte3
    channels[MIDIByte2] = MIDIChannel

    SendMIDIThru
    @End

    And here is the MIDI routing setup.

  • Before I have a go at this myself I thought I'd ask here first.

    I just realised I could use my old iPad and iPhone to control AUM synths running on a new iPad via BT. I then saw this cardboard expression pedal that uses an iPhone and its tilt sensors with RTPmidi to create an expression pedal https://beatbars.com/en/cardboard-expression-pedal.html Then I found you can assign the tilt sensors in Mozaic to midi CCs.

    Before I have a go at scripting this, does anyone have any pointers as to why it might or might not work, and traps for newbs who can't code? Any help would be greatly appreciated. Thanks!

  • @JES000000 said:
    Thanks again. Alas, no luck. On load, the session does not update the MFT. I’ve mapped CC12 to track 1 volume. The MFT can change track volume but isn’t registering in Mozaic. Changes to the knob on Mozaic show up on the MFT and also change the track volume Here’s my script in case there are obvious errors.

    You can't have two @OnLoad sections like that.
    And what are you trying to do with that @OnKnobChange block?

    Does the script as I posted it, without the added blocks work? Did you maybe append my code to some other code that was already there rather than replacing it?

    When you post code in the forum, if you place three "back ticks" (```) on a line by themselves before and after the code, it'll avoid formatting issues.

  • Thanks @wim! I just loaded your code without anything else, and now it seems to update the MFT on loading a session. Thank you so much. I am now going to try and build a few more complicated sessions to see if it works in my full intended application.

  • @JES000000 said:
    Thanks @wim! I just loaded your code without anything else, and now it seems to update the MFT on loading a session. Thank you so much. I am now going to try and build a few more complicated sessions to see if it works in my full intended application.

    Let me know if you run into problems with bigger setups. Thinking about it, I'm a bit concerned that dumping too many messages all at once to the Twister might be too much for it to handle. I'm working on a version that would meter them out by a small delay just in case.

  • Wow. I really appreciate that. I’m limiting myself to a single page of the Twister, so 16 knobs. But I could see someone else going to town.

    Eventually, I’ll have a couple templates, but right now I’m just retrofitting existing songs to control layouts, which is not the “right” way to do it but will be a good test. We are taking the week off band practice but it’ll get a solid road test next week.

  • wimwim
    edited October 2021

    @JES000000 said:
    Wow. I really appreciate that. I’m limiting myself to a single page of the Twister, so 16 knobs. But I could see someone else going to town.

    Eventually, I’ll have a couple templates, but right now I’m just retrofitting existing songs to control layouts, which is not the “right” way to do it but will be a good test. We are taking the week off band practice but it’ll get a solid road test next week.

    Here's an enhanced version you can try if you like: https://www.dropbox.com/s/8xo8l6tfh4ozo41/Controller Feedback and Restore v0.2.mozaic?dl=0

    I made it so that it should accommodate any channels and CC's you assign in the Twister. It no longer has the restriction of having a CC used only on a single channel. It also includes ways to manually dump the settings to the controller rather than just on session load. If it seems like its working correctly and does what you need then let me know and I'll finalize it and put it up on patch storage. No rush, and no worries if you decide not to use it. 👍🏼

  • Don’t think there’s a script like this but wondering about something that can alter the midi notes in certain ways, maybe like the Fugue Machine ’Invert’ button, or mirror the incoming midi ‘flip x, or flip y’ under process in atom 2, or even like Conway’s game of life, in xynthsizer, maybe all of them combined? Or any other ways to…? Something to jumble up a set amount of midi notes, for example, 1 bar, 2 bars, 4bars, then either spits out the altered version of the midi, ie. inverted, or you can blend between the 2. So then you could set the mix between the original midi notes, and the inverted/mirrored/etc. notes. > @JES000000 said:

    Hi Everyone,

    I just picked up Mozaic on the suggestion of another user and I’m impressed with the possibilities . But I’m new to the programming language, and it’s been awhile since I’ve learned one.

    I initially got it because I’m using AUM with a knobby controller, the DJ Tech Tools MIDI Fighter Twister, and I want the controller encoders to reflect the state of the AUM project once I load it. As you know, this works fine on DAWs, but AUM doesn’t send MIDI out that way. I am not able to effectively use the touchscreen when I'm playing with other people (I wear gloves for a hand condition and switch between a guitar and a Linnstrument), so the MIDI Fighter Twister is my only control.

    Using Mozaic's knob layout (layout 1), I want to map 16 knobs to the 16 knobs on my MFT.
    I then want to map the 16 knobs in Mozaic to different parameters in AUM and in AUv3 plugins I use in different sessions.

    The goal is that when I load a new project in AUM, the state of things like channel levels and filter positions will be reflected on the MIDI Fighter Twister, which I can then use to control things in real time.

    In AUM I’ve routed the MFT in to Mozaic, and Mozaic out to the MFT. I have then routed Mozaic to MIDI control in AUM.

    I’ve done the knob tutorial in the manual, and have it controlling both the channel 1 volume in AUM and reflected on the bottom left encoder on my MFT.

    Here’s what’s not happening: Mozaic isn’t “hearing” the command from the MFT and passing it to AUM, and it’s not updating settings in AUM on launch. I have to grab the knob in Mozaic in order for it to take charge of the volume in AUM.

    I imagine that’s just a couple lines of code but I am not seeing an obvious solution in the manual.

    So to sum up:

    1. I need Mozaic to hear CC12 coming from my MIDI Fighter Twister, update its knob that is mapped to CC12, and also update the parameter mapped to CC12 in AUM (in this case, channel 1 volume).

    2. When I load a session, I want all the settings in the session that are connected with Mozaic to update their status on my MFT, so I can see what they are and I don't get "jumps" when I grab the knobs.

    Thanks for any suggestions you might have.

    Not for your specific question but be sure to checkout the 250 or so Mozaic scripts on Patchstorage.com as well as the Audiobus Wiki. Tons of great creations Available!

  • @Poppadocrock said:
    Don’t think there’s a script like this but wondering about something that can alter the midi notes in certain ways, maybe like the Fugue Machine ’Invert’ button, or mirror the incoming midi ‘flip x, or flip y’ under process in atom 2, or even like Conway’s game of life, in xynthsizer, maybe all of them combined? Or any other ways to…? Something to jumble up a set amount of midi notes, for example, 1 bar, 2 bars, 4bars, then either spits out the altered version of the midi, ie. inverted, or you can blend between the 2. So then you could set the mix between the original midi notes, and the inverted/mirrored/etc. notes.

    Here are a few I found. I don't know if they fit what you're thinking though.

    If you're talking about altering incoming midi notes you'd first need to capture them, which would mean first playing through the 1, 2, 4, whatever bars, capturing and storing them, then applying transformations. Otherwise, you'd need to sequence them in the app.

    It's a good idea for an script. Pretty involved as a development effort, but others (not me) have pulled off things with at least that level of difficulty.

  • Thanks for the suggestions. Right on, yea that did cross my mind, about it having to play through the midi first. Yea it’s way over my head, just wanted to throw it out there. maybe it could be like a midi looper but you can set the output to rearrange the notes based on several parameters or options? Then you could set how many bars you want original midi to loop then how many bars the mutated midi would loop, so you could have a riff, but then every other bar it spits out a variation, like the invert, or jumbles/flips/etc the notes… I don’t know just thinking out loud really, lol.

  • @Poppadocrock said:
    Thanks for the suggestions. Right on, yea that did cross my mind, about it having to play through the midi first. Yea it’s way over my head, just wanted to throw it out there. maybe it could be like a midi looper but you can set the output to rearrange the notes based on several parameters or options? Then you could set how many bars you want original midi to loop then how many bars the mutated midi would loop, so you could have a riff, but then every other bar it spits out a variation, like the invert, or jumbles/flips/etc the notes… I don’t know just thinking out loud really, lol.

    Here's how I'm thinking I would design it.

    So the workflow would be to first use a "clip recorder" to record. (btw, unquantized playback with Mozaic = high CPU usage, less storage space. quantized = low CPU, more storage space).

    Next you would use a "clip variation editor" menu, where clips can be duplicated, and probabilities for transformations can be applied. Some can be applied permanently to the clip, others can be re-generated on every play.

    These clips are then placed onto a "clip sequencer", using Mozaic's Layout 2.

    Here's where I would make it slightly more complex, for version 2.0, or an "Advanced" version. The clip sequencer could allow you to add a clip to a "group" allowing you to quickly apply a clip's settings to the whole group.

    This way, you could tweak the randomization parameters for any group of clips during live performance,

    and have a button for "freeze/re-use last variation of group A/B/C or copy it to clipboard", and a probability setting for "repeat earlier variation generated by clip group". You could also re-record a clip, and apply the new recording as a change to the group.

    And finally, each slot of the sequencer could reference multiple tracks of clips, of which the program only picks one to play from, based on a simple probability setting. From there, the clip sequencer could be made Euclidian.

    The other questions to answer would be: what types of transpositions/transformations would be applied, what would those parameters be, and how would they be displayed? I'm not really good at that stuff, and I've barely explored what's already out there.

    But if you're more familiar with other apps that transform melodies and whatnot, and this is an idea you want to pursue, then I would recommend making a list of ideas for the transformations next. From there, you could stare at a blank Mozaic layout and imagine where things would go, or I might have some ideas. Designing a UI sketch in Mozaic is easy to learn. I think your idea sounds like a lot of fun, but it needs the creativity of someone who uses "generative components" more than I currently do.

  • @Skyblazer said:

    @Poppadocrock said:
    Thanks for the suggestions. Right on, yea that did cross my mind, about it having to play through the midi first. Yea it’s way over my head, just wanted to throw it out there. maybe it could be like a midi looper but you can set the output to rearrange the notes based on several parameters or options? Then you could set how many bars you want original midi to loop then how many bars the mutated midi would loop, so you could have a riff, but then every other bar it spits out a variation, like the invert, or jumbles/flips/etc the notes… I don’t know just thinking out loud really, lol.

    Here's how I'm thinking I would design it.

    So the workflow would be to first use a "clip recorder" to record. (btw, unquantized playback with Mozaic = high CPU usage, less storage space. quantized = low CPU, more storage space).

    Next you would use a "clip variation editor" menu, where clips can be duplicated, and probabilities for transformations can be applied. Some can be applied permanently to the clip, others can be re-generated on every play.

    These clips are then placed onto a "clip sequencer", using Mozaic's Layout 2.

    Here's where I would make it slightly more complex, for version 2.0, or an "Advanced" version. The clip sequencer could allow you to add a clip to a "group" allowing you to quickly apply a clip's settings to the whole group.

    This way, you could tweak the randomization parameters for any group of clips during live performance,

    and have a button for "freeze/re-use last variation of group A/B/C or copy it to clipboard", and a probability setting for "repeat earlier variation generated by clip group". You could also re-record a clip, and apply the new recording as a change to the group.

    And finally, each slot of the sequencer could reference multiple tracks of clips, of which the program only picks one to play from, based on a simple probability setting. From there, the clip sequencer could be made Euclidian.

    The other questions to answer would be: what types of transpositions/transformations would be applied, what would those parameters be, and how would they be displayed? I'm not really good at that stuff, and I've barely explored what's already out there.

    But if you're more familiar with other apps that transform melodies and whatnot, and this is an idea you want to pursue, then I would recommend making a list of ideas for the transformations next. From there, you could stare at a blank Mozaic layout and imagine where things would go, or I might have some ideas. Designing a UI sketch in Mozaic is easy to learn. I think your idea sounds like a lot of fun, but it needs the creativity of someone who uses "generative components" more than I currently do.

    Wow. Thanks for that, lots of great points and ideas. I’ve only coded a midi velocity delay based on that one AB thread that had several tutorials in it, can’t remember what it was called, but that’s it. I could hone this idea a little more, but it is way over my head in terms of coding it. I thought it would be a cool script, and wanted to throw it out there. I’ll try to make the idea a little more specific, and share it here. Thanks for the feedback.

  • @wim said:
    Check out SendMIDIBankSelect - page 71 of the manual. 👍🏼

    I just saw this reply for some reason. Where would it actually go in the code? Also, I tried making it to the knobs could do different letters beyond H. I based it off the code that's already in there, but it kept turning into musical notes (A, A#, etc.). I feel like I obviously missed something. Haha.

    `// This script lets you send PC messages 0-127 on any MIDI channel of your choice. Use the BANK knob to choose the bank, and the PATTERN pads to choose your pattern. Change the MIDI channel using the CHANNEL knob. Big ups to @wim and @_ki from the Audiobus forums for helping me make this work! Made specifically with the Elektron boxes in mind, but it could probably work for other gear.

    @Description TURN ON MIDI LINK

    @End

    @OnLoad
    default_channel = 15
    default_bank = 0
    default_program = 0

    if Unassigned init
    // Only do this stuff on a new load so that the
    // State is the same in saved sessions

    init = YES
    
    ch = default_channel
    bank = default_bank
    program = default_program
    

    SetKnobValue 0, TranslateScale bank, 0,7, 0,127
    SetKnobValue 3, TranslateScale ch, 0,15, 0,127

    SetKnobValue 0,bank 
    Call @RedrawBankKnob
    
    Call @ClearPads
    

    endif

    LabelPad 0, {01}
    LabelPad 1, {02}
    LabelPad 2, {03}
    LabelPad 3, {04}
    LabelPad 4, {05}
    LabelPad 5, {06}
    LabelPad 6, {07}
    LabelPad 7, {08}
    LabelPad 8, {09}
    LabelPad 9, {10}
    LabelPad 10, {11}
    LabelPad 11, {12}
    LabelPad 12, {13}
    LabelPad 13, {14}
    LabelPad 14, {15}
    LabelPad 15, {16}

    Call @RedrawBankKnob
    LabelKnob 1, { }
    LabelKnob 2, { }
    LabelKnob 3, {Channel },ch+1

    LabelKnobs {Controls}
    LabelPads {Patterns}

    SetShortName {ElkPtrn}

    ShowLayout 2

    @End

    @OnKnobChange

    knob = LastKnob
    val = GetKnobValue LastKnob

    if knob = 0
    bank = Round (TranslateScale val, 0,127, 0,7)
    Call @RedrawBankKnob
    Call @ClearPads

    elseif knob = 3
    

    ch = Round (TranslateScale val, 0,127, 0,15)
    LabelKnob 3, {Channel },ch+1
    endif

    @End

    @OnPadDown
    program = LastPad

    Call @ClearPads
    Latchpad program, YES
    SendMIDIProgramChange ch, (program + (bank*16))

    @end

    @ClearPads

    // Blank all pads
    for idx = 0 to 15
    LatchPad idx,NO
    endfor

    @End

    @RedrawBankKnob
    if bank = 7
    LabelKnob 0,{Bank H}
    else
    ABCDEFG = [9,11,0,2,4,5,7]
    LabelKnob 0,{Bank }, (NoteName ABCDEFG[bank], NO)
    endif
    @End

    `

Sign In or Register to comment.