5 ms·
Enhancing your MIDI devices with Perl
- PaulDavisThe1st 2y agoThere's some confusion at the end of TFA about latency. What TFA refers to as latency is the time required to inject a MIDI event/message received by RtMIDI into the perl async object - basically inter-thread wakeup. You certainly expect that to be very, very fast - it's what context switching on any multitasking/multithreaded system relies. "Fractions of a millisecond" is in the right ballpark, though on some systems "Tens of microseconds" would be more appropriate as a description. What "latency" normally means in the context of MIDI or audio is the delay between the user generating a MIDI event somehow and when the audio corresponding to that MIDI event (e.g. a note) is audible. This is typically measured in relatively small numbers of milliseconds (e.g. 1-30). These are not really connected in any meaningful sense.
- montag 2y agoWhy “TFA” instead of just “the article”? I understand “RTFA”, berating commenters who didn’t “read the fucking article” with a cheeky acronym, but TFA by itself is kind of hostile for no reason. Unless you hated the article that much
- Tepix 2y agoIn my mind, RTFM is read the fucking manual, but TFA is the fine article. It seems to be confusing however, because it's been discussed here previously https://news.ycombinator.com/item?id=29888845 https://news.ycombinator.com/item?id=29888845
- raziel2p 2y agothat's... extremely silly. the confusing thing is why wouldn't you just write "the article"? what's the point of the abbreviation if you don't mean to convey the swear word?
- TylerE 2y agoTA already means something else. 3 characters is lieds than 11. Shrug.
- MonkeyClub 2y ago> TFA is the fine article Isn't it a reference to "the featured article"?
- JodieBenitez 2y agoI thought it was "Read The Fantastic Manual" ;)
- randmeerkat 2y agoPeople still use Perl?
- weare138 2y agoI do.
- davewood 2y agoSo do I
- perlcommunity 2y agoGuilty.
- mkolassa 2y agoPerl is a great scripting language to stitch together high performance C binaries. Not to mention that CPAN and the built in debugger are awesome. Write it in Perl to deploy quickly and replace pieces with optimized binaries as needed. It’s still used for new projects in far more places than a lot of people might realize.
- fallous 2y agoYes. A mature and well-understood tool does not cease to exist nor cease to be useful simply because new tools exist. Simply being "new" does not mean "better," except for those who merely seek novelty.
- dutchbookmaker 2y agoI always hated Perl. This library does sound interesting and maybe Perl would be less painful for me now with a language model. The article is great right until it gets into the perl code. My brain just turns off and my eyes want to cross.
- mikedelfino 2y ago
- moneymack 2y ago[dead]
- grav 2y agoCouldn't get the code to run with Perl on Mac: $ plenv exec perl midi.pl Not enough arguments for main::pedal_notes at midi.pl line 107, near "$note)" BEGIN not safe after errors--compilation aborted at midi.pl line 150. I got something similar working in Supercollider though, which has a lot of tools for these sort of things, eg: MIDIIn.addFuncTo(\noteOn, ~myNoteOnHandler);