Howthe hell do you tell what functions are IN a library? So far, I've been able to look at examples and pull from there. But there doesn't seem to be a single good example of handling incoming MIDI events on the entire internet I can use with either Tinyusb or USBmidi. I have been pounding my head into a screen for an hour trying to figure out how to see what the functions are and how to use them. Are libraries just a giant black hole / guessing game or is there some way of actually reading what is in them and how they are made? This is so frustrating to me.
However, I understand that the source code is not the best form of documentation for many Arduino users, including myself when it comes to the more complex ones. But when it comes to free open source software, you're likely to get your money's worth either way. If not, we can go looking for something better or make our own from scratch.
So if you wanted to vent, then I guess it's as you say: "THAT'S ALL. That's it", mission accomplished and I sympathize. But if you want help you should provide some more information. We need to know exactly which libraries you are using. There are thousands of Arduino libraries; often multiple with the same or similar names. So playing guessing games is not a very productive use of the helper's time.
If that is still not enough, do the best you can to accomplish some simple, isolated tasks that are just part of the big picture. If you run into trouble with those, post the details on this forum. Or maybe the Adafruit forum.
I normally check the .h and .cpp files. (use notepad++ !) Sure some of the code might not be the same as the way i would write it, but then again, i might not be able to to begin with or i wouldn't need a library.
Just to check first what functions are available and what arguments they take, usually provides me with enough information. For midi there is actually quite decent examples, both included as examples, and online. Start out with the built in midi.h Locate the files on your drive and open them.
Again. Locate the files and open them. Keep in mind that normally i would use a board with a Atmega32u4 to make it show up as a midi device. (or a true UNO with a 16u4 as USB interface, but that is more complex)
I wish you hadn't mentioned "tinyUSB", because that's a whole different thing.
Or Adafruit, because the library you linked doesn't seem to have anything to do with them, either. (it GitHub - arduino-libraries/MIDIUSB: A MIDI library over USB, based on PluggableUSB I hope?) Note that the "pluggable USB" required by this library is the (default) alternative to the TinyUSB that Adafruit likes - they're not compatible...
Now, reading source code is a skill that doesn't necessarily require being able to write code, and just because you're not an experienced programmer doesn't mean you shouldn't or can't do it. (In fact, reading other peoples' code is a great way to learn more. If you've been cut&pasting from examples, you've already been doing it SOME.) (and... you'd be surprised at how much of "professional software engineering" consists of figuring out what others' code does, vs writing code from scratch. (alas, it is frequently more difficult to figure our existing code, or it seems that way.))
Fortunately, the midiUSB library is pretty simple.
First, let's look at MIDIUSB.h - that's the file that your sketch includes, so sooner or later, it will declare all of the functions that are usable. We want to look for the "Public:" part of some "class", and we find:
It might not be practical to send the results found, back on that same port in a different format.
But you can confirm it's functionality by making the program do whatever you want.
I would try and receive a CC msg and send back a note on or off for instance.
I just wanted to say thanks to everybody. I went to sleep early yesterday and won't have a chance to dive into this until at least this afternoon, but I've glanced at it and it looks like more than enough to solve my issues. Also, it gives me a pathway for future problems. I didn't know about header files (or really how to access documentation in general, other than random Google searches) and I didn't realize how the various MIDI libraries are connected. The buzzer.ino example in particular looks like it has everything I need. Best - Tom
I am struggling to manage to have my ESP32-S3-DevKitC-1 N8R2 being recognized as a USB MIDI peripheral (or any other USB descriptor) using the adafruit_tinyusb library.
I am reaching out there as I spent quite some time on it and running out of ideas.
I noticed this too. And tried both usb modes. Also tried enabling cdc on boot (which is also ticked in the arduino ide)
Still I will try again and confirm
Unfortunately none of those resolve the issue
I am unsure how this should be dealt with for future proof solution. Should a issue be filed somewhere so that it gets corrected ?
The include order problem and library archive option are beyond my undersanding of the compilation process, but I feel like the manual addition of the tinyusb config file is not the long term solution
To make a DIY sensor connect a potentiometer or construct some other voltage divider. The tip of the minijack is +5V, the sleeve is GND and the ring is where the voltage is measured by the midimalism and turned sent to your pooter as MIDI data. DONT SHORT +5V AND GND, midimalism might probably maybe die.
I was curious about how the USB hub chip would work out, thinking of just making a small board with just the hub chip from lcsc to see if the built-in crystal works without much trouble. I like the idea of it running without the overhead of linux but then again extending umbrellas with a midi router would be easier than rolling your own on the Teensy.
Sorry for bombarding with all these posts - i just bought a new very very sweet and tiny usb-midi controller (korg nanokontrol) that really completes my roland fp3 weighted piano keyboard, and i'm hyped about controlling PTQ.
So regarding the metronome:
1) How about controlling the tempo via midi?
2) maybe even tap via midi?
3) What about metronome volume - it seems to have disappeared from the last version. (if it was there i would like to control it as well)?
I also think I would require this. Or rather, the alternative would be to mix in a metronome out into the headphones along with pianoteq.
A hassle!
I would require to setup the metronome like I can on my iPad - time signature, division etc.
Hey This is great. I have also been building a MIDI controller. Mine looks just like a module in my rack so I can control some VST instruments, & effects and things from my modular (and even other things using a software interface like MIDI Mixer - Control Windows volumes (and more) with MIDI (
midi-mixer.com) , to control things on my PC when I want to like master volume, global mute, and even screen brightness when I want.
The driver allows users to use ESP32-S2 chips to develop USB devices on a top of the TinyUSB stack. TinyUSB is integrated with ESP-IDF to provide USB features of the framework. Using this driver the chip works as a composite device supporting several USB devices simultaneously. Currently, only the Communications Device Class (CDC) type of the device with the Abstract Control Model (ACM) subclass and the Musical Instrument Digital Interface (MIDI) are supported.
Note that the tinyusb_config_t structure can be zero initialized (e.g. tinyusb_config_t tusb_cfg = 0 ) or partially (as shown below). For any member that is initialized to 0 or NULL, the driver will use its default configuration values for that member (see example below)
No ESP32-S2 pin is 5V tolerant, so you must connect the VBUS to ESP32-S2 via a comparator with voltage thresholds as described above, or use a simple resistor voltage divider that will output (0.75 x Vdd) if VBUS is 4.4V (see figure below). In both cases, voltage on the sensing pin must be logic low within 3ms after the device is unplugged from USB host.
you need to configure the usb connection for use as MIDI. Do this by swiping from the top to see all your notifications. There should be a small notification with a tiny USB icon and text indicating the current device mode. Tap on that and you should be able to select the device as a MIDI device. Only then will JUCE be able to find the device.
@peteatjuce not sure if you have used tracktion engine code at all, but the problem is a bit worse using traction engine.
Basically midi device open/close handling is handled independantally by both systems, even though tracktion should be using juce, they get out of sync and android just barfs.
@anickt and @AndyPlankton provide good solutions above. The short explanation is that "USB MIDI" on a keyboard controller can only use a straight USB A to USB B cable (like a printer cable), not the converter device that Bianca suggests.
Sidebar, I realize but dammit: the 'professional' MIDI keyboard controller of 2016 should also serve as a USB host so that one can convert all of these clever little inexpensive USB MIDI only devices into honest to god electricity.
@syrupcore said:
Sidebar, I realize but dammit: the 'professional' MIDI keyboard controller of 2016 should also serve as a USB host so that one can convert all of these clever little inexpensive USB MIDI only devices into honest to god electricity.
But then every module/manufacturer would have to incorporate USB MIDI. A modern pro MIDI controller should have two DIN midi outputs and allow a USB hub to be plugged into it. There are a few midi interfaces that allow for this (ICM4, Akai EIE16, an m-audio...) but it hasn't landed in a midi controller yet.
3a8082e126