Giter Site home page Giter Site logo

aicomposer's Introduction

AIComposer

How to compile and run the preexisting data file:

  1. Press the Build and Run button in the upper left-hand corner to start the application up.
  2. Under 'File' select 'Open...'.
  3. Open "ResultsDataSet.aicomp" located in the projects folder.
  4. To listen to the playback of a preexisting composition, select it in the table and click 'Play'.
  5. To compose a new piece, enter a number of Genes (20-60 work best) and generations (300-500 work best, BUT take a really long time)
  • Click "COMPOSE".
  • The field will display information as it runs the algorithm.

Note:

'Compose' will not work in a new file because it requires MIDI files formatted in a specific way as input for both Melodic and Chord Progressions.

Controller Classes

  • CompositionController.swift: this contains all of the functions involved with creating music.
  • Two genetic algorithms are implemented:
  • Main theme creation genetic algorithm
  • Composition creation genetic algorithm
  • Also contains methods to generate instrument presets and random names.
  • Has struct definitions for DesiredResults and CompositionWeights

The Music object structure

  • MusicComposition: an complete piece of music with 4 instruments.
  • [MusicPart]: an array consisting of the four instrument melodies
  • [MusicMeasure]: an array of all of the measures in that instrument's part.
  • [MusicNote]: an array of all of the individual notes in each measure. * MusicTimeStamp: a Double representing where in the music sequence the note starts. (1.0 is the length of a quarter note)
    • MIDINoteMessage: the actual MIDI message for the note.
    • channel: UInt8: the MIDI channel number. (0-16)
    • note: UInt8: the MIDI note number. (0-127)
    • velocity: UInt8: the velocity (loudness) of the note. (0-127)
    • releaseVelocity: UInt8: The velocity after the note is released. Always set to 0.
    • duration: Float32: The length of the note in a MIDI sequence.

aicomposer's People

Stargazers

 avatar

Watchers

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