FZ1
Hi Promidi
Could you please post your channel to poly aftertouch cal routine?
Here you go. Remember, save often. I have had some CAL crash sonar inexplicably for some unknown reason. Usual disclaimers apply. I am not responsible if this crashes your sonar, sets your cat on fire and blows up your power supply, etc..
Copy and paste the text between "begin code" and "end code" and save the file as a *.cal and you're good to go.
Note: I did test this in Sonar Platinum and it worked fine. The best way to see the conversion is to have an event viewer window open while running the CAL to ensure correct conversion.
_____________begin code__________________ (do not include)
; Translate CHannel To Key Aftertouch.CAL
;
; Author : Paul Williamson
;
;
;
; A CAL program to translate data from Channel aftertounch to Key Aftertouch.
;
;Uses selected note as source . If no note selected then prompts for note number to convert to
(do
(int notenumber 64)
(int number_of_notes 0); counter for notes
(int number_of_aftertouch_events 0); counter for aftertouch events
; find single selected note
(forEachEvent
(if (== Event.Kind NOTE)
(do
(= notenumber Note.Key)
(++ number_of_notes)
)
)
)
; if there is no note selected then ask user for note number
(if (== number_of_notes 0)
(getInt notenumber "No note selected. Please enter note number for resulting key aftertouch events" 0 127)
)
; see if there are more than 1 notes selected
(if (> number_of_notes 1)
(do
(pause "Too many notes selected. Please only select 1 note")
(exit)
)
)
(forEachEvent
(if (== Event.Kind CHANAFT)
(do
(insert Event.Time Event.Chan KEYAFT notenumber ChanAft.Val)
(delete); delete original Channel aftertouch events
(++ number_of_aftertouch_events); count events that have changed
)
)
)
(if (== number_of_aftertouch_events 0)
;then
(do
(pause "There were no Channel Aftertouch events to modify")
)
;else
(do
(pause "Note number " notenumber "affected. Number of Aftertouch events modified " number_of_aftertouch_events)
)
)
)
_____________end code__________________(do not include)