Review of The Pillars of the Earth

No spoiler alerts here. I read the first quarter of this book, and that was enough for me. Maybe it was because I had just finished reading The Grapes of Wrath for the first time, re-acquainting myself with fiction’s potential to uniquely and powerfully communicate truth, as it does in Steinbeck’s classic. Of course, fiction’s potential isn’t always realized.

It sounded great in theory: a historical novel set in Medieval times about a master builder whose chief aspiration in life is to build a glorious, magnificent cathedral. In practice, Ken Follett’s The Pillars of the Earth is full of patronizing plot tricks; shallow, cartoonish characters; gratuitious sex and violence; and wearisome, dull-headed internal conversations. In short, it is titillating and boring at the same time. Like watching TV. Since the miniseries just came out, I figure I’m better off closing the book and watching it, since that will cost me a lot less time. Follett observes in the preface that this is his best novel, giving me an opportunity to save yet more time and pick someone else to read.

Comments

I’ve started another blog

Check it out here: Lenz on Learning: Reflections on parenting, education, kids, and creativity. Here are the article titles so far:

I’ll probably still blog here on miscellaneous topics on an occasional basis (as always), so feel free to subscribe to both.

Comments

Watching The Atheism Tapes

I just began watching The Atheism Tapes (on Netflix), by Jonathan Miller, a series of interviews with prominent atheist intellectuals. In the first episode, Colin McGinn reviews some standard arguments for and against the existence of God.

He puts forward lack of positive evidence as his principal reason for not believing that God exists. Paraphrasing Bertrand Russell, he says, “there’s no more reason to believe in the Christian God than in the Greek gods.” I think this is a silly assertion. Nobody believes in the Greek gods today. However, many millions of people do believe in the Christian God today. He may not think that’s a good enough reason to believe in God, but it’s a big jump to say there’s “no evidence”. If he’s talking scientific evidence, then I grant him the argument. Scientific evidence is a very narrow sort of evidence, as science is a very narrow sort of inquiry. But the continuing faith of millions over thousands of years does constitute some sort of evidence.

Later in the interview, he admits that people do have a sort of “cosmic loneliness”, or angst. He sees this as an explanation for why people have such a need for believing in God. The belief appears to satisfy their deep need for connection. This is another sort of evidence. You can use it to either explain people’s need to believe despite God’s non-existence, or you can view it as another sort of evidence for God—a being which, when believed in, “satisfies a deep craving in the human soul”, as McGinn puts it.

McGinn is most persuasive, I think, when he brings up the problem of evil. This should be truly challenging to any Christian or anyone who believes in the existence of a good, all-powerful God. Why would a good, all-powerful God let evil things happen in the world? McGinn notes the standard, ultimately unsatisifying explanation offered by theologians: God gave us free will, and we’re the ones that mess it up. Then what about natural disasters? Ultimately, the problem of evil is a real problem for faith. One of my beliefs as a Christian is that whereas God is all-knowing, we are not. And we’re not particularly meant to be. There are things we don’t understand and won’t ever understand in this life. Atrocities such as holocausts happen. There is a profound potential for evil in the human heart. These are things we have to contend with, even if we can’t fully explain them. If you’re going to believe in a religion, make sure it’s one that acknowledges and contends with the reality of suffering in the world and evil in the human heart—even if you were born into a free, wealthy society such as America where we are protected from much of the world’s suffering.

I have friends, family members, and colleagues who are atheists, and I want to better understand their point of view. I also want to find ways to address my doubts and to bolster my own faith in the face of unbelief. Despite my natural affinity for philosophy and philosophical arguments, I don’t put my hope in them as a primary way to grow closer to God (which is a primary goal of mine). They do play a minor role though; they fit in somewhere. Otherwise, I wouldn’t feel compelled to write about this topic. Just know that I haven’t even begun to expound on why I do believe, and I can’t necessarily explain all the reasons why I’m compelled to believe. (For one thing, I believe God had a large role in my choosing to believe and continue to believe, and that’s hopelessly circular from a philosophical perspective.)

Comments (6)

How to generate GUIDs in XSLT 2.0, using Saxon.NET

I have a project where I need to generate file names that are GUIDs. I’m using Saxon.NET. With the help of Google, I figured out how to do that, but it wasn’t immediately obvious. Hopefully this post will make the solution easier to find for other people trying to solve the same problem.

This is just one example of a .NET function you can access as an extension function in XSLT 2.0, so a more general-purpose treatment of .NET extension functions might be more useful. (I defer to “Writing extension functions for .NET” for that.) But if you’re like me, you spend most of your coding time within the safe, comfy confines of pure XSLT. And you do very little .NET development. So to ensure your continued comfort, here’s how you can generate a GUID in Saxon.NET (relevant parts highlighted):

<xsl:stylesheet version="2.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:guid="clitype:System.Guid?partialname=mscorlib"
  exclude-result-prefixes="guid">

  <xsl:output indent="yes"/>

  <xsl:template match="/">
    <guids>
      <guid>
        <xsl:value-of select="guid:NewGuid()"/>
      </guid>
      <guid>
        <xsl:value-of select="guid:NewGuid()"/>
      </guid>
      <guid>
        <xsl:value-of select="guid:NewGuid()"/>
      </guid>
    </guids>
  </xsl:template>

</xsl:stylesheet>

Here’s an example result from applying this stylesheet (to any input document):

<guids>
   <guid>6dbd3a72-ad74-429d-97ca-3056e8940813</guid>
   <guid>cea97da4-9de5-4fb5-a35e-ba04a0dee906</guid>
   <guid>41c89105-6cf7-4fd6-b17a-ed04235a4804</guid>
</guids>

All you do is call the .NET platform’s System.Guid.NewGuid() method as an extension function. The function’s namespace URI identifies for Saxon what assembly and object class you’re interested in (System.Guid in this case).

Thanks to M. David Peterson: I found this usage buried in a code example in his lucidly-titled blog post: if ((OOP + FP + AOP) == XSLT 2.0) then ‘Composable Language’ else ‘Try Again’.

Comments (2)

Some updates

Short blog post, in bullet points:

That’s all for now. See you again in 6 months. :-)

Comments (1)

Does Christianity make sense?

American Christians—we are disconnected from our heritage. That’s an understatement. Do we even have a collective consciousness? Bible stories are for Sunday school. You learn them once as a child and then recall them again during Sunday morning services. When I was in Ireland, I was struck by the religiosity built into the décor of people’s homes. Pictures of the Virgin Mary seemed to grace every wall. It was a haunting presence, and certainly very culturally foreign to me. I suspect that’s not just because I didn’t grow up in the Roman Catholic church. We Christians in America don’t normally wear religion on our sleeves. We blend in. Our houses don’t look much different than any other. Religious icons, if our particular tradition doesn’t denounce them altogether, stay safely tucked away in cathedrals and worship centers.

My faith has been on the rocks lately. The basic Christian message in America, and all the cultural context with which I associate it, are divorced from its rich, Jewish heritage. We don’t have religious forefathers. We’re too American for such things. When I compare our religiosity to other areas of the world, I wonder what is distinctive about our collective consciousness. What do we take for granted? I think they’re probably the same things as most Americans: freedom, individualism, a value placed in the “work ethic”, financial success, etc. There’s nothing particularly Christian about these things. American, yes. Christian, no.

Why have I been struggling with my faith? Because when I look at the stories of the Bible, especially those of the Old Testament, they seem so complex and detailed and messy, but the American Christian message is so simple and pristine and Americanized. It doesn’t add up. Are we joking? Maybe we should stop using the Bible in church. Our message would be much easier to convey that way. The Bible just raises too many questions. But more than that, it’s too culturally foreign. It’s way too messy and complex. And arbitrary. Who are these people these stories are about, and why should I care? What do these ancient texts have to do with my life in America? Aren’t they just archaic instruments of power, used over the centuries by the Church to bend people to obedience (and break them if necessary)? Why in the world would I want to associate myself with that heritage?

Simply Christian: Why Christianity Makes Sense, by N. T. Wright, came on my doorstep just in time, it seems. It starts off quite generically and doesn’t dive into Old Testament stories. Clever, in a way. Draw people in and then pounce with the religious content. But one thing Wright said really struck me. Really, the entire section “The Glorious Complexity of Life” (pp. 48-51) is what struck me. I’ll quote a large chunk from the middle of it:

We should expect the world and our relation to it to be at least as complex as we are. If there is a God, we should expect such a being to be at least as complex again.

I say this because people often grumble as soon as a discussion about the meaning of human life, or the possibility of God, moves away from quite simple ideas and becomes more complicated. Any world in which there are such things as music and sex, laughter and tears, mountains and mathematics, eagles and earthworms, statues and symphonies and snowflakes and sunsets—and in which we humans find ourselves in the middle of it all—is bound to be a world in which the quest for truth, reality, for what we can be sure of, is infinitely more complicated than simple yes-and-no questions will allow. There is appropriate complexity along with appropriate simplicity. The more we learn, the more we discover that we humans are fantastically complicated creatures. Yet, on the other hand, human life is full of moments when we know that things are also very, very simple.

Think about it. The moment of birth; the moment of death; the joy of love; the discovery of vocation; the onset of life-threatening illness; the overwhelming pain and anger that sometimes sweep us off our feet. At such times the multiple complexities of our humanness gather themselves together and form one simple great exclamation mark, or (as it may be) one simple great question mark—a shout of joy or a cry of pain, a burst of laughter or a bursting into tears. Suddenly the rich harmony of our genetic package seems to sing in unison, and say, for good or ill, This is it.

We honor and celebrate our complexity and our simplicity by continually doing five things. We tell stories. We act out rituals. We create beauty. We work in communities. We think out beliefs. No doubt you might think of more, but that’s enough for the moment. In and through all these things run the threads of love and pain, fear and faith, worship and doubt, the quest for justice, the thirst for spirituality, and the promise and problem of human relationship. And if there’s any such thing as “truth,” in some absolute sense, it must relate to, and make sense of, all this and more.

Stories, rituals, beauty, work, belief. I’m not talking just about the novelist, the playwright, the artist, the industrialist, the philosopher. They are the specialists in the different areas. I’m talking about all of us. And I’m not talking just about the special incidents—the story of your life-changing moment, the ritual of a family wedding, and so on. I’m talking about the ordinary moments. You come home from a day’s work. You tell stories about what has happened. You listen to more stories on television or radio. You go through the simple but profound ritual of cooking a meal, laying the table, doing the thousand familiar things that say, This is who we are (or, if you’re alone, This is who I am). This is where we are ourselves. You arrange a bunch of flowers or tidy a room. And from time to time you discuss the meaning of it all.

Take away any of these elements, as frequently happens—take away stories, rituals, beauty, work, or belief—and human life is diminished. In a million ways, small and great, our highly complex lives are made up of the interplay of these things. The multiple elements of life we noted a moment ago tie them all together in an ever-changing kaleidoscopic pattern.

That’s the complex world to which the Christian story is addressed, the world of which it claims to make sense.

What a wonderfully effective frame in which to dive into the history of Israel. Wright’s book attempts to answer the question that has been plaguing me lately: How are the entire range of human experience and of the wonders of the natural world accounted for and explained by Christianity, the faith that I ascribe to? The way he sets the stage above, and indeed in the entire first of the book’s three parts (“Echoes of a Voice”), are at least tentatively scratching the itch I’ve been feeling. As I continue to read, I will be pondering two questions:

  1. Does this really make sense?
  2. How might Christians in America start embracing and engaging the cultural distinctives and particularities of their faith’s heritage?

Answering not only question #1 but question #2 also is going to be essential for the survival of my own faith. Continuing with the status quo just seems dishonest to me. Incongruent. Unsustainable.

Comments (9)

Keyboard coloring variations

A common way to help users orient themselves on the chromatic Janko keyboard is to color some of the keys black, corresponding to the black keys on the traditional diatonic piano keyboard. (The actual Janko keyboard doesn’t use narrower keys on the upper row, so the pictures below are a bit misleading in that regard.)

Below are six keyboard coloring schemes. The first three are ways of coloring a chromatic keyboard. The second three are ways of coloring a diatonic keyboard. Here’s a legend for the six variations below:

  1. Chromatic keyboard with chromatic coloring
  2. Chromatic keyboard with diatonic coloring
  3. Same as #2, using opposite colors
  4. Diatonic keyboard with diatonic coloring
  5. Diatonic keyboard with chromatic coloring
  6. Same as #5, using opposite colors

[I'm trying out a new drawing program, so please excuse the big "UNREGISTERED" watermark. If I end up registering it, I'll replace the image, or better yet, break it into six images. Okay, I know. It's ridiculous. But I need to go to bed.]

Keyboard coloring experiments

These were inspired by a photo that Paul Morris posted to the MNMA forum, in which he had physically used black tape and white tape to achieve the coloring in #5 above on his traditional keyboard.

Comments (3)

Manual symmetry

A few weeks ago, I was sitting at the piano and contemplating what I had been learning about the Janko keyboard. I was thinking about all the different scale patterns on the traditional piano keyboard and how different they are. There are 12 of them. (I would tend not to count the minor key scales separately, since they’re essentially just offsets from the major scale, as are the other modes.) Johannes Drinda introduced the Janko keyboard to me and in that same email wrote:

The advantage of the uniform Janko keyboard pattern is mind-boggling:
The Janko keyboard pattern does away with practicing scales, would you believe?! This is the true reason, why so many hobby musicians (like me!) got stuck with playing mostly in C-major & A-minor scales and lost out on a great deal of musical joys and creativity.
With Janko one only needs to learn one major and one minor scale-pattern. From then on one can play all 24 major & minor scales.

As I sat at the piano considering these words, I realized that there are really twice as many scales as that, if you count both hands separately. My left hand is not a copy of my right hand. It’s a mirror image of it. The muscle movements and fingering for playing D-flat major in my right hand are much different than the movements and fingering for playing it in my left hand. So then there are actually 24 different scale patterns to learn (12 for the left hand, and 12 for the right hand), or if you count major and minor scales separately (as Johannes did in his email above), then there are 48 separate scales to learn (24 for the left hand, and 24 for the right hand).

The fact that one hand mirrors the other also reminded me of Vincent Persichetti‘s “Mirror Etudes”, a selection of which I played in my junior or senior recital in college (I can’t remember which). One thing I liked about this piece is that all I really had to do was learn the right hand, and then make the same movements in my left hand, taking advantage of the fact that the piano keyboard mirrors itself (pivoting around D and A-flat). Persichetti used this algorithmic device (where one hand’s part is a simple function of the other hand’s part) to very nice effect, perhaps in some ways in spite of the device.

The next thought I had was: “What if each hand had its own keyboard, so that the same movements and fingerings would produce the same notes?” If I traverse the five-finger position from my thumb to my pinky in my right hand, then the pitches go up (get higher). On a regular piano, if I do the same thing in my left hand, they go lower. That’s the mismatch. What if they both went higher, so that playing a given part in the right hand felt exactly like playing that part in the left hand? I then supposed that this would require two different keyboards: one for my left hand and one for my right hand. The right-hand keyboard could be the “normal” one, and the left-hand keyboard would be reversed: moving to the left causes the pitches to rise, and moving to the right causes them to descend. We could then speak, instead of moving left or right, of moving outward or away from the body (ascending in pitch), and inward or toward the body (descending in pitch). With a setup like this, if you act as if you’re playing the Persichetti etudes on a traditional keyboard, you’d now actually be playing both hands in unison (robbing the piece of its character, but that’s not the point).

Google can have a tendency to quash creative thinking. What seems like an original idea turns out to be not so original. Then again, it can also have a validating effect. Regardless, someone has already had this idea (and patented it). There’s also a diagram showing how the left-hand keyboard is re-mapped. Actually, now that I look at the diagram, I see that it’s not quite the same as what I had in mind. I was thinking of just reversing a traditional piano keyboard. The diagram for this patent shows a 6-6 pattern (like Janko) for both keyboards. So in that case I suppose you could truly say that the user would only need to learn 1 single diatonic scale pattern, as opposed to 24. Not bad.

But that’s not all. A pianist named Christopher Seed has actually built a left-handed piano. (Be sure to check out his videos page too, where he shows off his ambidexterity.) Not only that, but his website offers a simple hardware module called The Keyboard Mirror that transforms a MIDI keyboard into a left-handed (reversed) MIDI keyboard! This probably wouldn’t be too difficult to implement in software too. So to try my idea out, all I’d need is two MIDI keyboards, one unmodified and one with the Keyboard Mirror plugged into it. To keep things really interesting, I could try switching them around: not only right/normal, left/reversed; but also left/normal, right/reversed.

I just had a funny thought: playing Persichetti’s Mirror Etudes on a left-handed piano would be almost exactly like playing them on a traditional piano! (Except that when you try to voice the upper parts, you’d start wondering why the bass part is getting louder!)

Now, for a real mind-bending exercise, try playing the Mirror Etudes using a left-handed (reversed) keyboard for the left hand and a traditional (not reversed) keyboard for the right hand. Of course, that seems about as sensible as using Vim with a Dvorak keyboard.

Update: When I wrote that last paragraph earlier tonight, I hadn’t realized that playing the actual Mirror Etudes using symmetrical manuals would be “as if” you were playing both hands in unison on a traditional keyboard. The simplicity of this two-way function (reverseHalf mirrored = unison; reverseHalf unison = mirrored) obviously hasn’t sunken in yet, since it’s still all just up in my head. Yes, I’ve gotta try this out!

Comments

6-6 version of Klavarskribo

There has been some recent discussion in the MNMA forum about an alternative version of Klavarskribo that its inventor (Cornelis Pot) had designed for chromatic, 6-6 keyboards (i.e. keyboards having 6 white keys and 6 black keys in each octave, as opposed to 7 white keys and 5 black keys). Below is my attempt at reconstructing an image from a verbal description (posted in the forum) of an image that was published in a Dutch article in the February 1972 issue of Klavar-Nieuws:

Version of Klavarskribo for 6-6 keyboards

The above example contains all 12 major triads (with doubled roots), traversing over them in two sequences that correspond to the two whole-tone scales. As you can see, there are just two keyboard patterns to learn. (With a Janko keyboard that has more than just two rows of keys, then there’s really just one keyboard pattern to learn. To move up a half step, you’d just shift from the first and second rows to the second and third rows, keeping your hand in the same position.) A comparison with the Klavarskribo equivalent for the traditional piano keyboard shows just how irregular the traditional keyboard is, and how many patterns you have to learn within those same 12 keys (for chords, scales, etc.).

Below are the first six chords (in regular Klavarskribo notation), corresponding to the whole-tone scale starting on C. One thing that was apparently not made explicit in the Klavar-Nieuws article was which key is indicated by the thicker vertical lines in the 6-6 notation above. In my transcription to regular Klavarskribo, I just chose a mapping: B for the thicker lines so that C lands just to the right of each thicker vertical line in the 6-6 notation. Thus, the first sequence would then start with the C-Major chord:

Traditional Klavarskribo notation for 7-5 keyboard (example 1)

And here’s the second sequence, traversing the whole-tone scale starting on D-flat:

Traditional Klavarskribo notation for 7-5 keyboard (example 2)

As you can see, there’s nothing in these sequences that approaches the regularity of the 6-6 keyboard patterns. There’s a lot to discuss in comparing the two keyboard layouts—enough to leave for another blog post.

The message in the MNMA forum that described the 6-6 Klavar notation contained lots of fascinating insights, along with quotes relating to the 6-6 keyboard from a letter written by Pot. I wish I could link to it directly. The problem is that the MNMA forum messages are currently only accessible to members (although anyone can join). That may (hopefully) change in the near future and in fact is being discussed on the list right now.

Comments (1)

Blogging confusion

My blogging history has been erratic. In one month, I have probably doubled the number of posts I’ve made since I started this blog in 2004. That was intentional of course, as I committed to 30 days of blogging this month. I am not constraining myself to a particular topic, although I did see this as a way to help sustain my momentum on the PianoNinja project. And it certainly has helped me in that regard.

But tonight I am tired, preoccupied with rodent problems, upcoming business trips, vacuum cleaner shopping, etc. So I’m not going to try and eek out any Klavarskribo-related wisdom, for example.

At some point, I’d like to figure out what my blogging philosophy is, as I still haven’t been able to figure it out. That’s the main reason I’ve posted so infrequently. Who I am I writing for? Myself? Other people? Which people? Especially when getting started, it seems like no one is really out there, and so I feel like I’m just writing to myself. On the other hand, anyone in the world could be reading this, so I’m simultaneously crafting my online identity for the whole world to see. Which aspects of my life or work or interests do I want to share? I’ve never really decided, so I just put my name as the title of this blog, to keep things open. But then again, to what extent should my blog be about my identity anyway? Having my name at the top seemed like a good way to keep things open-ended, but now I’m thinking it too much implies that *I* will be the primary topic or focus of the blog.

Maybe having separate blogs, each with a more narrowly defined focus, is the answer. My attitude when writing a book is to serve and provide value to my readers in the best way I know how. Why should blogging be any different? I may decide to nix the whole artificial quota idea too (once per day), which can have a tendency to result in aimless posts like this one. But I guess that’s why it’s called a 30-day trial.

Comments (1)

MNMA -> The Music Notation Project

Since I recently posted about the MNMA (Music Notation Modernization Association), including its mission statement, it seems appropriate to forward on the announcement that the MNMA has disbanded and a new organization has emerged to take its place: The Music Notation Project.

The new mission statement from the website is as follows:

The Music Notation Project seeks to raise awareness of the disadvantages of traditional music notation, to explore alternative music notation systems, and to provide resources for the wider consideration and use of these alternatives. We hope our efforts will help make reading, writing, and playing music more enjoyable and easier to learn.

Today’s letter detailing the announcement hints at what some of the practical differences will be:

While we are still interested in research that evaluates different [notation] systems, we believe we can best further such comparative work through the development of software that can rapidly convert a lot of music into a wide variety of systems.

I think this makes a lot of sense. New notation efforts should take new technology into consideration and benefit from it.

The other practical difference, apart from having a new, nicely designed website, is the name change. “The Music Notation Project” rolls of the tongue much more nicely than “Music Notation Modernization Association”. I was just joking today that the name is a bit “shun”-heavy. Well, they fixed that now. :-)

Comments

Ninja pain

This is how the PianoNinja is feeling tonight after suffering a difficult blow:

Out-of-sorts ninja

We had a little setback involving lost code. Ironically, this happened when I was trying to set up version control to guard against this very thing. I’ve posted a message to the user’s list for the IDE that failed to give me a warning before deleting all this naive user’s code, in hopes that similar mistakes by other users can be prevented. Hindsight is 20/20. I should’ve backed it up before trying to…back it up. It would also have been good to have Time Machine set up already, but I hadn’t done that either.

Thankfully, I did still have an older version of the code from before I switched over to the development environment that I’m now using, so I don’t have to start totally all over. And you can be sure that I have already secured that code into version control on a server machine so that I can continue from now on from a solid base.

How bad is it? Well, we were on Video #7. Let’s just say we’ve now reverted back to Video #3. In other words, all the code I wrote in the last two weeks is gone.

Maybe this is a blessing in disguise. Sure, I learned a lesson and I won’t make this mistake again. But the blessing might be that my continued dependency on MIDI files as the game’s underlying format is now that much less alluring. The MIDI crutch has been snatched out from under me. I don’t need to wrest myself from the MIDI code so I can move onto a better way. The code has wrested itself from me…

I was going to add bar lines tonight. Oh well, those can wait.

Before you know it, the ninja will be feeling better than ever.

Comments (1)

PianoNinja Video #7: Notation-consistent note releases

Okay, this post is just to complete the thought I’ve been exploring over the last couple of posts. I wasn’t up for much heavy thinking tonight, so I decided to just download a free MIDI editor and normalize the durations of the notes in the Chopin Waltz MIDI file so that it had no more staccato releases in the first section of the piece. Now the visual note releases reflect the actual notated durations (except that some Klavarskribo continuation dots are still missing; I haven’t implemented those yet). I wanted to see if this helped make it easier to “see” the beat:


Video #7: Notation-consistent note releases (Quicktime streaming)

I think it works pretty well for this piece of music. The sudden flash of each note release now coincides with the attack of the next note. I think it now looks smooth and rhythmic, which is what I was hoping for.

Comments

PianoNinja Video #6: Note OFF events visualized

I haven’t made any progress since yesterday’s report, but I did finally track down our camera. This video shows what I was talking about yesterday: the MIDI Note OFF events are now visible.


Video #6: Note OFF events visualized (Quicktime streaming)

The game isn’t making any sound in this video, because I’m not playing along on the MIDI keyboard. It’s easier to see the note releases when I’m not playing along and adding all the green and red colors. The piece is the same one I’ve been using for the last few demos: Chopin Waltz in E-flat, Opus 18.

The molasses effect of lingering notes is gone, so that’s good. But the note releases are accented too much, in that the suddenness of the notes’ disappearance tends to be the most visually striking movement that’s going on. It’s also dependent on the interpretation of the person who rendered the performance in the MIDI file. My theory is that if performance-dependent note releases are ignored and instead the actual note value is reflected (regardless of whether the note should be played staccato), then the accented note releases will actually help rather than hinder the feeling of the beat, since they’ll most often coincide with the attack of the next note. I’m looking forward to testing my theory out (and then moving on past this academic theorizing).

Comments

More MIDI mismatches

Today, I tried to enable what I talked about in my last post about PianoNinja. I was able to get the MIDI Note OFF events to be reflected in each note’s visible duration: how long it remains stationary on its piano key before disappearing. (I would have posted a video, but I can’t seem to find the camera right now, and I really need to be getting to bed earlier anyway.) I have a couple of observations:

  • It’s much nicer than before: crisp and clean releases, but…
  • the effective duration doesn’t necessarily correspond to the actual note value.

A MIDI file contains a rendition of a piece, not (necessarily) the authoritative musical information you’d need to reconstruct a score. Staccato durations, for example, get interpreted as short notes that obscure the actual notated value. I’m coming to terms with what I want PianoNinja to do: display a score (in Klavarskribo notation) that can be relied upon as containing the more-or-less canonical information that makes up the piece. While there might be many and varied MIDI files for the same Chopin Waltz, I don’t want PianoNinja to be subject to those variations.

So while I’m glad that I got the MIDI Note OFF events to be reflected, the associated note-vanishing is still a bit jumpy-looking, since they don’t always coincide with the attack of the following note. Before diving into using MusicXML instead, I might try to see what sorts of MIDI file quantization I could do to stretch each duration out for its full note value. I’m going for the path of least resistance here in keeping this project moving forward—without compromising the steady vision I have for what PianoNinja can be.

Comments

Feeling the beat in PianoNinja

As I play around with PianoNinja, I’ve noticed so far that it’s fairly easy to get out of sync with the notes that I’m supposed to be playing. I tend to speed up when playing slowly, for example. (You might have noticed this in the last video I posted). Part of the problem is that I don’t have any strong cues as to where the beat falls. In games like Dance Dance Revolution, there’s a very strong beat—you simply dance to the music that you hear. Ultimately, I think PianoNinja will need auditory cues as well, whether as simple as a metronome sound or as complex as a full accompaniment. (That would make it a lot more fun too.)

But before I add any auditory hints, I want to see how far purely visual cues can get me. Of course, I’ve made the decision to go with Klavarskribo, so the question as to what visual cues to use has largely already been answered for me. (Basically, use solid and dotted bar lines to indicate the primary and secondary beats, respectively.) But what Klavarskribo doesn’t answer is how to display the notes once they reach the point where they’re supposed to be played.

The simplest approach would be to just keep scrolling the manuscript right off the screen, just as if it was a roll of sheet music continuing to unwind. In other words, apart from the scrolling movement, the display would be purely static. You’d know when to play the notes only according to when they cross a given (horizontal) line, but then they’d keep on scrolling off the screen and out of sight. In that case, perhaps the most natural place for that line would be the middle of the screen rather than the top. That way, you’d be able to see the notes come and go rather than immediately scroll off the screen at the top.

I’ve decided to take a more dynamic approach, placing that line at the top of the screen and representing it with a picture of a piano keyboard, so that, for one thing, the relationship between the notation and the piano keyboard is immediately obvious (I hope). The dynamic aspect is that the visible note then freezes and remains stationary on its corresponding piano key for the duration that it’s supposed to be played, while all along the rest of the music continues to scroll upward. Early on, I was experimenting with a grayscale fade-out approach for representing the decay of the note’s sound, but I found that keeping it solid and stationary and then suddenly making it disappear worked nicely—especially when followed immediately by another note in the same hand. The combination of the new note stopping in its tracks and the old note vanishing in the same instant creates a certain visceral perception of the rhythm. At least that’s my suspicion and hope; I haven’t fully put it to the test. Right now, the durations are all hard-coded to the length of one beat, which doesn’t fit well with the Chopin Waltz I’ve been using in my demos. The notes all linger far too long, giving a molasses-like visual effect which doesn’t help you feel the beat at all. So I think I’ll focus next on taking care of those note durations.

With this approach, the most “attack-like” movement that you see is when a note ends, not when it begins. What makes it work is the fact that the disappearance of one note often coincides with the attack of the next. For that reason, it may turn out to work well for some kinds of music, but not so well for others.

But now I’m just speculating. First I’ll get it to work correctly and try several pieces of music with it. If I still find it to be lacking, then maybe I’ll add some kind of “flash” to each note’s attack. I’m hoping that won’t be necessary though. I like the idea of a visually spare interface that still packs a punch—like Klavarskribo itself, and, I hope, like the new PianoNinja logo. :-)

Comments

It’s like meeting for the first time…

Tonight I was practicing reading Klavarskribo on my acoustic piano. It’s amazing how much this notation is transforming how I think about the keyboard. All the irregularities of the piano keyboard layout are jumping out at me like they never have before. I’m paying attention to the physical piano keys and their relationship to each other. I’m astonished (and embarrassed to admit) that, after having studied piano since the age of 6, I never consciously noticed (at least as far as I can remember) that four out of five of the black keys are not placed exactly in the middle between their two adjacent white keys. In fact, I unconsciously perceived them the way that Klavarskribo depicts them, spaced equidistantly from their adjacent white keys:

How I conceive of the horizontal relationship between black and white keys

In actuality, they’re spaced out from each other so that the black keys aren’t too close to each other and so there’s not such a big gap between the two groups of black keys:

How it’s actually laid out

The difference is subtle, but you can definitely feel it. It’s what accounts for the fact that the minor 3rd starting on A-flat feels a bit bigger than the Major 2nd starting on B-flat. Of course, in my theory-ridden brain, I naturally assume that a 3rd would feel bigger than a 2nd, because it’s a bigger interval. But no, it’s not because it’s a bigger interval, it’s because of the irregularity of the keyboard. In truth, I think the difference in distance feels bigger than it really is, because I’ve been trained to think that it’s a bigger interval. In actuality, they are physically quite similar, and if my unconscious assumption that the black keys were placed equidistant from their adjacent white keys had been true, they would be physically exactly the same.

In Klavarskribo notation, they are physically exactly the same distance from each other:

Physically and visually equivalent intervals

The above intervals are visually and (at least approximately) physically equivalent. Yet they’re not the same intervals. They are: m3 (minor third), M2 (major second), m3, m3, M2. But if you’re learning Klavarskribo, which makes you very attentive to the keyboard layout, you would recognize these as physically equivalent. They almost seem worth naming (“BWW”, for black-white-white?), at least perhaps as a way of organizing a series of Klavarskribo exercises. After forging the visual-kinesthetic link, you can then start layering on the theory that recognizes that, although these intervals look and feel the same, they are in fact different.

So while Klavarskribo glosses over the slight physical irregularities of the piano keyboard, traditional notation completely abstracts away from the physical characteristics of the keyboard. I’m not saying that’s a bad thing. I just want to clearly see this difference. I do find it terribly odd how unfamiliar I am with the keyboard after so many years of practice and study. And I’m struck how I have to keep saying “physical keys” just to distinguish which meaning of the overloaded term “key” I’m intending. It’s almost like the language of theory is rigged to detract attention from the physicality and irregularities of the instrument. The word “key” tends to mean “tonal center,” and my musically-trained brain keeps gravitating back toward that usage.

In any case, Klavarskribo is a much more raw representation of notes to play on the keyboard, and I’m liking it for that and for the fresh insights it’s giving me.

Comments (1)

PianoNinja file formats: MIDI or MusicXML or…

I’m trying to figure out what file format(s) to support in PianoNinja. Synthesia has gone the route of “blind devotion to MIDI files” and its attendant pitfalls when it comes to notating music. I’ve already gotten a glimpse of these drawbacks now that I’ve tried to add the left-hand/right-hand distinction to PianoNinja. Some MIDI files separate the hands into two different tracks, and some don’t. And there doesn’t seem to be a standard way of doing this. Also, there are other visual cues built into Klavarskribo that I want to include, like bar lines, note beams, rests, continuation dots, etc. These aren’t going to be easy to derive from simplistic MIDI ON and OFF events, especially since the best MIDI files as far as performance goes would tend to be the worst as far as deriving notation goes. That’s my suspicion anyway. I get the impression that there are features of MIDI files that could allow them to provide notational hints, but those are optional and so they can’t be totally relied on.

MusicXML, on the other hand, is designed for representing musical information that can be notated. The biggest disadvantage I see of using MusicXML is that it’s not nearly as widely available as MIDI files are. Where do I go to find MusicXML files anyway? Do I have to purchase them? Do they only exist transiently on their path from Finale to Sibelius or vice versa? If I can get sufficiently past that hurdle, then it seems that I should go with MusicXML.

But there might be some other disadvantages to MusicXML also. Traditional notation requires you to make certain decisions about things like key signatures, whereas key signatures are optional in Klavarskribo (represented by a circle or diamond at the beginning of the piece on the relevant line for major or minor keys, as well as other shapes for different modes IIRC). Are they optional in MusicXML? Or does MusicXML force you to make certain distinctions that Klavarskribo doesn’t require? If MusicXML files were as abundant as MIDI files, I wouldn’t worry so much about this. I’d just take what I need and leave what I don’t need. But if I want to promote the proliferation of PianoNinja music across the Web, would MusicXML raise the bar too high? The purist in me doesn’t want to have to decide whether a note is B-flat or A-sharp in the underlying format when that distinction may not ever appear on the screen in PianoNinja.

So maybe what’s needed is a new “KlavarML” format, along with a converter from MusicXML to KlavarML (using XSLT of course). I presume there are already converters from MIDI to MusicXML (insofar as they’re able to). I don’t want to reinvent the wheel. But I also don’t want to be held back by unnecessary technological limitations. Both MIDI and MusicXML provide too much information. MIDI has lots of performance/interpretation-specific information that’s not relevant to Klavarskribo (although theoretically could be relevant to PianoNinja insofar as the scroll speed could dynamically vary, but I digress). MusicXML makes distinctions that Klavarskribo and PianoNinja do not. And MIDI doesn’t provide enough information.

Whether a “KlavarML” becomes an interchange format or an internal format specific to PianoNinja, I still like the idea. At the very least, the exercise of designing it would help clarify the whole domain of what it is I need to represent in PianoNinja. And it would also give me another opportunity to use RELAX NG. :-)

Comments (1)

PianoNinja Video #5: Stems pointing to left and right

Whereas in the last video all the note stems pointed to the right (which made it difficult to tell which hand was supposed to play which notes), now I’ve associated MIDI events in one track with the left hand, and the other track in the right hand. For those of you who aren’t familiar with Klavarskribo (which is probably 99% of the population), if a stem points to the left, then that means the note is meant to be played with the left hand. If it points to the right, use the right hand.


PianoNinja Video #5: both hands (Quicktime streaming)

My 7-year-old son was holding the camera, while I was using both hands to play. He was trying his best to hold it still. :-)

Comments

PianoNinja Video #4: Scrolling notes from MIDI file!

Tonight I got some scrolling notes to appear on the screen in response to MIDI events being played back from a MIDI file. Observe:


There are a number of deficiencies still:

  • no bar lines (that aren’t irrelevant and hard-coded still)
  • no note durations (also hard-coded)
  • no right-hand/left-hand distinction (all hard-coded to the right)
  • stems are too short in some cases, erroneously breaking the chord up
  • no beams for grouping related notes in a line

Despite these deficiencies, I’m really stoked. I’m starting to get a sense of what it will be like to use this game and to practice sight-reading with it (using Klavarskribo notation, of course). My vision is starting to be realized!

Comments

« Previous entries Next Page » Next Page »