TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Jerrica, a 100% scheduled, Web Audio native, MOD player for JavaScript

138 点作者 gtrevorjay超过 2 年前

13 条评论

bitwize超过 2 年前
I love the name. Jerrica Benton was the true identity of the rock-star title character of <i>Jem and the Holograms</i>. She had an intelligent computer called Synergy who could put on holographic visual effects, manifest Jerrica&#x27;s Jem stage persona or other holographic disguises, and had other cyber-powers as the plot demanded. And her archenemy was a ruthless record executive named Eric Raymond.<p>Fitting name, then, for a JavaScript-based music player program. I love geeky references like this.
评论 #33360081 未加载
评论 #33362668 未加载
评论 #33361652 未加载
评论 #33360519 未加载
评论 #33360679 未加载
mwcampbell超过 2 年前
I&#x27;m using Edge on Windows. If I start playback, then switch to another application window, the player soon starts repeating the last fraction of a second of audio that it played. Then it resumes when I switch back to the Edge window. Presumably this is Edge putting the renderer process to sleep to save power and deal with sites that hog the CPU. The only exception is if I switch to a command prompt (console) window; in that case, the playback keeps going. Anyone know what&#x27;s going on there?
metadat超过 2 年前
In case this is the first you&#x27;ve heard of &quot;100% scheduled&quot; and &quot;web audio native&quot;:<p>&gt; By <i>&quot;100% scheduled&quot;</i> we mean that all the timing of audio events is handled using the web audio scheduler. Jerrica doesn&#x27;t use setTimeout, setInterval, or other timing hacks. It is recommended that its processMusic function is called once per frame via requestAnimationFrame, but that&#x27;s simply to ensure that sound events are always scheduled well ahead of when they need to occur.<p>&gt; By <i>&quot;web audio native&quot;</i> we mean that all audio effects are achieved via the web audio API. Many audio players manipulate audio at the sample level, treating web audio as a &quot;dumb pipe&quot; for an audio buffer. Jerrica doesn&#x27;t do that. After loading the samples from the MOD file, Jerrica only ever uses web audio functions to manipulate the sounds, for example via the playbackRate AudioParam.<p>To the author&#x27;s credit, these are both explained near the top of the README. Cheers.
aliqot超过 2 年前
Now -this- is cool <a href="http:&#x2F;&#x2F;uploads.ungrounded.net&#x2F;tmp&#x2F;1951000&#x2F;1951512&#x2F;file&#x2F;alternate&#x2F;alternate_2_r4.zip&#x2F;" rel="nofollow">http:&#x2F;&#x2F;uploads.ungrounded.net&#x2F;tmp&#x2F;1951000&#x2F;1951512&#x2F;file&#x2F;alter...</a><p>the numbers are tracker sequences and bars if anybody&#x27;s wondering.
评论 #33360258 未加载
评论 #33361898 未加载
评论 #33361775 未加载
hansjorg超过 2 年前
Nice! &quot;A Final Hyperbase&quot; by Firefox and Tip was made for the Amiga demo Enigma by Phenomena, which was released in 1991. Oh man, the nostalgia :)<p>This is how it sounds on a video grab from an Amiga:<p><a href="https:&#x2F;&#x2F;youtu.be&#x2F;iGpU3DicbLQ" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;iGpU3DicbLQ</a>
评论 #33391684 未加载
codeflo超过 2 年前
That’s really cool! But let’s have a technical discussion about the hiccups some commenters mention.<p>I’ve experimented with Web Audio stuff in the past, and wasn’t happy with it. It seems to be mainly intended to play back premade music files, not seamlessly playing dynamically generated samples.<p>Normal audio APIs issue a callback whenever their buffer gets low. This is done in a high-priority thread and has a high chance to work seamlessly even on a very busy system — think computer games. You get called, generate a few more bytes and everything is fine.<p>Web Audio, unless something changed, requires you to actively, manually schedule sending little audio snippets to the playback queue. You have to use timers for that, which are nondeterministic, and you’re competing with everything else that the JavaScript thread is doing. Any tiny hiccup is an audible artifact, and I had found no completely reliable way to avoid them.<p>Why is Web Audio like this? Are improvements on the horizon that would make this better?
评论 #33391702 未加载
Daunk超过 2 年前
I recently made a little tool for grabbing and searching mod music from the modland database - <a href="https:&#x2F;&#x2F;github.com&#x2F;Hezkore&#x2F;Modget" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Hezkore&#x2F;Modget</a>
horsawlarway超过 2 年前
This does some <i>very</i> wonky things in chromium based browsers if you switch to a different tab while it&#x27;s playing.<p>It plays normal audio for about 3 seconds, then begins what seems like a very short loop of the last few notes - repeating the same sounds forever (or until you navigate back to the tab)
评论 #33361491 未加载
评论 #33361796 未加载
评论 #33361086 未加载
评论 #33362814 未加载
评论 #33361300 未加载
postalrat超过 2 年前
Sounds a lot different in firefox and chrome. Not bad in either but don&#x27;t know what the more accurate one is.
评论 #33359810 未加载
评论 #33360201 未加载
评论 #33360882 未加载
undoware超过 2 年前
I have bad news for anyone who recognizes the name-reference instantly<p>You&#x27;re old<p>Like me :P<p>Showtime, cynergi
Max-q超过 2 年前
Impressive! In iOS Safari there are some issues with the timing&#x2F;rythm of the melody in the mid part and some a the end of the song.
评论 #33365086 未加载
agentultra超过 2 年前
I did notice in some cases frames getting delayed in the hyper demo but otherwise it works really well. This is an interesting approach!
评论 #33359826 未加载
tkanarsky超过 2 年前
Thanks, what a cool demonstration of WebAudio! Time for my weekly re-listen of space_debris.mod :)