mitcho Michael 芳貴 Erlewine

Linguist. Fifth year PhD student at MIT.

blog

Posts Tagged ‘music’

The Mori no Ike Songbook 1996

Tuesday, December 9th, 2008

[[Mori no Ike]] veteran and friend Kikai (aka “The Machine”) scanned his copy of the 1996 Mori no Ike songbook distributed to villagers and staff:

Long long ago, in the tiny po-dunk town of Dent, Minnesota, population 156, where a rag-tag bunch of gaijin (guy-jean) lived hippy lives while wearing hapi clothes, spending their summer speaking, living, learning, eating and singing Japanese.

From those years past I now resurrect the sacred song book for anyone who is interested, to share, educate, or practice their Nihongo no Uta’s during what has come to be known as “the off season” for many villagers.

Catalogued and printed over 10 years ago, the 1996 song book for Mori No Ike, the Japanese language village of the Concordia Language Villages, is just as timely today as it was in years past. Hopefully, this online publication will help bring back songs that have dissappeared with the passing of sensei through the ranks, out of the camping life and on to wider and greater adventures.

Talk about kicking it old school. My question: what the heck is トンバイ?

Display your Last.fm rankings using PHP 4’s XSLT support

Friday, February 1st, 2008

With all the exciting recent news about Last.fm, I thought I would document a simple bit of code I added to my site the other day.

Last.fm offers a number of [[Flash]]-based widgets you can add to your website. Unfortunately, this doesn’t give you much flexibility and, of course, requires Flash. But you, dear friend, have a site written in [[PHP]], and the rankings are just XML files. There is a better way.

Looking around on the web, there are some good instructions and recommendations for using PHP 5’s object-oriented XML support. But, as we know, not everyone is using PHP 5. Here’s what I did on my PHP install, which includes the DOM/XML and DOM/XSLT extensions.1

Write your XSL Transformation

The first step is to write your [[XSL Transformation]], or XSLT, a special XML “program” which takes an XML file and reformats it into another XML file. Remember when you learned in Algebra class what a function was? An XSLT defines a function from XML to XML. In our case, we need to take a special proprietary XML file like the this one for my weekly top artists and return some solid XHTML.

Let’s take a look at the XSLT I used: (it helps to take a look at the original XML file at the same time.)

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="weeklyartistchart">
<ol>
<xsl:apply-templates select="artist[position() &lt; 6]"/>
</ol>
</xsl:template>
<xsl:template match="artist">
<li><a><xsl:attribute name="href"><xsl:value-of select="./url"/></xsl:attribute><xsl:value-of select="./name"/></a><span><xsl:value-of select="./artist"/></span>: <xsl:value-of select="./playcount"/></li>
</xsl:template>
</xsl:stylesheet>

The full spec description will give you all the juicy details, but you really only need a few basic details (or you can just steal my code). First, we note the <xsl:template match="weeklyartistchart"> and <xsl:template match="artist"> items. Each of these code blocks describe what to do to each <weeklyartistchart> and <artist> nodes, respectively, in the input XML. In the code above, when a <weeklyartistchart> is found, an ordered list is opened and the artist template is applied to the first five (position() &lt; 6) <artist> nodes. In the artist template (<xsl:template match="artist">), the script takes each <artist> and prints a list item with the name of the artist, with a link to the url given in the original <artist>’s <url> subnode.

Process the XML with your XSLT

Once your XSLT is written, save it to a file, like last.fm.xml. Now we’ll use the DOM/XSLT extension and apply this XSLT file to the live weekly artist chart XML file from last.fm. Here’s the code I used:

$chartxml = domxml_open_file("/weeklyartistchart.xml");
$xslt = domxml_xslt_stylesheet_file("last.fm.xsl");
$charthtml = $xslt->process($chartxml);
echo $charthtml->dump_mem();

The code is pretty self explanatory—just four lines: 1. open the remote XML file using domxml_open_file, 2. open the stylesheet (XSL transformation), 3. apply the stylesheet to the remote XML file, and 4. echo the output.

That’s it! You can see the results here on my music page.


  1. To see if these instructions will work for you, check your phpinfo for the lines “DOM/XML enabled” and “DOM/XSLT enabled”. If the items aren’t even showing up, you’re out of luck. :( There are, however, other comparable methods to process XML and XSLT in PHP 4.
    dom/xml check 

The Gift That Keeps On Giving

Thursday, December 27th, 2007

Christmas in Yilan just keeps on trucking. Two days ago I wrote about my Christmas lessons and the special event at Penglai. But Christmas didn’t end on Christmas… I’ve continued to take part in festivity after festivity.

(more…)

Setting Language Research to Music

Monday, December 24th, 2007

Via LinguistList:

‘Setting Language Research to Music’ is a Newcastle University project whose aim is to compose orchestra and choral music to demonstrate infant perception and production. The first piece of music to emerge from the project, ‘Swing Cycle’, mimics babies’ experience of discovering word boundaries, taking work by Peter Jusczyk and colleagues as a starting point.

It’s the craziest thing I’ve seen in a long while… it reminds me of the Music: Materials and Design course I took a couple years ago. My final project was an electronic composition building a rhythm with political speech samples and echos and cracking noises, representing the hollowness of political rhetoric. It was one of my academic low points at Chicago, for sure.

Maybe it’s because I’m an artist, but I’ve never understood the drive for modern art, including compositions like these. I would much rather listen to some music and read about language acquisition separately… the motivation to combine the two eludes me.

You can listen to The Swing Cycle and read the lyrics (or their approximation) on the Setting Language Research to Music website.

Buklavu

Tuesday, November 20th, 2007

Every day at school they play some music over the PA after lunch and during cleaning time. Today I really enjoyed the music, which was not the usual classical or opera (our orchestra teacher normally chooses from “the classics”), and asked some teachers for the artist name. I then found a couple CD’s by the artist, 王宏恩 (Wáng Hóng’ēn), on the way to Chinese class in Yilan. The CD’s are solid overall. 王宏恩 is a Bunun aboriginal whose aboriginal name is biung tak-banuaz, and half his songs are in the Bunun language. To my pleasant surprise one CD also included a song we dance to at Nanao Elementary every week. The song is called “Buklavu,” written about his hometown and sung in Bunun. it’s beautiful, incredibly catchy, and encapsulates the aborigines’ energy. I found the song online and have embedded it here:

In addition, here’s a YouTube video of someone who’s figured out another one of my favorite songs of his: a beautiful song called “Ana tupa tu” (“moon”). I may try to learn parts of it, but simplified… it’s a little intense.

English Easy Go!

Saturday, November 3rd, 2007

Today was the ROC Year 96 Yilan county English Easy Go! competition. There are two parts to the fall competition: a song competition (song and dance, costumes, sets, the whole nine-yards) and a reader-theater. I think the competition is a great idea, getting kids all over the county excited about English through performance.

A group of 11 6th graders from Penglai have been practicing for the song competition for the past month or so under my co-teacher Jennifer’s direction. They sang and danced to the Fiona Fung song “Proud of You.”

The military guy and I met the kids at the train station at 7AM.

IMG_9559IMG_9572IMG_9567IMG_9579

The kids liked playing with my camera and abusing me.

IMG_9562IMG_9564

The competition was held at 凱旋國小, a huge elementary school.

IMG_9576IMG_9628IMG_9580

We first practiced downstairs a few times and hung out. They were all wearing little angel crown-ish things, black t-shirt with a gold “belt” of tape, and bells on their wrists.

IMG_9605IMG_9588IMG_9607IMG_9585IMG_9621IMG_9618

Our school was the third group in the later-morning performance group. They were not at all nervous and did fabulously!

IMG_9633IMG_9636

All of us ETA’s were of course all there with our respective teams. In the photo below Katie is videotaping another school’s choreographer standing in the back of the crowd dancing with/directing the kids. He had this whole face, haircut, and outfit that screamed “I am a choreographer.”

IMG_9648IMG_9645

Then we came home. A great time was had by all. ^^

IMG_9665IMG_9705IMG_9677

Atayal cultural festival

Sunday, October 21st, 2007

Last night there was an Atayal cultural festival: a traditional Atayal wedding demonstration supplemented by a variety of cultural acts. The wedding demonstration (which actually was a wedding—four couples got married) included:

  1. the first proposal with tribal elders meeting with the families to discuss whether the two should get married—the first proposal always fails, to add value to the marriage;
  2. the second proposal, again with tribal elders, this time accepting the terms of the marriage;
  3. an offering from the groom’s family to the bride’s;
  4. the wedding itself, with the groom carrying off the bride on his back.

A couple famous aboriginal singers came, as well as a number of local primary and secondary school dance groups (complete with pyrotechnics). The (very nice) high school gymnasium was packed.

DSC02853IMG_9061IMG_9100

We sat near the Nan-ao elementary school contingent—here’s a photo of me with some of my kids:

IMG_9053

A few other ETA’s came to check out the event as well, and got to play with my kids. (One later told me, in English, that Jeannie is beautiful.)

DSC02869DSC02871

The real highlight of the show, though, was my kids’ dancing act. Somehow I was under the impression that they were going to do a traditional dance, but it turns out it was a hip-hop routine set to Beyoncé and Sean Paul’s Baby Boy and what I believe to be an Amuro Namie single. Remember, these are elementary school kids. Pretty amazing talent, especially given that this is over 10% of the students at the school.

IMG_9075IMG_9081

(Some photos courtesy of Katie.)