diff options
author | Andrew Cady <d@jerkface.net> | 2014-01-17 13:57:42 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2014-01-17 13:57:42 -0500 |
commit | 2a5b879b672b099ce4bb82c3536f5bd8089b9a3b (patch) | |
tree | ef70b2aa1da8e49478ba15b7867098d44b6b17de | |
parent | 6a7389a5e257f52dc45c5251207868e68041b759 (diff) |
minor (format some commented-out code)
-rw-r--r-- | axis.hs | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -123,21 +123,21 @@ main = | |||
123 | (ex, w') <- stepWire w ds (Right x) | 123 | (ex, w') <- stepWire w ds (Right x) |
124 | let x' = either (const "") id ex | 124 | let x' = either (const "") id ex |
125 | 125 | ||
126 | Control.Monad.when (x /= x' && x' /= "") $ do | 126 | -- Control.Monad.when (x /= x' && x' /= "") $ do |
127 | -- textBand videoSurface videoClipRect (SDL.Rect 0 0 0 70) font x' | 127 | -- textBand videoSurface videoClipRect (SDL.Rect 0 0 0 70) font x' |
128 | return () | 128 | -- return () |
129 | 129 | ||
130 | Control.Monad.when (midiKeysDown' /= midiKeysDown) $ do | 130 | Control.Monad.when (midiKeysDown' /= midiKeysDown) $ do |
131 | --let chord = showChord midiKeysDown' | 131 | -- let chord = showChord midiKeysDown' |
132 | --let chord = show $ pitchList midiKeysDown' | 132 | -- let chord = show $ pitchList midiKeysDown' |
133 | -- let chord = show $ map (\i->elemIndices i pitchIndex) $ pitchList midiKeysDown' | ||
134 | -- textBand videoSurface videoClipRect (SDL.Rect 0 70 0 70) font chord | ||
133 | let ignoreThese = Set.intersection midiKeysDown' midiKeysDown | 135 | let ignoreThese = Set.intersection midiKeysDown' midiKeysDown |
134 | let drawThese = pitchList $ Set.difference midiKeysDown' ignoreThese | 136 | let drawThese = pitchList $ Set.difference midiKeysDown' ignoreThese |
135 | let eraseThese = pitchList $ Set.difference midiKeysDown ignoreThese | 137 | let eraseThese = pitchList $ Set.difference midiKeysDown ignoreThese |
136 | 138 | ||
137 | let chord = show $ map (\i->elemIndices i pitchIndex) $ pitchList midiKeysDown' | ||
138 | drawKeys drawThese videoSurface font axis_key_locations axis_key_size | 139 | drawKeys drawThese videoSurface font axis_key_locations axis_key_size |
139 | eraseKeys eraseThese videoSurface font axis_key_locations axis_key_size | 140 | eraseKeys eraseThese videoSurface font axis_key_locations axis_key_size |
140 | -- textBand videoSurface videoClipRect (SDL.Rect 0 70 0 70) font chord | ||
141 | return () | 141 | return () |
142 | 142 | ||
143 | Control.Monad.when (keysDown' /= keysDown && keyDown SDL.SDLK_BACKSPACE keysDown') allKeysOFF | 143 | Control.Monad.when (keysDown' /= keysDown && keyDown SDL.SDLK_BACKSPACE keysDown') allKeysOFF |
@@ -150,13 +150,13 @@ main = | |||
150 | -- if keyDown SDL.SDLK_a keysDown' then "arpeggiate" else "" | 150 | -- if keyDown SDL.SDLK_a keysDown' then "arpeggiate" else "" |
151 | -- return () | 151 | -- return () |
152 | 152 | ||
153 | Control.Monad.when(False) $ do | 153 | -- Control.Monad.when(False) $ do |
154 | 154 | -- | |
155 | mouse <- SDL.getRelativeMouseState | 155 | -- mouse <- SDL.getRelativeMouseState |
156 | let (x, y, button) = mouse | 156 | -- let (x, y, button) = mouse |
157 | let text = ((show x) ++ " " ++ (show y) ++ " " ++ (show button)) | 157 | -- let text = ((show x) ++ " " ++ (show y) ++ " " ++ (show button)) |
158 | textBand videoSurface videoClipRect (SDL.Rect 0 140 0 70) font text | 158 | -- textBand videoSurface videoClipRect (SDL.Rect 0 140 0 70) font text |
159 | Control.Monad.when (x /= 0 || y /= 0) warpMouse | 159 | -- Control.Monad.when (x /= 0 || y /= 0) warpMouse |
160 | 160 | ||
161 | _ <- SDL.updateRect videoSurface videoClipRect -- draw it all! probably a bad idea | 161 | _ <- SDL.updateRect videoSurface videoClipRect -- draw it all! probably a bad idea |
162 | 162 | ||