Skip to content
/ cm-svg Public

Glue code for a svg import/export backend (similar to a piano-roll editor) of Common Music (version 2.12). Also check out cm and related repos here.

Notifications You must be signed in to change notification settings

ormf/cm-svg

Repository files navigation

cm-svg adds a svg backend to cm. It is a seperate package depending on svg-import-export and the common lisp version of Common Music.

Installation

with asdf or quicklisp:

(require 'cm-svg)

with quicklisp:

(ql:quickload "cm-svg")

Example:

(in-package :cm)

(events
 (process
   for keynum in '(60 62 64 65 67)
   output (new midi :time (now) :keynum keynum :duration 0.5)
   wait 0.5)
 "/tmp/test.svg"
 :piano-roll-vis t
 :staff-system-vis t
 :showgrid t
 :x-scale 8)

;;; -> "/tmp/test.svg"

Importing from svg:

(defparameter *myseq* (import-events "/tmp/test.svg" :x-scale 1/8))

Converting to MIDI:

(events
 (import-events "/tmp/test.svg" :x-scale 1/8)
 "test.midi"
 :play nil)

;;; -> "/tmp/test.midi"

When cm-incudine is installed and rts is started the svg file can be played in realtime using midi:

(sprout *myseq*)

Note: cm-svg is not defined as a package on its own. It is evaluated within the :cm package, extending its functionality.

About

Glue code for a svg import/export backend (similar to a piano-roll editor) of Common Music (version 2.12). Also check out cm and related repos here.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published