Plastic Sitars Intro for piano

I’ve been playing more music lately, but also trying to go back and learn the fundamentals of reading/writing music and keyboard playing—I can play chords and pop melodies semi reliably but suck at playing scales with either hand. Yesterday I created a free account at Noteflight, which lets you compose scores online (you have to enter notes via mouse/keyboard, but the UI is pretty quick once you get the hang of it). The import feature successfully digested a 15 year old MIDI file of something I wrote in college.

The (yet unrecorded) French Horns song “Plastic Sitars” always started with rhythm guitar live, but for a few months I’ve been toying with a short solo guitar piece as an intro, ideally stealing Johnny Smith’s tone. Below is a piano arrangement for my tour of airport cocktail lounges.

Elgg Core Proposal: New Table “entity_list_items”

[This proposal has been superseded with ElggCollection.]

As of Elgg 1.7.4 there’s no way to specify a specific list or ordering of entities for use in an elgg_get_entities query. E.g. one might want to implement:

  • A “featured items” list for a group or user widget. On a group page this could be implemented in “left” and “right” lists for better display control
  • “Sticky” entities in discussion lists, or any other object lists
  • A “favorites” list for each user

Continue reading  

About damn time, guys

Opera 11 will have extensions.

Mozilla 1.0 had the first decent extension system in 2002, and since then Opera users have been begging for one and getting lame excuses and half-baked substitutes that offered none of the power of real extensions:  “Panels” were just HTML docs beside the viewport, and “widgets” just HTML apps in separate chromeless windows.

If Opera doesn’t want to sit at 1% market share for 10 more years, they better get this right. An “extension” system should be able to alter chrome and context menus at the bare minimum.

Five years later a “new” French Horns recording

In 2005 I wrote a vocal melody and lyrics on top of a blissy keyboard instrumental by Slavagoh. I really liked the repeating three chord progression and had planned to incorporate his recording into the French Horns demo, but decided to keep it minimal.

I kinda had always regretted that, so five years later I managed to glue those recordings together:

[audio:http://mrclay.org/mp3s/Surest%20Things_untitled%20bliss.mp3|titles=Surest Things – The French Horns & Slavagoh]

screenshot of Audition mixing session Both recordings were almost the same tempo, but the Slavagoh recording was about a semitone lower in key. After nudging his recording into the same key and time-stretching (thankfully both were recorded to drum machines), there were still some beat mismatches on the ends to deal with. Eventually I ended up with three instances of “untitled bliss” spliced in because I really liked how its ending had this smoother sound and how that part mixed with earlier parts of the track.

My demo was also bass-heavy, too dark in the vocal range, and overly punchy on some beats, so I did a bunch of surgical volume cuts and EQ on my track before mixing.

Wins: Extended the end of the track a bit by having the “guitar solo” twice. Worked hard on the fades at the beginning and end so the track starts and finishes with just the Slavagoh track.

Losses: Not remixing my recording from scratch to remove that annoying click track. Not using some of the violin tracks laying around from an older mix session. Not saving the session used to master it.

If you’re not patient, it’s easy to mix down and then immediately start mastering the resulting WAV file without keeping track of the changes you’re making. When you do this, there’s no way to duplicate that process in case you need to change something in the mixing session. I kinda did this on purpose though; after 5 years of sitting around I wanted to get this recording to “good enough” and move on. There’s a lot more piled up that needs working on.

Maria Napoleon “Think of Rain”

Louis Philippe and Maria Napoleon put together a fine version of one of my favorite tunes. I usually don’t like covers that mess with the melody, but at the end of the choruses I really love how the vocal playfully jumps to what a high harmony might sing, if Margo Guryan had written one in. I’ll have to check out the compilation this is on, “Simultaneous Ice Cream“.

StackExchange folks, KeyMinor already exists

Why is there a StackExchange proposal in the works for a “Musical Practice and Performance site” when KeyMinor already exists on the SE platform?

The proposed site is “for people who play musical instruments. On-topic questions will be about technique, practice, theory, composition, and repertoire.” KeyMinor already serves this purpose, it’s just not known about.

I’d add a comment to the proposal but I see no way to; I probably don’t have sufficient reputation points.

Why the Pernice Brothers Don’t Tour

From “Will he/they tour?“:

JP: We make any money if we tour for two weeks?

JL: You mean ten days, if rehearsals are included.

JP: Yes.

JL: No.

JP: Well then why would we do it?

RM: Because Menck wants to rock.

JL: Theoretically, the tour is just one piece of the things you do if you want to sell records.

JP: We don’t sell enough records at shows to justify that. Especially if YOU work the merch table, because people are scared of you.

JL: Theoretically, it’s not just the stuff you sell at the show, it’s the review that you get in the local paper, the placement you get in the local record store, none of which happens if you don’t play a show in that city.

JP: So you think we should tour?

JL: The extent of the fuck I do not give about whether you tour can’t really be measured.

RM: Doesn’t anyone care that Menck just wants to rock?

PHP UTF-8 string class

A couple years ago I put together a class for UTF-8 strings, kind of a smart wrapper around Harry Fuecks’s phputf8 string functions. All Utf8String objects—if I’m not missing bugs!—are guaranteed to house valid UTF-8 strings. The factory, make(), enforces UTF-8 validity, stripping non-UTF-8 bytes (default) or replacing them with Utf8String::$replacement (? by default).

$str = Utf8String::make('āll īs & ōk');

All the major string functions are methods with similar signatures (dropping the input string argument). Since native string assignment is always a copy, I felt all Utf8String objects should be immutable to avoid accidental referencing. After the following line, $str actually points to a fresh Utf8String object:

$str = $str->ucwords(); // Āll Īs & Ōk

Of course this means they’re chainable:

$str = $str->strtolower()->toAscii(); // all is & ok

Casting to string does what you’d think:

echo $str; // out come UTF-8 bytes.

Checking for UTF-8/ASCII-ness can be slow, so methods that create new objects propagate this info into the constructor so the new objects don’t have to check again. The constructor is private to avoid misuse of those arguments. I also threw in some convenience methods:

// input() returns false if $_POST['msg'] isn't present
if ($msg = Utf8String::input($_POST, 'msg')) {
    echo $msg->_; // escape with htmlspecialchars
}

In theory a framework could use a class like this to force safer string handling throughout:

function handleStrings(Utf8String $input) { /**/ }

It’s a proof-of-concept anyway (it’s missing preg_* methods and a lot of other stuff), but if the API could be ironed out, someone could make it into a proper C extension.