音乐模仿算法?

发布于 2024-07-29 04:54:26 字数 1437 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

起风了 2024-08-05 04:54:26

维基百科关于算法组合的文章是一本很好的入门读物。 它描述了用于算法音乐创作的一些模型、著名作曲家、书籍参考和算法作曲软件。

http://en.wikipedia.org/wiki/Algorithmic_composition

The Wikipedia article on Algorithmic Composition is an excellent primer. It describes some of the models used for algorithmic music creation, notable composers, book references, and algorithmic composition software.

http://en.wikipedia.org/wiki/Algorithmic_composition

旧人 2024-08-05 04:54:26

作为一名音乐家和一名软件工程专业的学生,​​我想我可以在这里阐明一些很酷的观点:P 我自己在这个主题上做了很多工作,并计划在未来围绕这个主题做一些大的事情。

当您编写算法时,您的目标是提出一个解决方案 - 例如,在对问题进行排序时,它是有一个排序列表。 在算法音乐创作中,解决方案(通常)是有一首歌,或者是令人愉悦的旋律,有结构等等。该

解决方案的问题(哈哈)在于它不仅是客观的,而且是开放式的。 使用排序算法,您只有一种方法对列表进行排序。 通过音乐创作,您可以创作数百万首令人愉悦的歌曲/无论您的目标是什么。

因此,您需要一种算法,该算法不适合找到确定的解决方案,而是适合找到最佳解决方案。 我的建议是遗传算法或类似算法。 遗传算法很棒,因为它们可以创建各种最佳解决方案池。

您需要将乐曲分解为多个部分 - 旋律 GA、节奏 GA、结构 GA 等。并设计适合您的需求的健身功能。

当然这只是解决问题的一种方法; 有很多,前面列出的维基百科链接是一个很好的开始。

我建议查看:
GenJam:一种即兴爵士乐遗传算法,旨在交易独奏 -
http://www.it.rit.edu/~jab/GenJam.html< /a>

这本书非常有启发性:
http://www.springer.com/ Computer/information+systems/book/978-1-84628-599-8

我想另一种有趣的方式是使用神经网络......但是给它们设置可能会有点问题...... .还有很多工作要做。

无论如何,祝你创业好运:P

Being a musician myself and a Software Engineering major, I htink I can shed some cool light here :P I've done a lot of work on the subject myself and plan on making something big based around this in the future.

When you write an algorithm, your goal is to come up with a solution- fore example, in sorting problems it's to have a sorted list. In algorithmic music composition, the solution is (usually) to have a song, or melody that is pleasing, has structure, etc.

The problem with the solution (hah) is that it is not only objective, but the solution is vastly open ended. With a sorting algorithm, you have only one way to sort a list. With music composition, you have millions of pleasing songs/whatevr your goal is.

So you will need an algorithm that is good for not finding definitive solutions, but OPTIMAL solutions. My suggestion is a genetic algorithm or similar. Genetic algorithms are great because they can create a pool of various optimal solutions.

You'd need to break the composition into parts- have a GA for melody, GA for rhythm, GA for structure, etc. And design your fitness function to fit your needs.

Of course this is only one solution to the problem; there are many and the wikipedia link listed before is a great start.

I recommend checking out:
GenJam: an improvisational jazz Genetic Algorithm designed to trade solos-
http://www.it.rit.edu/~jab/GenJam.html

And this book is very enlightening:
http://www.springer.com/computer/information+systems/book/978-1-84628-599-8

I suppose another fun way would be with neural networks....but giving them sets woud be a bit of an issue probably....it's a lot more work.

Anyways, Good luck in your ventures :P

清晰传感 2024-08-05 04:54:26

对现有音乐的统计分析得出的音乐是——好吧——平均水平。 很少有任何有趣的东西,因为它往往会重现您分析的所有共同特征。

音乐是多维的。 您可以清楚地分析您感兴趣的任何或所有维度。 音调、节奏、音符顺序、和声进行、音量变化等等。 一切。

音乐微妙而复杂,因此总有更多东西需要分析。

AFAIK(我的儿子是一名作曲家)更有趣的是发明自己独特的算法来生成相当独特的音乐。

这是我儿子指定的一些内容。 它生成了由 48 个音乐事件组成的序列,该作品就是围绕这些事件构建的。

#!/usr/bin/env python
"""
there are 8, 3-note sets.
each one can occur on 3 different beats.
each pitch of the 3 note set can be in one of 3 octaves and it can either be a harmonic or a fingered note.
"""
import random

noteSetChoices = [ "C-E-G", "C-F-A", "C-E-A", "D-F-A", "D-F-B", "D-G-B", "E-G-B", "F-A-C" ]
beatChoices= [ "1 - - -", "- 2 - -", "- - - 4" ]
octaveChoices= [ 1, 2, 3 ]
techniqueChoices= [ 'Fingered', 'Harmonic' ]

for n in range(48):
    note= random.choice(noteSetChoices)
    beat= random.choice(beatChoices)
    octave= random.choice( octaveChoices )
    technique= random.choice( techniqueChoices )
    print octave, note, technique, beat

Statistical analysis of existing leads to music that is -- well -- average. There's rarely anything interesting because it tends to reproduce all the common features of whatever you analyzed.

Music is multi-dimensional. You can, clearly, analyze any or all of the dimensions that interest you. Pitch, tempo, sequence of notes, harmonic progressions, volume changes, anything. Everything.

Music is subtle and complex so there's always something more to analyze.

AFAIK (my son is a composer) what's more interesting is to invent your own unique algorithm for generating music that's reasonably distinctive.

Here's something my son specified. It generates a sequence of 48 musical events that the piece is built around.

#!/usr/bin/env python
"""
there are 8, 3-note sets.
each one can occur on 3 different beats.
each pitch of the 3 note set can be in one of 3 octaves and it can either be a harmonic or a fingered note.
"""
import random

noteSetChoices = [ "C-E-G", "C-F-A", "C-E-A", "D-F-A", "D-F-B", "D-G-B", "E-G-B", "F-A-C" ]
beatChoices= [ "1 - - -", "- 2 - -", "- - - 4" ]
octaveChoices= [ 1, 2, 3 ]
techniqueChoices= [ 'Fingered', 'Harmonic' ]

for n in range(48):
    note= random.choice(noteSetChoices)
    beat= random.choice(beatChoices)
    octave= random.choice( octaveChoices )
    technique= random.choice( techniqueChoices )
    print octave, note, technique, beat
三寸金莲 2024-08-05 04:54:26

虽然它通常适用于比一个小节更长的序列,但马尔可夫链是一种简单有效的生成与其输入类似的音乐的方法。 有关使用 RTcmix 进行音频生成的 Python 示例,请参阅我的实现

它基于元级注释中的马尔可夫链章节,这是一本关于算法组合的优秀文本。

Though it's generally meant to work on longer sequences than one bar, Markov chaining is a simple, effective way of generating music similar to its input. For an example written in Python using RTcmix for audio generation, see my implementation here.

It is based off of the Markov chaining chapter from Notes from the Metalevel, an excellent text on algorithmic composition.

给我一枪 2024-08-05 04:54:26

如果您了解音乐惯例,这确实很有帮助,因此请阅读教人们如何创作歌曲的书籍和文章。 你会得到很棒的想法。

时不时地踩一些踏板来营造紧张感。 在两种不同的仪器之间使用古老的呼叫响应技术。

It really helps if you know conventions of music, so read books and articles written to teach humans how to compose songs. You'll get great ideas.

Throw some pedal point in now and then to build tension. Use the age-old technique of call-response between two different instruments.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文