summaryrefslogtreecommitdiff
path: root/AlsaSeq.hs
diff options
context:
space:
mode:
Diffstat (limited to 'AlsaSeq.hs')
-rw-r--r--AlsaSeq.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/AlsaSeq.hs b/AlsaSeq.hs
index 1926712..46562c4 100644
--- a/AlsaSeq.hs
+++ b/AlsaSeq.hs
@@ -1,5 +1,5 @@
1{-# LANGUAGE NondecreasingIndentation #-} 1{-# LANGUAGE NondecreasingIndentation #-}
2module AlsaSeq (withAlsaInit, parseAlsaEvents, forwardNoteEvent, cmdlineAlsaConnect, printChordLn, showChord) where 2module AlsaSeq (withAlsaInit, parseAlsaEvents, forwardNoteEvent, cmdlineAlsaConnect, printChordLn, showChord, pitchList, showPitch) where
3import qualified Sound.ALSA.Exception as AlsaExc 3import qualified Sound.ALSA.Exception as AlsaExc
4import qualified Sound.ALSA.Sequencer.Address as Addr 4import qualified Sound.ALSA.Sequencer.Address as Addr
5import qualified Sound.ALSA.Sequencer as SndSeq 5import qualified Sound.ALSA.Sequencer as SndSeq
@@ -40,7 +40,8 @@ showPitch x =
40 let (octave, pitch) = Haskore.Basic.Pitch.fromInt $ fromIntegral x 40 let (octave, pitch) = Haskore.Basic.Pitch.fromInt $ fromIntegral x
41 in Haskore.Basic.Pitch.classFormat pitch (show octave) 41 in Haskore.Basic.Pitch.classFormat pitch (show octave)
42 42
43pitchWords set = map (showPitch . Event.unPitch) $ Set.toList set 43pitchWords set = map showPitch $ pitchList set
44pitchList set = map Event.unPitch $ Set.toList set
44 45
45prettyNote :: Event.Note -> String 46prettyNote :: Event.Note -> String
46prettyNote (Event.Note noteChannel noteNote noteVelocity noteOffVelocity noteDuration) = 47prettyNote (Event.Note noteChannel noteNote noteVelocity noteOffVelocity noteDuration) =