.-----.   .----.   .-----.  .-----.         .---. .---.         .---.  .----.   
/ ,-.   \ /  ..  \ / ,-.   \/ ,-.   \  .-') /_   |/_   |   .-') /_   | /  ..  \  
'-'  |  |.  /  \  .'-'  |  |'-'  |  |_(  OO) |   | |   | _(  OO) |   |.  /  \  . 
   .'  / |  |  '  |   .'  /    .'  /(,------.|   | |   |(,------.|   ||  |  '  | 
 .'  /__ '  \  /  ' .'  /__  .'  /__ '------'|   | |   | '------'|   |'  \  /  ' 
|       | \  `'  / |       ||       |        |   | |   |         |   | \  `'  /  
`-------'  `---''  `-------'`-------'        `---' `---'         `---'  `---''   

100days of guitar day 61

Lick of the Day

e|-----------------|-----------------|-----------------|-----------------|
B|-6-3-6-3---------|-----------------|-----------------|-----------------|
G|---------5-3-5-3-|-----------------|-----------------|-----------------|
D|-----------------|-5-3-5-3---------|-----------------|-----------------|
A|-----------------|---------5-------|-----------------|-----------------|
E|-----------------|-----------------|-----------------|-----------------|

Play ASCII tab in Sonic PI

Simple little sonic-pi program to read ASCII tab format, and play it.

I should probably update it to output midi, so I can have ableton render the sound since they have much better guitar sounds.

guitar_strings = {
  'E': [:E3, :F3, :Fs3, :G3, :Gs3, :A3, :As3, :B3, :C4, :Cs4, :D4, :Ds4, :E4, :F4, :Fs4, :G4, :Gs4, :A4],
  'A': [:A4, :As4, :B4, :C5, :Cs5, :D5, :Ds5, :E5, :F5, :Fs5, :G5, :Gs5, :A5, :As5, :B5, :C6, :Cs6, :D6],
  'D': [:D5, :Ds5, :E5, :F5, :Fs5, :G5, :Gs5, :A5, :As5, :B5, :C6, :Cs6, :D6, :Ds6, :E6, :F6, :Fs6, :G6],
  'G': [:G5, :Gs5, :A5, :As5, :B5, :C6, :Cs6, :D6, :Ds6, :E6, :F6, :Fs6, :G6, :Gs6, :A6, :As6, :B6, :C7],
  'B': [:B5, :C6, :Cs6, :D6, :Ds6, :E6, :F6, :Fs6, :G6, :Gs6, :A6, :As6, :B6, :C7, :Cs7, :D7, :Ds7, :E7],
  'e': [:E6, :F6, :Fs6, :G6, :Gs6, :A6, :As6, :B6, :C7, :Cs7, :D7, :Ds7, :E7, :F7, :Fs7, :G7, :Gs7, :A7]
}

notes = {}

File.open("/Users/mattpoepping/s/cli/licks/2022-11-10.tab","r") do |f|
  while strline = f.gets
    strline = strline.strip()
    notes[ strline[0] ] = strline.split("").drop(2)
  end
end

use_synth_defaults release: 0.4
use_synth :fm
use_bpm 120

with_fx :hpf, cutoff: 80, res: 0.9, amp: 1.5  do
  with_fx :distortion, distort: 0.8, amp: 0.5, mix: 0.4  do
    for i in 0..notes['e'].length() do
      notes.each do |k,v|
      if ['1','2','3','4','5','6','7','8','9','0'].include? notes[k][i] then
        #puts k.to_sym , notes[k][i].to_i, guitar_strings[ k.to_sym ]
        play_note = guitar_strings[ k.to_sym ][ notes[k][i].to_i ]
        puts play_note
        play play_note
        sleep 0.2
      end
    end
  end
end
end

👈 Prev Day - Home - Next Day 👉