midi: optional nrpn/rpn packing/unpacking

This commit is contained in:
jean-emmanuel 2023-01-31 16:09:57 +01:00
parent 0ac4bd60df
commit 885886d0c9
4 changed files with 38 additions and 3 deletions

View file

@ -51,7 +51,7 @@ module.exports = {
},
'm': {alias: 'midi', type: 'array', describe: 'midi router settings',
check: (o)=>{
var err = o.filter(item=>!item.match(/^(list|debug|jack|sysex|mtc|active_sensing|note_off_velocity|pc_offset|path=(.*)|[^:]+:(virtual|[^,]+,[^,]+))$/))
var err = o.filter(item=>!item.match(/^(list|debug|jack|sysex|mtc|rpn|nrpn|active_sensing|note_off_velocity|pc_offset|path=(.*)|[^:]+:(virtual|[^,]+,[^,]+))$/))
return err.length ? `Invalid option${err.length > 1 ? 's' : ''}: ${err.join(', ')}` : true
}
},