1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Half pedaling script?

Discussion in 'KONTAKT: Sampling, Programming & Scripting' started by Rob, Jan 11, 2018.

  1. Rob

    Rob Senior Member

    3,057
    663
    Aug 23, 2007
    do any of the Kontakt scripts gurus know of a script that adds half pedaling capabilities to a piano patch? The ability to receive cc64 as a continuous controller, not just on/off and adjust the release time accordingly?
     
  2. FriFlo

    FriFlo Senior Member

    1,743
    558
    Jun 13, 2011
    I am not a Kontakt scripting guru, just wrote a couple of multi scripts. But wouldn't that rather be a Decay setting? The Release with Piano samples is mostly the sound the piano produces when letting go of the key.
    As far as the midi part goes, I am sure you know that: you need a continuous pedal, which sends CCs from 0-127. But to make that sound realistic, I suppose you need a lot of sampled material, half pedalled samples or some modeling to simulate that, probably a filter or IR to make the half pedal notes to decay in that way.
     
    Rob likes this.
  3. OP
    OP
    Rob

    Rob Senior Member

    3,057
    663
    Aug 23, 2007
    thanks Fritz, yeah that was what I was thinking myself... select all sustain groups - assign cc64 as a modulator for release time, no need for a script.
     
  4. OP
    OP
    Rob

    Rob Senior Member

    3,057
    663
    Aug 23, 2007
    no, doesn't work... I still need a script, because once a note is played with the pedal depressed it will keep ringing even if pedal is released.
     
  5. EvilDragon

    EvilDragon KSP Wizard

    4,650
    2,517
    May 25, 2010
    Croatia
    Adjusting release time wouldn't give you the half-pedal effect. Plus, you cannot change the release time once the note is already releasing (which is what half-pedaling can do). There's no generalized solution for this.
     
  6. OP
    OP
    Rob

    Rob Senior Member

    3,057
    663
    Aug 23, 2007
    too bad... I guess that's impossible then. Thank you ED
     
  7. Levitanus

    Levitanus Senior Member

    Find the same theme in the subforum. I've made script, representing it.
    But it uses sampler, not DFD mode
     
  8. willbedford

    willbedford Composer/Programmer

    440
    460
    Nov 16, 2014
    Huddersfield
    Depends how you're handling releases. If you're using fade_out(), you can interrupt it with a fade_in().
     
  9. EvilDragon

    EvilDragon KSP Wizard

    4,650
    2,517
    May 25, 2010
    Croatia
    Yeah, well, that would be the only way. I was referring only to the release time set by the envelope, which is what Rob was trying to do.
     
  10. OP
    OP
    Rob

    Rob Senior Member

    3,057
    663
    Aug 23, 2007
    Levitanus, where can I find this script, if it's available of course
     
  11. Levitanus

    Levitanus Senior Member

    somewhere in this subforum) It would be as hard for you as hard for me) search at keywords "piano, half-pedal, repedal'
     
  12. Maxime Luft

    Maxime Luft Senior Member

    153
    232
    Feb 28, 2016
    Karlsruhe
    I recommend you start by putting this function in your on init callback:

    SET_CONDITION(NO_SYS_SCRIPT_PEDAL)

    I don't use any midi half pedal so take my following advice with a grain of salt...
    Then during the "on controller" callback I guess something like:

    on controller
    if ($CC_NUM=64)

    if ($cc64_value=0)
    play_sustains:=true

    play_halfpedal:=false
    play_pedal:=false
    else
    if($cc64_value=64)
    play_sustains:=false
    play_halfpedal:=true
    play_pedal:=false
    else
    if($cc64_value=127)
    play_sustains:=false
    play_halfpedal:=false
    play_pedal:=true

    end if
    end if
    end if
    end if

    end on
     
    Last edited: Jan 13, 2018
  13. OP
    OP
    Rob

    Rob Senior Member

    3,057
    663
    Aug 23, 2007
    thanks a lot, Maxime!
     
  14. EvilDragon

    EvilDragon KSP Wizard

    4,650
    2,517
    May 25, 2010
    Croatia
    Half-pedaling means it has continuous motion, not just three positions (off, half, on). It's a bit more complicated than the above script. :)
     
  15. Maxime Luft

    Maxime Luft Senior Member

    153
    232
    Feb 28, 2016
    Karlsruhe
    Sure, I just wanted to give a hint about how to proceed for the start... I don't know how those pedals behave & what exact values they send, if I knew I'd have given my advice accordingly.
     
  16. OP
    OP
    Rob

    Rob Senior Member

    3,057
    663
    Aug 23, 2007
    yeah it should go from 0 to 127 where 0 is normal release and 127 full sample decay. But I appreciate people taking the time to think about it...
    I know nothing about scripts unfortunately so...
     

Share This Page