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

Solved Separate transpose for groups?

Discussion in 'Scripting Workshop' started by 3001 Studios, Oct 18, 2021.

  1. 3001 Studios

    3001 Studios NI Product Owner

    Messages:
    9
    I have looked at a couple of threads that are similar, but I don't think they would work for this:

    I would like to have separate transpose controls (not TUNE) for Group 1 and Group 2, and trigger both groups to play at their transposed pitches.

    Thanks
     
  2. 3001 Studios

    3001 Studios NI Product Owner

    Messages:
    9
    I found this by EvilDragon (thanks!) in another thread which I was able to modify to make work.

    on note
    ignore_event($EVENT_ID)

    if (in_range($EVENT_NOTE + $Transpose1, 0, 127))
    $osc1_ID := play_note($EVENT_NOTE + $Transpose1, $EVENT_VELOCITY, 0, -1)
    set_event_par_arr($osc1_ID, $EVENT_PAR_ALLOW_GROUP, 0, $ALL_GROUPS)
    set_event_par_arr($osc1_ID, $EVENT_PAR_ALLOW_GROUP, 1, 0)
    end if

    if (in_range($EVENT_NOTE + $Transpose2, 0, 127))
    $osc2_ID := play_note($EVENT_NOTE + $Transpose2, $EVENT_VELOCITY, 0, -1)
    set_event_par_arr($osc2_ID, $EVENT_PAR_ALLOW_GROUP, 0, $ALL_GROUPS)
    set_event_par_arr($osc2_ID, $EVENT_PAR_ALLOW_GROUP, 1, 1)
    end if
    end on​