# ModMatrix MultiScript Pattern: ""

# Settings:
poly
event

# Macros:
macro 1 "Note Input Dev+Ch" note("reason_master":1)
macro 2 "Tempest Output Dev+Ch" note("Tempest":1)
macro 3 "PadNr: 0=A1/c-4, 31=B16/G-6" 0
macro 4 "-" 0

# Defs:
# 
def PADNR m3
def SCRATCH <scratch>:16

# Entries:

; Copy note event to scratch
note(SCRATCH) = note(m1)

; Assign pad number (48=a1)
r1 + 48 PADNR

; c-3
vel(SCRATCH) == note(m1) 36 0x01 vel(SCRATCH)
; c#3
vel(SCRATCH) == note(m1) 37 0x07 vel(SCRATCH)
; d-3
vel(SCRATCH) == note(m1) 38 0x0b vel(SCRATCH)
; d#3
vel(SCRATCH) == note(m1) 39 0x0f vel(SCRATCH)
; e-3
vel(SCRATCH) == note(m1) 40 0x13 vel(SCRATCH)
; f-3
vel(SCRATCH) == note(m1) 41 0x17 vel(SCRATCH)
; f#3
vel(SCRATCH) == note(m1) 42 0x1b vel(SCRATCH)
; g-3
vel(SCRATCH) == note(m1) 43 0x1f vel(SCRATCH)
; g#3
vel(SCRATCH) == note(m1) 44 0x23 vel(SCRATCH)
; a-3
vel(SCRATCH) == note(m1) 45 0x27 vel(SCRATCH)
; a#3
vel(SCRATCH) == note(m1) 46 0x2b vel(SCRATCH)
; b-3
vel(SCRATCH) == note(m1) 47 0x2f vel(SCRATCH)
; c-4
vel(SCRATCH) == note(m1) 48 0x36 vel(SCRATCH)
; c#4
vel(SCRATCH) == note(m1) 49 0x3b vel(SCRATCH)
; d-4
vel(SCRATCH) == note(m1) 50 0x3e vel(SCRATCH)
; d#4
vel(SCRATCH) == note(m1) 51 0x40 vel(SCRATCH)
; e-4
vel(SCRATCH) == note(m1) 52 0x42 vel(SCRATCH)
; f-4
vel(SCRATCH) == note(m1) 53 0x44 vel(SCRATCH)
; f#4
vel(SCRATCH) == note(m1) 54 0x46 vel(SCRATCH)
; g-4
vel(SCRATCH) == note(m1) 55 0x47 vel(SCRATCH)
; g#4
vel(SCRATCH) == note(m1) 56 0x49 vel(SCRATCH)
; a-4
vel(SCRATCH) == note(m1) 57 0x4b vel(SCRATCH)
; a#4
vel(SCRATCH) == note(m1) 58 0x4d vel(SCRATCH)
; b-4
vel(SCRATCH) == note(m1) 59 0x4e vel(SCRATCH)
; c-5
vel(SCRATCH) == note(m1) 60 0x50 vel(SCRATCH)
; c#5
vel(SCRATCH) == note(m1) 61 0x51 vel(SCRATCH)
; d-5
vel(SCRATCH) == note(m1) 62 0x53 vel(SCRATCH)
; d#5
vel(SCRATCH) == note(m1) 63 0x55 vel(SCRATCH)
; e-5
vel(SCRATCH) == note(m1) 64 0x56 vel(SCRATCH)
; f-5
vel(SCRATCH) == note(m1) 65 0x57 vel(SCRATCH)
; f#5
vel(SCRATCH) == note(m1) 66 0x59 vel(SCRATCH)
; g-5
vel(SCRATCH) == note(m1) 67 0x5a vel(SCRATCH)
; g#5
vel(SCRATCH) == note(m1) 68 0x5c vel(SCRATCH)
; a-5
vel(SCRATCH) == note(m1) 69 0x5d vel(SCRATCH)
; a#5
vel(SCRATCH) == note(m1) 70 0x5e vel(SCRATCH)
; b-5
vel(SCRATCH) == note(m1) 71 0x60 vel(SCRATCH)
; c-6
vel(SCRATCH) == note(m1) 72 0x61 vel(SCRATCH)
; c#6
vel(SCRATCH) == note(m1) 73 0x62 vel(SCRATCH)
; d-6
vel(SCRATCH) == note(m1) 74 0x64 vel(SCRATCH)
; d#6
vel(SCRATCH) == note(m1) 75 0x65 vel(SCRATCH)
; e-6
vel(SCRATCH) == note(m1) 76 0x66 vel(SCRATCH)
; f-6
vel(SCRATCH) == note(m1) 77 0x67 vel(SCRATCH)
; f#6
vel(SCRATCH) == note(m1) 78 0x69 vel(SCRATCH)
; g-6
vel(SCRATCH) == note(m1) 79 0x6a vel(SCRATCH)
; g#6
vel(SCRATCH) == note(m1) 80 0x6b vel(SCRATCH)
; a-6
vel(SCRATCH) == note(m1) 81 0x6c vel(SCRATCH)
; a#6
vel(SCRATCH) == note(m1) 82 0x6d vel(SCRATCH)
; b-6
vel(SCRATCH) == note(m1) 83 0x6e vel(SCRATCH)
; c-7
vel(SCRATCH) == note(m1) 84 0x70 vel(SCRATCH)
; c#7
vel(SCRATCH) == note(m1) 85 0x71 vel(SCRATCH)
; d-7
vel(SCRATCH) == note(m1) 86 0x72 vel(SCRATCH)
; d#7
vel(SCRATCH) == note(m1) 87 0x73 vel(SCRATCH)
; e-7
vel(SCRATCH) == note(m1) 88 0x74 vel(SCRATCH)
; f-7
vel(SCRATCH) == note(m1) 89 0x75 vel(SCRATCH)
; f#7
vel(SCRATCH) == note(m1) 90 0x76 vel(SCRATCH)
; g-7
vel(SCRATCH) == note(m1) 91 0x78 vel(SCRATCH)
; g#7
vel(SCRATCH) == note(m1) 92 0x79 vel(SCRATCH)
; a-7
vel(SCRATCH) == note(m1) 93 0x7a vel(SCRATCH)
; a#7
vel(SCRATCH) == note(m1) 94 0x7b vel(SCRATCH)
; b-7
vel(SCRATCH) == note(m1) 95 0x7c vel(SCRATCH)
; c-8
vel(SCRATCH) == note(m1) 96 0x7d vel(SCRATCH)
; c#8
vel(SCRATCH) == note(m1) 97 0x7e vel(SCRATCH)
; d-8
vel(SCRATCH) == note(m1) 98 0x7f vel(SCRATCH)

; merge note if note
note(SCRATCH) = r1
note+(m2) != note(m1) none note(SCRATCH) none
