This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
# Exchange rate word | |
ex_rate_word = " | |
新台幣(TWD) | |
人民幣(CNY) | |
日圓(JPY) | |
韓圜(KRW) | |
港幣(HKD) | |
泰銖(THB) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def showScale( key, mode) | |
scale = ["C","#C/bD","D","#D/bE","E","F","#F/bG","G","#G/bA","A","#A/bB","B"] | |
mode_hash = { | |
# 1 means a semitone and 2 means two semitone | |
"Ionian" => [2,2,1,2,2,2,1], | |
"Dorian" => [2,1,2,2,2,1,2], | |
"Phrygian" => [1,2,2,2,1,2,2], | |
"Lydian" => [2,2,2,1,2,2,1], | |
"Mixolydian"=> [2,2,1,2,2,1,2], | |
"Aeolian" => [2,1,2,2,1,2,2], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "Set" | |
require "./mode_scale.rb" | |
class GuitarChord | |
attr_accessor :key | |
@@scale = ["C","#C/bD","D","#D/bE","E","F","#F/bG","G","#G/bA","A","#A/bB","B"] | |
@@chord_hash = { | |
# Major chords | |
"maj" => [0,4,3], | |
"maj7" => [0,4,3,4], | |
"M7" => [0,4,3,3], |