- Emacs Lisp 63.1%
- Common Lisp 31.7%
- Shell 3.3%
- Python 1.9%
| emacs.d | ||
| inkscape-play-selection | ||
| .gitignore | ||
| clamps-install.sh | ||
| clamps-shallow-install.sh | ||
| clampsinit.lisp | ||
| clean.sh | ||
| fomus | ||
| fomus-linux | ||
| fomus-osx | ||
| incudinerc | ||
| quicklisp.lisp | ||
| README.org | ||
| sbclrc | ||
clamps-install
Scripts for the installation of clamps on Linux or OSX. The Preparation is different for Linux or OSX. After the Preparation, the Install script is the same for both Operating Systems.
Preparation
Preparation on Gnu/Linux
Dependencies
Below are the dependencies for clamps on Linux.
Debian/Ubuntu
IMPORTANT NOTE: These dependencies are not using pipewire in the audio configuration! Check what audio system your installation uses and adapt the jack packages accordingly if your installation uses pipewire.
sudo apt update && sudo apt install libjack-jackd2-dev libportmidi-dev libsndfile-dev libfftw3-dev libgsl-dev libfluidsynth-dev liblilv-dev jackd2 qjackctl pulseaudio-module-jack a2jmidid emacs inkscape python3-pip sbcl git lilypond
Arch Linux
IMPORTANT NOTE: These dependencies are not using pipewire in the audio configuration! Check what audio system your installation uses and adapt the jack packages accordingly if your installation uses pipewire.
sudo pacman -y && sudo pacman -Sy emacs jack2 pulseaudio-jack a2jmidid sbcl git lilypond inkscape python-pip jack2 portmidi libsndfile fftw gsl fluidsynth lilv
Other Linux distributions
Make sure you have installed the following programs using the package manager of your Linux Distribution or compile them from scratch:
- Gnu Emacs
- Jack
- SBCL
- git
- LilyPond (optional)
- Inkscape (optional)
- pip for python3 (optional, called python-pip on Arch Linux)
In addition make sure, you have all incudine dependencies (listed on the incudine website) installed:
- jack2 library
- portmidi library
- libsndfile
- fftw3 library
- gsl library
- fluidsynth library (optional)
- lilv library (optional)
Testing Lilypond output
With clamps running, evaluate the following command in the REPL:
clamps> (events (new sfz :time 0) "/tmp/test.ly)
If the pdf viewer opens after a while displaying a Middle C quarter note in a staff system, the configuration works.
Testing the Inkscape Playing extension
- Open Inkscape and check, whether the "Extensions" Menu shows the entry "Play Selection"
Preperation on Apple OSX
Prerequisites
Emacs
Download GNU Emacs by clicking on the "Download" button on this page:
and follow the installation instructions. Make sure to put the "Emacs" application into the "Applications folder of your Mac.
Inkscape
Download Inkscape from this page
https://inkscape.org/release/1.3.2/mac-os-x/
and follow the installation instructions.
IMPORTANT NOTE: Make sure to put the installed application into the "Applications" folder on your Mac!
Jack and Qjackctl
Download the latest jack package from here:
https://jackaudio.org/downloads/
Use the "Universal Installer"
When installing, make sure to put the "Qjackctl" application into the "Applications" folder of your Mac.
Add Terminal to the Full Disk Access List in the System Settings of OSX.
- Go to apple logo in top left corner
- Click on system settings
- Scroll down and click on Privacy and Security in the left tab
- Under Privacy Click on Full Disc Access
Dependencies
- Brew Install Brew by downloading Homebrew-<version>.pkg from this page (Listed under "Assets") and installing it by doubleclicking the downloaded .pkg file: https://github.com/Homebrew/brew/releases/latest
-
Git
After a successful install of brew you can install git by typing
brew install gitinto a Terminal and finish it with the return key.
-
Incudine dependencies:
Install all incudine dependencies by typing the following lines into a Terminal and press the return key after each line.
brew install portmidi brew install libsndfile brew install gsl brew install fftw brew install fluidsynth brew install lilv
Installation of Clamps
Preparation
-
Open a Terminal and issue
cd /tmp git clone https://github.com/ormf/clamps-install.git cd clamps-install
IMPORTANT NOTE: Before calling the installation command, make sure, the files and folders affected by the installation mentioned above are backed up and moved out of the way as the installation will abort in case any of the files/folders exist.
If you are sure, the files and folders can be removed safely, you can explicitely remove them with the command
sh clean-osx.sh
- Start the clamps installation by issuing the following command
in a Terminal:
sh clamps-install-osx.shAfter some minutes, the process in the terminal prints the message "installation successful". - Start Jack using the "Qjackctl" application in the Application directory. Make sure, jack is up and running before continuing!
-
Start the Emacs Application from the Application directory
cl-user> (ql:quickload :clamps)This command will take a couple of minutes at the first time as all required packages have to get downloaded and compiled.
If everything worked without errors, issuing the following command should initialize the midi ports, start dsp processing and the GUI server.
cl-user> (clamps)If that worked as well, use the following command to play a Flute Middle C for 1 second using the outputs of Jack.
clamps> (output (new sfz))
Post Installation
Testing Lilypond output
With clamps running, evaluate the following command in the REPL:
clamps> (events (new sfz :time 0) "/tmp/test.ly")
If the pdf viewer opens after a while displaying a Middle C quarter note in a staff system, the configuration works.
Testing the Inkscape Playing extension
- Open Inkscape and check, whether the "Extensions" Menu shows the entry "Play Selection"
Fresh Installation (Linux and OSX)
This installation method installs everything necessary to run clamps in Emacs. For an installation into a system already running Emacs/sbcl/quicklisp, see /ormf/clamps-install/src/branch/main/Installation%20into%20a%20working%20Lisp%20Setup below.
Using the command for a fresh install automates the following steps:
- Emacs Configuration
Install the contents of
emacs.dof the repository into$HOME/.emacs.d - Miscellaneous config files
Copy the following files from the repo into the user's
$HOMEfolder:incudinercto$HOME/.incudinercsbclrcto$HOME/.sbclrcfomus-linuxorfomus-osxto$HOME/.fomuscminit.lispto$HOME/.cminit.lisp - Quicklisp
Quicklisp will be installed into its default location
$HOME/quicklispand the file$HOME/.sbclrcupdated to always load quicklisp on sbcl startup. - Local Quicklisp Packages
The following local Quicklisp Packages will be downloaded and
installed:
$HOME/quicklisp/local-projects/incudine$HOME/quicklisp/local-projects/cm$HOME/quicklisp/local-projects/fomus$HOME/quicklisp/local-projects/ats-cuda$HOME/quicklisp/local-projects/clamps
Preparation
-
Open a terminal and issue
cd /tmp git clone https://github.com/ormf/clamps-install.git cd clamps-install
Installation commands
IMPORTANT NOTE: Before calling the installation command, make sure, the files and folders affected by the installation mentioned above are backed up and moved out of the way as the installation will abort in case any of the files/folders exist.
If you are sure, the files and folders can be removed safely, you can explicitely remove them with the command
sh clean.sh
Be aware that this command silently and irrevocably removes all files and folders including $HOME/quicklisp without warning!
-
The fresh installation is done with the command
bash clamps-install.shThis will take a couple of minutes.
On OSX you will be prompted for a password during the installation process.
If everything worked without errors, Emacs should be started at the end of the process and should show a window split in half with a Common Lisp REPL in the lower half.
Proceed with /ormf/clamps-install/src/branch/main/Testing%20the%20Installation.
Installation into a working Lisp Setup
There is no straightforward way to install into a working Lisp Setup, as it is unclear, whether incudine has been installed/configured, etc. For the installation, it is assumed that emacs, sly, sbcl and quicklisp have already been installed on the system, otherwise install the required packages.
Then follow these steps:
-
Move the following packages out of the way in case they exist:
- $HOME/quicklisp/local-projects/incudine
- $HOME/quicklisp/local-projects/clamps
- $HOME/quicklisp/local-projects/ats-cuda
- $HOME/quicklisp/local-projects/
-
Move the following files/folders out of the way in case they exist:
$HOME/.incudinerc$HOME/.sbclrc$HOME/.fomus$HOME/.cminit.lisp$HOME/.emacs.d
- Then issue the following command in a Terminal:
cd /tmp/clamps-install && sh clamps-shallow-install.sh - Merge the emacs configuration in ~/emacs.d/init.el with your old configuration according to your preferences.
Testing the Installation
- Start jackd (e.g. using qjackctl) until it is showing "active" or "running".
- Start Emacs and input the following in the REPL:
cl-user> (ql:quickload :clamps)
This command will take a couple of minutes at the first time as all required packages have to get downloaded and compiled.
If everything worked without errors, issuing the following command should initialize the midi ports, start dsp processing and the GUI server.
cl-user> (clamps)
If that worked as well, use the following command to play a Flute Middle C for 1 second using the outputs of Jack.
clamps> (output (new sfz))
Testing Lilypond output
With clamps running, evaluate the following command in the REPL:
clamps> (events (new sfz :time 0) "/tmp/test.ly")
If the pdf viewer opens after a while displaying a Middle C quarter note in a staff system, the configuration works. Testing
Testing the Inkscape Playing extension
Open Inkscape and check, whether the “Extensions” Menu shows the entry “Play Selection”