RIP
Starting a new thread with a suitable title to attract interested folks. Not @ - mentioning anybody other than you @gzpiano but feel free to
@gzpiano or reference in a step #24 video on youtube, timestamp 1:03 and 2:38 (maybe latter is my playing skills?)
Frankly I can't notice that happening even after repeated watching (and that is perhaps one of the reasons why I hate videos rather than text descriptions of things -- plus with text I can read at the slow of fast speed of my choice, whereas with videos I can slow down or speed up, but it's not the same -- not to mention seeking that in text is immediate whereas in video is a huge PITA -- but I digress, excuse my rant.....)
@gzpiano occasionally drops or delays a note
I trust you that it does happen and I have some ideas. If my understanding is correct, in this architecture the Teensy is connected to a (number of) ADC chips on the SPI bus, correct? What software are you running on the Teensy (or on whatever else you have directly connected to the SPI bus which is producing a fair amount of data)?
Hypotheses (in order of worst-to-best for the purpose of not dropping nor delaying notes): Linux? Linux stripped down to only the essential? Linux RT kernel stripped down to only the essential? RTOS? Just your own code without any OS? How are you dealing with the SPI bus? Polling? Interrupts? Do you have a buffer/queue or are you doing synchronous real-time stuff? If the latter, how? If the buffer/queue, are you monitoring it for overflowing?
So let me make a wild speculation, not knowing any detail about the architecture of your software stack (this would be the easiest scenario to solve): you are running regular Linux, with all of its drivers and other settings and you are just polling the SPI buffer (rather than using interrupts, also because of the rate at which the SPI produces data the interrupts would not be trivial). An interrupt for some other reason comes for the OS, which then "drops" your code and does other stuff. Things in the buffer accumulate and in the best case a note is delayed, whereas in the worst the buffer overflows and a note is dropped.
Other things:
- does this "OS" have a filesystem or is it on RAMDISK?
- Do you run any language that needs garbage collection such as python or matlab? If so, do you have logs that you can use to correlate (or exclude) the dropped/delayed notes happening at the time of gc running?
@gzpiano Plan for debug is stream data about software out Ethernet port while playing look for clues.
If you can make a RAMDISK and flush it to permanent storage later, that would be better. Running the TCP/IP protocol (and to a less degree even just UDP) will at least make the problem worse, if not also muddy the waters.
@gzpiano I wish Teensy second usb was device not host. for performance I'd rather use usb than din MIDI.
Sure that would have better performance, but I don't think it's relevant here. You weren't playing that many notes that fast to get anywhere close to the din MIDI speed limits (which are actually really hard to get close to)
