Skip to content

Commit

Permalink
chord counts
Browse files Browse the repository at this point in the history
  • Loading branch information
dancor committed Jul 26, 2012
1 parent e034488 commit 18d9909
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
32 changes: 16 additions & 16 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ called A7-first-inversion (or A7/C#).
The code generating these is at
http://github.com/dancor/uke-chords

major
major (6+1)
0003: CM
2220: DM
0331: EbM
Expand All @@ -22,7 +22,7 @@ major
0232: GM
2100: AM

minor
minor (6+1)
0333: Cm
2210: Dm
1013: Fm
Expand All @@ -31,78 +31,78 @@ minor
2000: Am
2003: Am

diminished
diminished (4+1)
2320: Ebdim
2020: F#dim
2023: F#dim
0131: Gdim
3101: Bbdim

augmented
augmented (3)
1003: Caug
2110: C#aug
0332: Ebaug

dominant seventh
dominant seventh (4)
0001: C7
1202: E7
0212: G7
0100: A7

major seventh
major seventh (5)
0002: CM7
1302: EM7
0222: GM7
1100: AM7
3210: BbM7

minor seventh
minor seventh (4)
1102: C#m7
0202: Em7
0211: Gm7
0000: Am7

diminished seventh
diminished seventh (1)
0101: C#dim7

half-diminished seventh
half-diminished seventh (4)
0102: C#m7-5
0201: Em7-5
0111: Gm7-5
1101: Bbm7-5

minor major seventh
minor major seventh (5)
1103: C#mM7
0302: EmM7
0221: GmM7
1000: AmM7
3110: BbmM7

augmented major seventh
augmented major seventh (5)
1002: CaugM7
1303: EaugM7
0322: GaugM7
1110: AaugM7
3220: BbaugM7

augmented seventh
augmented seventh (4)
1001: Caug7
1203: Eaug7
0312: Gaug7
0110: Aaug7

ninth
ninth (3)
3203: C9
0310: F9
1021: Ab9

major ninth
major ninth (1)
1031: AbM9

minor ninth
minor ninth (1)
2032: Am9

dominant seventh sharp ninth (hendrix chord)
dominant seventh sharp ninth (hendrix chord) (3)
3303: C7+9
1310: F7+9
1022: Ab7+9
14 changes: 9 additions & 5 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,14 @@ myShowLine setChordSig frets =

myShowSet :: (ChordSig, [[Int]]) -> [String]
myShowSet (chordSig, fretss) =
map snd . sort $ map (myShowLine chordSig) fretss
"" : title : map snd set
where
set = sort $ map (myShowLine chordSig) fretss
title = cqShowLong (csQual chordSig) ++ " (" ++ counts ++ ")"
counts = show cUniq ++
(if cUniq == cTot then "" else "+" ++ show (cTot - cUniq))
cUniq = length . nub $ map fst set
cTot = length set

fretsToPitchClasses :: [Int] -> [PitchClass]
fretsToPitchClasses = map fst . zipWith pitchPlus geetStrs
Expand Down Expand Up @@ -148,7 +155,4 @@ main = do
thingsToShow = catMaybes $
map (\ k -> functorRunSnd (k, Map.lookup (csQual k) goodsByQual))
chordSigs
putStr . unlines . concat $
map (\ set -> "" : cqShowLong (csQual $ fst set) :
myShowSet (second sort set))
thingsToShow
putStr . unlines . concat $ map myShowSet thingsToShow

0 comments on commit 18d9909

Please sign in to comment.