[Top: John S. Allen's Home Page]
[Up: List of Cakewalk articles]
[Previous: Delete/Cut Glitches]
[Next: Controller conflicts]

[contact John S. Allen by e-mail]

Site Logo, Track bike (2 KB GIF)Bikexprt.com Web Site


Cakewalk -- Glitches when Pasting

John S. Allen

Grayed out checkboxes | Align to measures -- large gap after pasted section
Interval -- weird math | Interval autosetting bug -- overlap of pasted section
Controlling interval: select in ruler | Selecting in ruler also selects controllers -- beware!

If you get unexpected results when pasting musical material in Cakewalk, you are not alone. The task of pasting MIDI data is more complicated than that of pasting text or graphics. But also, Cakewalk throws a few strange behaviors (all right, bugs!) in your way to make it even more difficult. If you study this article, you will understand what is happening and have fewer unexpected results.

This article is current with Cakewalk Pro Audio version 5. There may be some changes in version 6. I hope so!

Before you paste, you must cut or copy material to place it on the Clipboard. The previous article on this site describes quirks that occur when cutting (or deleting). Here's a quick review:

  • You may not be able to delete or cut at all, because Cakewalk thinks there is nothing to delete. As far as Cakewalk's Delete and Cut functions are concerned, the time between events does not exist -- only the events exist. This prevents you from deleting empty time that has no events in it -- even if you check "delete the hole."

  • When deleting or cutting, you may get an unwanted change in the music following the deleted section. MIDI devices respond to the most recent message. If there were messages in the deleted section, an earlier message's effect will now extend past where the deleted section was.

Now, let's see what happens to the material you have placed on the Clipboard when you cut or copy. Cutting removes material from its original location, and copying does not. Both place material on the Clipboard in exactly the same way.

The material which you have cut or copied onto the Clipboard is stored there, ready to paste. If your cut or copy operation did not bring along all the messages that affect the material on the Clipboard, your paste operation will produce unexpected results. This is the flipside of the deletion problem: a message may affect the time segment you are cutting or copying, yet not be copied to the Clipboard because the message is before, not in, the section to be pasted.


Advanced Paste dialog box (7 KB GIF)


In the Advanced Paste dialog box shown above, only Meter/Key changes are enabled for pasting, since these were the only events in the selection that was cut or copied. Depending on what was cut or copied, the other checkboxes under "What to Paste" (right column of the dialog box) may be enabled.

Note also that "Align to Measures" in the middle column is enabled, and "Interval" is disabled. If you uncheck "Align to measures," "Interval" becomes enabled. More about "Interval" later.

The effect of messages outside the selection

This problem has been corrected as of Cakewalk 7.0 for tempo changes. It has not, however, been addressed for controller messages.

An earlier tempo, pitch bend, volume, sustain pedal other controller setting can make your pasted material sound completely wrong.Let's use a tempo message to illustrate the "outside the selection" pasting problem. Selection to cut or copy tempo map (4.4 KB GIF)

Consider the example shown at the left. You have copied measures 10 and 11, as shown at the left. The tempo before measure 10 was 159. This tempo held through measure 10, since measure 10 contained no new tempo messages. The tempo decreased in measure 11. You paste these two measures in as measures 2 and 3. The tempo before measure 2 is 100, and now that is the tempo for measure 2, which is the former measure 10. The result is shown at the right. Tempo map after paste (4.5 KB GIF)

When you paste, there are some messages you will want to get from the old location, and some from the new location. Cakewalk does not let you keep track of which are which. A more advanced sequencer would do this, by providing multiple, configurable inputs to each controller, as described in another article on this site. For now, you just have to remove glitches by hand -- a tiring chore, or write a CAL program to do it. (This can work well if you configure your MIDI patches so the same controllers should always move with the notes.) The Event Filter isn't much help, because it can only select a range of controllers, not individual controllers. Many musicians avoid the problem by not using controller messages any more than necessary. Their music suffers for it.

Unintended effects in the Advanced Paste dialog box

Cakewalk, selection for cutting (.7 KB GIF)The Advanced Paste dialog box, shown above, provides the most control over pasting you can have in Cakewalk using normal editing commands. The options in this dialog box can be confusing, though. Let's check them out with a few examples.We start by filling two measures with quarter notes. We do this using the pencil tool in Staff View, so we can be sure that the timings are exact. Then we are ready to cut the first note in the first measure, here shown in pink.

Cut for Align to measures (.6 KB GIF)After it is cut, the results are as shown here. Now we are ready to paste, and so we will discover how the Align to Measures and Interval checkboxes work. They don't work quite the way you may expect.

Align to Measures

When you paste, the Align to Measures checkbox does not affect the material that you are pasting -- it will always be pasted at the Now line. Align to Measures affects what follows the pasted section.

Effect of Align to measures (.8 KB GIF)The example shows the results of pasting in the quarter note that was prepared in the examples above. I checked "Slide old material over to make room" and "Align to Measures." The material following the pasted note was not only moved enough to make room -- it was moved by one full measure so it starts on the same beat as it did before. This is correct behavior, though it can be a bit confusing if you don't understand what is causing it.

Interval -- weird math

If you do not check Align to measures, then "Interval" is enabled. If you are pasting in more than one repetition, Interval determines the interval at which repetitions occur. But don't let the math confuse you! When Interval reads 1:01:000, you might think that means your pasted material will repeat every one measure and one beat. No, 1:01:000 means zero measures and zero beats -- the repetitions will all land right on top of one another. Subtract one from the number of measures and one from the number of beats in the Interval window to get the actual time interval. Sure, 1:01 is the usual way musicians describe the first beat of the first measure. But here we are talking about time intervals, not measure numbers, and the math is wrong.

I count the weird math as a bug. The first and second beats of the same measure are one beat apart. They are not a measure and two beats apart.

You might think that the Interval works only when you are pasting more than one repetition. After all, there is no interval between repetitions if there is only one repetition.

Not so! If you also check "Replace old material with new," Interval affects the length of material that is deleted following the paste, and if you select "Slide over...", Interval determines how far the old material slides over. This also happenswhen you only paste in one repetition.

There's another bug with "Interval". Let's have a look at the selection we made previously. We selected the note on the first beat of measure 1, using the selection arrow in staff view. Interval is supposed to set itself automatically to the length of the selection you have cut or copied. As shown at the left, the note is pink, indicating that it was selected, but there is no dark area in the ruler over the staff view. No time selection has been made. Hmmm...what does this mean. Selection of note only (1.1 KB GIF)

We see when we look at the Interval setting. After we select the quarter note, Interval reads 1:01:001. If we do not change this, we will get repetition intervals (remember the weird math) of zero measures, zero beats and -- one tick. The pasted notes will pile on top of each other (and on top of the old material too unless we check "replace..."). The results will look like the image at the right. Paste with two repetitions and "Slide" or "Blend (1.1 KB GIF)

Why didn't the automatic setting of Interval work right? We cut and pasted a quarter note. It's a full beat long, not one tick long. What is going on?

As described in another article on this site, Cakewalk stores the note-off event as part of the note-on event. As far as Interval is concerned, the quarter note is only as long as the one tick where the note-on/note off event is pasted.

Cartoon tick (0.7 KB GIF)I call this failure to account for the duration of a selected note a bug. Or maybe a tick. Yeah, I know ticks aren't bugs, they're more closely related to spiders. Who cares, this tick spreads Time disease. Sorry about the pun.

Sliding ignores duration of last note

Selection of two eighth notes (1.3 KB GIF)Now let's try pasting in two eighth notes instead of a quarter note. We select the eighth notes in Staff View. We shift-click or control-click on the second eighth note so that the first one remains selected. Notice in the image at the right that there is now a dark, selection area in the ruler, an eighth note long.

When we now open up the Advanced Paste dialog box, Interval is set to one eighth note and one tick. We paste, choosing to slide the old material over to make room. Pasted 8th notes (1 KB GIF)

The material slides over by an eighth note rather than by the two eighth notes, because the selection in the ruler ran from the start of the first note only to the start of the second note. The selection does adjust its length to include all the events we clicked, but since the selection does not include the duration of the second note, the old material only slides partly out of the way. Slid controller (3.5 KB GIF)

Once we have a selection with an appreciable length, selecting, cutting and pasting notes no longer affects only notes. The Cut command cuts "Events in tracks," not just notes. The Advanced Paste dialog box pastes "Events in Tracks," too. Controller messages are "Events in Tracks" and will also be slid over, replaced or blended, depending on what you choose in the Advanced Paste dialog box. The controller messages in the image at the left go with our eighth-note example. The messages originally decreased at a constant rate, but now the ones beginning at the paste location are moved over by an eighth note -- plus one tick -- partly out of the way, just like the notes that were slid over. This happens to all controllers in the track ,whether or not you want to move them with the notes.

Selecting in the Ruler

Now let's see what happens if we select in the top ruler of Staff View, as shown at the right.Unlike our earlier selection of the note only, this selection actually includes a full beat of time. We made sure it was exactly a full beat by using the Snap function in Staff View. Selection in Ruler (1.1 KB GIF)

When we open up the Paste dialog box, Interval will have been set automatically to 1:02:000 (remember, that's zero measures and one beat). Here's what happens when we paste now with 1 repetition and slide the old material over.

Voila! The result is correct. The old notes have been moved over just enough to leave room for the pasted note. The lesson here is: if you want to be sure about the length of the selection to paste, make the selection in the top ruler. Effect of pasting using selection made in top ruler (1.2KB GIF)

There's one hitch though: the top ruler selects "Events in Track(s)" -- not only notes. Controller events will also be selected, and they will be slid over, replaced or blended along with the notes. We have already seen how controller events slide over. At least now, with a selection of the correct length, they will slide over by the right amount.

Controller selection that goes with note selection above (4.5 KB GIF)Be especially wary of blending. Here (left) is a controller selection that goes along with the note selection at left above.

"Blend old material with new" is nice to add notes in the same time segment with others, but beware! "Blend" can make a mess of controllers. The illustration at the right, below, shows what happens. The old and new controller messages are interspersed among one another, causing wild, irregular changes in volume.

Blended controller messages (4.7 KB GIF)You can get some control over this problem by using the Event Filter (Edit | Select | by Filter) The Event Filter can include or remove all controllers, or a numerical range of controllers. Unfortunately, it can not select controllers individually. To do that, you will have to program in CAL. One useful trick is to move the controllers that you want to leave unchanged to a "storage" track. Another is to set up all the patches on your synth so the same controllers are used globally and the same ones locally.

The moral of all the examples in this article is that you must look carefully at the Interval setting before pasting, and usually change it manually. Don't forget about the weird math! Think about what is going to happen to controller messages! Above all, listen after you have pasted, so you can Undo if necessary. As with so many things about Cakewalk MIDI editing, you must work around a number of confusing quirks to get the results you want.


[Top: John S. Allen's Home Page]
[Up: List of Cakewalk articles]
[Previous: Delete/Cut Glitches]
[Next: Controller conflicts]

[contact John S. Allen by e-mail]

Contents © 1997 John S. Allen

Last revised 17 October 1999