Upload
steffnaace
View
62
Download
1
Embed Size (px)
Citation preview
[Computational Blues]12 Bars in the Key of C
http://sandboxeducation.co.uk
Computational Process• analyse the problem and identify an algorithm
• break the problem down into a series of steps or sub-problems
• create new algorithms and write pseudocode
• code, test and debug each sub-problem
• code sub-problems into parallel threads, test and debug
http://sandboxeducation.co.uk
Algorithm
Blues Chords + Blues Scale Notes played over 12 bars = 12 Bar Blues
http://sandboxeducation.co.uk
Sub-Problem 1
Code Blues Chords over 12 Bars
http://sandboxeducation.co.uk
Chords and Notes
Blues Chords Notes
C7 C E G BbF7 F A C EbG7 G B D F
http://sandboxeducation.co.uk
Code in Sonic Pi
Music Notation Midi (computer) Notationplay C3 play 48play E3 play 52play G3 play 55play Bb3 play 58
http://sandboxeducation.co.uk
C7 Chord
Blues Chords Notes
C7C E G Bb
60 64 67 70
http://sandboxeducation.co.uk
Blues Chords Chord C7 F7 C7 G7 F7 C7
Bar 1 2 3 4 5 6 7 8 9 10 11 12Notes 16 8 8 4 4 8Total Notes 48
http://sandboxeducation.co.uk
[Chords]
C7
play 48
play 52
play 55
play 58
F7
play
G7
play
http://sandboxeducation.co.uk
Blues Chords 4 Bars C7 Chord
16.times do play 60play 64play 67play 70sleep 1.0end
http://sandboxeducation.co.uk
16.times do play_chord [60,64,67,70]sleep 1.0end
16.times do play_chord [48,52,55,58] sleep 1.0end
C7 Octave 4
C7 Octave 5
http://sandboxeducation.co.uk
Bar 1 2 3 4 5 6 7 8 9 10 11 12
Chord C7 F7 C7 G7 F7 C7
http://sandboxeducation.co.uk
8.times doplay_chord [53,57,48,56]sleep 1.0end
16.times do play_chord [60,64,67,70]sleep 1.0end
F7 Octave 3
C7 Octave 4
http://sandboxeducation.co.uk
# Octave 3 C7 play_chord [48,52,55,58]
# Octave 3 F7 play_chord [53,57,48,56]
# Octave 3 C7 play_chord [48,52,55,58] #G7 Octave 4 play_chord [?]
# Octave 3 F7 play_chord [53,57,48,56]
# Octave 3 C7 play_chord [48,52,55,58]
http://sandboxeducation.co.uk
Melody
Scale NotesC Blues C Eb F F# G Bb C
http://sandboxeducation.co.uk
Function
play_pattern [:C, :Eb, :F, :Fs, :G, :Bb, :C5]
http://sandboxeducation.co.uk
# Welcome to Sonic Pi v2.1.1
#Blues Scale Octave 4 and 5 48.times doplay_pattern [:C, :Eb, :F, :Fs, :G, :Bb, :C5]play_pattern [:C5, :Eb5, :F5, :Fs5, :G5, :Bb5, :C55]sleep 0.25end
http://sandboxeducation.co.uk
To Do!• use rand for random function to vary the notes in the
blues scale
• code the chords and the scale to play at the same time ( in thread do)
• experiment to find the right temp or bpm 100+
• experiment to find the best synth
• experiment to find the best release and attack values for blues
http://sandboxeducation.co.uk
Get in touch…
Computing CPD Computing Lessons
Hacks and Jams Tech Fests HackathonsHardware