Monday, April 16, 2007

公眾人物不自由

朋友也想架網誌,又是一次關於網誌的後設討論。大家關心網誌的隱私權,以及流言的問題,也提到公眾人物必須要更加謹言慎行。我從心的觀點提出一些看法。

我覺得blog給我很好的反思機會: 我為什麼要寫?要寫什麼?要寫給誰看?要具名還是要匿名?我發現這些問題各各組合我都有不同的答案,背後都透露出我不同的欲望,對我來說是很寶貴的經驗。

謹言慎行應該對所有人都重要。身口意如果不清淨,心要平安就很難。只是我們大部分的人,在變成公眾人物之後,就更會被「名」綁住了,所以才會覺得公眾人物不自由。事實上,真正不自由的不是公眾人物的身份,而是我們心對虛名的執著,以及不清淨的欲望對我們心的綁縛。

Thursday, April 12, 2007

Masculine Music vs. Feminine Music

A few weeks ago I was watching the video recording of an astonishing piano concert by Friedrich Gulda, Chick Corea, and Nicolas Economou (it was broadcasted on TV and was recorded from the TV). When Gulda was playing Bach's Air (a nice surprise in an improvisational concert), my housemate Shining, in the other room, heard that and asked me who the beautiful lady pianist was. I laughed hard and showed her the bald Gulda.

After that, I went on to watch Hiromi Uehara's piano concert at Singawa Aqua Stadium Stellar Ball. Then Shining walked by again when Hiromi was pounding on the piano with her fist and arm. Realizing the dramatic shock she must have been in, I couldn't help but laugh harder.

Does music has gender? Obviously the question implies a lot of sterotypical assumption:

First, the gender-quality association: beauty implies feminity.

Second, the music-performer assocation: a beautiful melody is probably produced by a beautiful person.

In our scenario here,a beautiful Bach Air then implies feminine qualities (ironically Bach was a man) which is probably played by a beautiful lady.

My gender equality friends would be more interested in breaking the above stereotype. I, as a composer, am actually more interested in what music is considered beautiful.

* Conservative repertoire in 'classical' concerts

* Listeners' ears unopened

Monday, November 13, 2006

Musical Iconology 圖像音樂學

I've been composing for a local flute ensemble. They have a quite particular instrumentation -- two piccolos, about ten C flutes, two alto flutes, a bass flute, and a cello.  In my composition I have to take the number of each instruments into balancing consideration.  Say, for a rich bassy chord, there might not be enough low-pitched notes to support ten C flutes in the upper register.  One solution is to divide the C flutes into more parts, yielding to a, say, 7-part chordal structure. The other obvious solution is to ask only part of C flutists to play, instead of all.

這陣子我為當地一個長笛樂團作曲。這個團的編制很特別: 兩支短笛,十支左右長笛,兩支中音長笛,一支低音長笛,以及一個大提琴。作曲時,我必須為這個編制考慮平衡問題。比方說,如果我要一個低沈穩重的和弦,很容易發生低音部不夠支撐十多支高音長笛的問題。一個解決方式是把十支長笛再多分幾部,讓整個和聲架構變成七部;或是直接請部份的樂手不要演奏。


Dividing the C flutes into more parts has a problem: the score then will be too specific to adapt on other settings (I guess this nature provides the job market for arrangers). The other extreme is jazz charts -- the most flexible form of composition. I envy Hiromi Uehara that she can only write guidelines in her composition yet her guidelines are more specific than a jazz chart that the produced work still has a controlled overall structure.

Asking only part of the players to play makes me wonder that if a composer doesn't note how many playerss/he wants for a part (quite common in an ensemble score), the balancing is really up to the conductors/performers. I believe an educated conductor/performer will make proper decisions on that. On the other hand, this also reminds me one of the significance of musical iconology.  These scholars dig valuable information out of pictures.  By looking at an early picture with a band in the background, they can decide the partial balance of an ensemble work.  Amazing, isn't it?

把高音長笛再細分多部有個問題: 這會使該譜變得不彈性,不易給不同編制的樂團使用 (我想這也讓編曲者市場得以存在)。另外一種極端是爵士樂譜--那大概是最彈性的記譜吧。我很羨慕 Hiromi Uehara 在作曲時,只需要大概寫出綱要;而且她的綱要又比爵士樂譜更特定些,使得演奏出來的作品仍具有特定的總體結構。

至於只要求部份樂手演奏的方法,讓我想到如果一個作曲家不在作品中標明需要的樂器件數,那指揮或是演奏者就得決定了。我相信經過訓練的指揮或演奏者應該沒有問題。另方面,我想起音樂圖像學的重要性。音樂圖像學家從圖片中發掘出有價值的資訊。看一張早期有樂隊為背景的圖片,這些學者能決定不同樂器的聲部間該如何平衡。了不起吧?

Waiting for Perl 6

I still remember when I first learned Perl in 1999, I appreciated its string manipulation power, but my reaction to its typelessness was not very positive. I thought it would be a trap to invite bug bearing codes. Boy would I imagine that Perl has been indispensable in my daily shell scripting tasks, and none of the bugs I had had anything to do with its typelessness. Perhaps I was wrong on that. (Of course, without typing, memory management won't be as efficient. However, that's not the main concern for shell scripting.)


When PHP was out, many, including me, thought Perl would meet its end. PHP has much better HTML integration when it comes to CGI. PHP's OO support is much satisfying than Perl's (although PHP 4's OO wasn't really good enough but PHP 5's OO is fairly useful). Perl 5 does have some kind of OO support, but it is, in my opinion, way under development. (I found two documents particularly helpful: Writing serious Perl and Perl Object Oriented Programming.) (Also see this interesting "ideological" argument against Perl support OO.) However, Perl is more powerful in dealing with large data -- in PHP, you have the default 8MB memory restriction;Perl is supported by default by most Linux distributions (it means most people agree at its usefulness). What I think the most relevant for its survival (in my work environment) is that it pushes the concept of "quick and dirty" to an extreme that some would say "quick and elegant". Seasoned Perl programmers (so called one-liners) can really accomplish tasks with minimal codes. I haven't seen any other language that finds its nitch as well as Perl. (However, see this interesting article "Ancient Languages: Perl" by an ex-Perl programmer.)


Perl 6 is very much expected --it's been quite a long wait for me (since my first Perl project in 1999; Perl 5 was very improved but not enough for me). Fortunately it won't be as long as C++'s birth after C-- according to Wikipedia, Perl 6 alpha is to be released by the end of 2006. (I read about Pugs but decided to wait for Perl 6 when they didn't project the release date. Recently I got impatient and checked more about Pugs and found this brilliant Taiwanese fellow Audrey Tang behind the project. Quite a figure she is.)

Wednesday, July 26, 2006

SELinux vs. mount

I needed to share a directory which is actually a mounted ISO image via ftp, but SELinux would assign system_u:object_r:iso9660 to the directory as the context, instead of system_u:object_r:public_content_t. The solution is to use the option "-o context=system_u:object_r:public_content_t" in mount.

It's obvious why we need mount to work with SELinux when mounting any external media/drive.  However, when do we need to it to work with ISO image?  Well, a common application is to make available the contentof an ISO image via SAN, FTP, HTTP, etc.  This not only makes themanagement of files easier (one image file instead of millions of smallfiles, for example), it also allows us to have multiple virtualdrives.  That way, we don't really need a physical drive and/or disc.

I needed it to install Fedora 5 by sharing the content of FC5 DVD image via FTP.

Saturday, July 8, 2006

Music as non-focal point 學用音樂當配角

我在為居住地的一個佛教團體整理重編一些儀式用的曲,在找爐香讚的時候找到這個關於台灣早期音樂家張福興的網站

I was organizing and rearranging some ceremonial music for a local Buddhist group and a search led me to this site about one of the earliest Taiwanese musican in modern time.

記得大學時修音樂學時,有位同學就到廟宇裡採譜。當時對宗教音樂沒什麼興趣,總覺得音樂不是主角的時候,有損音樂的地位。後來,開始學「配樂」,跟導演或製作人有幾次觀點極不同的溝通之後,才漸漸學著放下總想當主角的傲心。

主角可以放心表現,但配角要演得好,需要對藝術細節與平衡,有更精細的掌握。

宗教音樂,尤其是以沈靜安定為傳統的宗教,這種音樂對心靈的感染力,是很不可思議的。精彩複雜的音樂,不見得適合用在典禮儀式中。但恰到好處的音樂,卻能幫助人和心靈接觸。

現在對於這些聽似簡單的音樂(民歌,新世紀,宗教音樂),再不敢小覷了。

The site reminds me of my college musicology class. One of ourclassmates went to temples to trascribe the cermonial chanting. I wasnot at all interested in religious music because I had the prejudiceagainst music not being "the leading role" in any "application" (Ialways want to pay full attention to music itself). However, later whenI started to score for films and media, I had to learn to let go ofsuch proud attitude from several arguments with directors and producers.

A leading actor/actress can shine to the fullest degree, but a supporting role needs to know the subtle balance, artistically.

Religious music, especially those with meditational tradition, touches our heart in an amazing way. Clever and complex music doesn't always fit well in a ceremony. Only the music that's just right will do.

Overthe years I've learn that music that sounds so simple, such as folksongs or new age music, may actually be very deep and very hard to write.

Friday, June 23, 2006

Reading xen guest disk image from the outside (FC5)

On Fedora's Xen wiki, there's a tutorial on how to read a xen guest OS's disk from the outside. The instruction works for a physical LVM, but when the disk is actually an image file,
the instruction there does not really work. Here I share my experience, step by step, in the hope of saving somebody else's time. The problem that the original instruction doesn't work is because many people (including myself) simply use Fedora's default
Volume Group name, VolGroup00 in both dom0 and guest systems. Therefore, vgscan will be confused by two volume groups with the same name and gathers only the info of the one currently working, i.e. the one used in dom0. Since LVM basically
provides a unique name for volume accessing, there is no way that we can assign a particular logical volume within a particular volume group, without having a unique name for it. The solution is to change the name of one of them. Since we usually deal
with many guest systems on the same dom0, I choose to change the name for dom0. (It's also possible to change the guest system instead by steps similar to the below, but note that it can only be done from the inside.)
Use Rescue Mode to access the system's root file system
  1. Reboot into the rescue mode (insert FC5 DVD, CD1, or Rescue CD, and at the boot prompt, type linux rescue).
  2. Choose language and keyboard layout.
  3. Choose No when asked about bringing up the network.
  4. When prompted about mounting the original file system, press F2 to bring up a shell.
  5. Wait for a while (for the background lvm process to find necessary info).
Change the volume group's name
  1. At the # prompt, type lvm vgrename VolGroup00 VGHost00
Change original references to the volume group's name
  1. # cd /mnt
  2. # mkdir root boot
  3. # mount /dev/mapper/VGHost00-LogVol00 /mnt/root
  4. # vi root/etc/fstab (replace VolGroup00 with VGHost00, you can use :%s/VolGroup00/VGHost00/g to do so and use ZZ to quit vi)
  5. # umount root; rm -rf root
  6. # mount /dev/hda1 /mnt/boot
  7. # vi boot/grub/grub.config (do the same substitution)
  8. # umount boot; rm -rf boot
Now we need to build a new init ramdisk that knows about the new volume group (reference from this blog)
  1. Press F1 to go back to the rescue menu where it asks about mounting the original system,select Continue (you can also manually mount it -- see the blog reference above)
  2. # chroot /mnt/sysimage
  3. # cp /boot/initrd-2.6.16-1.2133_FC5xen0.img /boot/initrd-2.6.16-1.2133_FC5xen0.old.img
  4. # mkinitrd -v -f /boot/initrd-2.6.16-1.2133_FC5xen0.img 2.6.16-1.2133_FC5xen0
Reboot
  1. # exit
  2. # exit
  3. Remember to remove the Fedora DVD/CD1/RescueCD to boot from your HD
Read the disk image of the guest OS
  1. Use losetup -f to find a free loopback device. Here we assume it's /dev/loop0
  2. # losetup /dev/loop0 your_disk_image_file
  3. # kpartx -av /dev/loop0 (this should give us loop0p1 loop0p2 under /dev/mapper)
  4. # vgscan (this should report both VolGroup00 and VGHost00)
  5. # vgchange -ay VolGroup00
  6. # mkdir /mnt/guest_root
  7. # mount /dev/mapper/VolGroup00-LogVol00 /mnt/guest_root
Voila!

To unmount it, basically we just reverse the steps:
  1. umount /mnt/guest_root
  2. rm -rf /mnt/guest_root
  3. vgchange -an VolGroup00
  4. kpartx -d /dev/loop0
  5. losetup -d /dev/loop0