I use the following cal script to do all kinds of inserts of midi notes. Then can use the PR and filters to change note pitch, value,... And then send to what ever sound, and bounce to tracks as desired.
This scipt is set to use 960 ticks per quarter note.
Use notepad to save to "insert qtr C5.cal" in the cal folder.
Edit as needed to change length (currently 20 minutes), channel number (6), note value (C5, note length (20 ticks), and beat (currently qtr).
The semi colon (;) indicates a commented line, it does not execute. Remove/change as desired.
Change which TIMENOW line is used to set note: can insert 1/8, 1/4, 1/2, on the 1, and on the every other 1. And then save to a new name for future use.
Tabs used for indenting lines, removed here by the forum software. Easier to read with tabs.
==================
Example of use:
insert on the 1
clone track 4 times
move each track to different beat of 4
clone 8 times
move each track to spots to trigger triplets
change the midi note pitch of each track
send to drums, piano,...
-------
do the same with the every other 1
use another cal script to then remove every 3rd note from each track
use two timenow lines to "randomize" when notes are inserted
and so on
lots of unique rythym and melody accidents
==================
;; insert qtr C5.cal
(do
;; initialize variables
(dword LengthSpace 2)
(dword LengthSecond 1)
(dword TimeNow 0)
(dword TimeTotal 0)
(dword TimeEnd 0)
(dword BeatsPM 0)
(dword TicksPQ 0)
(int ChannelNumber 0)
;;;;;; set known variables
;;
;; (getInt ChannelNumber "ChannelNumber: " 0 15) ;; could be used to have user input
;;
;; set default values
(= TimeNow 0)
(= TimeTotal 20)
(= TimeEnd 0)
(= BeatsPM 120)
(= TicksPQ 960)
(= ChannelNumber 6) ;; change for different midi channel
;;
;; convert time to ticks
(= TimeEnd (* BeatsPM TicksPQ))
;; (pause "TimeEnd " TimeEnd)
;;
(= TimeEnd (* TimeEnd TimeTotal))
;; (pause "TimeEnd " TimeEnd)
;;
;;LENGTHs change SECONDS to ticks
;;
;; (= LengthSecond (* (* LengthSecond TicksPQ) (/ BeatsPM 60)))
;; (pause "LengthSecond " LengthSecond)
;;
;; (= LengthSpace (* (* LengthSpace TicksPQ) (/ BeatsPM 60)))
;; (pause "LengthSpace " LengthSpace)
;;
(= TimeNow 0) ;; 1st time through loop
(do
(while (< TimeNow TimeEnd)
(do
;; (insert TimeNow ChannelNumber NOTE 52 127 10)
(insert TimeNow ChannelNumber NOTE 72 127 20) ;; C5 ;; change for note pitch, volume level, length
;; (insert TimeNow ChannelNumber NOTE 64 127 1000)
;; (insert TimeNow ChannelNumber NOTE 76 127 1000)
;; (= TimeNow (+ TimeNow (+ LengthSecond LengthSpace))) ;; could be used with setting these way above
;; (= TimeNow (+ TimeNow 480)) ;; eighth notes
(= TimeNow (+ TimeNow 960)) ;; qtr notes
;; (= TimeNow (+ TimeNow 1920)) ;; on the 1/2
;; (= TimeNow (+ TimeNow 3840)) ;; on the one
;; (= TimeNow (+ TimeNow 7680)) ;; on the one of every other measure
;;
;; (pause "TimeNow " TimeNow )
;;
)
)
)
)