<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Implementing a class-compliant USB MIDI device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38443/implementing-a-class-compliant-usb-midi-device</link><description>Hi everyone, 
 
 I&amp;#39;m trying to developp a MIDI USB class compliant device with the nrf52840 DK. 
 I&amp;#39;m beginner about USB developpement and I have only basics about MIDI class definition. 
 
 I&amp;#39;m trying to modify the usbd_audio example of the SDK 15.1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Jul 2019 11:29:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38443/implementing-a-class-compliant-usb-midi-device" /><item><title>RE: Implementing a class-compliant USB MIDI device</title><link>https://devzone.nordicsemi.com/thread/196812?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 11:29:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61a6e5d6-4072-4fd2-b06b-5b20808c96b8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Gaétan,&lt;/p&gt;
&lt;p&gt;Please check why nrf_drv_usbd_ep-enable_check(ep) returns what it does. It should be in nrf_usbd.h (you may need to copy it out to the app_usbd.c file in order to debug it).&lt;/p&gt;
&lt;p&gt;Please create a new ticket where you describe your progress and your issue. I&amp;#39;ll be out of office for a couple of weeks, so this ticket is not looked after.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing a class-compliant USB MIDI device</title><link>https://devzone.nordicsemi.com/thread/196709?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 06:42:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9083fba-2b50-4a85-b243-35c73058579d</guid><dc:creator>Ga&amp;#233;tan</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am also working on a MIDI over USB version for the nRF52840.&lt;br /&gt;I have adapted the declarations and the USB enumeration works correctly. The host software recognizes my card as a MIDI device.&lt;/p&gt;
&lt;p&gt;However, I have a problem with sending and receiving data....&lt;br /&gt;Obviously the endpoints I use are not enabled for the NRF!&lt;/p&gt;
&lt;p&gt;For example, when I try to send via the &lt;em&gt;app_usbd_ep_handled_transfer&lt;/em&gt; function, it returns &lt;em&gt;NRF_ERROR_INVALID_STATE&lt;/em&gt; to me because of the &lt;em&gt;nrf_drv_usbd_ep_enable_check(ep)&lt;/em&gt; test (line 1835 of app_usbd.c)&lt;/p&gt;
&lt;p&gt;I think there is a concern about the init of part of the USB communication... &lt;br /&gt;I noticed that I only have one call to the &lt;em&gt;setup_event_handler()&lt;/em&gt; function with &lt;em&gt;setup.bmRequestType = 128&lt;/em&gt;, whereas if I understand the principle correctly there should be several calls to initialize the endponits.&lt;/p&gt;
&lt;p&gt;If needed I can send an example of my code.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Ga&amp;eacute;tan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing a class-compliant USB MIDI device</title><link>https://devzone.nordicsemi.com/thread/193259?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2019 19:26:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a65f4485-acd4-498d-a6e1-b9e2b6b1ef5f</guid><dc:creator>Andrew Mowry</dc:creator><description>&lt;p&gt;I would love to see an example of USB MIDI if anyone has it working. Using a single chip for both Bluetooth MIDI and USB MIDI would be very useful.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing a class-compliant USB MIDI device</title><link>https://devzone.nordicsemi.com/thread/169411?ContentTypeID=1</link><pubDate>Tue, 05 Feb 2019 07:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d6b63b1-0813-4860-9b53-630c8f88d572</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Please create a new ticket where you describe your progress and issues with the MIDI implementation.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing a class-compliant USB MIDI device</title><link>https://devzone.nordicsemi.com/thread/169007?ContentTypeID=1</link><pubDate>Fri, 01 Feb 2019 09:36:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a033f6a-e2c3-446e-a5cd-a92ae9993684</guid><dc:creator>tim11</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yes, tried to change it to midi streaming, but cant at at the moment work out how to fix the corresponding descriptions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing a class-compliant USB MIDI device</title><link>https://devzone.nordicsemi.com/thread/168507?ContentTypeID=1</link><pubDate>Tue, 29 Jan 2019 14:53:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4caf6809-2183-43be-b3fa-49bf6396e716</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Tim,&lt;/p&gt;
&lt;p&gt;I am sorry, I haven&amp;#39;t looked much into the USB MIDI since I last answered on this thread. Did you try to change the implementation to MIDI? Maybe &lt;a href="https://devzone.nordicsemi.com/members/beul"&gt;Beul&lt;/a&gt; made some progress?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing a class-compliant USB MIDI device</title><link>https://devzone.nordicsemi.com/thread/168333?ContentTypeID=1</link><pubDate>Mon, 28 Jan 2019 21:04:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bbb9fc4-7905-45d2-a8e9-3ade50482f0b</guid><dc:creator>tim11</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you possibly give any more advice on getting usb midi to work. I&amp;#39;m stumped by it.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Tim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing a class-compliant USB MIDI device</title><link>https://devzone.nordicsemi.com/thread/149255?ContentTypeID=1</link><pubDate>Tue, 18 Sep 2018 13:35:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0de261f-65d4-48cb-a09b-22f6c1894333</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. I spoke to one of the guys who worked with the USB implementation on the nRF52840. He says that they didn&amp;#39;t have time to implement a midi-example, but everything needed should be there to set it up.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But, as I mentioned, we don&amp;#39;t have an example doing this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I suggest that you start by testing the USBD audio example, as described &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fusbd_audio_example.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then look for the&amp;nbsp;APP_USBD_AUDIO_GLOBAL_DEF() for the microphone in main.c.&lt;/p&gt;
&lt;p&gt;APP_USBD_AUDIO_GLOBAL_DEF(m_app_audio_microphone,&lt;br /&gt; MIC_INTERFACES_CONFIG(),&lt;br /&gt; mic_audio_user_ev_handler,&lt;br /&gt; &amp;amp;mic_form_desc,&lt;br /&gt; &amp;amp;mic_inp_desc,&lt;br /&gt; &amp;amp;mic_out_desc,&lt;br /&gt; &amp;amp;mic_fea_desc,&lt;br /&gt; 0,&lt;br /&gt; APP_USBD_AUDIO_AS_IFACE_FORMAT_PCM,&lt;br /&gt; 192,&lt;br /&gt; APP_USBD_AUDIO_SUBCLASS_AUDIOSTREAMING&lt;br /&gt;);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You would at least want to change this to be a midi.&lt;/p&gt;
&lt;p&gt;change:&lt;/p&gt;
&lt;p&gt;APP_USBD_AUDIO_SUBCLASS_AUDIOSTREAMING to&amp;nbsp;APP_USBD_AUDIO_SUBCLASS_MIDISTREAMING&lt;/p&gt;
&lt;p&gt;then you need to change all the mic_defines to MIDI defines. Exactly which one, I am not sure. You will have to read up on how MIDI over USB works.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>