Skip to content

Latest commit

 

History

History
83 lines (61 loc) · 3.12 KB

README.md

File metadata and controls

83 lines (61 loc) · 3.12 KB

Soloist 🎸

🏡 Application Home Page : http://soloist.gear.host

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