Adding swing to your project

Swing, also known as shuffle or groove, refers to stretching and shortening alternating notes of a rhythm. It’s often used to add a more relaxed feel to a song.

This recipe will focus on adding swing to 16th notes, using the default 4/4 time and 16th note grid in SunVox. We’ll cover two ways to add swing, and list the benefits and drawbacks of each method.

Common principles

PPQN: Parts per quarter note

By default, lines in SunVox represent 16th notes. Also by default, each line is divided into six ticks. This means each quarter note is divided into 24 ticks, or 24 PPQN (parts per quarter note).

24 PPQN is the default in SunVox for historical and practical reasons. However, this gives you a limited range of swing amounts.

For adding more subtle swing to your project, 96 PPQN is useful. Thankfully, SunVox supports this by changing the BPM and TPL in project properties.

One way of doing this, while keeping 16th note lines in your patterns, is to multiply both BPM and TPL in your project properties by 4.

The example project used here has an actual BPM of 80, so the project’s BPM is set to 320 and the TPL is set to 12.

Swing percentages

Swing is often referred to as a percentage between 50% and 75%. If an 8th note of time in a track represents 100%, the swing percentage is the amount of time the first 16th note will occupy. The second 16th note is then triggered and occupies the remainder.

Without adding any swing, your swing is at 50%. This means that both 16th notes are the same length:

           11111111112222222222333333333344444444
 012345678901234567890123456789012345678901234567   <-- tick (96 PPQN)
+-----------------------><-----------------------+
|<-50%------------------><-50%------------------>|  <-- 8th note divided into
|<-24 ticks-------------><-24 ticks------------->|      equal 16th notes
+-----------------------><-----------------------+
 \__________/\__________/\__________/\__________/   <-- 32nd notes
 0.......................1.......................   <-- line (16th note)

If we have a swing of 75%, what effectively happens is that the first 16th note becomes dotted (which means it takes up 1.5 times the space of a 16th note) and the second becomes a 32nd note:

           11111111112222222222333333333344444444
 012345678901234567890123456789012345678901234567
+-----------------------------------><-----------+
|<-75%------------------------------><-25%------>|
|<-36 ticks-------------------------><-12 ticks->|
+-----------------------------------><-----------+
 \__________/\__________/\__________/\__________/
 0.......................1.......................

This creates a very extreme swing, so typically something in between is used, such as 62.5%, sometimes shown as “62%” on hardware sequencers:

           11111111112222222222333333333344444444
 012345678901234567890123456789012345678901234567
+-----------------------------><-----------------+
|<-62.5%----------------------><-37.5%---------->|
|<-30 ticks-------------------><-18 ticks------->|
+-----------------------------><-----------------+
 \__________/\__________/\__________/\__________/
 0.......................1.......................

Now that you have knowledge of how swing works musically, you can explore these methods for adding swing to your SunVox projects.

Example project without swing

As a point of comparison, here is what our example project sounds like before adding any swing. In other words, its swing value is 50%.

Download Audio for No Swing Applied

Download No Swing Applied

Modules

We have a basic setup involving a FM synth passed through a couple of filters, one of which has a line-based LFO running. We also have a drum synth that’s providing a kick, snare, and hihat.

../_images/b3a413dc2fa3da29024992c00c9d38b31ea3e02ea665a9c3594e02fa40d073fb.svg

FM pattern

   | NN VV MM CC EE XXYY
00 | G4    MM           
01 | B3    MM           
02 | a3    MM           
03 | //    MM           
04 | a3    MM           
05 | //    MM           
06 | a3    MM           
07 | //    MM           
08 | a3    MM           
09 | //    MM           
10 | a3    MM           
11 | //    MM           
12 | a3    MM           
13 | a3    MM           
14 | a3    MM           
15 | //    MM           
16 | G4    MM           
17 | B3    MM           
18 | a3    MM           
19 | //    MM           
20 | a3    MM           
21 | //    MM           
22 | a3    MM           
23 | //    MM           
24 | G3    MM           
25 | //    MM           
26 | a3    MM           
27 | //    MM           
28 | a3    MM           
29 | G3    MM           
30 | f3    MM           
31 | //    MM           
32 | G4    MM           
33 | B3    MM           
34 | a3    MM           
35 | //    MM           
36 | a3    MM           
37 | //    MM           
38 | a3    MM           
39 | //    MM           
40 | a3    MM           
41 | //    MM           
42 | a3    MM           
43 | //    MM           
44 | a3    MM           
45 | a3    MM           
46 | a3    MM           
47 | //    MM           
48 | G4    MM           
49 | B3    MM           
50 | a3    MM           
51 | //    MM           
52 | a3    MM           
53 | //    MM           
54 | a3    MM           
55 | //    MM           
56 | G3    MM           
57 | //    MM           
58 | a3    MM           
59 | //    MM           
60 | a3    MM           
61 | G3    MM           
62 | f3    MM           
63 | //    MM           

LFO initialization pattern

   | NN VV MM CC EE XXYY
00 | ..    MM 10 00     
01 | ..    MM           
02 | ..    MM           
03 | ..    MM           
04 | ..    MM           
05 | ..    MM           
06 | ..    MM           
07 | ..    MM           
08 | ..    MM           
09 | ..    MM           
10 | ..    MM           
11 | ..    MM           
12 | ..    MM           
13 | ..    MM           
14 | ..    MM           
15 | ..    MM           
16 | ..    MM           
17 | ..    MM           
18 | ..    MM           
19 | ..    MM           
20 | ..    MM           
21 | ..    MM           
22 | ..    MM           
23 | ..    MM           
24 | ..    MM           
25 | ..    MM           
26 | ..    MM           
27 | ..    MM           
28 | ..    MM           
29 | ..    MM           
30 | ..    MM           
31 | ..    MM           

DrumSynth pattern

   | NN VV MM CC EE XXYY | NN VV MM CC EE XXYY | NN VV MM CC EE XXYY
00 | D2    MM            | f2    MM            | G6    MM           
01 | //    MM            | f2    MM            | //    MM           
02 | //    MM            | E5    MM            | //    MM           
03 | //    MM            | f2    MM            | //    MM           
04 | D2    MM            | f2    MM            | G6    MM           
05 | //    MM            | f2    MM            | //    MM           
06 | //    MM            | E5    MM            | //    MM           
07 | //    MM            | f2    MM            | //    MM           
08 | D2    MM            | f2    MM            | G6    MM           
09 | //    MM            | f2    MM            | //    MM           
10 | //    MM            | E5    MM            | //    MM           
11 | //    MM            | f2    MM            | //    MM           
12 | D2    MM            | f2    MM            | G6    MM           
13 | //    MM            | f2    MM            | G6    MM           
14 | //    MM            | f2    MM            | G6    MM           
15 | //    MM            | E5    MM            | //    MM           
16 | D2    MM            | f2    MM            | G6    MM           
17 | //    MM            | f2    MM            | //    MM           
18 | //    MM            | E5    MM            | //    MM           
19 | //    MM            | f2    MM            | //    MM           
20 | D2    MM            | f2    MM            | G6    MM           
21 | //    MM            | f2    MM            | //    MM           
22 | //    MM            | E5    MM            | //    MM           
23 | //    MM            | f2    MM            | //    MM           
24 | D2    MM            | f2    MM            | G6    MM           
25 | //    MM            | f2    MM            | //    MM           
26 | //    MM            | E5    MM            | //    MM           
27 | //    MM            | f2    MM            | //    MM           
28 | D2    MM            | f2    MM            | G6    MM           
29 | //    MM            | f2    MM            | G5    MM           
30 | //    MM            | f2    MM            | //    MM           
31 | D2    MM            | E5    MM            | //    MM           
32 | D2    MM            | f2    MM            | G6    MM           
33 | //    MM            | f2    MM            | //    MM           
34 | //    MM            | E5    MM            | //    MM           
35 | //    MM            | f2    MM            | //    MM           
36 | D2    MM            | f2    MM            | G6    MM           
37 | //    MM            | f2    MM            | //    MM           
38 | //    MM            | E5    MM            | //    MM           
39 | //    MM            | f2    MM            | //    MM           
40 | D2    MM            | f2    MM            | G6    MM           
41 | //    MM            | f2    MM            | //    MM           
42 | //    MM            | E5    MM            | //    MM           
43 | //    MM            | f2    MM            | //    MM           
44 | D2    MM            | f2    MM            | G6    MM           
45 | //    MM            | f2    MM            | G6    MM           
46 | //    MM            | f2    MM            | G6    MM           
47 | //    MM            | E5    MM            | //    MM           
48 | D2    MM            | f2    MM            | G6    MM           
49 | //    MM            | f2    MM            | //    MM           
50 | //    MM            | E5    MM            | //    MM           
51 | //    MM            | f2    MM            | //    MM           
52 | D2    MM            | f2    MM            | G6    MM           
53 | //    MM            | f2    MM            | //    MM           
54 | //    MM            | E5    MM            | //    MM           
55 | //    MM            | f2    MM            | //    MM           
56 | D2    MM            | E5    MM            | G6    MM           
57 | //    MM            | f2    MM            | //    MM           
58 | //    MM            | f2    MM            | //    MM           
59 | //    MM            | E5    MM            | //    MM           
60 | D2    MM            | f2    MM            | G5    MM           
61 | D2    MM            | f2    MM            | //    MM           
62 | D2    MM            | E5    MM            | //    MM           
63 | //    MM            | f2    MM            | //    MM           

Method 1: Global swing by setting TPL

This method works by alternating the number of ticks each line takes. The first line sets it to the longer value, and the second line sets it to the shorter.

It will affect all notes in all patterns globally, and you will also see the swing visually during playback.

Applying the method

Find the “1st note ticks” and “2nd note ticks” that match your PPQN and desired swing amount. (See Tables)

Create a new pattern that alternates between the two values using the 0F: Set playing speed [TBW] note effect.

Clone the pattern as many times as needed to reach the end of your song (or the end of the section where you want swing).

Here’s what it looks like to apply 56% swing:

   | NN VV MM CC EE XXYY
00 | ..    MM 00 0F 001B
01 | ..    MM 00 0F 0015
02 | ..    MM 00 0F 001B
03 | ..    MM 00 0F 0015
04 | ..    MM 00 0F 001B
05 | ..    MM 00 0F 0015
06 | ..    MM 00 0F 001B
07 | ..    MM 00 0F 0015
08 | ..    MM 00 0F 001B
09 | ..    MM 00 0F 0015
10 | ..    MM 00 0F 001B
11 | ..    MM 00 0F 0015
12 | ..    MM 00 0F 001B
13 | ..    MM 00 0F 0015
14 | ..    MM 00 0F 001B
15 | ..    MM 00 0F 0015
16 | ..    MM 00 0F 001B
17 | ..    MM 00 0F 0015
18 | ..    MM 00 0F 001B
19 | ..    MM 00 0F 0015
20 | ..    MM 00 0F 001B
21 | ..    MM 00 0F 0015
22 | ..    MM 00 0F 001B
23 | ..    MM 00 0F 0015
24 | ..    MM 00 0F 001B
25 | ..    MM 00 0F 0015
26 | ..    MM 00 0F 001B
27 | ..    MM 00 0F 0015
28 | ..    MM 00 0F 001B
29 | ..    MM 00 0F 0015
30 | ..    MM 00 0F 001B
31 | ..    MM 00 0F 0015

Here’s what it sounds like:

Download Audio for Method 1, 96 PPQN, 56% swing

Download Method 1, 96 PPQN, 56% swing

Notice how the filter’s LFO no longer aligns the same way as before. This is one of the side-effects of this method and is discussed in the list of drawbacks below.

Advantages

  • Requires only a single track to apply swing to all notes.

  • Swing across entire project can be adjusted quickly.

  • All note effects may be used.

Drawbacks

  • All tracks must follow the same swing amount. Track-specific swing, as described below, can allow for this. Mixing the two techniques is left as an exercise for the reader.

  • Maximum swing value is 64% when using 96 PPQN, as TPL cannot be set past 31.

  • If you have any LFOs set to use “line”, “line/2”, or “line/3” as a frequency unit, they will be affected by the shifting TPL. You may hear audible clicks as a result. Use a different frequency unit, or try track-specific swing instead. Affected modules: Delay [TBW], Echo [TBW], Filter [TBW], Filter Pro [TBW], Flanger [TBW], LFO [TBW], Vibrato [TBW].

Method 2: Track-specific swing by delaying notes

This method works by alternating the number of ticks each line takes. The first line sets it to the longer value, and the second line sets it to the shorter.

It will affect all notes in all patterns globally, and you will also see the swing visually during playback.

Applying the method

Find the “2nd note delay” that matches your PPQN and desired swing amount. (See Tables)

Delay every second line in the sequence of notes you want to swing using the 1D: Delay start during line [TBW] note effect.

Here’s what it looks like to apply 56% swing to our FM bassline, 52% to our kick drum, 62% to our hihats, and 75% to our snare:

   | NN VV MM CC EE XXYY
00 | g4    MM           
01 | B3    MM 00 1D 0003
02 | a3    MM           
03 | //    MM 00 1D 0003
04 | a3    MM           
05 | //    MM 00 1D 0003
06 | a3    MM           
07 | //    MM 00 1D 0003
08 | a3    MM           
09 | //    MM 00 1D 0003
10 | a3    MM           
11 | //    MM 00 1D 0003
12 | a3    MM           
13 | a3    MM 00 1D 0003
14 | a3    MM           
15 | //    MM 00 1D 0003
16 | G4    MM           
17 | B3    MM 00 1D 0003
18 | a3    MM           
19 | //    MM 00 1D 0003
20 | a3    MM           
21 | //    MM 00 1D 0003
22 | a3    MM           
23 | //    MM 00 1D 0003
24 | G3    MM           
25 | //    MM 00 1D 0003
26 | a3    MM           
27 | //    MM 00 1D 0003
28 | a3    MM           
29 | G3    MM 00 1D 0003
30 | f3    MM           
31 | //    MM 00 1D 0003
32 | G4    MM           
33 | B3    MM 00 1D 0003
34 | a3    MM           
35 | //    MM 00 1D 0003
36 | a3    MM           
37 | //    MM 00 1D 0003
38 | a3    MM           
39 | //    MM 00 1D 0003
40 | a3    MM           
41 | //    MM 00 1D 0003
42 | a3    MM           
43 | //    MM 00 1D 0003
44 | a3    MM           
45 | a3    MM 00 1D 0003
46 | a3    MM           
47 | //    MM 00 1D 0003
48 | G4    MM           
49 | B3    MM 00 1D 0003
50 | a3    MM           
51 | //    MM 00 1D 0003
52 | a3    MM           
53 | //    MM 00 1D 0003
54 | a3    MM           
55 | //    MM 00 1D 0003
56 | G3    MM           
57 | //    MM 00 1D 0003
58 | a3    MM           
59 | //    MM 00 1D 0003
60 | a3    MM           
61 | G3    MM 00 1D 0003
62 | f3    MM           
63 | //    MM 00 1D 0003
   | NN VV MM CC EE XXYY | NN VV MM CC EE XXYY | NN VV MM CC EE XXYY
00 | D2    MM            | f2    MM            | G6    MM           
01 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
02 | //    MM            | E5    MM            | //    MM           
03 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
04 | D2    MM            | f2    MM            | G6    MM           
05 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
06 | //    MM            | E5    MM            | //    MM           
07 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
08 | D2    MM            | f2    MM            | G6    MM           
09 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
10 | //    MM            | E5    MM            | //    MM           
11 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
12 | D2    MM            | f2    MM            | G6    MM           
13 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | G6    MM 00 1D 000C
14 | //    MM            | f2    MM            | G6    MM           
15 | //    MM 00 1D 0001 | E5    MM 00 1D 0006 | //    MM 00 1D 000C
16 | D2    MM            | f2    MM            | G6    MM           
17 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
18 | //    MM            | E5    MM            | //    MM           
19 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
20 | D2    MM            | f2    MM            | G6    MM           
21 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
22 | //    MM            | E5    MM            | //    MM           
23 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
24 | D2    MM            | f2    MM            | G6    MM           
25 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
26 | //    MM            | E5    MM            | //    MM           
27 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
28 | D2    MM            | f2    MM            | G6    MM           
29 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | G5    MM 00 1D 000C
30 | //    MM            | f2    MM            | //    MM           
31 | D2    MM 00 1D 0001 | E5    MM 00 1D 0006 | //    MM 00 1D 000C
32 | D2    MM            | f2    MM            | G6    MM           
33 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
34 | //    MM            | E5    MM            | //    MM           
35 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
36 | D2    MM            | f2    MM            | G6    MM           
37 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
38 | //    MM            | E5    MM            | //    MM           
39 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
40 | D2    MM            | f2    MM            | G6    MM           
41 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
42 | //    MM            | E5    MM            | //    MM           
43 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
44 | D2    MM            | f2    MM            | G6    MM           
45 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | G6    MM 00 1D 000C
46 | //    MM            | f2    MM            | G6    MM           
47 | //    MM 00 1D 0001 | E5    MM 00 1D 0006 | //    MM 00 1D 000C
48 | D2    MM            | f2    MM            | G6    MM           
49 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
50 | //    MM            | E5    MM            | //    MM           
51 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
52 | D2    MM            | f2    MM            | G6    MM           
53 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
54 | //    MM            | E5    MM            | //    MM           
55 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
56 | D2    MM            | E5    MM            | G6    MM           
57 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
58 | //    MM            | f2    MM            | //    MM           
59 | //    MM 00 1D 0001 | E5    MM 00 1D 0006 | //    MM 00 1D 000C
60 | D2    MM            | f2    MM            | G5    MM           
61 | D2    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C
62 | D2    MM            | E5    MM            | //    MM           
63 | //    MM 00 1D 0001 | f2    MM 00 1D 0006 | //    MM 00 1D 000C

Here’s what it sounds like:

Download Audio for Method 2, 96 PPQN, variable swing

Download Method 2, 96 PPQN, variable swing

This example may be a bit overdone, but it shows how you can use different swing values simultaneously.

The filter’s LFO aligns the same way as without swing, because we are not changing the size of lines.

Advantages

  • Simpler way to have different swing amounts for different tracks.

  • LFOs using “line”, “line/2”, or “line/3” as a frquency unit will not be affected as the TPL will stay fixed.

Drawbacks

  • Must place note effects in an adjacent track.

  • More difficult to change swing values once set.

  • Some note effects may not be used: 20-23 (random notes and controller values), 40-5f (delay event for line fraction).

Tables

Here is a table of swing percentage values. It’ll be useful for the techniques explained below. Each value shows the number of ticks each 16th note will take, and the number of ticks the second 16th note will need to be delayed.

If you’re using a TPL other than 6, 12, or 24, I applaud you for your creativity! You’ll have to calculate swing and BPM on your own, but the same methods described above will still apply.

24 PPQN

Keep TPL at 6.

%

1st note ticks

2nd note ticks

2nd note delay

50

6

6

0

58

7

5

1

66

8

4

2

75

9

3

3

48 PPQN

Set TPL to 12, multiply project BPM by 2.

%

1st note ticks

2nd note ticks

2nd note delay

50

12 (c)

12 (c)

0 (0)

54

13 (d)

11 (b)

2 (2)

58

14 (e)

10 (a)

4 (4)

62

15 (f)

9 (9)

6 (6)

66

16 (10)

8 (8)

8 (8)

70

17 (11)

7 (7)

10 (a)

75

18 (12)

6 (6)

12 (c)

96 PPQN

Set TPL to 24, multiply project BPM by 4.

Note

Maximum TPL is 31, so 64% swing is highest available using Method 1: Global swing by setting TPL.

%

1st note ticks

2nd note ticks

2nd note delay

50

24 (18)

24 (18)

0 (0)

52

25 (19)

23 (17)

1 (1)

54

26 (1a)

22 (16)

2 (2)

56

27 (1b)

21 (15)

3 (3)

58

28 (1c)

20 (14)

4 (4)

60

29 (1d)

19 (13)

5 (5)

62

30 (1e)

18 (12)

6 (6)

64

31 (1f)

17 (11)

7 (7)

66

8 (8)

68

9 (9)

70

10 (a)

72

11 (b)

75

12 (c)

Further reading

For more about the history behind swing and quantization, read this interview with Roger Linn, creator of the LinnDrum drum machine and designer of early Akai MPC workstations.


Contributors to this page

Author(s)

Matthew Scott