Skip to content

Melody

Chords to Melody

One way is to create a chord progression, and than to find the melody in the chords.

E3D3F3E3
C3B2D3C3
A2G2A2G2

As mentioned before, the octave in Renardo is 2 steps above the usual, middle C is 5 not 3.

Lets do the chords with 93 bpm with A as Root note and minor scale:

Clock.bpm = 93
Root.default=”A”
Scale.default=Scale.minor
# Chords:
chords = var([(0,2,4),(-1,1,3),(0,3,5),(-2,2,4)])
s1 >> swell(chords, oct=5, dur=4, sus=5)
# Hit the drums can help find a good melody:
b1 >> play("<X....X..X..[X.].X..><..o.><---->",sample=0)

The easiest way to start a melody is to take the highest notes of the chords. However, you want to add some non-chord notes to your chord notes:

E4F4D4F4D4G4E4D4
seq=[4,5,3,5,3,6,4,3]
s2 >> pulse(seq, oct=6, dur=[3,1,3,3,1,1,2,2])

Melody to Chords

In this example we start with a melody in order to get suitable chords from it, here the melody.

A3B3C4B3E4F4C4G4E4D4

Let’s set the tempo, the root and the scale:

Clock.bpm = 93
Root.default=”A”
Scale.default=Scale.minor

The originating Melody:

If you can’t remember the numbers on the scale list, use print(Scale.minor).

seq=[0,1,2,1,4,5,2,6,4,3]

Synth:

s1 >> saw(seq, dur=[2,1,1,4,3,1,1,1,1,1], formant=4, amplify=0.4)

The available chords (with 7th) for the notes played in the melody are as follows:

G4A4B4C5D5E5F5
E4F4G4A4B4C5D5
C4D4E4F4G4A4B4
A3B3C4D4E4F4G4

Here is a good example of a trip-hop-like track:

E4D4E4E4
C4B3C4G4
A3G3A3C4

Let’s add the chords to the melody:

chords = var([(0,2,4),(-1,1,3),(0,2,4),(-1,6,4)])
s2 >> keys(chords, oct=4, dur=4, shape=0.4)

And a drum hit:

b1 >> play("<X....X..X..[X.].X..><..o.><---->", sample=0)

Add a counter melody (arpeggio)

Let’s keep it simple and use the chord notes to play with the chords. With the counter melody we want to add a rhythm to the track. As the 4th of the sequence in a 4-beat measure, we add the 2nd as shown here:

chords = var([(0,2,4),(-1,1,3),(0,2,4),(-1,4,6)])

becomes

seq2 = [0,2,4,2,-1,1,3,1,0,2,4,2,-1,4,6,4]

Now let’s add another instrument that plays the counter melody:

s3 >> karp(seq2, dur=1)

Chords to Bassline

In the example below, the chord progression is based on A minor, while raising a root to a higher octave and lowering a root.

G3G3
E3F3G3G3
C3D3E3E3
A2B2C3B2

Let’s set the tempo, root and scale:

Clock.bpm = 128
Root.default=”A”
Scale.default=Scale.minor

Here chords and synth:

chords = var([(0,2,4,6),(1,1,3,6),(2,4,6),(1,4,6)])
s1 >> prophet(chords, oct=4, dur=4, sus=4)

The safe case is to use chord root notes as bass notes and lower those notes in the octave:

A1G1C2E2
bassline1 = [0,-1,2,4]

Another way to create a bass line is to find notes within the chords (although the 7th can be tricky).

A1B1C2B1

You can also change the duration of the bass line to get a rhythmic component:

Use dur=1dur=[0.5,1], or dur=[1,2,1] instead of dur=4.

Another option is to move the root note of a chord one step up the previous chord row.

With dur=1:

bassline2=[0,0,0,-1,-1,-1,-1,2,2,2,2,-3,-3,-3,-3,0]

Or you use octave oct jumps:

bassline3=[0,0,0,0,-1,-1,-1,-1,2,2,2,2,-3,-3,-3,-3]

with dur=1 and oct=[3,3,4,3]

Finally, a melody as a bass line:

A1G1A1B1A1G1G1A1C2C2A1G1E1E1F1G1
bassline4 = [0,-1,0,1,-1,-1,0,1,3,3,0,-1,-3,-3,-2,-1]

Bassline to Chords

We’ll start with tempo, root note, scale, and a simple bass line:

Clock.bpm = 128
Root.default=”A”
Scale.default=Scale.minor
bassline=[0,0,0,0,0,0,0,1]

Now let’s build chords along the minor chord, like: Am, Bm/A, G/A, Am.

chords = var([(0,2,4),(1,3,5),(0,2,4),(-1,1,3),(0,2,4)])

Bm/A and G/A mean “above A” because the bass line still keeps A as the root of the chord.

The corresponding synth examples for bass and chords are:

s1 >> jbass(bassline, oct=3, dur=0.5, shape=0.4) # Bass
s2 >> dirt(chords, oct=5, dur=[4,3,1,4,4], amplify=0.4) # Chords

Drums:

b1 >> play("<V....V..><..o.><....k..d>←--[--]>", sample=var([4, 2], 16), amplify=0.5)
b2 >> play(var(["[ss]",".[ss]"]), amplify=0.5)

Some additional notes on a bass line:

Only use one note at the time, as low frequency easy go “muddy”!