diff options
Diffstat (limited to 'AlsaSeq.hs')
-rw-r--r-- | AlsaSeq.hs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | module AlsaSeq (withAlsaInit, parseAlsaEvents, forwardNoteEvent, cmdlineAlsaConnect, printChordLn) where | 1 | module AlsaSeq (withAlsaInit, parseAlsaEvents, forwardNoteEvent, cmdlineAlsaConnect, printChordLn, showChord) where |
2 | import qualified Sound.ALSA.Exception as AlsaExc | 2 | import qualified Sound.ALSA.Exception as AlsaExc |
3 | import qualified Sound.ALSA.Sequencer.Address as Addr | 3 | import qualified Sound.ALSA.Sequencer.Address as Addr |
4 | import qualified Sound.ALSA.Sequencer as SndSeq | 4 | import qualified Sound.ALSA.Sequencer as SndSeq |
@@ -31,6 +31,8 @@ joinWords ls = foldr1 (\a b -> a ++ " " ++ b) ls | |||
31 | printWords [] = return () -- print nothing if no words (not an empty line) | 31 | printWords [] = return () -- print nothing if no words (not an empty line) |
32 | printWords ls = putStrLn $ joinWords ls | 32 | printWords ls = putStrLn $ joinWords ls |
33 | 33 | ||
34 | showChord ls = joinWords $ pitchWords ls | ||
35 | |||
34 | showPitch x = | 36 | showPitch 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) |