Giter Site home page Giter Site logo

harmonicaccompaniment's Introduction

Real Time Harmonic Accompaniment

The written code here takes as an input a melody played by a user and outputs chordal accompaniment to fit the melody in real time. That is, as the user is playing a melody on a MIDI keyboard, harmonic accompaniment is automatically generated to fit the melody. The algorithm improves as the user continues playing, though it is still limited in the number of states available. Only the standard I to VII chords are considered, though the project is readily expandable to accomodate additional states.

Training

MATLAB code was generated to create 200 melodies: each melody consists of anywhere between 200-400 notes. These melodies followed a few simple rules and so some of the results later achieved were expected, however, if the training data was instead a scraping of MIDI files, results could be improved. There were libraries utilized in MATLAB that faciliated conversion of MIDI to matrix array format.

Following this, the data was read into the Java code using the JAHMM library. This generates a trained Hidden Markov Model.

Generation

The Hidden Markov Model, then, allows us to within some accuracy predict successive chords based on previous chords, as well as the note in the melody that is currently being played. By navigating through the available states, then matching against state transition variables, such transitions were decided.

harmonicaccompaniment's People

Contributors

mmscibor avatar denivanov avatar

Watchers

John D. Pope 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.