If you connect the audio output of the synth to the computer audio in, you can record the result in audacity or similar as a single WAV file, which is convenient when using the sample editor.
Code: Select all
#!/bin/bash
# PlayNotes sends a stream of MIDI notes to a synth for automated sampling
# by Mr_-G-
# 29/08/2015
midiport=$(amidi -l | grep -i Nord | grep -i Stage | cut -d ' ' -f 3) # detect automatically Nord Stage among midi ports
echo $midiport
silence=0.5
gate=1
vel=127
# c1 to c9 in steps of n
for i in {12..108..4};
do
sleep $silence
note=$(printf "%x\n" "$i")
velo=$(printf "%x\n" "$vel")
midi="90 $note $velo"
echo -e "\\e[0;31m\\033[1mNote On : $midi \033[0m"
amidi -p $midiport --send-hex=$midi
sleep $gate
velo=$(printf "%x\n" "0")
midi="90 $note $velo"
echo -e "\\e[1;33m\\033[1mNote Off: $midi \033[0m"
amidi -p $midiport --send-hex=$midi
done
Code: Select all
amidi -l
The variables to tweak are:
silence (the gap betwen played notes, default 0.5 sec)
gate (the number of seconds the note is played, default 1 sec)
vel (the MIDI veolcity value, default 127)
The line
Code: Select all
for i in {12..108..4};
To run it, copy the code above into a text file, save it as 'PlayNotes', make it executable and run it from the folder location in the terminal window by typing:
Code: Select all
./PlayNotes
All commands used in the code should be available in a modern linux distribution.
This comes with no guarantees of any kind, but posted it in the hope that it is useful to others.
Please post any modifications or improvements (and your sample masterpieces too!).