Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 16, 2025. It is now read-only.
/ cm-svg Public archive

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

This Repository is deprecated!

The cm-svg repository has been completely integrated into Clamps and is developed there. The archive here is kept only for historical reasons. This archive will not receive further updates or patches. Issues and pull requests will not be looked at here either, please submit your patches and issue tickets on the Clamps repository on Codeberg, or send them directly via good old email patches to the author.

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