summaryrefslogtreecommitdiff
path: root/AlsaSeq.hs
diff options
context:
space:
mode:
Diffstat (limited to 'AlsaSeq.hs')
-rw-r--r--AlsaSeq.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/AlsaSeq.hs b/AlsaSeq.hs
index 7c831bd..e0ec6a2 100644
--- a/AlsaSeq.hs
+++ b/AlsaSeq.hs
@@ -1,4 +1,4 @@
1module AlsaSeq (withAlsaInit, parseAlsaEvents, forwardNoteEvent, cmdlineAlsaConnect, printChordLn) where 1module AlsaSeq (withAlsaInit, parseAlsaEvents, forwardNoteEvent, cmdlineAlsaConnect, printChordLn, showChord) where
2import qualified Sound.ALSA.Exception as AlsaExc 2import qualified Sound.ALSA.Exception as AlsaExc
3import qualified Sound.ALSA.Sequencer.Address as Addr 3import qualified Sound.ALSA.Sequencer.Address as Addr
4import qualified Sound.ALSA.Sequencer as SndSeq 4import qualified Sound.ALSA.Sequencer as SndSeq
@@ -31,6 +31,8 @@ joinWords ls = foldr1 (\a b -> a ++ " " ++ b) ls
31printWords [] = return () -- print nothing if no words (not an empty line) 31printWords [] = return () -- print nothing if no words (not an empty line)
32printWords ls = putStrLn $ joinWords ls 32printWords ls = putStrLn $ joinWords ls
33 33
34showChord ls = joinWords $ pitchWords ls
35
34showPitch x = 36showPitch x =
35 let (octave, pitch) = Haskore.Basic.Pitch.fromInt $ fromIntegral x 37 let (octave, pitch) = Haskore.Basic.Pitch.fromInt $ fromIntegral x
36 in Haskore.Basic.Pitch.classFormat pitch (show octave) 38 in Haskore.Basic.Pitch.classFormat pitch (show octave)