midi-note-on

[Class]
  `midi-note-on`

A MIDI note on event.

`midi-note-on` supports the following slot initializations:

`:time` number
  The start time of the object.
`:channel` integer
  A MIDI channel number. The default value is 0.
`:keynum` integer
  A MIDI key number
`:velocity` integer
  A MIDI velocity. The default value is 64.

#### Examples:

Example 1. The `midi-note-on` and `midi-note-off` events.

    (define (on-and-off reps k1 k2 v1 v2)
      (process repeat reps
               for k = (between k1 k2)
               for v = (between v1 v2)
               for r = (between .5 2.0)
               output (new midi-note-on :time (now)
                                        :keynum k
                                        :velocity v)
               sprout (new midi-note-off :time (+ (now) (* r 1.5))
                                         :keynum k
                                         :velocity (between 10 v))
               wait r))

    (events (on-and-off 20 40 60 40 80) "test.mid")
    ⇒ "test.mid"

#### See also:

- MIDI event classes [Topic]
- MIDI score classes [Topic]