• SONAR
  • How To Alternate Panning (Per Note)? (p.2)
2016/12/29 22:33:57
promidi
Anderton
Soundwise's script reminds me that Cakewalk was really ahead of the curve with the CAL thing...would be nice to see it get some more love from the Bakers.



Definitely that, and Studioware panels.
2016/12/30 01:15:31
Sanderxpander
To be honest for me that's way too much like programming instead of making music.

Don't mistake me - I see its power and it's an awesome solution in this case, but I could never see myself writing one. I've never even used one. If they could find a way to make it more user friendly or more easily integrated into the workflow more people might get on board.
2016/12/30 07:18:39
bitflipper
I was hoping somebody less lazy than me would do that...thanks, Alisa.
2016/12/30 09:10:12
Anderton
Sanderxpander
To be honest for me that's way too much like programming instead of making music.

Don't mistake me - I see its power and it's an awesome solution in this case, but I could never see myself writing one.



I'm not sure how possible it would be to make it user-friendly, but people like Alisa can come up with scripts that benefit SONARians. Similarly I've never written a Kontakt script, but I use a ton of Kontakt sounds that have scripting someone else did. 
2016/12/30 09:23:48
Kamikaze
But sort out Staff View first.
2016/12/30 14:28:56
jeteague
To Soundwise:   Now that's taking care of business!
2016/12/30 15:34:32
brundlefly
I found that his CAL added more Pan events than necessary, and didn't really give the synth any time to respond to the pan message before the note event - maybe not a problem for soft synths, but could be an issue with hardware synths.
 
FWIW, below is a revised version that inserts only one message per note, and inserts it 30 ticks before each note. I didn't take time to make this 'lead time' user-specified or to automatically insert a message at 1:01:000 when the first note event is less than 30 ticks in. As noted in the CAL description, setting the Pan widget in the MIDI track will suffice to establish the initial position.
 
I have not 'bomb-proofed' this this script to avoid failure or bad results with unexpected input (e.g. chords) or to make it as efficient as possible so I can't make any guarantees of efficacy in all cases, but here it is:
 
;NotePan.CAL by David Baay, modified significantly from the original by Alisa Miller
;
; This CAL script will insert alternating Pan (CC10) events 30 ticks before each note event at 1:01:030 or later.
; If any notes occur before 1:01:030, the Track Pan should be set to the value equal to the left pan setting that you
; intend to set using the CAL to set the initial pan position before playback starts.
;
(do
  (int count 0)
  (int left 0)
  (int right 127)
  (int position 127)
 ;
  ;Get Min and Max Pan values to determine Pan changes
  (getInt left "Enter the left pan amount" 0 64)
  (getInt right "Enter the right pan amount" 64 127)
  (= position right)
    (forEachEvent
      (if (&& (>= Event.Time 30) (== Event.Kind NOTE))
        (do
          (insert (- Event.Time 30) Event.Chan CONTROL 10 (= Control.Val position))
          (if (<= position 64)
            (= position right)
            (= position left); else
          );end if
        );end do
      ); end if
   ); end for
 ); end do
2016/12/30 16:36:47
Sanderxpander
Anderton
Sanderxpander
To be honest for me that's way too much like programming instead of making music.

Don't mistake me - I see its power and it's an awesome solution in this case, but I could never see myself writing one.



I'm not sure how possible it would be to make it user-friendly, but people like Alisa can come up with scripts that benefit SONARians. Similarly I've never written a Kontakt script, but I use a ton of Kontakt sounds that have scripting someone else did. 

If not the writing, then maybe the application of them. A browser with tags, a hotswap function a la Ableton, easy modification of definable important parameters, etc.

I know I'm lazy, I just hate to see great ideas go unused because they're too obscure for the general musician/producer. More iPhone, less Linux Terminal.
2017/01/02 10:26:46
AdamGrossmanLG
coming back to this:

how do I do this if it is already in audio format?
2017/01/02 10:34:53
AdamGrossmanLG
brundlefly
I found that his CAL added more Pan events than necessary, and didn't really give the synth any time to respond to the pan message before the note event - maybe not a problem for soft synths, but could be an issue with hardware synths.
 
FWIW, below is a revised version that inserts only one message per note, and inserts it 30 ticks before each note. I didn't take time to make this 'lead time' user-specified or to automatically insert a message at 1:01:000 when the first note event is less than 30 ticks in. As noted in the CAL description, setting the Pan widget in the MIDI track will suffice to establish the initial position.
 
I have not 'bomb-proofed' this this script to avoid failure or bad results with unexpected input (e.g. chords) or to make it as efficient as possible so I can't make any guarantees of efficacy in all cases, but here it is:
 
;NotePan.CAL by David Baay, modified significantly from the original by Alisa Miller
;
; This CAL script will insert alternating Pan (CC10) events 30 ticks before each note event at 1:01:030 or later.
; If any notes occur before 1:01:030, the Track Pan should be set to the value equal to the left pan setting that you
; intend to set using the CAL to set the initial pan position before playback starts.
 
(do
(int count 0)
(int left 0)
(int right 127)
(int position 127)
 
  ;Get Min and Max Pan values to determine Pan changes
(getInt left "Enter the left pan amount" 0 64)
(getInt right "Enter the right pan amount" 64 127)
 (= position right)
   (forEachEvent
     (if (&& (>= Event.Time 30) (== Event.Kind NOTE))
       (do
         (insert (- Event.Time 30) Event.Chan CONTROL 10 (= Control.Val position))
         (if (<= position 64)
           (= position right)
           (= position left); else
         );end if
       );end do
     ); end if
  ); end for
); end do




 
the modified CAL leads to this



© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account