Skip to content

auto generated touhou-style midi tunes with char-rnn

Notifications You must be signed in to change notification settings

NSDN/touhou-midi-rnn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

touhou-midi-rnn

auto generated touhou-style midi tunes with torch-rnn


Introduction

This project downloads midi tracks from www.touhoumidi.altervista.org and feeds them to LSTM network (torch-rnn) to produce touhou-style midi tunes


简介

这些工作 的启发,这个项目从 www.touhoumidi.altervista.org 上下载东方相关的 midi 文件,转换处理为 abc 标记文本后,来训练 LSTM 网络 (torch-rnn),并使用训练好的网络生成 midi 片段。

下载到的 midi 文件大概有两百多首,用不同的处理方法和网络配置训练了几个批次:

  • data/alice:仅使用带有多音轨的 midi 文件,将多个音轨摊开并去掉了注释,转换后的文本约 5MB。使用两层 512 节点的 LSTM 网络训练。有明显的 overfitting 注意

  • data/sakuya:约 11MB 的文本,两层 256 节点的网络。多了不少狂气注意

  • data/aya:将音轨合并后输出产生约 14MB 的文本。两层 256 节点的网络。大量脸滚键盘注意

更多示例 midi 输出见 这里

使用

项目库里仅包含使用的部分脚本和训练生成 checkpoint 文件与示例,并不提供用来训练的 midi 源文件。

# 在 ~ 下安装 torch 和 torch-rnn(省略)
# ...

# 依赖 abcmidi
sudo apt-get install abcmidi

# 旧版本 ubuntu 需要自行编译 midicsv
sudo apt-get install midicsv

# 下载数据并生成样本
./make_inputs.sh data/input

# 开始训练或从最新的 checkpoint 继续
./start_traning.sh data/input

# 使用最新的 checkpoint 输出
./output_sample.sh data/input

About

auto generated touhou-style midi tunes with char-rnn

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages