-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#641) Removed last remaining _repr_specification references.
This closes with #641.
- Loading branch information
1 parent
684598f
commit 514ec35
Showing
41 changed files
with
511 additions
and
603 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#! /usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import abjad | ||
|
||
|
||
if __name__ == '__main__': | ||
from abjad import show | ||
from abjad.demos import bartok | ||
lilypond_file = bartok.make_bartok_score() | ||
show(lilypond_file) | ||
lilypond_file = abjad.demos.bartok.make_bartok_score() | ||
abjad.show(lilypond_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
#! /usr/bin/env python | ||
import abjad | ||
|
||
|
||
if __name__ == '__main__': | ||
from abjad import show | ||
from abjad.demos import desordre | ||
lilypond_file = desordre.make_desordre_lilypond_file() | ||
show(lilypond_file) | ||
lilypond_file = abjad.demos.desordre.make_desordre_lilypond_file() | ||
abjad.show(lilypond_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
import abjad | ||
import math | ||
from abjad.tools import indicatortools | ||
from abjad.tools import scoretools | ||
from abjad.tools import spannertools | ||
from abjad.tools.topleveltools import attach | ||
from abjad.tools.topleveltools import select | ||
|
||
|
||
def make_desordre_cell(pitches): | ||
'''The function constructs and returns a *Désordre cell*. | ||
`pitches` is a list of numbers or, more generally, pitch tokens. | ||
'''Makes a Désordre cell. | ||
''' | ||
|
||
notes = [scoretools.Note(pitch, (1, 8)) for pitch in pitches] | ||
beam = spannertools.Beam() | ||
attach(beam, notes) | ||
slur = spannertools.Slur() | ||
attach(slur, notes) | ||
clef = indicatortools.Dynamic('f') | ||
attach(clef, notes[0]) | ||
dynamic = indicatortools.Dynamic('p') | ||
attach(dynamic, notes[1]) | ||
notes = [abjad.Note(pitch, (1, 8)) for pitch in pitches] | ||
beam = abjad.Beam() | ||
abjad.attach(beam, notes) | ||
slur = abjad.Slur() | ||
abjad.attach(slur, notes) | ||
clef = abjad.Dynamic('f') | ||
abjad.attach(clef, notes[0]) | ||
dynamic = abjad.Dynamic('p') | ||
abjad.attach(dynamic, notes[1]) | ||
|
||
# make the lower voice | ||
lower_voice = scoretools.Voice(notes) | ||
lower_voice = abjad.Voice(notes) | ||
lower_voice.name = 'RH Lower Voice' | ||
command = indicatortools.LilyPondCommand('voiceTwo') | ||
attach(command, lower_voice) | ||
command = abjad.LilyPondCommand('voiceTwo') | ||
abjad.attach(command, lower_voice) | ||
n = int(math.ceil(len(pitches) / 2.)) | ||
chord = scoretools.Chord([pitches[0], pitches[0] + 12], (n, 8)) | ||
articulation = indicatortools.Articulation('>') | ||
attach(articulation, chord) | ||
chord = abjad.Chord([pitches[0], pitches[0] + 12], (n, 8)) | ||
articulation = abjad.Articulation('>') | ||
abjad.attach(articulation, chord) | ||
|
||
# make the upper voice | ||
upper_voice = scoretools.Voice([chord]) | ||
upper_voice = abjad.Voice([chord]) | ||
upper_voice.name = 'RH Upper Voice' | ||
command = indicatortools.LilyPondCommand('voiceOne') | ||
attach(command, upper_voice) | ||
command = abjad.LilyPondCommand('voiceOne') | ||
abjad.attach(command, upper_voice) | ||
|
||
# combine them together | ||
container = scoretools.Container([lower_voice, upper_voice]) | ||
container = abjad.Container([lower_voice, upper_voice]) | ||
container.is_simultaneous = True | ||
|
||
# make all 1/8 beats breakable | ||
leaves = select(lower_voice).by_leaf() | ||
leaves = abjad.select(lower_voice).by_leaf() | ||
for leaf in leaves[:-1]: | ||
bar_line = indicatortools.BarLine('') | ||
attach(bar_line, leaf) | ||
bar_line = abjad.BarLine('') | ||
abjad.attach(bar_line, leaf) | ||
|
||
return container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
# -*- coding: utf-8 -*- | ||
import abjad | ||
from abjad.tools import documentationtools | ||
from abjad.demos.desordre.make_desordre_pitches import make_desordre_pitches | ||
from abjad.demos.desordre.make_desordre_score import make_desordre_score | ||
|
||
|
||
def make_desordre_lilypond_file(): | ||
'''Makes Désordre LilyPond file. | ||
''' | ||
|
||
pitches = make_desordre_pitches() | ||
score = make_desordre_score(pitches) | ||
pitches = abjad.demos.desordre.make_desordre_pitches() | ||
score = abjad.demos.desordre.make_desordre_score(pitches) | ||
lilypond_file = documentationtools.make_ligeti_example_lilypond_file(score) | ||
return lilypond_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
import abjad | ||
from abjad.tools import mathtools | ||
from abjad.tools import scoretools | ||
from abjad.tools.topleveltools import inspect_ | ||
|
||
|
||
def make_desordre_measure(pitches): | ||
'''Makes a measure composed of *Désordre cells*. | ||
`pitches` is a list of lists of number (e.g., [[1, 2, 3], [2, 3, 4]]) | ||
The function returns a measure. | ||
Returns a measure. | ||
''' | ||
|
||
for sequence in pitches: | ||
container = abjad.demos.desordre.make_desordre_cell(sequence) | ||
time_signature = inspect_(container).get_duration() | ||
time_signature = mathtools.NonreducedFraction(time_signature) | ||
time_signature = abjad.inspect_(container).get_duration() | ||
time_signature = abjad.NonreducedFraction(time_signature) | ||
time_signature = time_signature.with_denominator(8) | ||
measure = scoretools.Measure(time_signature, [container]) | ||
measure = abjad.Measure(time_signature, [container]) | ||
|
||
return measure | ||
return measure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
# -*- coding: utf-8 -*- | ||
import abjad | ||
from abjad.tools import scoretools | ||
|
||
|
||
def make_desordre_staff(pitches): | ||
r'''Makes Désordre staff. | ||
''' | ||
|
||
staff = scoretools.Staff() | ||
staff = abjad.Staff() | ||
for sequence in pitches: | ||
measure = abjad.demos.desordre.make_desordre_measure(sequence) | ||
staff.append(measure) | ||
return staff | ||
return staff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.