|
Sound.MIDI.Message.Channel.Voice |
|
|
Description |
Channel voice messages
|
|
Synopsis |
|
|
|
Documentation |
|
|
Constructors | | Instances | |
|
|
|
|
putWithStatus :: C writer => (Int -> T writer) -> T -> T writer | Source |
|
|
|
|
|
|
|
|
|
|
|
NoteOn with zero velocity is considered NoteOff according to MIDI specification.
|
|
|
NoteOn with zero velocity is considered NoteOff according to MIDI specification.
|
|
|
A MIDI problem is that one cannot uniquely map
a MIDI key to a frequency.
The frequency depends on the instrument.
I don't know if the deviations are defined for General MIDI.
If this applies one could add transposition information
to the use patch map.
For now I have chosen a value that leads to the right frequency
for some piano sound in my setup.
|
|
|
Convert all NoteOn p 0 to NoteOff p 64.
The latter one is easier to process.
|
|
|
Convert all NoteOff p 64 to NoteOn p 0.
The latter one can be encoded more efficiently using the running status.
|
|
|
Map integral MIDI controller value to floating point value.
Maximum integral MIDI controller value 127 is mapped to 1.
Minimum integral MIDI controller value 0 is mapped to 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Instances | |
|
|
|
|
|
|
|
Instances | |
|
|
|
|
|
|
|
Instances | |
|
|
|
|
|
|
|
We do not define Controller as enumeration with many constructors,
because some controllers have multiple names and some are undefined.
It is also more efficient this way.
Thus you cannot use case for processing controller types,
but you can use Data.List.lookup instead.
maybe (putStrLn "unsupported controller") putStrLn $
lookup ctrl $
(portamento, "portamento") :
(modulation, "modulation") :
[]
| Instances | |
|
|
|
|
|
|
|
|
|
|
|
Convert pitch to frequency
according to the default tuning
given in MIDI 1.0 Detailed Specification.
|
|
|
The velocity of an ordinary key stroke and
the maximum possible velocity.
ToDo:
This should be of type Velocity.
|
|
|
|
|
64 is given as default value by the MIDI specification
and thus we map it to 1.
0 is mapped to 0.
All other values are interpolated linearly.
ToDo:
MIDI specification says,
if velocity is simply mapped to amplitude,
then this should be done by an exponential function.
Thus we should be better map normalVelocity to 0,
maximumVelocity to 1,
and minimumVelocity to -1.
|
|
Produced by Haddock version 2.6.1 |