Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion blues_solo.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,29 @@ def add_note(out, instr, key_num, duration, bpm, volume):
blues_scale = [25, 28, 30, 31, 32, 35, 37, 40, 42, 43, 44, 47, 49, 52, 54, 55, 56, 59, 61]
beats_per_minute = 45 # Let's make a slow blues solo

add_note(solo, bass, blues_scale[0], 1.0, beats_per_minute, 1.0)
# add_note(solo, bass, blues_scale[0], 1.0, beats_per_minute, 1.0)

curr_note = 0
#add_note(solo, bass, blues_scale[curr_note], 1.0, beats_per_minute, 1.0)

licks = [ [[1,0.2],[1,0.2],[1,0.2],[-1,0.2]],
[[1,0.2],[-1,0.2],[-1,0.2],[-1,0.2]],
[[3,0.5],[-1,0.1],[-1,0.1],[-1,0.1]],
[[2,0.2],[-2,0.2],[2,0.2],[-2,0.2]],
[[1,0.3],[0,0.3],[2,0.1],[-2,0.3]],
#[[len(blues_scale)+5,0.3],[-3,0.2],[-len(blues_scale)+5,0.3],[2,0.4]] # For large jumps
]
lick_repeat = 2
volume = 1
for i in range(lick_repeat*len(licks)):
lick = choice(licks)#licks[i/lick_repeat]
crescendo = choice([-0.3, 0, 0.3])
for note in lick:
curr_note += note[0]
curr_note %= len(blues_scale) # If statements are for loosers
volume += crescendo
volume %= 2
add_note(solo, bass, blues_scale[curr_note], note[1], beats_per_minute, volume)


solo >> "blues_solo.wav"
Binary file added blues_solo.wav
Binary file not shown.