Skip to main content

Exporting

Although the bellplay~ graphical user-interface (GUI) allows us to export the final output of each script, it's sometimes useful being able to programmatically do the same through our scripts. This tutorial shows how to do this for audio and MIDI files.

exporting.bell
## generate a 1-second buffer of white noise and transcribe
noise(@duration 1000).transcribe(@pan 0 1);
## trigger rendering
render(@play 1);
## this assumes you have a folder named Documents in your home directory
$audiopath = '~/Documents/myfile.wav';
$midipath = '~/Documents/myfile.mid';
## export rendered buffer
export($audiopath);
## export each buffer channel individually
export($audiopath @stems 1);
## export transcription as MIDI
export($midipath)