Icon

01_​Preprocessing

Preprocess Midi Files

This workflow reads some midi files and first extracts the notes, duration, and offset for each note. Next it performs some data clearning and creates semi overlapping sequences to train an RNN to generate new music.


To execute this workflow:
1. Download the midi files from this GitHub Repository
https://github.com/hedonistrh/bestekar/tree/master/midi_files/classic/schumann
2. Change the path in the List Files / Folders node, to point to the folder including the downloaded midi files


Step 1: Read midi file and extract notes, duration and offset using music21 Step 2: Data cleaning and preprocessing Step 3: Create semi-overlapping input and target sequences for notes, duration, and offset difference To execute this workflow you need a conda environment with keras, music21,and tensorflow-mkl. This Conda Environment Propagation node creates a newenvironment with all necessary packages to execute this workflow. Read midi fileand extract notes, duration and offsetGet pathsof midi filesPlease donwload the midi files and update the path to the folder including the midi fileshttps://github.com/hedonistrh/bestekar/tree/master/midi_files/classic/schumannApply notesdictionary Lag 101Top: NotesCreates a Conda EnvTop: DurationBottom: OffsetDiffLag 101Lag 101One song periterationOne songper iterationRemove iterationnumberSave musicin raw table formatSave dictionarySave training setCreate start tokensRead music in raw table format Python Source List Files/Folders Chords to notes CalculateRelativeOffset Duration to number Cell Replacer Lag Column Column Splitter Conda EnvironmentPropagation Resort Columns Column Splitter Lag Column Resort Columns Lag Column Resort Columns Column Appender Create inputand target seq Create inputand target seq Create inputand target seq Path to String Table Row ToVariable Loop Start Loop End(deprecated) Loop End(deprecated) Group Loop Start Column Filter Create dictionaryfor notes Table Writer Table Writer Table Writer Table Creator Concatenate Table Reader Step 1: Read midi file and extract notes, duration and offset using music21 Step 2: Data cleaning and preprocessing Step 3: Create semi-overlapping input and target sequences for notes, duration, and offset difference To execute this workflow you need a conda environment with keras, music21,and tensorflow-mkl. This Conda Environment Propagation node creates a newenvironment with all necessary packages to execute this workflow. Read midi fileand extract notes, duration and offsetGet pathsof midi filesPlease donwload the midi files and update the path to the folder including the midi fileshttps://github.com/hedonistrh/bestekar/tree/master/midi_files/classic/schumannApply notesdictionary Lag 101Top: NotesCreates a Conda EnvTop: DurationBottom: OffsetDiffLag 101Lag 101One song periterationOne songper iterationRemove iterationnumberSave musicin raw table formatSave dictionarySave training setCreate start tokensRead music in raw table formatPython Source List Files/Folders Chords to notes CalculateRelativeOffset Duration to number Cell Replacer Lag Column Column Splitter Conda EnvironmentPropagation Resort Columns Column Splitter Lag Column Resort Columns Lag Column Resort Columns Column Appender Create inputand target seq Create inputand target seq Create inputand target seq Path to String Table Row ToVariable Loop Start Loop End(deprecated) Loop End(deprecated) Group Loop Start Column Filter Create dictionaryfor notes Table Writer Table Writer Table Writer Table Creator Concatenate Table Reader

Nodes

Extensions

Links