Skip to content

tpllaha/jammy

Repository files navigation

jammy

A musical accompaniment system, trained using Echo State Networks to listen to a leading track (default: guitar) and play along by generating an accompanying track (default: bass).

I wrote this code during my Bachelor Thesis project and I am doing only minor error checking. It was only used for experimental purposes, so it may fail to fulfill even some of the most basic engineering requirements. I have only tried to make it easy to change the network parameters. Long story short, it's still fragile and needs to be used with care.

File structure :

/music/ : main scripts

/music/csv/ : This is where I currently keep all the csv files.

/music/midi/ : This is where I keep midi files

/music/Sample Results/ : samples of melodies produced by the system, visualized using the Music Animation Machine. The top (purple) line is the leading track, the bottom one is the network produced accompanying track.

Prerequisites :

Besides matlab, the tools midicsv and csvmidi are needed to convert between midi and csv files. The script expects csv files created by midicsv. It also outputs csv files, which in turn need to be converted using csvmidi. Main Scripts :

read_mixed_csv.m : Reads the midi information from a csv file (the result of converting the midi file to csv using midicsv) into matlab structures.

music.m : To train the network (file names are hard-coded) All training and testing data should be in 1 file.

continue_run.m : To run the network. In the top rows it is determined which portion of the data will be used as testing data.

noteToVector.m : Converts a midi note (pitch) to a 5 dimensional vector that represents that note. (described in the paper)

durationToVector.m : Converts a midi duration in the representation used by the network (essentially, just applying a logarithmic transform for now)

teachNote.m, teachDur.m : Convert a midi note/duration into the representation of notes used in the output units

select.m : Interprets the network output and selects the next note on the accompanying track. The third argument specifies the type of selection (1 : deterministic, 0: non-deterministic selection)

Limitations :

  1. For each of the 2 instruments the system currently supports only 1 voice (1 line of melody). This means that chords are not yet supported. Whenever chords appear in the train/test data, only the top note is selected.

About

A musical accompaniment system, trained using Echo State Networks to listen to a leading track (default: guitar) and play along by generating an accompanying track (default: bass). The code is what I used for the bachelor thesis and I am doing only minor error checking

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors