On
Handles midiOn events, typically for playing an instrument’s sounds.
- class
- On
- extends
- Handle
- tag
<on-blam>
Props
| name | type | default | description |
|---|---|---|---|
| device | string | null | The named MIDI device to listen to. If not set, the element listens to all connected devices. |
| root | string | C4 | The key on the MIDI keyboard from which all sounds will be mapped. |
| range | number | null | How many keys, from the |
| spread | boolean | false | For non-tonal instruments like Pads. Whether to spread the individual sounds over the range of keys (one sound per key). |
| from | string | CSS selector. Must be a Midi element. If not set, looks for an ancestor Midi element. |
|
| to | string | CSS selector. If not set, it looks for a single Sampler-based element. |
|
| value | string | null | Handle-derived elements support special |
| event | string | blam | The event type to listen for. For many Event-based elements, this is the generic custom event |
| prop | string | null | The property (which may be a method or map to an |
| bypass | boolean | false | Whether to stop responding to events as they happen. |
| chance | boolean | 1 | The probability that the |
Examples
OH FUN! There are currently no examples using On.