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:

score:

https://drive.google.com/file/d/1WoEhBKigax0nY19qQwt4sH5YP-6fTf1o/view?usp=sharing

audio:

2 Likes

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

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

  1. compute_knn_model.py will create a knn-model and dump it in the folder knn_models.
  2. scamp-piano.py 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.py 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:
    sage compute_knn_model.py
    The meaning of the weights is described here: Measuring note similarity with positive definite kernels

Here are the scripts and folders:

https://drive.google.com/drive/folders/18vfohb45btY4lqmAP03xwGmvF59XJJzD?usp=sharing

In case you use github: