Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cnv←{
- t←¯1+'C D EF G A B'⍳⍵
- 12|(⍵∊⎕A)/t+1 ¯1 0['#b'⍳1⌽⍵]
- }
- chord←{
- ⍝ typical guitar tuning
- ⍺←'EBGDAE'
- strings←cnv ⍺
- c←cnv ⍵
- frets←12|strings∘.+¯1+⍳24
- frets∊c
- }
- <\chord 'EG#B'
- 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- ⍪(<\chord'EG#B')+.ׯ1+⍳24
- 0
- 0
- 1
- 2
- 2
- 0
Add Comment
Please, Sign In to add comment