repl-electric/sonic-pi.el
Emacs running SonicPi
{ "createdAt": "2014-09-25T10:11:46Z", "defaultBranch": "master", "description": "Emacs running SonicPi", "fullName": "repl-electric/sonic-pi.el", "homepage": "", "language": "Emacs Lisp", "name": "sonic-pi.el", "pushedAt": "2024-06-19T16:07:15Z", "stargazersCount": 92, "topics": [ "emacs", "livecoding", "sonic-pi" ], "updatedAt": "2025-11-27T04:38:08Z", "url": "https://github.com/repl-electric/sonic-pi.el"}Sonic Pi for Emacs π=-
Section titled “Sonic Pi for Emacs π=-”A Emacs plugin to enable live coding music in Ruby communicating with SonicPi.
SonicPi (http://sonic-pi.net/) was created by Sam Aaron.

Install
Section titled “Install”Prerequisites:
- A checkout of sonic-pi https://github.com/samaaron/sonic-pi
- The
dashpackage - The
oscpackage - Highlight from EmacsWiki https://www.emacswiki.org/emacs/highlight.el
- SuperCollider
- Ruby 1.9.3+
git clone git@github.com:samaaron/sonic-pi.gitcd sonic-pi && app/server/bin/compile-extensions.rbgit clone git@github.com:repl-electric/sonic-pi.el.git ~/.sonic-pi.elInstall the required packages
M-x package-install dashM-x package-install oscAdd to your emacs init.el
(add-to-list 'load-path "~/.sonic-pi.el/")(require 'sonic-pi)(setq sonic-pi-path "SONIC-PI-INSTALL-DIR/") ; Must end with "/"
;; Optionally define a hook(add-hook 'sonic-pi-mode-hook (lambda () ;; This setq can go here instead if you wish (setq sonic-pi-path "SONIC-PI-INSTALL-DIR/") (define-key ruby-mode-map "\C-c\C-b" 'sonic-pi-stop-all)))Start emacs emacs my-first-sonic-pi.rb
M-x sonic-pi-mode
M-x sonic-pi-jack-in
;;OR if you are already running sonic-pi-server
M-x sonic-pi-connect
;;Send buffer to sonic-pi
C-c C-k