Auto-accompainment with Scamp, an example piece

I am experimenting with “live-composing” using Akai LPK 25 as midi input and auto-accompainment through an algorithm I have developed. Scamp is used to play live the input and auto-accompainment. The result is written in midi and later processed in MuseScore.

Here is a piece with one voice played by different instruments in canon, so to say:




Nice! Are you willing to post some of the code?

Hi Marc,
Please find attached the source code for this.

  1. will create a knn-model and dump it in the folder knn_models.
  2. will need a midi-keyboard as input and a configuration file.
    Probably you will need to install a few libraries with “pip install”.
    It runs on ubuntu with python 3.6 and sagemath 9.0 (sudo apt-get install sagemath)
    To run the scripts run:
    sage scamp-piano-configurations/cello-conf-loop-3.yaml
    You could however want to change the weights and produce a new knn-model-file. In this case:
    The meaning of the weights is described here: Measuring note similarity with positive definite kernels

Here are the scripts and folders:

In case you use github: