Poly Aftertouch Cymbal Choke Script issue.

JordonBeal Member Posts: 11 Newcomer

I tried implementing this script I found for poly aftertouch cymbal choking from EvilDragon, and it sort of works. The issue, however, is that it doesn't totally kill the voice, it just reduces it in volume. The sample continues playing at this reduced volume. I've implemented it verbatim, and I'm a bit stumped.

on init
    declare const $NUM_CYMBALS := 4
    declare const $FADE_OUT_TIME := 20000

    declare $search_cymbal
    declare %cymbal_keys[$NUM_CYMBALS] := (49, 52, 55, 57)
end on

on note
    $search_cymbal := search(%cymbal_keys, $EVENT_NOTE)

    if ($search_cymbal # -1)
        set_event_mark($EVENT_ID, sh_left($MARK_1, $search_cymbal))
    end if
end on

on poly_at
    $search_cymbal := search(%cymbal_keys, $POLY_AT_NUM)
    if ($search_cymbal # -1)
        fade_out(by_marks(sh_left($MARK_1, $search_cymbal)), $FADE_OUT_TIME, 1)
    end if
end on


  • EvilDragon
    EvilDragon Moderator Posts: 947 mod

    Voice should definitely stop considering last argument of fade_out() is 1, which means kill voice. Your problem is probably elsewhere. Try the script in a minimal instrument with just a single sample, does it work there?

  • JordonBeal
    JordonBeal Member Posts: 11 Newcomer
    edited April 2022

    Okay, looks like the issue is with the play_note() line from my random round robin script the other post interfering. Removing that solved the issue, and things play back fine, now I just need to sort out why removing play_note() in my other script/post stops it from working in that one.

Back To Top