SkillAgentSearch skills...

Odcnn

implementation of improved musical onset detection with cnn

Install / Use

/learn @seiichiinoue/Odcnn
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Musical Onset Detection with Convolutional Neural Networks

Summary

  • model architecture: simple convolutional neural network

  • prediction: probability of onset

Description

This repository is implementation of Jan Schlüter and Sebastian Böck's "IMPROVED MUSICAL ONSET DETECTION WITH CONVOLUTIONAL NEURAL NETWORKS"

ABSTRACT:

Musical onset detection is one of the most elementary tasks in music analysis, but still only solved imperfectly for polyphonic music signals. Interpreted as a computer vision problem in spectrograms, Convolutional Neural Networks (CNNs) seem to be an ideal fit. On a dataset of about 100 minutes of music with 26k annotated onsets, we show that CNNs outperform the previous state-of-the-art while requiring less manual preprocessing. Investigating their inner workings, we find two key advantages over hand-designed methods: Using separate detectors for percussive and harmonic onsets, and combining results from many minor variations of the same scheme. The results suggest that even for well-understood signal processing tasks, machine learning can be superior to knowledge engineering.

Using PyTorch, implemented musical onset detectioner and apply it to Taikosanjiro which is sounds game like taiko-no-tatsujin

Usage

Requirement

  • git-lfs (for downloading large dataset)
  • python3
  • pytorch
  • soundfile
  • librosa
  • tqdm

Install Pytorch

you can download from here

Running Sample

  • install requirement
$ pip install -r reqirement.txt
  • before training, prepare audio dataset. (and pickle data.)
$ python music_processor.py reduced
$ python music_processor.py test
  • then, train model.
$ python train.py don
$ python train.py ka
  • then predict onset probability with trained model.
$ python infer.py don
$ python infer.py ka
  • and create notes and corresponding music from inferred data.
$ python synthesyze.py 

Notice

  • train_reduced in this repo is too small for training, because of limitation of uploadable file size of git, I wasn't able to upload enough size training data.

  • if you want to train model with larger data, you could download audio data and corresponding notes here.

References

View on GitHub
GitHub Stars56
CategoryDevelopment
Updated4mo ago
Forks14

Languages

Python

Security Score

82/100

Audited on Nov 22, 2025

No findings