Forum Rule: Always post complete source code & details to reproduce any issue!
Page 4 of 4 FirstFirst ... 2 3 4
Results 76 to 82 of 82

Thread: Teensy 3.6 USB MIDI host development status

  1. #76
    Quote Originally Posted by flocked View Post
    It seems that it finds the endpoint correctly, but doesn't create it's pipe because MAX_PACKET_SIZE is too small. In USBHost_t36.h I changed MAX_PACKET_SIZE to 512 and RX_QUEUE_SIZE to 256 and all Elektron devices + OP-1 get detected. Not sure if these are the perfect values as I don't know much about USB/midi. It was just a lot of trial and error.
    I am also trying to connect my OP-1, but can't get the Teensy to receive MIDI from the OP-1.
    I tried to change the two values in the USBHost_t36.h file as suggested by flocked, but it didn't resolve the issue.

    Activated debug mode, and this is what I get when connecting the OP-1 to the USB Host:

    Code:
    15:32:55.223 -> USB Host Testing
    15:32:55.223 -> sizeof Device = 36
    15:32:55.223 -> sizeof Pipe = 96
    15:32:55.223 -> sizeof Transfer = 64
    15:32:55.223 -> power up USBHS PHY
    15:32:55.267 -> port change: 10001803
    15:32:55.267 ->     connect
    15:32:55.343 ->   begin reset
    15:32:55.416 -> port change: 18001205
    15:32:55.416 ->   port enabled
    15:32:55.416 ->   end recovery
    15:32:55.416 -> new_Device: 480 Mbit/sec
    15:32:55.416 -> new_Pipe
    Other devices like the AKAI LPK25 do work perfectly, and also I receive MIDI from the OP-1 when connected to a computer.

    Maybe anyone can help me? Thanks a lot!

  2. #77
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,701
    Let's continue the discussion about OP-1 on the other more specific thread.

    https://forum.pjrc.com/threads/51622...Hardware-issue

    It will help me to solve this quicker if you can post all your replies on that other thread.

  3. #78
    Member SteveBar's Avatar
    Join Date
    May 2018
    Location
    Portland, OR USA
    Posts
    60
    Quote Originally Posted by ETMoody3 View Post
    could you clarify exactly how to query the ID string (if present) of any specific MIDIDevice once the library has it? - Gah! Sorry, found it. Trees/forest.
    Can you share where you found it? Thanks :-)

  4. #79
    Senior Member ETMoody3's Avatar
    Join Date
    Mar 2014
    Location
    New Ulm, Mn
    Posts
    181
    I ended up using ID numbers.

  5. #80
    Junior Member
    Join Date
    Feb 2019
    Posts
    3
    Quote Originally Posted by PaulStoffregen View Post
    There's also functions to query the vendor and product ID numbers, and manufacturer, product and serial number strings. These are also in the base class, so they work on MIDI, keyboards, joystick, etc.
    I see this working when I enable DEBUG... but how do I get the Manufacturer and Product strings into my sketch?

    22:26:27.186 -> Manufacturer: Focusrite A.E. Ltd
    22:26:27.186 -> enumeration:
    22:26:27.186 -> Product: Launchpad Mini

  6. #81
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    27,701
    You can call midi1.manufacturer() and midi1.product() to get the names, since MIDIDevice inherits the public functions of the USBDriver base class. These return NULL if no device is connected or if the device didn't provide a string descriptor, so be sure to check for NULL before using the string.

  7. #82
    Junior Member
    Join Date
    Feb 2019
    Posts
    3
    Thanks so much

    I'm doing this... is this the most efficient way to it?

    Code:
    void myNoteOn(byte channel, byte note, byte velocity) {
      if (midi1.manufacturer() != NULL && midi1.product() != NULL) {
        String make = (char*)midi1.manufacturer();
        String model = (char*)midi1.product();
        Serial.print(String(make) + " " +  model + " ");
      }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •