Skip to content

Commit

Permalink
fix midi velocity for Ch4
Browse files Browse the repository at this point in the history
part of #16
  • Loading branch information
mtolly committed Jul 5, 2015
1 parent fd8ec26 commit 2959b9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/AssemblyToMidi.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ loopFormToMidi ch (begin, loop) = let
$ go inLoop speed vol octave is
DNote tks d -> let
pitch = fromEnum d
in RTB.cons 0 (M.On pitch midiVelocity)
in RTB.cons 0 (M.On pitch 96)
$ RTB.cons (ticksToLen tks) (M.Off pitch)
$ go inLoop speed vol octave is
Rest tks -> RTB.delay (ticksToLen tks) $ go inLoop speed vol octave is
Expand All @@ -56,8 +56,8 @@ loopFormToMidi ch (begin, loop) = let
-- This maps [0 .. 15] to [7, 15 .. 127].
in go
False -- is in loop
(error "loopFormToMidi: note speed not defined") -- speed
(error "loopFormToMidi: note volume not defined") -- volume
(error $ "loopFormToMidi: note speed not defined in " ++ show ch) -- speed
(error $ "loopFormToMidi: note volume not defined in " ++ show ch) -- volume
3 -- octave (don't rely on this default)
begin -- list of instructions to process

Expand Down

0 comments on commit 2959b9e

Please sign in to comment.