5 changePitch :: (Pitch -> Pitch) -> Note -> Note
6 changePitch f (NoteOn p v) = NoteOn (f p) v
7 changePitch f (NoteOff p v) = NoteOff (f p) v
9 changeVelocity :: (Velocity -> Velocity) -> Note -> Note
10 changeVelocity f (NoteOn p v) = NoteOn p (f v)
11 changeVelocity f (NoteOff p v) = NoteOff p (f v)
13 perfectFifth :: Note -> Note
14 perfectFifth = changePitch (toPitch . (+7) . fromPitch)
16 majorThird :: Note -> Note
17 majorThird = changePitch (toPitch . (+4) . fromPitch)
19 minorThird :: Note -> Note
20 minorThird = changePitch (toPitch . (+3) . fromPitch)