• SONAR
  • Silly question: Is there a command to join adjacent MIDI notes? (p.2)
2014/10/04 19:59:13
Anderton
MarioD
Another method is in the piano roll view click on the draw icon in the smart tool window, put the cursor near the end of the first note, hold down the left mouse button and drag the cursor over the notes that you want to connect.



Another reason to love this forum  Jeez, you think I'd remember that there's a Glue tool in Sonar!! SilkTone, I think you'll find this is a very fast way to work. You don't have to drag the end of the first note precisely, just land it somewhere in the second note and they glue together. I think you'd find this faster than using the step sequencer. 
2014/10/04 21:22:25
mudgel
The depth of knowledge here never ceases to amaze me. Excellent!
2014/10/04 21:26:05
mettelus
This is a nice tip! Audio-to-MIDI conversion often splits notes on me as described in the OP, so this will come in very handy.
2014/10/04 21:42:21
Anderton
I was hoping there would be a "forum-knowledge-to-brain-dump" function in Sonar X4. Noel said maybe Sonar X37.
2014/10/05 14:14:43
SilkTone
Yea the glue tool is very useful, thanks Mario for pointing that one out. It is the easiest but unfortunately didn't solve my problem as I have too many to fix up.
 
Craig I tried the step sequencer tip but the clip I dragged into it covers the full song, and the step sequencer shortened it to just a few bars. Maybe there is a setting I can use to make it accept the full 100+ measures in one go, but at the end of the day it is still a manual process to join the notes so the glue tool turns out to be better for this purpose.
 
But I must confess the original problem was of my own making. I made a "chord sequencer" plugin that I use to enter all of my chords. It is just easier that way because now I can feed the chords into multiple VSTs, like Real Guitar, Real Strat, or just a simple string synth to use as a backing while sketching out a song. Anyway I'm adding a "Join Adjacent Notes" option to it that will automatically do what I need and sustain common notes from one to the next chord. This will solve my problem for both feeding directly from the chord sequencer into other VSTs, or when dragging the MIDI clip onto a track.
 
But yea this forum never ceases to teach one about new tips and tricks...
2014/10/05 14:52:04
Anderton
SilkTone
Craig I tried the step sequencer tip but the clip I dragged into it covers the full song, and the step sequencer shortened it to just a few bars. Maybe there is a setting I can use to make it accept the full 100+ measures in one go.



No, there isn't. The step sequencer does a maximum of 64 beats with 16 steps per beat.
 
2014/10/05 14:57:31
scook
Here is a script for joining notes where join candidates are sequential note events and the second note starts immediately after the first note. Scripting a solution gets a little messy when notes of different pitches start overlapping in time.

;;; joinNotes.CAL
;;;
;;; joins adjacent notes
;;;
;;; ---------------------------------------------------------------------
;;; Prolog
;;;
(do
   ; flag used to control write
   ;    0 = initialize required
   ;    1 = write required
   (int writeEvent 0)

   ; event variables
   (dword etime 0) ; event time
   (int   echan 0) ; event channel
   (int   nkey -1) ; note key
   (int   nvel  0) ; note velocity
   (dword ndur  0) ; note duration
)
;;; ---------------------------------------------------------------------
;;; Body
;;;
(do  
   (if (== Event.Kind NOTE)
      (if (== writeEvent 0)
         (do
            (= etime Event.Time)
            (= echan Event.Chan)
            (= nkey  Note.Key)
            (= nvel  Note.Vel)
            (= ndur  Note.Dur)
            (= writeEvent 1)
            (delete)
         )
         (if (&& (== Note.Key nkey) (== Event.Time (+ etime ndur)))
            (do
               (delete)
               (= ndur (+ ndur Note.Dur))
            )
            (do
               (delete)
               (insert etime echan NOTE nkey nvel ndur)
               (= etime Event.Time)
               (= echan Event.Chan)
               (= nkey  Note.Key)
               (= nvel  Note.Vel)
               (= ndur  Note.Dur)
            )
         )
      )
   )
)
;;; ---------------------------------------------------------------------
;;; Epilog
;;;
(if (== writeEvent 1)
   (insert etime echan NOTE nkey nvel ndur)
)    


2014/10/05 15:16:41
SilkTone
scook,
 
Interesting, I'll take a look. Thanks.
12
© 2026 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account