Title: | Tools for 12-Tone Musical Composition |
---|---|
Description: | Functions for creating and manipulating 12-tone (i.e., dodecaphonic) musical matrices using Arnold Schoenberg's (1923) serialism technique. This package can generate random 12-tone matrices and can generate matrices using a pre-determined sequence of notes. |
Authors: | Jeffrey A. Dahlke <[email protected]> |
Maintainer: | Jeffrey A. Dahlke <[email protected]> |
License: | GPL (>= 3) |
Version: | 2.0.3 |
Built: | 2025-02-21 02:43:28 UTC |
Source: | https://github.com/jadahlke/schoenberg |
Print methods for schoenberg output objects with classes exported from schoenberg.
x |
Object to be printed (object is used to select a method). |
... |
Additional arguments. |
Re-express a "schoenberg" class object with a different lead tone or different notation of accidentals.
rekey(tone_mat, tone0 = NULL, accidentals = NULL)
rekey(tone_mat, tone0 = NULL, accidentals = NULL)
tone_mat |
Object of the class "schoenberg" produced by the |
tone0 |
Optional: Name of the note to use as the lead tone of the matrix. |
accidentals |
Optional: Character scalar that determines whether accidentals should be represented as sharps ( |
A 12-tone matrix of the "schoenberg" class with prime series on the rows and inverted series on the columns.
# Let's create a vector of notes to use in creating our inital 'tone_mat' matrix based # on Schoenberg's Walzer from Opus 23 prime01 <- c("C#", "A", "B", "G", "Ab", "F#", "A#", "D", "E", "Eb", "C", "F") tone_mat <- schoenberg(prime0 = prime01) # Now, let's change the lead tone to "C": rekey(tone_mat = tone_mat, tone0 = "C") # And let's also change the accidentals to flats: rekey(tone_mat = tone_mat, tone0 = "C", accidentals = "flats")
# Let's create a vector of notes to use in creating our inital 'tone_mat' matrix based # on Schoenberg's Walzer from Opus 23 prime01 <- c("C#", "A", "B", "G", "Ab", "F#", "A#", "D", "E", "Eb", "C", "F") tone_mat <- schoenberg(prime0 = prime01) # Now, let's change the lead tone to "C": rekey(tone_mat = tone_mat, tone0 = "C") # And let's also change the accidentals to flats: rekey(tone_mat = tone_mat, tone0 = "C", accidentals = "flats")
Generate a 12-tone matrix using Arnold Schoenberg's serialism technique.
schoenberg(prime0 = NULL, tone0 = NULL, accidentals = NULL, seed = NULL)
schoenberg(prime0 = NULL, tone0 = NULL, accidentals = NULL, seed = NULL)
prime0 |
Optional: Vector of notes or numeric note indices to use in forming the matrix.
If the vector is numeric, the values must span from 0 - 11, where 0 is the lead tone (unless |
tone0 |
Optional: Name of the note to use as the lead tone of the matrix. |
accidentals |
Optional: Character scalar that determines whether accidentals should be represented as sharps ( |
seed |
Optional: Seed value to use in generating random matrices. Set this to a numeric value when matrices need to be reproducible. |
A 12-tone matrix of the "schoenberg" class with prime series on the rows and inverted series on the columns.
Schoenberg, A. (1923). Fünf klavierstücke [Five piano pieces], Op. 23, Movement 5: Walzer. Copenhagen, Denmark: Wilhelm Hansen.
#### Generating Random 12-Tone Matrices #### # The schoenberg() function can generate completely random 12-tone matrices: schoenberg() # Or you can specify a seed value so that your matrices are reproducible: schoenberg(seed = 42) #### Generating 12-Tone Matrices From a Specified Vector of Notes #### # For illustration, let's create two equivalent vectors of note information # for Schoenberg's first 12-tone serialist work: Walzer from Opus 23. # First, let's create one vector with note labels: prime01 <- c("C#", "A", "B", "G", "Ab", "F#", "A#", "D", "E", "Eb", "C", "F") # Next, let's create an equivalent vector using numeric indices instead of notes: prime02 <- c(1, 9, 11, 7, 8, 6, 10, 2, 4, 3, 0, 5) # Now, let's generate a 12-tone matrix from our note-based vector: schoenberg(prime0 = prime01) # And let's generate a matrix from our number-based vector: schoenberg(prime0 = prime02) # Schoenberg used a mix of sharps and flats in his notation, wich lost in translation with the # numeric-index approach. Let's re-create our note-based matrix using only sharps: schoenberg(prime0 = prime01, accidentals = "sharps") # These two approaches produce identical outputs: all(schoenberg(prime0 = prime01, accidentals = "sharps") == schoenberg(prime0 = prime02)) # Matrices can also be generated with flat notation by setting accidentals to "flats": schoenberg(prime0 = prime01, accidentals = "flats") schoenberg(prime0 = prime02, accidentals = "flats") # As before, these two approaches produce identical outputs: all(schoenberg(prime0 = prime01, accidentals = "flats") == schoenberg(prime0 = prime02, accidentals = "flats")) # We can also manipulate the output of the schoenberg() function # so that the lead tone of the matrix is a particular note. # This works with either note-based or number-based input vectors: schoenberg(prime0 = prime01, tone0 = "C", accidentals = "sharps") schoenberg(prime0 = prime02, tone0 = "C") # And, as before, these two approaches produce identical outputs: all(schoenberg(prime0 = prime01, tone0 = "C", accidentals = "sharps") == schoenberg(prime0 = prime02, tone0 = "C"))
#### Generating Random 12-Tone Matrices #### # The schoenberg() function can generate completely random 12-tone matrices: schoenberg() # Or you can specify a seed value so that your matrices are reproducible: schoenberg(seed = 42) #### Generating 12-Tone Matrices From a Specified Vector of Notes #### # For illustration, let's create two equivalent vectors of note information # for Schoenberg's first 12-tone serialist work: Walzer from Opus 23. # First, let's create one vector with note labels: prime01 <- c("C#", "A", "B", "G", "Ab", "F#", "A#", "D", "E", "Eb", "C", "F") # Next, let's create an equivalent vector using numeric indices instead of notes: prime02 <- c(1, 9, 11, 7, 8, 6, 10, 2, 4, 3, 0, 5) # Now, let's generate a 12-tone matrix from our note-based vector: schoenberg(prime0 = prime01) # And let's generate a matrix from our number-based vector: schoenberg(prime0 = prime02) # Schoenberg used a mix of sharps and flats in his notation, wich lost in translation with the # numeric-index approach. Let's re-create our note-based matrix using only sharps: schoenberg(prime0 = prime01, accidentals = "sharps") # These two approaches produce identical outputs: all(schoenberg(prime0 = prime01, accidentals = "sharps") == schoenberg(prime0 = prime02)) # Matrices can also be generated with flat notation by setting accidentals to "flats": schoenberg(prime0 = prime01, accidentals = "flats") schoenberg(prime0 = prime02, accidentals = "flats") # As before, these two approaches produce identical outputs: all(schoenberg(prime0 = prime01, accidentals = "flats") == schoenberg(prime0 = prime02, accidentals = "flats")) # We can also manipulate the output of the schoenberg() function # so that the lead tone of the matrix is a particular note. # This works with either note-based or number-based input vectors: schoenberg(prime0 = prime01, tone0 = "C", accidentals = "sharps") schoenberg(prime0 = prime02, tone0 = "C") # And, as before, these two approaches produce identical outputs: all(schoenberg(prime0 = prime01, tone0 = "C", accidentals = "sharps") == schoenberg(prime0 = prime02, tone0 = "C"))