1. IMPORTANT:
    We launched a new online community and this space is now closed. This community will be available as a read-only resources until further notice.
    JOIN US HERE

Mute/bypass controller

Discussion in 'Scripting Workshop' started by albertas123, Mar 31, 2014.

  1. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Oh that's a surprise! I never even thought to try it because I figured it was simply for use in Multiscripts.

    BTW That was a short honeymoon (or did you drop that post during your honeymoon?) :)
     
    Last edited: May 4, 2014
  2. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Honeymoon will have to wait a bit, there are lots of things to be done before that. The wedding alone was a solid financial feat, so after some recouping we will start planning the honeymoon :)
     
  3. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Ah Yes, such things are rather expensive these days. But, in any case congratulations are in order :thumbsup:
     
  4. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
  5. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Hey Mr. Albertas123,

    I got to thinking last night that for your situation, a mulit-script (MS) might be superior to a per-script block.

    So I wrote a little MS for you to try if you are so inclined. I'm attaching both the KScript editor source code and the pre-compiled or Kontakt Ready source code (in case you are not using Nils' Editor). The file named MIDISplitterKR.ksp is a text file that can be pasted into the MS Editor's first script slot. Then just hit Apply and the control panel should appear.

    The way you would use this script is to load your 10 instruments into Kontakt and set their MIDI receive channels 1 to 10. Then, on the MS control panel, set Input Chan to whatever MIDI channel you were using before (the output channel of your Triple Play and Stomp Box). Set your stomp box to provide a contiguous block of 10 MIDI CCs, as an example, 101..110

    On the MS panel, set Out-1 CC# to the base CC number you've chosen (101 in the above example).

    The way the MS works is it expects to receive all MIDI data on the Input Chan and will reject all MIDI data on other channels.

    Performance data coming in on the Input Channel will be split (cloned) and sent to output channels 1..10 but only to those channels that are ENABLED by the numbered buttons. When the button is lit, the channel is enabled and when it is off, the channel is disabled. You can control the buttons either with your mouse or with your stomp box. CC101 will control Button 1, CC102 will control Button 2, etc. A CC value of 64..127 will turn on the button while a value of 0..63 will turn off the button.

    If you need instructions for how to open the MS Editor and paste the script into it, please let me know.

    Anyway, try it out and see what you think. This might even be easier to use because you won't have modify the instruments at all, just set their MIDI receive channel.

    Rejoice,

    Bob
     

    Attached Files:

  6. albertas123

    albertas123 New Member

    Messages:
    16
    Wow! That script works great, thanks Big Bob! :)

    I am wondering is it possible to edit it this way that all the instruments will be on the same channel, and I would just ignore_events like in the instrument scripts that Evil Dragon wrote, but do it globally in the multiscript? Because in your script I am limited to 16 instruments and all of my midi channels are occupied, so I cannot mapped any other midi note messages in different places in my DAW.

    I am also thinking of the script (multiscript would be the best) that would work like Intrument Bank where I can choose different instruments in a bank and mapped my choice to my foot pedal, but without using the built-in Instrument Bank. Why? Because in Instrument Bank I cannot edit an instrument that is not developed by Native Instruments (the message "The instrument is lock and cannot be edited" appears).
     
  7. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Actually, if you need to cover more than 16 instruments, the existing script could be extended to cover all 64 MIDI channels supported by Kontakt.
    But, how would you intend to control more than ten from your stomp box? The way you first explained your requirement, I thought you had like 10 foot switches you wanted to use to enable/disable instruments with. How do you envision you will control say 64 instruments?


    I'm afraid I don't follow you here. Locked instruments are locked instruments, what does it have to do with being in a bank or on a specific MIDI channel, etc.

    I thought you specifically didn't want to implement the instrument bank function because you wanted to be able to select more than one instrument at a time from the collection (bank).?

    I believe that the MS I just gave you implements pretty accurately what you have been asking for. So, I think maybe you ought to completely think out just what it is you want to do because this is starting to look like a moving target :)

    In other words, why don't you describe completely and precisely what you would like to be able to do. We can then tell you if it is doable or not and if not, what kind of alternative might be possible.

    Rejoice,

    Bob

    BTW My name is Bob, what'e yours?
     
  8. albertas123

    albertas123 New Member

    Messages:
    16
    My footpedal has more than 16 switches. It has a lot of banks that can be connected, but you are right. 64 midi channels should be enough, thank you :)

    The second question is not connected to the previous problem. It just popped into my head because it is a similar problem and was suggested earlier by Evil Dragon. This problem is not about my guitar but my midi keyboard. I want to change instruments simply by pressing some buttons on the controller attached to my keyboard. So if I press 1 it will turn on the Piano in Kontakt, if I press 2 it will change to Sax etc. This time I don't need to select more than one instrument. If one is playing, the rest should be off. The easiest way is to do it within Instrument Banks, but as I mentioned there are a lot of instrument that cannot be edited there and an error "The instrument is lock and cannot be edited" appears. And I cannot open the instrument and change anything (for example add some reverb, change the EQ, etc.). I would need to open this instruments individually, than make the changes, save it, and load it into the Bank. And I would need to do this everytime I wanted to do any change to the instrument, so this isn't really comfortable...

    P.S. My name is Albert.
     
  9. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Hi Albert.

    To be honest with you, I have yet to find a serious application for Instrument Banks so I have very little experience with them. Are you saying that there is a class of instrument that you can open for editing when the instrument is loaded in the multi-rack but these same instruments cannot be edited by double clicking them in a bank?

    The MS I gave you (with suitable modifications), can drive up to 64 instruments ** in the multi rack. Which ones it drives and how you tell it which instruments to drive can be designed whatever way you want. So, if you want it to behave like a bank, you could change the CC logic so that it responded to MIDI Program Change (PC) messages and enabled only one of the 64 MIDI channels at a time. It's really up to you to decide on the control protocol.

    ** I'm almost positive about the 64 MIDI channel thing but we should probably run a few tests to make sure that when Kontakt is used as a plugin, the MS can still feed its output to all 64 MIDI channels supported in Kontakt. I suppose it's also possible that how this works might be affected by your nested VST configuration with inserting Kontakt into your Triple Play into your DAW. To be sure this will work in your situation would require that you perform certain tests, so let me know if you want to do this.

    Rejoice,

    Bob
     
    Last edited: May 6, 2014
  10. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Instrument banks are for live usage, Bob. You load all the instruments you want to switch via Program Change messages in a bank and off you go. They are preloaded in RAM and switching between the programs is instantaneous and there's no gap in sound like on most hardware workstations...
     
  11. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Hi Mario,

    Thanks for the info but, I think I understand what banks are and how they are used. I'm just not familiar with details like can you edit certain instruments in the multi rack but not when they are in a bank?. And, that's what Albert seems to be concerned about. What are your comments about that particular issue?
     
  12. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    You can edit most instruments in an instrument bank, you just have to double-click the slot.

    There are some Kontakt Player libraries that have locked the user out of edit mode - SampleModeling, George Duke Soul Treasures, etc... Those won't be editable within instrument banks either. But I don't think Albert is talking about those libs.
     
  13. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Hi Mario,

    I wish that you would read my posts a little more carefully before trying to respond. For example, this is what I already asked Albert:

    He seems to indicate that he has instruments that he can edit when they are loaded in the multi rack but that he can't edit them when they are loaded in a bank. At least that's what it sounds like to me but, he hasn't responded to the above question yet.
     
  14. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Yep, it would be good to know which instruments/libraries he's talking about.
     
  15. Big Bob

    Big Bob Forum Member

    Messages:
    606
    Hi Albert,

    I'm about to quit for the day but here's another multiscript for you check out.

    This one can drive up to 64 MIDI channels and can operate either as an Inst Bank or as an N-way splitter.

    I figured with up to 64 output channels, you will want to change your selection protocol because I don't think you will want to use 64 CCs to control which outputs are enabled. Since you haven't proposed any protocol yet, here's what I implemented for this script.

    If you send a MIDI Program Change (PC) in the range from 1 to 64, the script will behave like an Inst Bank. For example, if you send PC = 13, Output Channel 13 will be enabled and all other output channels will be disabled.

    However, if you add 64 to the channel number, it will toggle the current enabled/disabled state of that output channel (leaving all other channels unchanged). For example, if you send PC = 88, it will toggle the state of output channel 24 (without affecting the others). In this mode you can enable as many output channels at the same time as you wish, just like the 10-way splitter (only now it's a 64-way splitter).

    I don't know how friendly this PC or PC+64 control protocol will be for you but this can rather easily be changed to something else as soon as you tell me what the something else is :)

    The main thing for now is to determine if this works with your nested VST deal and still reaches the MIDI channels above 16.

    I'll check back tomorrow morning.

    Rejoice,

    Bob

    BTW We also need to discuss a number of details regarding sustained notes for disabled channels. For now, I just feed all note_off and pedal_up messages to all output channels regardless of their enable/disable state.
     

    Attached Files:

    Last edited: May 8, 2014
  16. albertas123

    albertas123 New Member

    Messages:
    16
    Thank you! I will try this today! :)

    And EvilDragon was right. I use Samplemodeling instruments and those cannot be edited in Instrument Banks.
     
  17. airmenpierre

    airmenpierre New Member

    Messages:
    1
    @Big Bob or @EvilDragon,

    Either one of you guys willing to make a video tutorial on this matter. I too, desire to have a mute function on each instrument and be able to map it to a midi control. A mute for volume would suffice. Or even, as mentioned prior, a mute button used as a way to ignore all midi signals coming in while its on. Which ultimately, would be great I believe in reducing the CPU usage. I attempted to follow the previous posts you all made. But, yet have been able to grasp it all. Your help would be greatly appreciated.