We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The parsing and encoding should be optional so it's possible to interact with other tooling.
Adds a { raw: true } option to all commands to toggle input/output to raw mode.
{ raw: true }
Pros:
Cons
// By default, MIDI messages are parsed const globalSettings = await device.getGlobalSettings() // { // type: 'programchange', // channel: 1, // number: 10, // outputs: { // midi0: true, // flexi1: true, // flexi2: true, // usb: true, // } // } // And encoded device.setGlobalSettings({ bankMessages: { numMessages: 1, messages: [{ type: 'programchange', channel: 1, number: 10, outputs: { midi0: true, flexi1: true, flexi2: true, usb: true, }, }], }, }) // Optionally, get the raw data device.getGlobalSettings({ raw: true }) // { // statusByte: 'b0', // dataByte1: '0', // dataByte2: '0', // outputs: { // midi0: true, // flexi1: true, // flexi2: true, // usb: true, // } // } // And set raw data device.setGlobalSettings({ bankMessages: { numMessages: 1, messages: [{ statusByte: 'b0', dataByte1: '0', dataByte2: '0', outputs: { midi0: true, flexi1: true, flexi2: true, usb: true, }, }], }, }, { raw: true })
Returns both for any get... commands and takes either format for set...
get...
set...
Pros
const globalSettings = await device.getGlobalSettings() // { // statusByte: 'b0', // dataByte1: '0', // dataByte2: '0', // type: 'programchange', // channel: 1, // number: 10, // outputs: { // midi0: true, // flexi1: true, // flexi2: true, // usb: true, // } // } device.setGlobalSettings({ bankMessages: { numMessages: 1, messages: [{ type: 'programchange', channel: 1, number: 10, statusByte: 'b0', dataByte1: '0', dataByte2: '0', outputs: { midi0: true, flexi1: true, flexi2: true, usb: true, }, }], }, })
Provide encodeMessages and decodeMessages utilities that process any data to and from the simplified representation.
encodeMessages
decodeMessages
...Raw
The main command names handle simplified data, the ...Raw methods are available as needed.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The parsing and encoding should be optional so it's possible to interact with other tooling.
API options
1. Opt-out option per command
Adds a
{ raw: true }
option to all commands to toggle input/output to raw mode.Pros:
Cons
2. Merged / automatic
Returns both for any
get...
commands and takes either format forset...
Pros
Cons
3. External utility
Provide
encodeMessages
anddecodeMessages
utilities that process any data to and from the simplified representation.Pros
Cons
5. Additional
...Raw
commandsThe main command names handle simplified data, the
...Raw
methods are available as needed.Pros
Cons
The text was updated successfully, but these errors were encountered: