MyNixOS website logo
Description

Render Instrument Chords.

Library to generate musical instrument manipluations

Instrument Chord

Render music chords on a guitar and piano

Installation:

cabal install instrument-chord

Example:

$ghci

Prelude>:m + Music.Instrument.Chord 
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept True AnnotatePositionVertical False True False standardTuning (minorChord C) 4 1 True False [] False False False False False)
Fret: 3 Fret: 3 
|S3---  3---    
|S-4--  -4--    
0S----  --5-    
|S--5-  --5-    
|S3---  3---    
|S3---  3---    
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept True AnnotatePositionVertical True True True standardTuning (minorChord C) 4 1 True False [] False False False False False)
Fret: 3 Fret: 3 
0===0== 333---3 
 ^^^^^^ 4----4- 
333---3 5--55-- 
4----4- 6------ 
5--5---         
6------         
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateMarking False True True dropD (majorChord F) 4 0 True False [] False False False False False)
=o==== Fret: 1 
----** ----**  
---*-- ---*--  
*-*--- ***---  
       ------  
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotatePositionVertical False True True standardTuning (harmony (majorScale A)) 4 0 True False [] True True False False False)
002220
224432
442124
200232
022100
244222
456434
Prelude Music.Instrument.Chord> putStr $ concat . map hConcat $ renderGuitarConcept False AnnotatePositionVertical False True True standardTuning [majorChord D,majorChord A,minorChord B,majorChord G] 4 0 True False [] False False False False False
=00===
------
2--2-2
----3-
00===0
------
--222-
------
Fret: 2
22---2
----3-
--44--
------
==000= ==00== 
------ ------ 
-2---- -2---- 
3----3 3---33 
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateNote False True True standardTuning (majorScale F) 4 0 False False [] True False True True False)
=AD===
Fb----
--E---
GC----
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateNote False True True standardTuning (shiftOctave 1 $ convertToSteps $ majorScale F) 4 0 False False [] True False True True False)
===G=E
----C-
---A--
--FbD-
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateNote False True True standardTuning (chordToScale (majorChord F)) 4 0 False False [] False False True True False)
=A====
F-----
------
-C----
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotatePositionHorizontal False False True (reverse standardTuning) (majorChord G) 4 0 True False [] False False False False False)
=234== ==34== 
------ ------ 
----5- ----5- 
1----6 12---6 
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateNote False True True standardTuning (sus 4 $ dominant7thChord G) 4 3 False True [] False False True False False)
Fret: 3 Fret: 3  Fret: 3  Fret: 3 
GCF-DG  G-F-DG   G-F--G   G----G  
------  ------   ------   ------  
---C--  -D-C--   -D-C--   -DGC--  
------  ------   ----F-   ----F-  
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateNote False True True standardTuning (minorChord G) 4 1 False False lightChord False False False False False)
Fret: 3
---bDG
------
------
------
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateNote False True True standardTuning (minor7thChord A) 4 2 False False lightChord False False True False False)
Fret: 5
--GCEA
------
------
------
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateMarking False True True standardTuning (slash C (majorChord D)) 4 0 False True [] False False False False False)
==o===
------
---*-*
-*--*-
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateMarking True True True standardTuning (fifthChord B) 4 0 False True powerChord True False False False False)
0======
1------
2-*----
3------
4--**--
5------
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateNote False True True standardTuning (majorChord (flat A)) 4 0 False False [] False False False False False)
Fret: 1
--eaC-
------
-C----
------
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotatePositionVertical False True True ukelele (majorChord C) 4 0 True False [] False False False False False)
000= 0=0= 
---- ---- 
---- ---- 
---3 -3-3 
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateNote False True True standardTuning (minorPentatonicScale A) 4 5 True False [] False False False False False)
Fret: 5
ADGCEA
------
-EAD--
C---GC
Prelude Music.Instrument.Chord> putStr $ concat $ map hConcat (renderGuitarConcept False AnnotateNote True True True standardTuning E 13 0 True False [] False False False False False)
 0E====E
 1------
 2--E---
 3------
 4------
 5----E-
 6------
 7-E----
 8------
 9---E--
01------
11------
21E----E
Prelude Music.Instrument.Chord> putStrLn (renderPianoConcept 0 AnnotateMarking (majorChord C))
 ____________________ 
| | || | | | || || | |
| |_||_| | |_||_||_| |
|* |  |* |  |* |  |  |
|__|__|__|__|__|__|__|
Prelude Music.Instrument.Chord> putStrLn (renderPianoConcept 1 AnnotateNote (majorScale A))
 ____________________ ____________________ 
| | || | | | || || | | |d|| | | |g||a|| | |
| |_||_| | |_||_||_| | |_||_| | |_||_||_| |
|  |  |  |  |  |A |B |  |D |E |  |  |  |  |
|__|__|__|__|__|__|__|__|__|__|__|__|__|__|
Prelude Music.Instrument.Chord> map head $ findPositionPatterns True (majorChord C) standardTuning 4 True False [] False False
[[[[0],[3],[2],[0],[1],[0]],[[0],[3],[2],[0],[1],[3]],[[3],[3],[2],[0],[1],[0]],[[3],[3],[2],[0],[1],[3]]]]
Metadata

Version

0.1.0.11

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows