The MIDI Forum

  1. Keith Sloan
  2. MIDI Software
  3. Tuesday, 22 November 2016
  4.  Subscribe via email
I am trying to program a program a Microchip Curiosity MX470 board to behave as a MIDI USB Keyboard.

I have basically followed the setup as per http://www.microchip.com/forums/m914640.aspx.

After much debugging I believe I am send NoteOn and NoteOff packets to the USB Endpoint.
My NoteOn packet is 0x19901F17 and NoteOff 0x18801F0. But when I start up Garageband on the Mac
and open a track with a software instrument I get no sound.

If I try the application MIDI monitor then if I plug or unplug the USB cable or reset the PIC micro.
I get a "To MIDI monitor" SysEx message F0 7E 00 06 01 F7

If I use About this Mac to look at the USB it lists it as a Composite Device with product ID 0x0059 and vendor 0x04db the same as the values in the code for the PIC.
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Does "send" mean from the device to the host, or from the host to the device?

Why do you write you "believe" it is sending? Do you have any evidence for that?

Does the MIDI monitor work with a 'real' USB MIDI device?
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Does "send" mean from the device to the host, or from the host to the device?

Send from device to host. Host being the Mac.

Why do you write you "believe" it is sending? Do you have any evidence for that?

Well the code writes to the Endpoint with a USB_DEVICE_EndpointWrite request - return code good and the USB event handler
sees the subsequent USB_DEVICE_EVENT_ENDPOINT_WRITE_COMPLETE event

Does the MIDI monitor work with a 'real' USB MIDI device?

Don't have access to a real USB MIDI device, but if I use an Arduino to send to the serial port and
run Hairless-midiserial on the Mac then MIDI monitor works and shows the noteon requests arriving on the Mac
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Everything sounds as if you're using the MIDI monitor correctly.

The problem is probably with your firmware. In theory, outputting USB-MIDI event packets should work exactly the same as outputting data from a CDC device. But you should ask somebody who knows about the Microchip USB stack.
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
Okay I made some progress by connecting to a Windows 7 machine. I had to change some things to get Windows to be happy with enumeration. If I use MIDI-OX on the windows machine then I am able to send a "note on" to the PIC. But I am not having any luck the other way. If I send from the PIC 0x0FF8487C I do get F8 time clock messages in MIDI-OX but no channel info or Data values. If I try and send 0x0990487C I do not get anything turn up in MIDI-OX input window.
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Okay I have borrowed my daughters MIDI keyboard and there seems to be an exchange of SysEX messages before being able to send Note On's. But the exchange is not the same on a real keyboard as my PIC device. The real keyboard seems to receive according to MIDI Monitor F0 7E 00 06 01 F7 but my PIC device get 0x06F0F700 and nothing shows in MIDI Monitor where can I find out more info on these initial SysEx exchanges?
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 5
Accepted Answer Pending Moderation
0
Votes
Undo
If I look at "Audio MIDI Setup" and Window Show MIDI Studio on the Mac for a working MIDI keyboard I see 3 ports 2 with MIDI in and 3 with MIDI out. With my PIC32 device connected I don't see any ports. Am at a loss of how to define ports to the PIC device
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 6
Accepted Answer Pending Moderation
0
Votes
Undo
"F0 7E 00 06 01 F7" is a Device Inquiry message (with a device ID that is unlikely to be correct ). You can ignore it.

06 F0 F7 corresponds to the SysEx message "F0 F7", which is empty and does not make sense. If this is indeed the message you're getting (check that you handle multiple USB packets and multiple USB-MIDI event packets correctly), then this looks like a bug in the USB MIDI driver.

Ports are defined in the descriptors.
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 7
Accepted Answer Pending Moderation
0
Votes
Undo
My descriptors are setup as per Appendix B of the MIDI 1.0 specification document. Don't understand why the Mac see's no Ports
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 8
Accepted Answer Pending Moderation
0
Votes
Undo
I cannot see your code. And there would be better debugging mechanisms on a Linux host.
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 9
Accepted Answer Pending Moderation
0
Votes
Undo
Code is the same as on this web page http://www.microchip.com/forums/m914640.aspx.
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 10
Accepted Answer Pending Moderation
0
Votes
Undo
Those descriptors look OK (but you can check with "lsusb -v" on a Linux host if they are enumerated correctly).

If there were not any ports, then you would not be able to see anything in the MIDI monitor.
Comment
There are no comments made yet.
  1. more than a month ago
  2. MIDI Software
  3. # 11
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.