TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Enhancing your MIDI devices with Perl

122 pointsby oalders4 months ago

3 comments

PaulDavisThe1st4 months ago
There&#x27;s some confusion at the end of TFA about latency.<p>What TFA refers to as latency is the time required to inject a MIDI event&#x2F;message received by RtMIDI into the perl async object - basically inter-thread wakeup. You certainly expect that to be very, very fast - it&#x27;s what context switching on any multitasking&#x2F;multithreaded system relies. &quot;Fractions of a millisecond&quot; is in the right ballpark, though on some systems &quot;Tens of microseconds&quot; would be more appropriate as a description.<p>What &quot;latency&quot; 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).<p>These are not really connected in any meaningful sense.
评论 #42906254 未加载
grav4 months ago
Couldn&#x27;t get the code to run with Perl on Mac:<p><pre><code> $ plenv exec perl midi.pl Not enough arguments for main::pedal_notes at midi.pl line 107, near &quot;$note)&quot; BEGIN not safe after errors--compilation aborted at midi.pl line 150. </code></pre> I got something similar working in Supercollider though, which has a lot of tools for these sort of things, eg:<p><pre><code> MIDIIn.addFuncTo(\noteOn, ~myNoteOnHandler);</code></pre>
randmeerkat4 months ago
People still use Perl?
评论 #42906918 未加载
评论 #42906244 未加载
评论 #42906121 未加载
评论 #42909458 未加载
评论 #42910953 未加载
评论 #42907719 未加载
评论 #42907279 未加载