Webern v0.1.0 Webern.Matrix View Source
Models a matrix built from a Webern.Row
N.B. Although the main functionality for matrix creation is
defined in this module, the Webern
module provides a more user-friendly
interface, and it is recommended to use the functions defined there for
your own work.
to_string/1
The Webern.Matrix
implementation of the Strings.Char
protocol maps
to_string/1
over the ordered prime rows of the matrix and joins them
together with new lines. See Webern.Row
for details.
to_lily/1
The Webern.Matrix
implementation of Webern.Lilypond
embeds all 60
possible transformations of the original row (primes, retrogrades, inverses,
retrograde inverses, and inverse retrogrades), each labeled, into a
Lilypond document that can be saved to a file and compiled.
Link to this section Summary
Functions
Accepts prime_row
, a Webern.Row
, as an initial prime row and returns
a matrix containing the ordered prime rows for generating the 2D tone matrix
Link to this section Types
Link to this section Functions
Accepts prime_row
, a Webern.Row
, as an initial prime row and returns
a matrix containing the ordered prime rows for generating the 2D tone matrix.
##Example
iex> row = Webern.Row.new([0, 2, 1, 3, 4, 6, 5, 7, 8, 10, 9, 11])
iex> matrix = Webern.Matrix.new(row)
iex> length(matrix.primes)
12
iex> List.first(matrix.primes) == row
true
iex> List.last(matrix.primes)
%Webern.Row{
pitch_classes: [11, 1, 0, 2, 3, 5, 4, 6, 7, 9, 8, 10]
}