Skip to content

stephband/midi-modify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

midi-modify

Modifiers browser MIDI events.

Instantiation

Create a filter:

var midiModify = new MIDIModify(options);

This creates a modify node. The new keyword is optional.

node.in(e)

To pass messages into the filter, call the filter's in method:

midiModify.in(e);

node.out(fn)

To listen to the output, register a listener with the filter's out method:

midiModify.out(fn);

The callback function fn will be called whenever a MIDI message is passed through the modifier. It is given the message e as it's first argument.

Options

A modifier understands the options:

{
    port:    number | string | target
    channel: number (1-16) | fn
    message: string
    data1:   number (0-127) | fn
    data2:   number (0-127) | fn
}

message should be one of:

'noteoff'
'noteon'
'polytouch'
'cc'
'pc'
'channeltouch'
'pitch'

Functions should return a number.

About

A midi node for modifying messages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published