Teaching AI to Write Melodies

This blog documents the process of teaching an AI system to generate melodies from the Skiptune database. Expect experiments, mistakes, and occasional surprises, and at the end expect melodies that sound as if a human wrote them.

  • Hashing Intro

    Hashing is a technique by which data are compressed into a fixed-size value that can be compared quickly.  Invented in the 1950s to access data stored on early computers, it allowed programmers to avoid having to search for a name sequentially, one at a time, a slow and inefficient searching strategy.   For example, if

    Continue reading

  • Fixing the “Rest” Issue

    We recognized that our coding of rests as zeroes presented searching errors relatively early, but we put off thinking about a solution off until we needed to finalize the database in preparation for machine learning. We had several options to solve it. The first was as follows: Construct another string of numbers that parallels each

    Continue reading

  • Finalizing the Database

    We’ve been putting off a needed correction to the database that we can no longer delay because training any AI model without this correction would be impossible.  When we were deciding how to encode melodies written with standard Western music notation, encoding the notes as their numerical MIDI values was an easy (and correct) decision.

    Continue reading

  • The Plan for AI — An Introduction

      When Skiptune was started at the turn of the last century, machine learning was rudimentary and artificial intelligence (AI) was limited to such accomplishments as turning speech into text.  Accuracy was 85 to 95 percent, which means 10 mistakes every 100 words.  Face detection was limited to detecting a face, but not identifying it.

    Continue reading