{"action":"created","issue":{"url":"https://api.github.com/repos/arduino-libraries/MIDIUSB/issues/48","repository_url":"https://api.github.com/repos/arduino-libraries/MIDIUSB","labels_url":"https://api.github.com/repos/arduino-libraries/MIDIUSB/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/arduino-libraries/MIDIUSB/issues/48/comments","events_url":"https://api.github.com/repos/arduino-libraries/MIDIUSB/issues/48/events","html_url":"https://github.com/arduino-libraries/MIDIUSB/issues/48","id":377639201,"node_id":"MDU6SXNzdWUzNzc2MzkyMDE=","number":48,"title":"Receivng Sysex and Sysex Raw MIDI messages in MIDIUSB","user":{"login":"kaspencer","id":13821902,"node_id":"MDQ6VXNlcjEzODIxOTAy","avatar_url":"https://avatars1.githubusercontent.com/u/13821902?v=4","gravatar_id":"","url":"https://api.github.com/users/kaspencer","html_url":"https://github.com/kaspencer","followers_url":"https://api.github.com/users/kaspencer/followers","following_url":"https://api.github.com/users/kaspencer/following{/other_user}","gists_url":"https://api.github.com/users/kaspencer/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspencer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspencer/subscriptions","organizations_url":"https://api.github.com/users/kaspencer/orgs","repos_url":"https://api.github.com/users/kaspencer/repos","events_url":"https://api.github.com/users/kaspencer/events{/privacy}","received_events_url":"https://api.github.com/users/kaspencer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-06T00:18:52Z","updated_at":"2018-11-06T08:20:38Z","closed_at":null,"author_association":"NONE","body":"uController=Arduino Due\r\nLIbrary=MIDIUSB\r\nI wish to receive Sysex and Sysex Raw MIDI messages using a Due. However I suspect that this is not possible as the read() function seems only to expect a structure of very few data bytes.\r\nCan you confirm the MIDIUSB does indeed not support Sysex message reading?\r\nCan you possibly indicate by which library how this may be done using an Arduino Due?\r\nI am grateful for your work developing the library, and also will be for your help with this issue.\r\nKASpencer"},"comment":{"url":"https://api.github.com/repos/arduino-libraries/MIDIUSB/issues/comments/436167901","html_url":"https://github.com/arduino-libraries/MIDIUSB/issues/48#issuecomment-436167901","issue_url":"https://api.github.com/repos/arduino-libraries/MIDIUSB/issues/48","id":436167901,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjE2NzkwMQ==","user":{"login":"gdsports","id":31050875,"node_id":"MDQ6VXNlcjMxMDUwODc1","avatar_url":"https://avatars0.githubusercontent.com/u/31050875?v=4","gravatar_id":"","url":"https://api.github.com/users/gdsports","html_url":"https://github.com/gdsports","followers_url":"https://api.github.com/users/gdsports/followers","following_url":"https://api.github.com/users/gdsports/following{/other_user}","gists_url":"https://api.github.com/users/gdsports/gists{/gist_id}","starred_url":"https://api.github.com/users/gdsports/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdsports/subscriptions","organizations_url":"https://api.github.com/users/gdsports/orgs","repos_url":"https://api.github.com/users/gdsports/repos","events_url":"https://api.github.com/users/gdsports/events{/privacy}","received_events_url":"https://api.github.com/users/gdsports/received_events","type":"User","site_admin":false},"created_at":"2018-11-06T08:20:38Z","updated_at":"2018-11-06T08:20:38Z","author_association":"NONE","body":"You can compose the 4 bytes raw USB MIDI packets into complete sysex messages.\r\n```\r\n  // init sysex buffer empty\r\n  midiEventPacket_t rx = MidiUSB.read();\r\n  if (rx.header != 0) {\r\n    switch (rx.header & 0x0F) {\r\n      case 0x00:  // Misc. Reserved for future extensions.\r\n        break;\r\n      case 0x01:  // Cable events. Reserved for future expansion.\r\n        break;\r\n      case 0x02:  // Two-byte System Common messages\r\n      case 0x0C:  // Program Change\r\n      case 0x0D:  // Channel Pressure\r\n        // do something with 2 byte messages\r\n        break;\r\n      case 0x03:  // Three-byte System Common messages\r\n      case 0x08:  // Note-off\r\n      case 0x09:  // Note-on\r\n      case 0x0A:  // Poly-KeyPress\r\n      case 0x0B:  // Control Change\r\n      case 0x0E:  // PitchBend Change\r\n        // do something with 3 byte messages\r\n        break;\r\n      case 0x04:  // SysEx starts or continues\r\n        // append sysex buffer with 3 bytes\r\n        break;\r\n      case 0x05:  // Single-byte System Common Message or SysEx ends with the following single byte\r\n        // append sysex buffer with 1 byte\r\n        // process completed sysex buffer\r\n        // init sysex buffer empty\r\n        break;\r\n      case 0x06:  // SysEx ends with the following two bytes\r\n        // append sysex buffer with 2 bytes\r\n        // process completed sysex buffer\r\n        // init sysex buffer empty\r\n        break;\r\n      case 0x07:  // SysEx ends with the following three bytes\r\n        // append sysex buffer with 3 bytes\r\n        // process completed sysex buffer\r\n        // init sysex buffer empty\r\n        break;\r\n      case 0x0F:  // Single Byte, TuneRequest, Clock, Start, Continue, Stop, etc.\r\n        // process since byte messages\r\n        break;\r\n    }\r\n  }\r\n\r\n```"}}
{"actor":{"display_login":"gdsports"}}