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

DIY MIDI Map

Discussion in 'Building With Reaktor' started by Jeff Brown, Jun 19, 2008.

Thread Status:
Not open for further replies.
  1. Jeff Brown

    Jeff Brown Forum Member

    Messages:
    377
    I'm making a synth right now that has more controls than there are MIDI CC numbers. I've only got 24 faders and 24 buttons on my MIDI controller. I'm planning a way to get those few controllers to control everything of interest.

    The basic idea is this: I use the buttons to decide what the faders do, and then I control stuff with the faders. Specifically, I MIDI-map each fader to a "dummy knob", which doesn't control anything directly. I feed all the dummy knobs into a routing matrix, and use the buttons to decide where to route those signals.

    Here's the problem: Suppose I've got a knob on the panel that is *not* a dummy -- it controls, say, filter pitch, and by looking at the knob I want to be able to see what the filter pitch is set at. In order to use one of the physical faders to control the same filter pitch parameter, I have to merge the output from the non-dummy knob with the output from a dummy knob. But the problem is, if I then change the value of the dummy knob, it won't be reflected by the real knob. How can I change that? Is there some way to get a knob on the panel to reflect commands not only from the mouse, but from some other module as well?
    ---
    Never mind. Figured it out: all I need is an IC send.

    But the more general question remains: Have others tried a DIY MIDI Map arrangement, where you can use one physical fader to control multiple parameters in an instrument, depending on the state of the instrument?
    ---
    There's a bug on this forum. If you make two posts in a row and then try to edit the second, you'll end up editing the first instead.
     
  2. Jeff Brown

    Jeff Brown Forum Member

    Messages:
    377
    I can't believe I can't do this!

    I have attached an instrument with nothing but two knobs and a button. One knob is called "Control", the other "Target". When the button is on, I want all changes to Control to be mirrored by Target. However, when the button is off, I want changes to Control to leave Target unaffected.

    I've put the Control through a step filter with a variable tolerance. When the button is on, the tolerance is tiny, so any change made to Control is allowed through. When the button is off, the tolerance is huge, and changes to Control do not come through.

    But the problem is that I can't get the Target knob to pay attention! Is there any way to connect them? This is driving me up the wall. It should be easy.

    [In looking at the instrument I've attached, the interesting parts are at the top of the screen. The modules at the bottom are debris, inconsequential except that they prevent the modules above from becoming inactive.]
     

    Attached Files:

  3. sowari

    sowari Moderator Moderator

    Messages:
    27,759
    probably not very elegant (and i have put it in a macro to allow event loops) but it works.

    the reason i did this the way i did was to prevent the Target knob resetting when i unconnected

    btw, it is really a good idea to avoid switches, as they tend to fire off global resets

    sowari
     

    Attached Files:

  4. Jeff Brown

    Jeff Brown Forum Member

    Messages:
    377
    Yee-ha! Thanks, Sowari!

    Below I've re-introduced the step filter, so that now, when the "Connected" button is turned on, the Target knob doesn't immediately snap to the value of the Control knob. Rather, it will remain where it is until the Control knob starts moving.

    As you felt about yours, I'm not sure this is the most elegant solution. But also like yours, it works!
     

    Attached Files:

  5. sowari

    sowari Moderator Moderator

    Messages:
    27,759
    ;)

    sowari
     
  6. Jeff Brown

    Jeff Brown Forum Member

    Messages:
    377
    I forgot to respond to this:

    > btw, it is really a good idea to avoid switches,
    > as they tend to fire off global resets

    Madness! Is there any way to predict when they'll do that? Are there other modules that suffer the same problem?
     
  7. jhinden

    jhinden NI Product Owner

    Messages:
    296
    Thanks so much fellas...this has helped me a ton, just when I needed it!

    And yeah, the switches situation stinks...I can't use switches in any of my external MIDI ensembles without freaking out my hardware synths. I've just been using lists instead.
     
  8. gzifcak

    gzifcak Forum Member

    Messages:
    212
    i've been planning to do something like this too. my plan is to have one instrument with 12 knobs and 4 sliders (to mimic my hardware controller, which has 12 knobs and 2 joysticks) and have each knob/slider connected to an IC send.

    then i can connect the sends to another instrument's controls and save a snapshot, so that i have snaps for controlling each of my separate instruments with my controller.
     
  9. m3m

    m3m NI Product Owner

    Messages:
    536
    That's clever. :cool:
     
  10. Jeff Brown

    Jeff Brown Forum Member

    Messages:
    377
    Snapshottable MIDI Maps

    I hope to find the following useful; maybe you will too.

    Suppose you make one instrument that has nothing but knobs, corresponding to whatever you've got on your MIDI keyboard -- e.g. mine has 8 knobs, 8 faders, 8 buttons, so I'll have those controls on this instrument. There's a second instrument that actually does useful stuff -- say, a synthesizer. I want the knobs from the first instrument to be mappable to whatever I want in the second instrument, in the following way: For each knob in the Target instrument, I can choose (1) which Control knob it's listening to; (2) what range the Control knob moves the Target knob within. So for instance, I could have Control 1 moving one knob across its full range, another knob in a small subset of its full range, and a third knob backwards across its full range.

    The ensemble I've attached lets you do that. Moreover, the parameters (1) and (2) listed above can vary by snapshot. To try it out, MIDI Map the two control knobs in the lower instrument to some controls on your keyboard, and then play with the upper instrument to see what happens.

    Note that having the Control knobs in a separate instrument is not really necessary; I just thought it was aesthetically more pleasing. However, if there are computational reasons to prefer keeping them all in the same instrument, to avoid the invisible sends, please let me know! In the ensemble where I plan to use this trick, Sound University, I'll have appropximately ten gazillion of these Target knob modules, so if I can make them more efficient I probably should.
     

    Attached Files:

  11. Jeff Brown

    Jeff Brown Forum Member

    Messages:
    377
    This is totally not my fault.

    I think Reaktor is trying to hurt me.

    The ensemble I've attached is very similar to the one Sowari provided originally in this thread, but this new one is horribly buggy and I don't know why. The Target knob is designed to be controllable by either Knob 1 or Knob 2; the choice is made in the Receive menu at the top left. However, for that slaving to be in effect, the Slave button must be on; if it's off, no knob controls Target except Target itself. Or such is the idea.

    The first bug is that when Slave is On, the Target cannot be moved from itself, only by the controlling knob. I can ttry to drag the target with the mouse, use the cursor keys, use a MIDI Mapped fader, but nothing will make it move except the knob that it's slaved to. Sowari's tool didn't have this bug, and I don't see why mine should behave any different.

    The second bug is that if I reduce the number of steps for the Target knob to a low number -- I want to put it at 10 steps, so that the value displayed in the numeric readout goes from -60 to 60 in steps of 12 -- the knob goes haywire. If I pull it with the mouse, it will SKIP VALUES in a consistent but totally nonsensical manner, and if I try to control it with the keyboard, I can make it go down but not up! It's actually even weirder than that; you'll see what I mean if you try it out.

    So ... wha?

    (The knobs "Min Control" and "Max Control" are not relevant to the bug, but if you're wondering what they do, they set the minimum and maximum values for the Target that will be obtained when the Controlling knob is at its own minimum or maximum.)
     

    Attached Files:

  12. sowari

    sowari Moderator Moderator

    Messages:
    27,759
    Reaktor says "i didn't mean to hurt you"

    1/ i used a Selector not a Relay ;) see pic. NB you have to reverse the input wiring when you use a Selector. to clarify, inputs 0 and 1 are reversed.

    2/ try matching the Mouse Resolution to the number of steps. if you have 10 steps, you don't need a resolution of 127 (which is meant for 127 steps).

    sowari
     

    Attached Files:

  13. Jeff Brown

    Jeff Brown Forum Member

    Messages:
    377
    I still get the same problem. When it's slaved, the target knob won't respond to mouse commands from its own image, only from those of its master.

    I'm using this structure in Sound University, and solved the first problem by doing some modulo arithmetic to get around the need to quantize the knob itself. I decided I can consider the second bug a feature rather than a bug: when a knob is slaved to a MIDI control, it can only be moved from the control, which is sort of like idiot-proofing the knob. It means you won't find the perfect position via the mouse, and then lose it as soon as you move the MIDI control.
     
  14. sowari

    sowari Moderator Moderator

    Messages:
    27,759
    ?

    the target knob is moving with me. i am uploading my version.

    Re: using MIDI Controllers: unless you have (i can't remember the exact name) endless encoders the knob will always pick up from where it left off. so if you move the Reaktor knob with the mouse and then the knob on your Controller it will pick up from where it was before, and therefor jump to the position.

    some MIDI Controllers (like the new Novation, i think), will just move the knob from where you left it. but then they have endless encoders, or whatever it is called. Kore2 works this way btw.

    btw, Reaktor knobs have Soft Takover as part of the knobs properties, that is meant to soften the jump.

    sowari
     

    Attached Files:

  15. Jeff Brown

    Jeff Brown Forum Member

    Messages:
    377
    Well hog-tie me and call me Piggy. I swear I did just what you showed me and it didn't work. Anyway, thanks Phil!

    Strangely, though, I've decided this bug actually IS a feature, so I think I'll keep using the Relay. The thinking is: Suppose you're making a snapshot, and there's some crucial parameter that you're fine-tuning with the mouse, and you've forgotten that the knob you're moving is slaved to a MDII control. Then the instant you move that MIDI control, the carefully-chosen value will be lost. But with this bug-feature, you can't move a knob with the mouse if it's slaved to something else, so you won't actually lose all that work.

    I wish I understood why the bug happens, though. Relays and Selectors are supposed to be equivalent (when they have the same number of inputs and the Selector doesn't interpolate).
     
  16. sowari

    sowari Moderator Moderator

    Messages:
    27,759
    i bet you tried it in your synth, well so did i, and it didn't work ?

    however, i then imported the macro (with the 2 knobs) into your synth, and it did work :|

    fwiw, i did come up with a way of getting it to work with faders in your synth (see other thread).

    sowari
     
  17. herw

    herw NI Product Owner

    Messages:
    6,421
    the problem is that there is no general solution to serve normal MIDI-controllers and endless MIDI-controllers (i have thought about it weeks as you know).
    You have to construct two versions:
    • one for endless MIDI-controllers (which is very elegant tro solve with a common memory)
    • second for normal MIDI-controllers - the problems with these controllers are two:
      1st they jump when using mouse or hardware simultaniously (solved with softtakeover).
      2nd having reached the top of values with mouse and using now normal MIDI controller (beeing at lowest position) will not change any value until you have moved the controller to maximum too. So you have to decide before using in live situations whether you want to use mouse or hardware MIDI.
     
  18. haris

    haris NI Product Owner

    Messages:
    297
    interesting stuff...
     
  19. haris

    haris NI Product Owner

    Messages:
    297
    I also downloaded Redbook 3 from UL... seems like good stuff
     
  20. Jeff Brown

    Jeff Brown Forum Member

    Messages:
    377
    Haris wrote:
    " ... Redbook 3 from the UL ..."

    Does that have DIY MIDI Mapping?

    The new Spark synth (one thread: http://www.native-instruments.com/forum/showthread.php?t=75753) does. It uses the word "macros" to describe three knobs that each can control up to four separate parameters in the synth, and the target parameters can vary by snapshot. I'm loath to spend the money but I'd *really* like to see how they made it snapshottable. (In Sound University, I was able to make snapshots in which the DIY MIDI Mapping worked, but there was some sort of event-order bug that made the resulting sound sensitive to order of execution -- a problem I ran into again, in a separate context, this week. Thread: http://www.native-instruments.com/forum/showthread.php?t=75702. I was able to solve it in that more recent context, but not for the DIY MIDI mapping.)
     
Thread Status:
Not open for further replies.