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!

19192949697102

Comments

  • edited May 2023

    @espiegel123 , I think the information is stored in the setknobposition and the setknoblabel .

    @spiegel said, Find the lines in your code where knob values are fetched. Add a log line after any such line to record the fetched value.

    Unfortunately, I don't know what to do in this regard.




    @OnLoad for knob = 0 to 9 if Unassigned init init = YES gate = [57,57,57,57] swing = [0,0,0,0] p = LastPad ccgate = [1,6,11,16] ccswin = [2,7,12,17] ////for changable knobs for user kgate = [5] kswin = [6] padrevert = 0 padrev = 4 ColorPad 0, 5 endif Call @SetKnobPosition Call @SetKnobLabel endfor LabelPads {TRACKS } LabelPad 0, {1️⃣} LabelPad 1, {2️⃣} LabelPad 2, {3️⃣} LabelPad 3, {4️⃣} @End @OnPadDown //Log {pad },p,{ paddown},{ befor} //Log {knob },knob,{ paddown},{ befor} p = LastPad for knob = 0 to 9 Call @SetKnobPosition Call @SetKnobLabel endfor //Log {pad },p,{ paddown},{ after} //Log {knob },knob,{ paddown},{ after} if LastPad >=0 and LastPad <=3 ColorPad padrevert, 0 ColorPad LastPad, 5 padrevert = LastPad if LastPad = 0 LabelKnobs {TRACK 1} elseif LastPad = 1 LabelKnobs {TRACK 2} elseif LastPad = 2 LabelKnobs {TRACK 3} elseif LastPad = 3 LabelKnobs {TRACK 4} endif endif @End @OnKnobChange knob = LastKnob value = GetKnobValue //Log {pad },p,{ knobchange},{ befor} //Log {knob },knob,{ knobchange},{ befor} for p = 0 to 3 p = LastPad gate = GetKnobValue kgate if LastKnob = kgate SendMIDICC 1, ccgate[p], gate elseif LastKnob = kswin SendMIDICC 1, ccswin[p], swin endif endfor //Log {pad },p,{ knobchange},{ after} //Log {knob },knob,{ knobchange},{ after} Call @SetKnobPosition Call @SetKnobLabel @End @SetKnobPosition Log {pad },p,{ setknobpos},{ befor} Log {knob },knob,{ setknobpos},{ befor} for p = 0 to 3 p = LastPad //if knob = kgate gate = GetKnobValue kgate SetKnobValue kgate, gate ////[p] ////????? swin = GetKnobValue kswin SetKnobValue kswin, swin ////[p] ////????? //endif endfor Log {pad },p,{ setknobpos},{ after} Log {knob },knob,{ setknobpos},{ after} @End @SetKnobLabel Log {pad },p,{ setknoblab},{ befor} Log {knob },knob,{ setknoblab},{ befor} for p = 0 to 3 p = LastPad gate = GetKnobValue kgate lgate = Round TranslateScale gate, 0,127,-100,100 LabelKnob kgate, {GATE}, { } ,lgate if LastKnob = kgate LabelKnobs {Track },p+1,{ GATE},{ },lgate endif swin = GetKnobValue kswin lswin = Round TranslateScale swin, 0,127,0,100 LabelKnob kswin, {SWING},{ } ,lswin if LastKnob = kswin LabelKnobs {CREAM },p+1,{ SWING},{ },lswin endif endfor Log {pad },p,{ setknoblab},{ after} Log {knob },knob,{ setknoblab},{ after} @End
  • @pejman : you don’t know what to do in what regard?

  • @pejman wrote “ I think the information is stored in the setknobposition and the setknoblabel .”

    Those are functions . The question is what specific variable or variables will hold the information about the knob value so that can be restored when you tap a different pad and come back.

    You need to identify that variable or variables so that you can check whether you are assigning them correctly. You will use logging to check that they get assigned correctly.

    If they are assigned correctly, you should also see from the log lines you added, if they are still at the correct value when you tap another pad,turn a knob and then tap the original pad.

  • @pejman : here is a (made up ) example of what I am asking you to figure out.

    What variable or variables store knob 5’s value when pad 0 is active so that it can be restored after another pad has been tapped and the knob turned?

    When pad 0 is active and knob 5 is turned, its value is stored in myPad0knobs[5]. Any time pad 0 is tapped, the value in myPad0knobs[5] is used to restore the knob value.

  • I didn't see anything suspicious, the knob numbers and pad numbers are reported correctly.
    Only in the setknobpos section, 0 to 9 was reported for knobs, that is, 0 to 9 was reported every time the pad or knob was tapped.
    So I removed the knobs loops from the script. And I also removed ( for p and p = LastPads ) which were redundant . As already mentioned by @wim.
    But I still don't understand the problem.




    @OnLoad //for knob = 0 to 9 if Unassigned init init = YES gate = [57,57,57,57] swing = [0,0,0,0] p = LastPad ccgate = [1,6,11,16] ccswin = [2,7,12,17] ////for changable knobs for user kgate = [5] kswin = [6] padrevert = 0 padrev = 4 ColorPad 0, 5 endif Call @SetKnobPosition Call @SetKnobLabel //endfor LabelPads {TRACKS } LabelPad 0, {1️⃣} LabelPad 1, {2️⃣} LabelPad 2, {3️⃣} LabelPad 3, {4️⃣} @End @OnPadDown //Log {pad },p,{ paddown},{ befor} //Log {knob },knob,{ paddown},{ befor} p = LastPad //for knob = 0 to 9 Call @SetKnobPosition Call @SetKnobLabel //endfor //Log {pad },p,{ paddown},{ after} //Log {knob },knob,{ paddown},{ after} if LastPad >=0 and LastPad <=3 ColorPad padrevert, 0 ColorPad LastPad, 5 padrevert = LastPad if LastPad = 0 LabelKnobs {TRACK 1} elseif LastPad = 1 LabelKnobs {TRACK 2} elseif LastPad = 2 LabelKnobs {TRACK 3} elseif LastPad = 3 LabelKnobs {TRACK 4} endif endif @End @OnKnobChange knob = LastKnob value = GetKnobValue //Log {pad },p,{ knobchange},{ befor} //Log {knob },knob,{ knobchange},{ befor} //for p = 0 to 3 //p = LastPad gate = GetKnobValue kgate if LastKnob = kgate SendMIDICC 1, ccgate[p], gate elseif LastKnob = kswin SendMIDICC 1, ccswin[p], swin endif //endfor //Log {pad },p,{ knobchange},{ after} //Log {knob },knob,{ knobchange},{ after} Call @SetKnobPosition Call @SetKnobLabel @End @SetKnobPosition //Log {pad },p,{ setknobpos},{ befor} //Log {knob },knob,{ setknobpos},{ befor} //for p = 0 to 3 //p = LastPad //if knob = kgate gate = GetKnobValue kgate SetKnobValue kgate, gate ///[p] ////????? swin = GetKnobValue kswin SetKnobValue kswin, swin ////[p] ////????? //endif //endfor Log {pad },p,{ setknobpos},{ after} Log {knob },knob,{ setknobpos},{ after} @End @SetKnobLabel //Log {pad },p,{ setknoblab},{ befor} //Log {knob },knob,{ setknoblab},{ befor} //for p = 0 to 3 //p = LastPad gate = GetKnobValue kgate lgate = Round TranslateScale gate, 0,127,-100,100 LabelKnob kgate, {GATE}, { } ,lgate if LastKnob = kgate LabelKnobs {Track },p+1,{ GATE},{ },lgate endif swin = GetKnobValue kswin lswin = Round TranslateScale swin, 0,127,0,100 LabelKnob kswin, {SWING},{ } ,lswin if LastKnob = kswin LabelKnobs {CREAM },p+1,{ SWING},{ },lswin endif //endfor //Log {pad },p,{ setknoblab},{ after} //Log {knob },knob,{ setknoblab},{ after} @End
  • @espiegel123 said:
    @pejman : you don’t know what to do in what regard?

    I meant your sentence below.

    @spiegel said, Find the lines in your code where knob values are fetched. Add a log line after any such line to record the fetched value.

  • @pejman: you need to identify the variable that holds the value for the knob and where in your script the knob value gets assigned to the variable.

    Then you need to add log lines to print out the variable wherever it appears.

    Is that clear?

    The reason you need to do this is that from what you have described one of the following is probably true:

    • the variable where you expect to store the value isn’t getting the correct value
    • the variable you are using is also being assigned a value when you don’t intend to
    • the variable isn’t being referenced when you tap a different pad and tap pad 0 again

    To figure out what is happening, you first need to know what variable is storing the value . Then you can see if it is changing only when you want it to.

  • Everything is reported correctly, in log for values, I don't see anything suspicious .


    @OnLoad //for knob = 0 to 9 if Unassigned init init = YES gate = [57,57,57,57] swing = [0,0,0,0] p = LastPad ccgate = [1,6,11,16] ccswin = [2,7,12,17] ////for changable knobs for user kgate = [5] kswin = [6] padrevert = 0 padrev = 4 ColorPad 0, 5 endif Call @SetKnobPosition Call @SetKnobLabel //endfor LabelPads {TRACKS } LabelPad 0, {1️⃣} LabelPad 1, {2️⃣} LabelPad 2, {3️⃣} LabelPad 3, {4️⃣} @End @OnPadDown //Log {pad },p,{ paddown},{ befor} //Log {knob },knob,{ paddown},{ befor} p = LastPad //for knob = 0 to 9 Call @SetKnobPosition Call @SetKnobLabel //endfor //Log {pad },p,{ paddown},{ after} //Log {knob },knob,{ paddown},{ after} if LastPad >=0 and LastPad <=3 ColorPad padrevert, 0 ColorPad LastPad, 5 padrevert = LastPad if LastPad = 0 LabelKnobs {TRACK 1} elseif LastPad = 1 LabelKnobs {TRACK 2} elseif LastPad = 2 LabelKnobs {TRACK 3} elseif LastPad = 3 LabelKnobs {TRACK 4} endif endif @End @OnKnobChange knob = LastKnob value = GetKnobValue //Log {pad },p,{ knobchange},{ befor} //Log {knob },knob,{ knobchange},{ befor} //for p = 0 to 3 //p = LastPad gate = GetKnobValue kgate if LastKnob = kgate SendMIDICC 1, ccgate[p], gate //Log Round gate ,{ pad}, p,{ },knob elseif LastKnob = kswin SendMIDICC 1, ccswin[p], swin endif //endfor //Log {pad },p,{ knobchange},{ after} //Log {knob },knob,{ knobchange},{ after} Call @SetKnobPosition Call @SetKnobLabel @End @SetKnobPosition //Log {pad },p,{ setknobpos},{ befor} //Log {knob },knob,{ setknobpos},{ befor} //for p = 0 to 3 //p = LastPad //if knob = kgate gate = Round GetKnobValue kgate SetKnobValue kgate, gate ////[p] ////????? Log {setknobpos},Round gate,{pad },p,{knob },knob swin = GetKnobValue kswin SetKnobValue kswin, swin ////[p] ////????? //endif //endfor //Log {pad },p,{ setknobpos},{ after} //Log {knob },knob,{ setknobpos},{ after} @End @SetKnobLabel //Log {pad },p,{ setknoblab},{ befor} //Log {knob },knob,{ setknoblab},{ befor} //for p = 0 to 3 //p = LastPad gate = GetKnobValue kgate lgate = Round TranslateScale gate, 0,127,-100,100 LabelKnob kgate, {GATE}, { } ,lgate if LastKnob = kgate LabelKnobs {Track },p+1,{ GATE},{ },lgate endif swin = GetKnobValue kswin lswin = Round TranslateScale swin, 0,127,0,100 LabelKnob kswin, {SWING},{ } ,lswin if LastKnob = kswin LabelKnobs {CREAM },p+1,{ SWING},{ },lswin endif //endfor //Log {pad },p,{ setknoblab},{ after} //Log {knob },knob,{ setknoblab},{ after} @End
  • @pejman : can you please answer the question, I asked earlier. What variable stores the value of knob 5 when pad 0 is active so that it can be restored after you come back to pad 0 (after having tapped pad 1 and returning to pad 0)?

  • @espiegel123 said:
    @pejman : can you please answer the question, I asked earlier. What variable stores the value of knob 5 when pad 0 is active so that it can be restored after you come back to pad 0 (after having tapped pad 1 and returning to pad 0)?

    Lastknob or LastPad , I don't know exactly which one.

  • @pejman said:

    @espiegel123 said:
    @pejman : can you please answer the question, I asked earlier. What variable stores the value of knob 5 when pad 0 is active so that it can be restored after you come back to pad 0 (after having tapped pad 1 and returning to pad 0)?

    Lastknob or LastPad , I don't know exactly which one.

    Maybe the question isn’t clear. Neither of those are variables where you can store a value.

    Let me try to explain what you need to look for. With this information finding your problem should be straightforward.

    If I understand correctly, you want your program to do the following with regards to knob 5.

    • when pad 0 was the last pad, track changes to knob 5 and store the value (so that it can be restored if you tap another pad , change knob 5 then tap pad 0)
    • When you tap pad 1, track changes to knob 5 and store the value (so that it can be restored if you tap a different pad and return to pad 1)

    For that to work, you need two different variables (which might have different names or might be different slots in an array): one for knob 5’s value when pad 0 was last pad and a different one for when pad 1 was last pad.

    So, the question is what are those variables.

  • Can we make bets on the page number where we stomp out all the bugs in this app? I’ll take 100 for $100.

    Sorry… it’s great to see people working to help solve some really tricky UI behavior. For anyone that’s following along there’s good information being shared and good questions being asked.

  • wimwim
    edited May 2023

    It's not so much about solving any tricky behavior at this point as to help someone learn the basic concepts and trouble shooting mindset to be able to achieve other goals. Hopefully that learning process is helpful for others, though for people who get bothered by unread threads of no interest to them, it may be an annoyance.

  • @espiegel123 , I do not really know. Maybe it's something I haven't come across before or I don't have any experience with it at all.

  • @wim said:
    It's not so much about solving any tricky behavior at this point as to help someone learn the basic concepts and trouble shooting mindset to be able to achieve other goals. Hopefully that learning process is helpful for others, though for people who get bothered by unread threads of no interest to them, it may be an annoyance.

    I’m NOT complaining… just making bored comments because the A-Team is on the job. Carry on guys. I do find value in the discussion since adding “layers” to knobs is in itself a really interesting concept and NOT something I would tackle without some expert help on the best data model and algorhythms. Ideally this conversation is labeled as a Problem Solving Mozaic exercise and not the Product Annoucement thread. It’s a bit of a Zombie thread in that way. Personally, I prefer new questions start with new thread and not some ancient thread. That’s just me… many prefer fewer threads group around topics. But in 2 years this conversation will be lost to the archives since the Title doesn’t match the discussion I might be seeking around UI Design with Mozaic.

  • @McD said:

    @wim said:
    It's not so much about solving any tricky behavior at this point as to help someone learn the basic concepts and trouble shooting mindset to be able to achieve other goals. Hopefully that learning process is helpful for others, though for people who get bothered by unread threads of no interest to them, it may be an annoyance.

    I’m NOT complaining… just making bored comments because the A-Team is on the job. Carry on guys. I do find value in the discussion since adding “layers” to knobs is in itself a really interesting concept and NOT something I would tackle without some expert help on the best data model and algorhythms. Ideally this conversation is labeled as a Problem Solving Mozaic exercise and not the Product Annoucement thread. It’s a bit of a Zombie thread in that way. Personally, I prefer new questions start with new thread and not some ancient thread. That’s just me… many prefer fewer threads group around topics. But in 2 years this conversation will be lost to the archives since the Title doesn’t match the discussion I might be seeking around UI Design with Mozaic.

    Indeed, a separate thread might be appropriate if this is going to go on for a long time. Trouble is there's no knowing going into a discussion if it's going to be short or long. It could end a few posts from now or go on for months.

  • @pejman said:
    @espiegel123 , I do not really know. Maybe it's something I haven't come across before or I don't have any experience with it at all.

    If you don't know, that's fine and important to understand. Your script stores information about knob values, but if you aren't clear about where the particular information is supposed to be stored you can't figure out why it isn't working right. So, let's see if we can clarify this. I think we need to help you get on track with that before you will be able to find the errors in your code.

    when you have a line like myKnobValue = getKnobValue lastKnob, my knobvalue is the variable that stores the knobvalue.

    Variables places where you can stash information and from where you can later retrieve the information. So, you need to know where you stashed the information if you want to retrieve it. For the problem at hand, you need a place to store the value knob 5 has when pad 0 is active and a different place for when pad 1 is active, another one for when pad 2 is active and one for when pad 3 is active.

    There are many ways to do this.

    The simplest to understand is to have 4 differently named variables. (A more advanced method is to store the values in their own slots in an array, but I think that would be confusing at this stage). Looking at the code, it looks like it was intended to use arrays called gate and swing but outside of the onLoad procedure, the only array slot that is referenced is the first slot and so they always have the last value the knob had regardless of the last pad.

    Read what I just wrote carefully and look at your code.

    Ask yourself, how can I store knob 5's value when last Pad is 0 so that it isn't affected by a change to knob 5 when lastPad is 1.

    Your solution will have two important elements: different places to store the knob values depending on what lastpad is and logic so that when you store the value, you store it in the right place.

    If you understand arrays, the different places can be different slots in an array.

  • edited May 2023

    @spiegel,
    Unfortunately, I still haven't found the answer to the puzzle, but before we get into this topic, I have a question for you.
    Have you been up to date with the script path since I brought it up with @wim ? Page93 at 11may , which started with this title : Hi @wim. This is the script we are debugging… .

    If you are completely familiar with our previous path and know everything, then we will continue on our own path. I am very eager for this mystery to be solved.

    Here's what my script looked like before, which worked without problem. But I had a problem to add double tap on knob to reset some knobs to specific values.


    @OnLoad for knob = 0 to 9 if Unassigned init init = YES sgate = [57,57,57,57] sswing = [0,0,0,0] ccgate = [1,6,11,16] ccswin = [2,7,12,17] kgate = 5 kswin = 6 selection = LastPad padrevert = LastPad padrev = LastPad shift = 0 endif Call @SetKnobPosition Call @SetKnobLabel endfor ShowLayout 0 LabelPads {TRACKS} LabelPad 0, {1️⃣} LabelPad 1, {2️⃣} LabelPad 2, {3️⃣} LabelPad 3, {4️⃣} @End @OnPadDown selection = LastPad for knob = 0 to 9 Call @SetKnobPosition Call @SetKnobLabel endfor if LastPad >=0 and LastPad <=3 ColorPad padrevert, 0 ColorPad LastPad, 1 padrevert = LastPad if LastPad = 0 LabelPad 0, {1️⃣} LabelKnobs {TRACK 1} elseif LastPad = 1 LabelPad 1, {2️⃣} LabelKnobs {TRACK 2} elseif LastPad = 2 LabelPad 2, {3️⃣} LabelKnobs {TRACK 3} elseif LastPad = 3 LabelPad 3, {4️⃣} LabelKnobs {TRACK 4} endif endif @End @OnKnobChange knob = LastKnob value = GetKnobValue if knob = kgate sgate[selection] = gate elseif knob = kswin sswing[selection] = Round swin endif for p = 0 to 3 if LastPad = p if LastKnob = kgate SendMIDICC 1, ccgate[p], gate LabelKnobs {APP },p+1,{ Gate},{ },lgate elseif LastKnob = kswin SendMIDICC 1, ccswin[p], swin LabelKnobs {APP },p+1,{ SWING},{ },lswin endif endif endfor Call @SetKnobLabel @End @SetKnobPosition if knob = kgate SetKnobValue knob, sgate[selection] elseif knob = kswin SetKnobValue knob, sswing[selection] endif @End @SetKnobLabel gate = GetKnobValue kgate lgate = Round TranslateScale gate, 0,127,-100,100 LabelKnob 5, {Gate}, { } ,lgate swin = GetKnobValue kswin lswin = Round TranslateScale swin, 0,127,0,100 LabelKnob 6, {swing},{ } ,lswin @End
  • @pejman : I followed your conversation with @wim . And he gave you a lot of good advice and my sense from your responses to him and the problems you have had, is that we would help you more by helping you to find and solve the problem yourself than to solve it for you.

    If the script you just posted works, you should reread what I posted in my last few posts and compare the script that works line by line with the one that doesn’t (my recommendation is to print them out on paper).

    If the old one works, you should be able to look at the differences and understand why they impact the behavior.

    Or maybe go back and carefully read what wim told you.

    I am taking the approach of making you self-sufficient. I’ve probably done what I can if you are still feeling stuck with what I was trying to help you see. Unless you have specific questions.

  • edited May 2023

    @espiegel123 , Ok so let's continue with our script to see how we can solve the problem.
    Unfortunately, I cannot solve or answer the question you asked me in the previous post.

    I know that everyone has a way of teaching.

    Don't you think that if like @wim who sent me the script and gave me explanations in its lines that made me learn and understand the concepts very well, you should also do this to avoid the complexity and length of the posts.

    Of course, your opinion as a teacher is very respectful to me. You have spent a lot of time for me so far, I really appreciate you.

    I hope you don't take my comment as rude.

  • @pejman : my interpretation of what happened when wim solved problems for you is that it did not end up furthering your understanding.

    I believe that the question that I have asked you is a straightforward one. It isn’t a trick question.

    I think that for you to be able to solve problems on your own, you will need to be able to look at your script and be able to identify where in the script you store knob 5’s value.

    If you do that, there is a next question: will that variable change if I tap pad 1 and turn knob 5.

    If that seems like a hard question, let me know where you are stuck in figuring it out.

  • I've started a new thread for Mozaic help :smile:
    https://forum.audiob.us/discussion/55532/mozaic-help-line/p1?new=1

    @pejman , let's continue there. If you aren't sure how to get started let me know.

  • wimwim
    edited May 2023

    Hi @pejman. This shift in approach came about because it didn't seem to be working providing you commented code examples to try to help you understand why your scripts have problems. I would find that you had not fixed problems in the code or that I didn't explain well enough because you didn't take the right actions.

    You seem to want to learn to make scripts on your own. To do that you need to understand the basics. It seems like the best thing to do is to help you understand how to identify and fix problems one at a time rather than toss out code bits that you don't really understand.

    The code you posted above is a good example. You didn't make some changes where I tried to explain what you needed to do. Where you did make changes, some of them weren't correct because I suppose you didn't understand the explanation I gave. I don't mind that, but it isn't getting you anywhere, so I think backtracking until you can understand things better is a good idea.

    I think it would be best for you to decide if you want to press in and learn one step at a time, or if you prefer others to write whole scripts for you.

    You can learn to write scripts if you're able to focus on methodically solving problems. You can probably get others to write them for you if you describe what they should do clearly enough. Either approach is fine. If you do want to move ahead with the learning process, the other thread set up by @espiegel123 is a better place to do it.

  • edited May 2023

    @wim ,

    Is there something wrong in this script? Are there extra words? As far as I remember, you said that there is no need for sgate and [selection].

    Can it be written more simply?


    @OnLoad for knob = 0 to 9 if Unassigned init init = YES sgate = [57,57,57,57] sswing = [0,0,0,0] ccgate = [1,6,11,16] ccswin = [2,7,12,17] kgate = 5 kswin = 6 selection = LastPad padrevert = LastPad padrev = LastPad shift = 0 endif Call @SetKnobPosition Call @SetKnobLabel endfor ShowLayout 0 LabelPads {TRACKS} LabelPad 0, {1️⃣} LabelPad 1, {2️⃣} LabelPad 2, {3️⃣} LabelPad 3, {4️⃣} @End @OnPadDown selection = LastPad for knob = 0 to 9 Call @SetKnobPosition Call @SetKnobLabel endfor if LastPad >=0 and LastPad <=3 ColorPad padrevert, 0 ColorPad LastPad, 1 padrevert = LastPad if LastPad = 0 LabelPad 0, {1️⃣} LabelKnobs {TRACK 1} elseif LastPad = 1 LabelPad 1, {2️⃣} LabelKnobs {TRACK 2} elseif LastPad = 2 LabelPad 2, {3️⃣} LabelKnobs {TRACK 3} elseif LastPad = 3 LabelPad 3, {4️⃣} LabelKnobs {TRACK 4} endif endif @End @OnKnobChange knob = LastKnob value = GetKnobValue if knob = kgate sgate[selection] = gate elseif knob = kswin sswing[selection] = Round swin endif for p = 0 to 3 if LastPad = p if LastKnob = kgate SendMIDICC 1, ccgate[p], gate LabelKnobs {APP },p+1,{ Gate},{ },lgate elseif LastKnob = kswin SendMIDICC 1, ccswin[p], swin LabelKnobs {APP },p+1,{ SWING},{ },lswin endif endif endfor Call @SetKnobLabel @End @SetKnobPosition if knob = kgate SetKnobValue knob, sgate[selection] elseif knob = kswin SetKnobValue knob, sswing[selection] endif @End @SetKnobLabel gate = GetKnobValue kgate lgate = Round TranslateScale gate, 0,127,-100,100 LabelKnob 5, {Gate}, { } ,lgate swin = GetKnobValue kswin lswin = Round TranslateScale swin, 0,127,0,100 LabelKnob 6, {swing},{ } ,lswin @End
  • @pejman - sorry, I don't think the fragmented and disjointed approach you keep trying is a good use of either of our time. It takes a long time to construct answers to your questions and this is made much harder when you jump around between different pieces of code. I don't see any point in drilling back into this and re-explaining things that I failed to make clear earlier.

    I think you want to learn. If so, I think you should stick with it and do your best to follow a step-by-step approach until you start to understand. At this point you are lacking understanding of some fundamental ideas, without which you'll never be able to write your own code.

    IMO @espiegel123 is doing a great job at trying to walk you through a systematic approach, taking one piece at a time and making sure you understand what's happening before moving on. I would be doing the same.

    If you're not up for learning the basics then maybe someone will write a complete script for you if you clearly explain exactly what it should do. But then you'll be no further along in trying to write your own future scripts.

    I still believe you can get past this block in understanding how to code if you stick with it. 👍🏼

  • edited May 2023

    Anyone know of a script that maps a set of specific CC values to pitch bend? Here's what I'm looking to do: my controller emits CC74 starting at a value of 60 or so and the full range brings it up to about 110. I think Wim's MIDI Scaler will handle the CC values part but what about converting to the right pitch bend range?

    EDIT: never mind! I figured this out with two very easy tools. First, Loopy Pro's MIDI learn tools make the mapping of CC74 in the specific range I need completely trivial. Amazing how easy it is to get the MIDI to bend to what I want! Second, MFX Convert does the conversion from CC to PitchBend out of the box. Voila!

  • Damn. I'm on my 999th referral to mfxConvert in this thread. I thought your post was gonna get me to 1,000 @lukesleepwalker , but you foiled me.

  • edited July 2023

    @RajahP said:

    @wim said:

    @RajahP said:

    @wim said:

    @RajahP said:
    Is it very difficult to insert a ‘pitch’ knob on Simple Scaler? Please..

    I don't understand what you mean.

    @wim said:

    @RajahP said:
    Is it very difficult to insert a ‘pitch’ knob on Simple Scaler? Please..

    I don't understand what you mean.

    Something like this, where you can transpose a midi file’s key in simple Scaler?

    Sorry, I'd rather not add that level of complexity. Maybe you can talk someone else into adding it to a new version.

    Ok..

    Logic came thru.... Thanks

  • edited July 2023

    @RajahP said:

    @RajahP said:

    @wim said:

    @RajahP said:

    @wim said:

    @RajahP said:
    Is it very difficult to insert a ‘pitch’ knob on Simple Scaler? Please..

    I don't understand what you mean.

    @wim said:

    @RajahP said:
    Is it very difficult to insert a ‘pitch’ knob on Simple Scaler? Please..

    I don't understand what you mean.

    Something like this, where you can transpose a midi file’s key in simple Scaler?

    Sorry, I'd rather not add that level of complexity. Maybe you can talk someone else into adding it to a new version.

    Ok..

    Logic came thru.... Thanks

    Better yet, Mozaic’s visual feedback is critical.. so Logic’s inspector solved the transpose issue.. fitting a midi file, any midi file into a scale/key.. Amazing stuff..

  • @wim said:
    @pejman - sorry, I don't think the fragmented and disjointed approach you keep trying is a good use of either of our time. It takes a long time to construct answers to your questions and this is made much harder when you jump around between different pieces of code. I don't see any point in drilling back into this and re-explaining things that I failed to make clear earlier.

    I think you want to learn. If so, I think you should stick with it and do your best to follow a step-by-step approach until you start to understand. At this point you are lacking understanding of some fundamental ideas, without which you'll never be able to write your own code.

    IMO @espiegel123 is doing a great job at trying to walk you through a systematic approach, taking one piece at a time and making sure you understand what's happening before moving on. I would be doing the same.

    If you're not up for learning the basics then maybe someone will write a complete script for you if you clearly explain exactly what it should do. But then you'll be no further along in trying to write your own future scripts.

    I still believe you can get past this block in understanding how to code if you stick with it. 👍🏼

    Maybe he can try with chatgpt, its super helpful, you can paste the documentation of anything for it to understand

Sign In or Register to comment.