Question: I am interested in visualizing melodic contours of polyphonic music with Processing. It is still unclear to me, though, what the most convenient format for imported data (pitch and onset/duration) would be: tabular (e.g. Humdrum), XML (e.g. MEI, musicXML), or JSON? Maybe another format?

Any suggestions/thoughts on this would be really helpful! Thanks.

Answer: 
Using MIDI files would be optimal, because of the combination of those 3 reasons

1. MIDI is widely used. You can export a .midi file from pratically any score editor plus you can create your own by recording the input from a midi instrument.
2. You can already find .midi files of iconic polyphonic music on the web (Bach's counterpoints, Reinaissance vocal music, etc)
3. It just contain music/playback information. It doesn't contain notation information like music XML. So if you just want to see pitches and note position/duration (like in this [video](https://www.youtube.com/watch?v=qXMZoKofu7g)) then .midi will contain just what you need
4. You can use the [Java Midi Package](https://docs.oracle.com/javase/tutorial/sound/overview-MIDI.html) in Processing and it already contains everything you need to read the MIDI files.

While other formats might also apply for 1, 2, 3 or 4 only MIDI applies for **all** of them.
The best answer I can give you is that you should **put together a simple hello world program that tests out each format and see which one you like the best.**

In the end, you're the one that has to deal with the code, so only you can really decide on the best format.