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

Midi Automation of Bypass

Discussion in 'Scripting Workshop' started by thumky, Jun 4, 2011.

  1. thumky

    thumky Forum Member

    Messages:
    43
    I see some old threads on this topic but nothing recent. I'm looking to turn on/off Filters and Effects via Midi CC#, but it doesn't appear to be supported. Any suggestions?

    Thanks!
    -matt
     
  2. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Scripting is the only way.
     
  3. thumky

    thumky Forum Member

    Messages:
    43
    Thanks EvilDragon. I've scripted before, any hints to get started?
     
  4. DarkStar

    DarkStar NI Product Owner

    Messages:
    2,089
    ... KSP Reference Manual, pages 124-125.
     
  5. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Basically, you'd want to use the "on controller" callback. Here's an example: you have an effect in Insert FX, slot 4, and you want to toggle that effect with CC21:

    Code:
    on controller
    	if (%CC_TOUCHED[1] = 21)
    		set_engine_par($ENGINE_PAR_EFFECT_BYPASS,1 - (%CC[21] / 64),-1,3,1)
    	end if
    end on
     
  6. thumky

    thumky Forum Member

    Messages:
    43
    You guys rock!
     
  7. thumky

    thumky Forum Member

    Messages:
    43
    Man, would you mind looking at this its driving me nuts. I can Bypass Instrument Inserts but not Sends.
    I'm using a 0 as the last parameter for the Sends. It will print "Chorus" but won't bypass. Any advice? I've tried different slots.

    on controller
    if (%CC_TOUCHED[34] = 1)
    { Phaser. Slot 0 on Instrument Insert }
    message("Phaser")
    set_engine_par($ENGINE_PAR_EFFECT_BYPASS, 1 - (%CC[34] / 64), -1, 0, 1)
    else if (%CC_TOUCHED[32] = 1)
    { Chorus. Slot 1 on Instrument Send }
    message("Chorus")
    set_engine_par($ENGINE_PAR_EFFECT_BYPASS, 1 - (%CC[32] / 64), -1, 1, 0)
    end if
    end on
    ---
    Yay, i got it. I needed $ENGINE_PAR_SEND_EFFECT_BYPASS
     
  8. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    For bypassing sends, use $ENGINE_PAR_SEND_EFFECT_BYPASS instead of $ENGINE_PAR_EFFECT_BYPASS.
     
  9. DJ47

    DJ47 New Member

    Messages:
    16
    Hey guys, I know this one is old but maybe someone has the answer.. is it the same process if I want to bypass effects using the last few notes on my keyboard? I'm not really well educated when it comes to midi but are the keys assigned a CC# or is there an easier way to assign the effect bypass to a key?
     
  10. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    MIDI notes are entirely different types of MIDI events from CCs.
     
  11. DJ47

    DJ47 New Member

    Messages:
    16
    Thanks! So, is there any way to bypass effects using MIDI notes? Or is the scripting method described above is the only way?
     
  12. EvilDragon

    EvilDragon Well-Known Member

    Messages:
    19,938
    Scripting is the only way.