Showing posts with label mozart. Show all posts
Showing posts with label mozart. Show all posts

Wednesday, May 2, 2012

Mozart’s Requiem Down Under

Sydney Opera House
M   ozart’s ‘Requiem’ brings a shift in mood—with the terror, the sorrow, and the sheer drama of Life … and Death.”
  — Sydney Symphony, program notes, MAY-2012.

T he performance of Mozart’s Requiem in D minor, K.626, by members of the Sydney Symphony led by [guest] conductor David Zinman challenged our patience last night. The Süssmayr completion of the Requiem is something that many ensembles perform in 57 min or longer, full of pathos. But speeding it up more than 15%, to come in at less than 49 min, is aesthetically not a great idea. Specifically, it’s not a good idea when the acoustic delay of the stage that is more than 14 meters deep from the conductor to the rearmost chorister makes the performers sound as though they are not ‘together’.

A lthough I’ve been in Australia previously, this was the first time I’d heard a performance in the Sydney Opera House… a very warm, responsive hall.

T he vocal parts were ably performed by Jennifer Welch-Babidge, soprano; Fiona Campbell, mezzo-soprano; Paul McMahon, tenor; Paul Whelan, bass; and the Sydney Philharmonia Choirs.

A nd a diverting and expansive pre-concert talk was given by singer and musicologist Natalie Shea, who cued up more than a dozen clips of recordings to illustrate the points she was making.

T o me, I hear this Dies Irae as an ‘appogiatura’ within a Lacrimosa-esque life; or Mozart saying, in full view of his own fast-approaching death, “Life is hard, and then you (and we all—) die.” In that kind of frame of mind, I’m troubled by Robert Levin’s view that Mozart scholar Simon Keefe is asserting that accurately understanding the Requiem necessarily requires an historically-informed sense of context or that late 18th-Century judgments of the work are ‘privileged’ or somehow more valid than anything we might grasp or express. It just seems that the work is more naturally accessible than that. (I do like Levin’s own completion of the Requiem, though—complete with a fugue ending of the Lacrimosa.)

U  nsanctimonious’ to the point of ‘willfulness’... like musically rendering a [personal] prayer, not a Mass.”
  — Natalie Shea, pre-concert remarks, 03-MAY-2012.

T he mystery of how much of the Requiem was Süssmayr’s and how much was Mozart’s will maybe never be resolved. But ultimately, the nature of the piece seems to me to be more individual/idiosyncratic—an individualistic expression of what it is to be mortal; a personal ‘music-of-the-soul’—than requiem-idiomatic or ‘normative’ of what a requiem should be or say.

P .S.—I’m looking forward to the release later this year of Professor Keefe’s new book, which reevaluates the nature of the incomplete manuscript and its context. Keefe covers the history of the work and extensively reviews the accumulated criticism, analysis, and performance practices that pertain to it. Keefe particularly focuses on the autograph score and on Franz Süssmayr’s 1792 completion, which is the one that the Sydney Symphony and Philharmonia Choirs performed tonight. Keefe recommends that evidence that is confined only to records of Mozart’s life and correspondence and notations in the incomplete manuscript are not enough—understanding the Requiem instead requires broader, hermeneutics-based methods of analysis.

Keefe book

Saturday, October 1, 2011

The Assertive Sonic Self: Anne-Sophie Mutter, on Making Every Note Heard in a Large Hall

Anne-Sophie Mutter
W   orld-class Mozart interpreters will have a carefully worked-out sound world in mind for each piece, and a profound sense of the music’s underlying rhetoric—that is, the language of tension and release that unlocks Mozart’s phrases and allows them to unfold as statements of great eloquence and often subtle but deep emotion... The best argument for playing these works without a conductor is that the soloist and orchestra can communicate directly, without an intermediary.”
  —  Jeremy Eichler, Boston Globe.
A ttended BSO’s opening last night, with Anne-Sophie Mutter performing (and conducting) Mozart violin concertos Nos. 3 and 5 with a ~20-instrument ensemble of BSO members. Admirable in all respects. Her pianissimos were fully audible, and the ensemble had sensitivity and control over its dynamics to let her sound come through.

I n part, the contrast and audibility are a result of the somewhat wider, European-style vibrato that Mutter chooses. Such ‘focus’ and projection of the voice and ‘self’—all that comes from the tiny violin box!

T hese Mozart concertos are wonderful, innocent things—ones that might merit less vibration in a smaller, more intimate venue. But the aesthetic rationale for vibrating more demonstratively in this way is clear, I think—the reason comes from the acoustic requirements of performing in a large hall like this, packed nearly to capacity with people as it was last night. In other words, authenticity in performance is not just faithfulness-to-the-text or appropriate in an historical performance practice sense. It presents a clean and stylistically coherent rendition, and one that takes into account not only the dialogue with the ensemble but also the dialogue with the audience under the conditions and constraints that prevail in the performance space. In this case, the wider-than-usual vibrato was in no way an affective, romanticized conceit, but instead was an accomodation to the realities of the large hall—an accomodation on behalf of us in the audience: Mutter communicating with us directly, as directly as she did with her ensemble colleagues.

M utter’s cadenzas were inspired—fresh as if they were improvised on the spot, and especially beautiful, magical. She makes you believe that the story she is telling is true, a personal fact, and you are the first one she is telling it to. Why we go to hear serious music, performed live.

Violin shoulder pad, yes or no



Monday, March 14, 2011

Robert Levin: Meta-Mozart and Mozart’s Own Experimentalism/Eclecticism

Robert Levin
M   olding the ‘clay’, getting your fingers ‘wet’: discovering how Mozart thought, how he might have written things, how he went about doing what he did. This is inevitably humbling—this improvising cadenzas and whole movements that are missing from his works. But it also enables you to more accurately perform and understand the parts that are not missing; to have a better sense that there are [performance] ‘options’ from which to choose.”
  — Robert Levin, pianist.
I s it ‘creation’ or is it imitation? Honestly, it is both!
  • Mozart – Prelude and Fugue in C, K. 394 (4.0 min; 3.5 min)
  • Mozart – “Adagio variee” K3 Anh. 206a = K6 Anh. A 65 (1.5 min for each of 4)
  • Mozart – Suite “In the style of Handel”, K. 399 [Sarabande completed by R. Levin] (3.5 min; 3.5 min; 2.2 min; 4.3 min; 3.5 min)
  • Mozart – Piano Sonata No. 15 in F, K. 533/494 (26.5 min)
W   hat you hear in this Adagio, K. Anh. A65, are two parts, A and B, composed by Mozart. And for each of these, I have deconstructed them, stripped them down, and created versions, A’ and B’, removing the decorations… to show what might have been.”
  — Robert Levin, pianist.
I n Levin’s improvised material in last evening’s MainlyMozart program in San Diego we get a sense of genuine authenticity in terms of motivic elements, harmonic progressions, modulations, durations that each chord/key prevails until a change is introduced, and so on. Really convincing and wonderful. You don’t necessarily have to have comprehensive (or even ‘adequate’) explanations for the formal structure of Mozart’s music to produce new compositions (or, as Levin is famous for doing, completions of Mozart’s unfinished ones) that have tremendous verisimilitude.

T here is a lot of latitude for interpretation in these pieces—including Levin’s slow, dilated accounts of the first two movements of Sonata in F, K. 533. For example, Schiff, Eschenbach, Uchida, and others turn in Allegro times ranging between 7 min and 9 min, compared to Levin’s 11 min for the Allegro last night. Others’ performances of the Andante range between about 6 min and 10 min, with Levin’s account close to 9 min. And the Rondo Allegretto of this Sonata is, in others’ hands, incredibly varied, ranging from as short as 6 min to 8 min or more; Levin’s tendency toward hyper-masculine emphasis leads him to 6 min 20 seconds with a flourish.
I ’m studying—we all should be studying, like students learning a new language. People study French, German, Italian, Chinese… eventually they become fluent speakers, if they work hard at it. Well, why not think of Mozart as a language, one that must be learned, in a conversational way? I am studying Mozart! I’m just trying to improve my diction—trying to get my ‘accent’ better.”
  — Robert Levin, pianist.
L evin’s remarks remind me of David Cope, composer and professor at UC Santa Cruz, who 20+ years ago created Emmy, a LISP-based software application that produced scores in the style of classical composers. Some time ago Cope decided to sunset Emmy. It has been superceded by a new package, called Emily Howell, another in his suite of computer models of musical creativity.

L iterary theorist Frederic Jameson considers the ‘effacement’ of a personal style and its replacement by ‘pastiche’—not parody as in Bruce Adolphe’s comedic and educational routines but the borrowing and recoding of historical idioms, adopting jargon popularized by others, and repurposing ornaments and decorations that previously held different meanings—as fundamental elements of post-modernism. It is a “celebration of surfaces, which denies the hermeneutics of depth” (Jameson, pp. 64-5.) It’s like speech in a dead language, but speech that is devoid of parody’s ulterior, satiric motives. [Satie and Debussy co-opted and experimented with other styles and did pastiches. Nyman’s book covers some of this history of ‘experimental’ music.]

L evin marveled aloud about the brevity of the fragments that were his starting-materials… conjured the notion of Mozart as a dilettante... abandoning a Gigue in 5 bars; the Sarabande that Levin completed, abandoned by Mozart in 4 bars, just the merest sketch now extant; Mozart becoming very quickly disinterested in the art of fugue, having been goaded into attempting it by his wife.

B ut these idiosyncrasies and peccadillos of Mozart’s become in Levin’s hands a wonderful asset—they serve as a pretext for better understanding the man and the music, or, as many have noted, reviving the art of improvisation and honoring ‘freshness’ and novelty in classical music performance.

W   hat has happened in the last generation or so is that objects—musical scores—have become ‘sacred’. People focus far too much on adhering literally to the notes that are written on the page. It is far better, I believe, to have a sense of responsibility to create something new in performing each work—it needs always to be ‘dangerous’.”
  — Robert Levin, pianist.
R obert Levin studied piano with Louis Martin in New York City, and composition there with Stefan Wolpe. He was invited to study with Nadia Boulanger at the American Conservatory in Fontainebleau, France, and in Paris while still a teenager. He studied composition with Leon Kirchner, and piano with Clifford Curzon, Robert and Jean Casadesus, and Alice Gaultier-Léon. He was appointed head of music theory at the Curtis Institute in 1968, on the recommendation of Rudolf Serkin. Levin’s highly praised Mozart fortepiano concerto series, with Christopher Hogwood and The Academy of Ancient Music, was released in 1994 on the L’oiseau-Lyre label. Levin has been commended especially for his improvised cadenzas, a once-popular performance practice that some have credited him with restoring to tradition. His version of Mozart’s Requiem was premiered in 1991 in Stuttgart at the European Music Festival, conducted by Helmuth Rilling. Since 1993, Levin has been a professor at Harvard, where he serves as a Dwight P. Robinson Jr. Professor of Music Performance & Analysis and Professor of the Humanities.




Sunday, June 7, 2009

Early-Music Aleatorics: Mozart’s Macrogranular Minuet Generator

T    he piece starts with a recognizably Mozartean voice, but as different versions of the minuet are superimposed, the textures become complex and passingly dissonant. Soaring themes, too, and bits of poignancy, rise. There’s much to arrest the ear.”
  —  Scott Cantrell, Dallas Morning News, 21-APR-2006, review of Robert Rodriguez’s ‘Mozart Dice Game’.
A    nleitung:
Walzer oder Schleifer mit 2 Würfeln zu componieren,
ohne Musikalisch zu seyn,
noch von der Composition etwas zu verstehen.”

[Instruction:
To compose a waltz or a schleifer / landler with two dice,
without being musically gifted,
nor knowing anything about composition.]
  —  W.A. Mozart.
S ometime around 1775—when is not known with certainty—Mozart wrote the measures and instructions for a musical compositional method using dice, a table of numbers, and a set of cards. On each card was printed one measure of music and a number to identify that measure. You randomly select from these pre-written measures of music based on rolls of the dice. With each dice roll, you do a table look-up to find out what card (measure) you are to select from the deck. Then you put the cards together to create new Menuets. It was possibly the first [published] algorithmic stochastic composition.

T here are 176 possible Menuet measures and 96 possible Trio measures to choose from. The results of the 32 dice rolls and the pretty large set of pre-written measures give a quite large number of different compositions that could be generated by Mozart’s rules.

B ut there are not 1116 + 616 = 4.6 * 1016 possible compositions as some claim. [My god, there is an error on the internets!]

N or is it 272C32 (176 + 96 things, taken 32 at a time) = 4.6 * 1041 possible menuets.

I nstead, what you have with Mozart’s menuet generator are 1116 * 616 = 1.3 * 1029 possibilities. That’s because his rules specify a menuet as a segmented number (string-vector) comprised of 16 base-11 (undecimal [Babylon5 ‘minbari’]) digits concatenated with 16 base-6 (hexal) digits, where each digit indexes into a separate list of permitted measures. Only members of the specific subset of measures that Mozart enumerated in a given roll’s list are permitted (table column look-ups), not just any from the whole set of all 176 Menuet measures or all 96 Trio measures.

I    f you fail to preserve it [the sequence of 32 numbers from your dice rolls, or the sequence of measures you get], it will be a menuet that will [probabilistically speaking—] never be heard again.”
  —  Martin Gardner, Scientific American, 1970.
 Mozart K. 516f ‘Wurfelspiel’
  • The Menuet section is in the tonic key and the Trio section is in subdominant.
  • Measure numbers are indicated in the top row.
  • Outcome of each dice roll is indicated in the left-most column (2 to 12 for the Menuet roll with two dice; 1 to 6 for the Trio single-die roll).
  • For example, for the first measure (Menuet) if you rolled “snake-eyes” you would play measure #96 of the 176 possible Minuet measures. If in bar 17 (Trio) you rolled a “6” you would play measure #18 of the 96 possible Trio measures.
I n 2005, the Dallas Symphony Orchestra commissioned a ‘new version’ of K. 516f in honor of the 250th anniversary of Mozart’s birthday.

 Robert X. Rodriguez, photo (c) Schexnyder
M    usical Dice Game’ begins with the first solo quartet playing the first half of one minuet; both quartets then join to play all eleven versions of those bars at once; the second solo quartet continues with the second half of the minuet, followed by all eleven versions of those bars, again played by all forces simultaneously. Eleven continuous variations follow, based on the harmonies and principal melodic motifs of the original dice game. I most often used the game’s versions for throwing a five, six, eight, nine or, particularly, a seven. Since, by the laws of probability, those numbers are the most likely to be thrown, they have the most melodically distinctive variants. In the first few variations, the themes and harmonies are given in their simple, original forms; then, as the piece progresses, the minuets are disguised, and the music grows more and more chromatic, complex and rhythmically asymmetrical. In the final variation, a synthesis is reached between the Mozartean themes and their transformed versions, as the original minuets return, superimposed over the varied material in a festive musical layer cake.”
  —  Robert Xavier Rodriguez, score notes, 2005.
B eautiful! Having been persuaded/challenged by the DSO to go where angels fear to tread, Rodriguez created a composition guided by Mozart’s stochastic wurfelspiel rules that is notable for its novelty and sheer musicality. It does not have too much emphasis on ‘bar-lines’, despite the ‘measure-wise’ macro-granularity of the stochastic engine (dice-rolling selection of single measures by table look-up). It’s superbly constructed... a moving piece of music in its own right, and one that also invites us to critically rethink Mozart’s own compositional methods and computational composition in general.

I n light of the Schick/ICE Xenakis concert in Chicago earlier this week and my previous CMT post speculating about algorithmic composition methods’ begging for human editing/finishing, I thought I’d mention Mozart’s own experiments, as well as Robert Rodriguez and his Mozart Reloaded.

M    usic is meaningless noise unless it touches a receptive mind.”
  —  Paul Hindemith.
P    otential for banality, or beauty

What are avatars of impendingness?
After Verdi died in 1901 (January, in Milan, of complications from a single, deterministic stroke), Italy suffered a cardiac/cultural arrest of confidence.
After Xenakis died in 2001 (February, in Paris, of complications from multiple stochastic ailments he had been enduring), Greece suffered nothing, at least not right away.
But soon after each event, the protean exuberance of the respective century collapsed; emergent self-absorption papered over with frenzied ornamentation.
No such country as “Homeland”... non-existence hardly ameliorates its artistic self-glorification.
You know, things that happen according to Markovian rules can be changed without loss of overall meaning, and likewise without gain of overall meaning.

What are Markov melody engines?
Stochastic algorithms who have had a recurring, salacious role in western music composition for more than 200 years...
Who do not want the listener to be aware of their forms and metabolisms.
Mozart’s ‘Musikalisches Wurfelspiel’ K.516f is well-known. But other composers, including Haydn and C.P.E. Bach, fooled around here.
Recombining humanly-composed motifs in random orders, first for the novelty of it, but then as friends/accomplices, then as crutches/co-dependents, and finally as addictions.
Mozart wrote (or [at least] Peter Welcker published in 1775, in London) a ‘Tabular System Whereby Any Person without the Least Knowledge of Musick May Compose Ten Thousand Different Menuets in the Most Pleasing and Correct Manner’.
‘Pleasing’, maybe, sometimes. ‘Correct’, leave it for the first violin to say.”



Sunday, March 15, 2009

Tabula recompositoria: Amending/Improving Compositions Resembles Software ‘Refactoring’

W    hile composers were [in earlier Centuries] certainly able to work out music in their minds without recourse to writing, at some point the music had to assume a graphic form so that it could be preserved, transmitted, and performed. The evidence suggests that composers employed two different kinds of surfaces for writing down their music: (1) an ‘erasable tablet’ such as a slate that could be used many times and (2) paper. In the period [1450-1600 C.E.] we are considering, the pencil had not yet been invented, so writing on paper meant using pen and ink. Erasure could only be achieved by scraping the ink from the surface of the paper, often resulting in holes in the paper. Paper was therefore a ‘write-once’ medium. Despite the differences in the properties of the two kinds of writing surfaces, composers seem to have used them both in much the same way for all the written stages of a composition, from the earliest sketches to the final version.”
  —  Jessie Ann Owens, p. 74.
 Mozart K.581 Mvt.3 Trio II, mm. 1-12

    [20-sec clip, Umesh Shankar et al, UC Berkeley, 2003, Mozart, K. 581, Mvt. 3, ‘Trio II’, 0.4MB MP3]

M usical sourcecode (the musical score for a composition) is not sacrosanct: we honor the text in our reading of it, but we also take advantage of the interpretive latitude that it affords.

A nd any composer/arranger performs edits upon edits, to clean-up and perfect a work over a period of days to years. Or you create new versions to suit new and different purposes. It’s matter of what software developers would call ‘emergent design’.

Y ou may want to generate a piano reduction, exploding and imploding sectional structures, changing durations and meters, moving layers, manage instrument doublings, etc. .... Johnson’s book (link at bottom of the CMT post) has a good synopsis of these use-cases for MusicXML.

A lternatively, you may want to programmatically change your orchestration and timbres/sonorities, simplify or obfuscate/complexify the rhythms and horizontal relationships, de-risk the voice-leading to make it more natural to perform or sing, change the key to address the realities with regard to black-key biomechanics on keyboards or string-change biomechanics on stringed instruments. More and more use-cases for arrangers and composers!

S uzanne Clercx was the first to document the use of ‘erasable tablets’ by composers when in 1953 she published the discovery of a slate with six staves on each side [termed a ‘tabula compositoria’, ‘cartella’, ‘palierten schiffer stein’, ‘palimpsestus compositorius’, or ‘ardoyse’, depending on the country and century]. MusicXML is simply a latter-day tabula compositoria, that’s all.

W orking as I do on software in my day-job, I am impressed that compositions are homeomorphic to today’s object-oriented software and today’s data networks, including so-called ‘cloud’ computing or ‘software-as-a-service’ (‘SaaS’). All can be complex and difficult to manage.

I  suggest that the root of these problems lies in the complexity of the control and management planes—the orchestration and voice-leading and quasi-protocols coordinating the musical parts; the software and protocols coordinating the objects and network and distributed-services elements—and particularly the way the decision logic and the distributed-systems issues are inexorably intertwined.

I  am impressed that ‘refactoring’ the functionality can improve a composition just as it can improve a piece of software. There is no great profundity or earth-shattering novelty in such a view. It is just something that naturally occurs to any person who spends her/his days working on both software and music.

I  propose three key principles:

  • network-level objectives,
  • network-wide views, and
  • direct control
that I believe should underlie any [new/refactored] architecture, be it an object-oriented software system or a musical composition.

F ollowing these principles, I identify a design pattern that I call ‘4D’, after the architecture’s four planes: decision, dissemination, discovery, and data. A 4D architecture completely separates a network’s/composition’s decision logic from the compositional protocols and performance-practice/runtime protocols that govern the interactions among the network/musician elements.

I n creating a ‘4D’ design pattern, it’s important to remember that MusicXML score files do not represent ‘presentation-level’ primitives such as pages and staff-systems ... such details of formatting will change based on different paper and display sizes. But MusicXML does represent syntactic and semantic concepts of voices (parts) and synchronization among them, segmented into ‘movements’. In the MusicXML environment, in other words, formatting is handled separately from structure and semantics. The same applies for detailed interpretive performance information. Separate MusicXML supersets could be developed to represent individual printings and performances.

R efactoring of MusicXML can, of course, be done off-line—with generation of printed parts and score ahead of performance runtime. My MusicXML source for K.581 Mvt.3 Trio II is here. This (and several Beethoven string quartets) is what I have been testing my prototype MusicXML refactoring engine with this week.

O r the refactoring of MusicXML can be done in realtime—with refactored parts rendered with streaming MusicXML interpreter to be sight-read by the performers, with (I suppose) considerable surprise for artists who are deeply familiar with the original texts—and for listeners as well.

T he realtime MusicXML refactoring works okay so long as the lead-time for the canonical refactoring service is at least one measure ahead of where the musicians are playing. That, to me, seems to be about the minimum for proper scansion and so that phrasing and other effects are not too disrupted.

O f course, this depends on the meter and tempo and the prevailing complexity—things that are making cognitive demands on each performer. If a streaming realtime refactoring is too elaborate, then the aesthetics (and the fun) will undoubtedly suffer.

B eyond this, in principle I suppose one could mike each member of the ensemble and do analog-to-digital conversion of each signal—perform digital signal processing (DSP) and pattern-recognition to impute pitch and interval and rhythm and dynamics deviations from the score—and then use those imputed deviations to drive a refactoring server, to further permute the parts or effect meta-alteration of the downstream score. That’s beyond anything that I’m prepared to attempt right now, but CMT readers with enough studio gear and computational resources may be interested to try it.

    K. 581 Clarinet Quintet (‘Stadler’ Quintet) [1789]
  1. Allegro (A major)
  2. Larghetto (D major)
  3. Menuetto (A major), Trio I (A minor), Trio II (A major)
  4. Allegretto con variazioni (A major)
T he clarinet predominates in K.581 as ‘primus inter pares’ (‘first amongst equals’) as Alfred Einstein once wrote, yet the parts’ roles are more discursive and autonomous than they would be if this were a ‘concertante’ form where the soloist rules.

M y simple experiments initially have dwelt on Mozart’s K. 581, primarily because it is straightforward and familiar. Its interpretive history and performance practice are pretty transparent and well-understood. I wondered, “What if we refactored the Trio II, to render it as an exuberant/obstinate ‘recovery’ from the A-minor Trio I of the 3rd movement?” Okay. Here’s what I get with my canonical XML parser—scanning for and phrase and repeat boundaries in the tokenized MusicXML source.

 Mozart K.581 Mvt.3 Trio II, mm. 1-12
becomes  

 Mozart K.581 Mvt.3 Trio II, mm. 1-12
B asically, my “light” refactoring of K.581 treats every ‘repeat’ structure as a MusicXML ‘class’. You play it through the first time as originally written—that’s the first ‘invocation’ or programmatic ‘call’ to the ‘repeat’ class method with the contents of the bars between the repeat-delimiters as an argument. When you get to the end of the first time through, the method in the ‘main’ class (call it ‘A’) bumps an ‘excursion counter’ and calls the repeat class (call it ‘B’)—with a canonical refactoring argument to dynamically alter the articulation syntax in each part, according to rules I created for my refactoring engine to use.

 DSM Refactoring Engine Architecture
B ut the simple as-written MusicXML source then involves a ‘cycle’ between the ‘main’ class ‘A’ and the ‘repeat’ class ‘B’. If this were a software refactoring, generally we try to eradicate cycles, to localize and manage features and dependencies and to improve reliability and for other reasons. How about doing the same thing in MusicXML, with similar justification? Sure...

 DSM – removing cycles with dependency-inversion DIP
W hat my refactoring of the score does is this:
  • Extract a ‘repeat interface’ BI class from class B. BI contains the methods of class B that are needed by A, to implement the articulations (or other canonical changes that propagate through the quintet’s 5 parts) that we want to be associated with the repeats. The new, refactored class B implements BI.
  • Set all references in class A that aren’t required for object generation from B to BI.
A  simple ‘toy’ example, to be sure, but it is non-trivial—non-trivial in terms of the parser and its embedded logic, and non-trivial in terms of the expressive effects that this has.

I n the end, what we get in this example is a canonical cascading propagation of accents, tenutos, and decrescendos—explicitly amending the expressive sense of the K.581 Trio II. Cool. It works. And it suggests how we could implement other, fancier refactorings and canonical edits.

 Mozart K.581 Mvt.3 Trio II, mm. 1-12 repeat, after canonical XML mark-up with accents, tenutos, diminuendos
M y particular example refactoring of the MusicXML sourcecode for K.581 Trio II is directly analogous to what in the Roock-Lippert software refactoring book is called ‘dependency inversion’ or DIP (see. pp.130-43). Again, I was only exploring here what can be done with current-version MusicXML and refactoring techniques operating on music scores; I am not saying that anything wonderful has been done to K.581 with this attempt. I am only saying that it is interesting, and that it works, and that it may be of interest to you as a composer/arranger or as a music theorist. For CMT readers who are performing artists and avid users of PC-based digital music readers (like Hugh Sung or Nicholas Kitchen) maybe this stuff has interest as well.

T o me, the effort so far seems worthwhile. Yes, MusicXML is not ideal. It’s not a ‘causal encoding format’ and therefore and commands are [must be] used to encode single parts with multiple staves or multiple voices—and so on. While not ideal, MusicXML is the reigning standard that has market-share; it is the ‘bandwagon’ to jump on.

I t’s possible that these refactoring explorations will lead to new MusicXML enhancement-requests or new requirements-specifications for future versions of MusicXML. I’d welcome dialogue with you if you have observations or concerns in that regard. Please email me or comment here if you like. Thanks!

B    rian Foote suggested the name [‘speculative generality’] for a smell to which we are very sensitive. You get this smell when people say, ‘Oh, I think we need the ability to do this kind of thing someday’ and consequently specify all sorts of ‘hooks’ and special-case requirements—to handle things that aren’t in fact required. The result is often harder to understand and maintain. If all this machinery were being used, it would be worth it. But if it isn’t being used, it isn’t [worth it]. The extra machinery [to provide abstract generality] just gets in the way [of clean, effective, testable, maintainable source-code and non-defective solutions] ... Any structure or class that isn’t doing enough to pay for itself should be eliminated ...”
  —  Martin Fowler, p. 83.

A   ndrew Monk and others at University of York in the U.K. It is useful to think about software usability problems as forming a hierarchy with each successive level in the hierarchy requiring more contextualized knowledge. By contextualized knowledge we mean knowledge about a particular user and the goals and priorities which are relevant when the problems are identified. An example of a problem at the bottom of the hierarchy is a user having difficulty in correcting typographical errors because of inadequate delete facilities. This may be a quite general problem independent of the particular user and the task being performed. An example of a problem near the top of the hierarchy is the difficulty that a user might have in understanding how to carry out a database search task on some new system. The problem arises from the user's experience with the system, with other systems and with the task it is being used for and so depends very much on the context. Such problems often have a large impact on usability. By definition, these problems require information about the user's knowledge and beliefs in order to diagnose their cause, and to recommend the changes needed. Work at University of York has attempted to develop methods which elicit increasing amounts of context-sensitive data which can be used to diagnose problems at successively higher levels of this hierarchy and have identified four diagnostic levels. At the first level are problems that can be identified from system logs recorded from unknown users during free use. An approach was developed which identifies problems by isolating redundant user input. These problems can be diagnosed with minimal user-specific or task-specific information. A second level involved the analysis of log data from users completing tasks which have been set by the evaluator of the system. When these tasks are well constrained the system evaluator can use them to gain partial information about the users’ plans and goals when problems occur. This method is not always adequate since strategic differences amongst subjects can make plans and goals difficult to infer. A third level used verbal protocol methods to elicit users’ plans and goals directly. Two methods have been used re-enactment. Re-enactment proved particularly useful for diagnosing problems that could not be diagnosed from log data alone. In this method the user and evaluator discuss problems that the user had experienced during previous sessions.

Techniques that allow for more abstraction
  • Encapsulate Field - force code to access the field with getter and setter methods
  • Generalize Type - create more general types to allow for more code sharing
  • Replace type-checking code with State/Strategy
  • Replace conditional with polymorphism
Techniques for breaking code apart into more logical pieces
  • Extract Method, to turn part of a larger method into a new method. By breaking down code in smaller pieces, it is more easily understandable. This is also applicable to functions
  • Extract Class moves part of the code from an existing class into a new class
Techniques for improving names and location of code
  • Move Method or Move Field - move to a more appropriate Class or source file
  • Rename Method or Rename Field - changing the name into a new one that better reveals its purpose
  • Pull Up - in object-oriented programming (OOP), move to a superclass
  • Push Down - in OOP, move to a subclass
  • Shotgun surgery - in OOP, when a single change affects many classes—all affected code is kept in a single class, so that the change is made only in one place.”