Giter Site home page Giter Site logo

video-to-midi's Introduction

video-to-midi

Detect virtual piano keys in a video and convert the changes to a midi file

piano video screenshot with detection points in purple piano video screenshot with detection points in purple

How to make a capture

  • Clone the repo or download the zip
  • Make sure you have NodeJS 16+ installed
  • Install the dependencies by running the command in the root of the folder in your terminal: npm install
  • Open the index.ts file and set the song duration (should be more than the song length. eg: 4.5 minutes => 5) calibration instructions
  • Set the video playback speed to 0.25 calibration instructions
  • Start the program: npm start
  • Calibrate the piano keyboard: calibration instructions
    1. While keeping the terminal focused
    2. Hover over the top of left most key on the keyboard and press enter
    3. Hover over the top of the right most key on the keyboard and press enter
    4. Hover over the top of the C4 (do) key and press enter
  • Enter how many keys are on the keyboard. Usually somewhere around or less than 72
  • The capture has started, start the video
  • Do not use the computer until the video has done capturing and the console shows: File song.mid written to disk
  • It uses the screen colors to detect the pressed keys

video-to-midi's People

Contributors

bertyhell avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  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.