Git Product home page Git Product logo

midi-converter's Introduction

Youtube Synthesia to MIDI

Are you a penny-pinching upcoming musician like me, that wants to learn how to play the piano without paying a single cent?

Great this repo has you covered!

Simply find any synthesia style video-tutorial on youtube and copy the link.

Now run the script and there you go! You have a semi-beautiful midi file to further convert to sheet music or anything you'd like.

Features

  • Automatically extracts the key positions
  • Only a link to the video is required

Installation

python -m pip install -r requirements.txt

Console

>> python youtube_midify.py --help
Usage: youtube_midify.py <youtube-url> -o <outputfile = out.mid> -s <start_in_seconds = 0> -e <end_in_seconds = -1> -t <activation_threshold = 30> -k <proportional_keyboard_height_from_top = 0.88>

>> python youtube_midify.py https://youtu.be/HNPZ6KuJZYk
Downloading video...
Detected 88 keys.
Recognized key  39 as middle C.
Saved as out.mid.

Module

from youtube_midify import convert

convert("https://youtu.be/HNPZ6KuJZYk", output = "out.mid", start = 0, end = -1, keyboard_height = 0.85, threshold = 30)

Result

alt text This is a preview of the generated midi file.

Disclaimer

I am not responsible for any psychological damage that may occur upon taking a look at the source code.

INSPECT AT YOUR OWN RISK

midi-converter's People

Contributors

41pha1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

midi-converter's Issues

this code can use commercially?

This is the highest quality synthesia to midi converter I've ever seen. I want to modify this code and use it commercially. Is it possible? There is no license notice, so i ask. If there is a license, pls tell me what is license. thx

Cannot Open Video

Is there a cmd I can do to run one of the downloaded videos from the file, because it won't open some files, I believe because it has a different name in the folder than on yt (due to special characters being removed).

separate hand channels

It would be really useful if the notes are written to different midi channels depending on the color:
image
Right now everything in the output midi is in channel/track 0

left hand white key: #5279a1
left hand black key: #2d558b
right hand white key: #6bb826
right hand black key: #4b8914

But the colors could be different in some videos so I suggest adding a cli option or auto-detecting it

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.