Skip to main content

rmaz

Coordinate requestMIDIAccess calls across your app and/or libraries.

based on rafz: requestAnimationFrame

  • raf => rma
  • loop => change
  • frame => access
  • animation => midi
import { rma } from 'rmaz'

// Schedule an update
rma(dt => {})

// Start an update loop
rma(dt => true)

// Cancel an update
rma.cancel(fn)

// Schedule a mutation
rma.write(() => {})

// Before any updates
rma.onStart(() => {})

// Before any mutations
rma.onAccess(() => {})

// After any mutations
rma.onFinish(() => {})

// Use a polyfill
rma.use(require('@essentials/rma').rma)

Basic Examples

inputs

outputs