SonicWeave is a Domain Specific Language for manipulating musical frequencies, ratios and equal temperaments.
Not to be confused with the Sweave flexible framework for mixing text and R code for automatic document generation.
The sonic-weave
package is many things.
.swi
)You may also be interested in the technical overview of SonicWeave as a programming language.
Harmonic segment from the 8th harmonic to the 16th (repeating at the octave).
8::16
10-tone equal temperament
tet(10)
The major scale in Pythagorean tuning i.e. 3-limit just intonation.
sort(3^[-1..5] rdc 2)
Scale title, colors and labels.
"Japanese pentatonic koto scale, theoretical. Helmholz/Ellis p.519, nr.110"
9/8 white "Major 2nd"
6/5 green "Minor 3rd"
3/2 white "Perfect 5th"
8/5 green "Minor 6th"
2 gray "Root & Octave"
SonicWeave looks like Javascript with Python semantics, has Haskell ranges and operates similar to xen-calc with some Zig sprinkled on top.