cwelt / Soloist

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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;
      }

About

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

License:GNU General Public License v3.0


Languages

Language:C# 59.7%Language:JavaScript 26.6%Language:HTML 13.6%Language:CSS 0.1%Language:ASP.NET 0.0%