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.

Training a Recurrent Neural Network to Compose Music

134 pointsby dacmalmost 9 years ago

11 comments

lubujacksonalmost 9 years ago
If you think this is impressive, consider that Mozart himself wrote an algorithm to randomly generator music... and it still sounds like Mozart: <a href="http:&#x2F;&#x2F;www.rationalargumentator.com&#x2F;index&#x2F;blog&#x2F;2015&#x2F;06&#x2F;variations-minuet-mozart&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.rationalargumentator.com&#x2F;index&#x2F;blog&#x2F;2015&#x2F;06&#x2F;varia...</a>
评论 #12335317 未加载
lopatinalmost 9 years ago
Noob question: It intuitively seems to me that by feeding raw text of a structured format (such as the music notation in the article) we&#x27;re making the algorithm unnecessarily learn the syntax in addition to interesting stuff, which is the high level musical patterns. What kind of results would you expect from running the same experiment, but with an input encoding more specialized to the problem domain? Would the performance benefits be significant?
评论 #12333790 未加载
评论 #12333723 未加载
评论 #12333989 未加载
jcraanealmost 9 years ago
A whole time back I created a program which uses genetic algorithms to generate melodies. I used the generated melodies as inspiration for music composition. The idea was (never implemented though) to add a fitness function based on training a neural network which could be trained by looking at other melodies or user input. More information can be found here: <a href="http:&#x2F;&#x2F;jcraane.blogspot.nl&#x2F;2009&#x2F;06&#x2F;melody-composition-using-genetic.html" rel="nofollow">http:&#x2F;&#x2F;jcraane.blogspot.nl&#x2F;2009&#x2F;06&#x2F;melody-composition-using-...</a><p>The source code is available here: <a href="https:&#x2F;&#x2F;github.com&#x2F;jcraane&#x2F;melodycomposition_genetic" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jcraane&#x2F;melodycomposition_genetic</a><p>Some sample melodies are in de docs&#x2F;samples folder.<p>I may cost some time to get it to work again but should not be that hard.
minimaxiralmost 9 years ago
Another (hilarious) tool which demonstrates the difference in quality of lightly-trained RNNs and strongly-trained RNNs is RoboRosewater, which generates Magic: the Gathering cards using networks of varying quality&#x2F;sanity, indicated by the card art: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;RoboRosewater" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;RoboRosewater</a>
评论 #12334389 未加载
jazaalmost 9 years ago
The authors of these music-generators should submit some of the compositions to online music libraries, to song competitions, etc, and see if they get accepted! &quot;A la&quot; what happened, back in the day, with peer-reviewed journals and: <a href="http:&#x2F;&#x2F;www.elsewhere.org&#x2F;journal&#x2F;pomo&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.elsewhere.org&#x2F;journal&#x2F;pomo&#x2F;</a>
Question1101almost 9 years ago
I am a neural network noob and only know the basic feedforward network.<p>So the training set is just text files containing songs? How does it test if the output is correct or not? If I understand correctly the goal here was just to produce outputs in the correct format. If one wanted to train for quality as well would one need to grade every output the network produces by hand?
评论 #12333450 未加载
Animatsalmost 9 years ago
Isn&#x27;t this the third project like this on HN?<p>These things generate tunes which sound OK for a few seconds, but after tens of seconds, you realize there&#x27;s no higher level structure at all. It&#x27;s just random.
评论 #12334841 未加载
yomlyalmost 9 years ago
The music came out quite fun sounding. I could almost imagine hearing at least passages within the music in videogames. Perhaps some old-school zelda&#x2F;jrpg game which would suit the folky quality of the music.<p>The bass line was generally quite simplistic, I wonder what happens if you codified gradus ad parnassum and taught the RNN counterpoint[0]<p>[0] <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Johann_Joseph_Fux" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Johann_Joseph_Fux</a>
评论 #12333477 未加载
empath75almost 9 years ago
Is there a better music database to work from for music generation? I&#x27;m surprised there isn&#x27;t a massive db of 19th century sheet music or player piano rolls somewhere.
评论 #12333551 未加载
评论 #12336584 未加载
xylophoneralmost 9 years ago
This isn&#x27;t composition. Mimicry, perhaps.
评论 #12334046 未加载
评论 #12333854 未加载
franzealmost 9 years ago
So has somebody fed all (i.e.: JS) github code into a neural network yet?
评论 #12334235 未加载