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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Play music by typing

119 点作者 benzguo超过 10 年前

32 条评论

granttimmerman超过 10 年前
I created a music auto-player since I was too lazy to play your guy&#x27;s songs by myself. Paste this in the console.<p><pre><code> &#x2F;&#x2F; SETTINGS var input = &quot;rsa ecde srgu yhgr bv rsa ecde srgu yhgr bv hybtg ser erv&quot;; input += &quot; hybtg iii r hybtg ser erv tvr rrr rvgres rrr rvg rrr rvgres &quot;; input += &quot;ggg rgh grs sxebbe cuuuhbgres grs sxebbe cbbbgvrsai&quot;; var TIME_INTERVAL = 300; &#x2F;&#x2F; Add jquery var script = document.createElement(&#x27;script&#x27;); script.src = &#x27;http:&#x2F;&#x2F;code.jquery.com&#x2F;jquery-1.11.0.min.js&#x27;; script.type = &#x27;text&#x2F;javascript&#x27;; document.getElementsByTagName(&#x27;head&#x27;)[0].appendChild(script); function play () { &#x2F;&#x2F; Sound array setup var soundArray = []; var down = $.Event(&quot;keydown&quot;); var up = $.Event(&quot;keyup&quot;); input = &#x27; &#x27; + input; &#x2F;&#x2F; hack for (var i = 0; i &lt; input.length; ++i) { soundArray.push(input.toUpperCase().charCodeAt(i)); } &#x2F;&#x2F; Start sound var index = 0; function playSound () { up.which = soundArray[index]; $(&quot;body&quot;).trigger(up); ++index; down.which = soundArray[index]; $(&quot;body&quot;).trigger(down); &#x2F;&#x2F; &#x2F;&#x2F; is there another? if (index &lt; soundArray.length) { setTimeout(playSound, TIME_INTERVAL); } } playSound(); } (function loadjQuery () { if (typeof jQuery === &#x27;undefined&#x27;) { setTimeout(loadjQuery, 100); } else { play(); } })();</code></pre>
评论 #8217900 未加载
评论 #8217905 未加载
评论 #8223658 未加载
adrianh超过 10 年前
In possibly the geekiest thing I&#x27;ve ever posted to the Internet...Here&#x27;s the Super Mario Bros. theme!<p>rsa ecde srgu yhgr bv rsa ecde srgu yhgr bv hybtg ser erv hybtg iii r hybtg ser erv tvr rrr rvgres rrr rvg rrr rvgres ggg rgh grs sxebbe cuuuhbgres grs sxebbe cbbbgvrsai<p>It&#x27;d be cool to integrate my site <a href="http://www.soundslice.com/" rel="nofollow">http:&#x2F;&#x2F;www.soundslice.com&#x2F;</a> into this.
评论 #8217725 未加载
评论 #8217652 未加载
评论 #8217868 未加载
评论 #8218461 未加载
评论 #8217802 未加载
cousin_it超过 10 年前
The beginning of Game of Thrones theme:<p><pre><code> g e rvg e rvc v s rcv s rce (bhu g bhu g bhu g) </code></pre> I love the idea of having a layout where all patterns are movable. Going diagonally up-right gives you whole tone steps, diagonally down-right gives you semitone steps. An octave is QT, a major triad is QSD, a minor triad is QWD, a major scale is QZSXDRVT or AWXECFTG or ASEDRVGB. I could pick this up right away, in some ways it&#x27;s easier than the piano, which I&#x27;ve played a lot. I really wish there was touch response, but computer keyboards don&#x27;t support it.<p>The behavior of cmd as the pedal is a little weird. When you release the pedal, the sound should stop. Maybe it&#x27;s just a Mac bug, though.<p>The top row seems to be an octave higher than it should be, that interferes with moveability. Though I understand you probably wanted to expand the range.
baddox超过 10 年前
Interesting layout. Horizontal rows are diminished triads, so it takes a minute to figure out the pattern for your standard maj&#x2F;min chords. It&#x27;s very counterintuitive for someone familiar with piano and guitar (or at least me), but that can be a good thing.
评论 #8217716 未加载
评论 #8217819 未加载
peterjmag超过 10 年前
Awesome. The first thing I did was run my finger across the qwerty row from left to right, which immediately made me think of Toccata and Fugue, prompting me to pick out this excerpt:<p><pre><code> 8[8 [;plol mum yhtg cec esaqa qwertyuiopluyn tgytgytgytgy huyhuyhuyhuy 4iu4iu4iu4 </code></pre> Transposed down a half step to D-flat minor to better fit this thing&#x27;s range. It&#x27;s not a perfect transcription by any means (the arpeggio suffers from limited polyphony, for one), but it&#x27;s pretty cool that it was so easy to get this far!
staunch超过 10 年前
<i>EAR TO EAR GRIN</i><p>More music please from the talented among us!<p>I&#x27;ve tried things like this before, but this is great.<p>I knew playing all those typing race games would come in handy one day!
aclissold超过 10 年前
I wrote a Python script to convert note names into keys:<p><a href="https://gist.github.com/aclissold/c6dcdee3838f23cee7cd" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;aclissold&#x2F;c6dcdee3838f23cee7cd</a><p>…But I stopped caring when I got to filling in the dictionary of notes, so if somebody else wants to finish it, be my guest! ;]
ivanca超过 10 年前
Is nice that you can open the JavaScript console (F12) and it shows the name of the notes (along the musical octave).<p>Is a shame there are some chords that you can&#x27;t play (chord: pressing notes at the same time), such as &quot;yup&quot;. But I think is a hardware limitation rather than a bug in the JavaScript.
评论 #8217779 未加载
评论 #8219579 未加载
doomrobo超过 10 年前
A patriotic tune<p>uyvyu,pl,ynuuupl,kmk,,uyvuyvyu,pl,ynuuupl,kmk,,uyvppp;[[;plp;;;pl,kmk,ynuu,,,kmmml;pl,,kuu,lp;[,lp;l,
mountainpass超过 10 年前
Does anybody know if a desktop equivalent version of this exist?<p>I would love to hear nonsensical boops as I code.
apeconmyth超过 10 年前
A quick heads-up: I left the page open to play with it later and about an hour and a half afterwards, it apparently started blaring quite alarming noise out of nowhere. Didn&#x27;t hear it myself but it freaked out the unlucky person in the room.
chillingeffect超过 10 年前
This may be an easy question for others, but not for me- how does it load the app code? When I view the source, it only shows the loading of google analytics and require.js, but the console&#x2F;Debugger shows 10 .js files?! Thanks.
评论 #8219187 未加载
thisjepisje超过 10 年前
The layout doesn&#x27;t make much sense to me.<p><a href="https://www.image-line.com/support/FLHelp/html/img_glob/qwerty_keyboard.jpg" rel="nofollow">https:&#x2F;&#x2F;www.image-line.com&#x2F;support&#x2F;FLHelp&#x2F;html&#x2F;img_glob&#x2F;qwer...</a>
Aardwolf超过 10 年前
Interestingly, mashing random keys of a single row makes an acceptable melody. Do accordeon players aldo randomly mash keys? :D<p>Also, perfect thing to test my N-key rollover keyboard (which only goes to 6 due to USB limitations...)!
cezary超过 10 年前
Nice! I noticed pressing alt+key will hold the note, but you might want to change that to shift+key since &#x27;w&#x27;,&#x27;q&#x27;,&#x27;t&#x27; and &#x27;n&#x27; won&#x27;t work (I got a little carried away).
suncanon超过 10 年前
Here is another project that also uses this keyboard layout, with a marimba sound:<p><a href="http://michaelscottnelson.com/app/Charmonika2/" rel="nofollow">http:&#x2F;&#x2F;michaelscottnelson.com&#x2F;app&#x2F;Charmonika2&#x2F;</a>
评论 #8217686 未加载
yeukhon超过 10 年前
I remember a few years back there was a site similar to this idea and you could actually share! I think you could add an option to append to fragment #<p><i>edit</i>: is this open source such that people can contribute?
评论 #8217865 未加载
samirmenon超过 10 年前
I love this! My favorite part was &#x27;discovering&#x27; my own &#x27;cords&#x27;. So far, my ear prefers AEF, AWF, ECG, AEG, and AFY.<p>Also, you can make a key stay down by holding down Control (Command on a Mac)
评论 #8217701 未加载
评论 #8217606 未加载
killwhitey超过 10 年前
Someone made a native version of this a few years back. Had a lot of fun playing with it for a week in 2009.<p><a href="http://keybored.wikidot.com/" rel="nofollow">http:&#x2F;&#x2F;keybored.wikidot.com&#x2F;</a>
Htsthbjig超过 10 年前
I am too lazy to use this site without some kind of interactive help.<p>I would like to same some kind of feedback, like piano diodes that get on and of for you to follow a tune or tell you when you get wrong.
gravity13超过 10 年前
I made something like this recently <a href="http://www.gravitypersists.com/musicspiral" rel="nofollow">http:&#x2F;&#x2F;www.gravitypersists.com&#x2F;musicspiral</a>
fferen超过 10 年前
Someone should make a keyboard that assigns nice sounding intervals to the most common digrams&#x2F;trigrams so that typing normal text produces better music.
评论 #8220223 未加载
评论 #8217916 未加载
umutisik超过 10 年前
Very fun. This is a nice range, very different from the keyboards included in music software. I wish I could figure out which button is which note.
评论 #8217654 未加载
Grue3超过 10 年前
I used to play bayan, so I figured out the layout even before I saw the url. The orientation of keyboard makes it a bit hard to play though.
zaksoup超过 10 年前
While we&#x27;re all posting transcriptions of songs: Take the A Train.<p>d h dthc r rfvh cdey bx e d hdthc r rfvh rrthxrthr rtherthr c d h dthc r rfvh cdey bx
thejerz超过 10 年前
I created a similar thing a few years ago: <a href="http://kreolmusic.com" rel="nofollow">http:&#x2F;&#x2F;kreolmusic.com</a>
Elethier超过 10 年前
I found the song from Donkey Kong arcade! Or at least a close approximation.<p>q s drd q s drd q s drd q s drd q s drd ...
wickawic超过 10 年前
qwdtytdw qertytre qxctntcx zxctbtvwq<p>The scales produced by typing along one row reminded me of the castle theme from Super Mario World. If my javascript-foo was greater, I would write a function that types this, but alas.
评论 #8217602 未加载
kybernetyk超过 10 年前
Reminds me of a program from the demo disk that came with my C64.
Elethier超过 10 年前
Song of time: ib n ib n io,jnji b th b
arianvanp超过 10 年前
this thing is so slow for me on FF that it skips half of the notes I hit.. :(
brickmort超过 10 年前
i LOVE this. i want to hear this everytime I write code.