summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index c2f0452..6c440d2 100644
--- a/README.md
+++ b/README.md
@@ -48,6 +48,8 @@ starting with `pm_` or `PM_`.
Below, `i64` is an integer, and `f64` is a floating-point number (number with decimals).
`bool`s are either `true` or `false`.
+You can keep track of state between function calls using `this` (see `examples/fun.rhai`).
+
### user-supplied constants
- `PM_DEVICE_ID: i64` - define this to control which MIDI device is used.
@@ -57,6 +59,8 @@ will be used. Otherwise, the device with ID `PM_DEVICE_ID` will be used.
### user-supplied functions
+- `pm_start()` - called when progmidi is started.
+
- `pm_note_played(channel: i64, note: i64, velocity: i64)` - Called
when a note is played (MIDI "note on" event, or "note on" with velocity 0).
`note` is a number from 0 to 127 — 60±n indicates n semitones above/below middle C.
@@ -118,6 +122,10 @@ If `falloff` = 1, the note's volume is not affected when it is released.
- `pm_stop_midi_recording()` - Stop the current .wav recording if there is one.
+- `pm_print()` - `print` with no added newline.
+
+- `pm_get_time() -> i64` - get timestamp in milliseconds since application was started.
+
## building from source
You can build progmidi with `cargo build --release`,