Giter VIP home page Giter VIP logo

cwelt / soloist Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 0.0 39.78 MB

.NET C# Web Application for Generating a Solo-Melody Over a Given Midi-Playback & Chord-Progression :notes:

License: GNU General Public License v3.0

C# 59.67% CSS 0.08% JavaScript 26.61% HTML 13.62% ASP.NET 0.01%
csharp genetic-algorithm algorithmic-composition midi dotnet asp-net-mvc5 entity-framework-6 entity-framework repository-pattern unit-of-work-pattern

soloist's Introduction

Soloist ๐ŸŽธ

๐Ÿก Application Home Page : http://soloist.gear.host

๐ŸŽผ Composition Form Page : https://soloist.gear.host/Composition/Compose

Description

Soloist is a web application which generates solo-melodies improvisations over a given playback.

Design Documentation ๐Ÿ“

DesignDiagramSnippet


Further Details ๐ŸŽน

Given a midi-file & a chord-progression as input,
along with other user preferences & constraints,
Soloist analyzes the chord-progression,
generates a new melody over it using a genetic algorithm,
and finally replaces the original melody track in the MIDI file
with the new generated melody.


Try It Yourself! ๐ŸŽต

Click Here to try it out your self: Just select a song, mark your preferences,
hit the submit button, and VWallaaaaa -
your new generated melody would be automatically downloaded as MIDI file. DesignDiagramSnippet

Initial Prototype Sample for Desktop Application ๐ŸŽถ

PrototypeSample

Code Snippet ๐Ÿ‘จโ€๐Ÿ’ป

This appliation implements a genetic algorithm to carry out the composition process.

       private protected override IEnumerable<IList<IBar>> GenerateMelody()
       {
           // get first generatiion 
           PopulateFirstGeneration();

           int i = 0;
           bool terminateCondition = false;

           while (!terminateCondition)
           {
               // update generation counter 
               _currentGeneration++;

               // mix and combine pieces of different individuals 
               Crossover();

               // modify parts of individuals 
               Mutate();

               // rate each individual 
               EvaluateFitness();

               // natural selection 
               SelectNextGeneration();

               // Check if termination conditions are met 
               if (++i == MaxNumberOfIterations || (_candidates.Select(c => c.FitnessGrade).Max() >= CuttingEvaluationGrade))
                       terminateCondition = true;                   
           }
           //...
           // return the result 
           IEnumerable<IList<IBar>> composedMelodies = _candidates
               .OrderByDescending(c => c.FitnessGrade)
               .Select(c => c.Bars);
           return composedMelodies;
      }

soloist's People

Contributors

cwelt avatar

Stargazers

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