GithubHelp home page GithubHelp logo

vid2midi's Introduction

vid2midi

Converts video signals to musical notation.

Requires OpenCV, Mido and tqdm.

Usage

vid2midi [-h] [-s {small,medium,large}] [-o {1,3,7}] [-c {mono,all}] filename

-h, --help, show this help message and exit -s, --size {small,medium,large}, size of the sample area -o, --octaves {1,3,7}, octave range of resulting notes -c, --colors {mono,all}, color range to measure

Notes

It works by grabbing a square in the center of the video file, blurring it, and averaging the hue or brightness values of the contained pixels. Iterating each frame of the movie file, it looks for a value that is consistent for at least 5 frames. If it is, a note is generated corresponding to 1, 3, or 7 octaves of the chromatic scale. Brighter areas or purple produce higher notes.

Why is this useful?

When soundtracking videos in a Digital Audio Workstation such as Reaper, Ableton, or Reason, it is useful to have a timing track that corresponds to the video to match the timing of scene changes. As a creative tool it is the reverse of visualizing audio. Instead of generating audio reactive animation, this allows for creating a video first, without a soundtrack. Then you can make music or sounds that match the tempo and feel of the visuals.

vid2midi's People

Contributors

lucidbeaming avatar

Stargazers

 avatar  avatar

Watchers

 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.