diff options
-rw-r--r-- | AlsaSeq.hs | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -139,15 +139,14 @@ parseAlsaEvents h keysDown immediate = loop keysDown | |||
139 | return keysDown | 139 | return keysDown |
140 | else do | 140 | else do |
141 | ev <- Event.input h | 141 | ev <- Event.input h |
142 | immediate ev | ||
142 | case Event.body ev of | 143 | case Event.body ev of |
143 | Event.NoteEv Event.NoteOn n -> do | 144 | Event.NoteEv Event.NoteOn n -> |
144 | immediate ev | ||
145 | if (Event.unVelocity (Event.noteVelocity n) == 0) then | 145 | if (Event.unVelocity (Event.noteVelocity n) == 0) then |
146 | loop (Set.delete (Event.noteChannel n, Event.noteNote n) keysDown) | 146 | loop (Set.delete (Event.noteChannel n, Event.noteNote n) keysDown) |
147 | else | 147 | else |
148 | loop (Set.insert (Event.noteChannel n, Event.noteNote n) keysDown) | 148 | loop (Set.insert (Event.noteChannel n, Event.noteNote n) keysDown) |
149 | Event.NoteEv Event.NoteOff n -> do | 149 | Event.NoteEv Event.NoteOff n -> |
150 | immediate ev | ||
151 | loop (Set.delete (Event.noteChannel n, Event.noteNote n) keysDown) | 150 | loop (Set.delete (Event.noteChannel n, Event.noteNote n) keysDown) |
152 | _ -> loop keysDown | 151 | _ -> loop keysDown |
153 | 152 | ||