Giter Site home page Giter Site logo

audio_to_midi's Introduction

Sound to midi converter

Tools to convert audio files to midi. The CLI does not require any programming. The library enables stopping the process at any intermediate step.

Currently, supports monophonic audio (tunes played one note at a time).

Follow this guide for installation and usage.

For information about how it works, read the whitepaper.

Quickstart guides

Installation from pip

pip install sound_to_midi

Installation from Github repo

git clone https://github.com/tiagoft/audio_to_midi.git

cd audio_to_midi

python -m build

pip install .\dist\audio_to_midi-0.0.1-py3-none-any.whl

Usage as a Python library

import sys
import librosa

from audio_to_midi.monophonic import wave_to_midi

print("Starting...")
file_in = sys.argv[1]
file_out = sys.argv[2]
y, sr = librosa.load(file_in, sr=None)
print("Audio file loaded!")
midi = wave_to_midi(y, sr=sr)
print("Conversion finished!")
with open (file_out, 'wb') as f:
    midi.writeFile(f)
print("Done. Exiting!")

Command-line interface (CLI)

After installing:

w2m input_file.wav output_file.mid

(supports most common formats like wav, aiff, mp3...)

audio_to_midi's People

Contributors

kant avatar tiagoft avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.