Archive for the 'Music' Category

Simple music player

Wednesday, April 18th, 2012

I put up a few MP3s on http://anacondalimousine.com, in simple a hrefs. While modern browsers will let you click and display some sort of player in a new page, why not play them in-page without a refresh? Simple enough. Plus we have HTML5 audio. Problem is, old IEs don't support HTML5 audio and you need flash or, god forbid, a Java applet to play them.

What's a webmaster to do? All I need is a simple PLAY button next to each link

While I was aware of SoundManager, I accidentally stumbled across sound.js yesterday and thought I should give it a chance. Tiny (3K), it should give me an easy way to do x-browser playing with the help of some SWF for IE, I assume. Dropped the JS from their CDN (nice), but then what? "Online documentation" points to API docs which I don't feel like reading. Demos don't give you the code. Next.

Sound manager has a nice "basic template". Awesome. Replace the sound.js js with SoundManager's. Load in FF. It's looking for an swf. In FF. Why? Because FF doesn't play mp3. Well, I'd rather convert the MP3 than have the user load SWF. But anyway, I drop the swf. For whatever reason (like you need a reason!) I've disabled flash in FF and forgot about it. So no sound in FF. And maybe I'm not the one. Requiring SWF in FF feels unnecessary, although I'm sure Sound Manager probably has way around it. I'm sure. I've met the author, he's brilliant. But... I still need to write some JS to initialize the playing. And if I'm to write code, might as well go solo.

Here's what I came up with, hope it helps.

Disclaimer: I haven't tested in IE, and I mean at all. Should probably work in newer IEs

Demo

http://anacondalimousine.com

Codez, how they work

Everything in an immediate function. Unobtrusive. Bail if (IE) browser doesn't know about Audio.

(function () {
  if (!Audio) return;

  // ...

}());

Codes for play and stop:

var playsym = "▶", stopsym = "■";

Some browsers play mp3, some OGG, so let's just change the extension and have both .mp3 and .ogg on the server

var extension = new Audio().canPlayType('audio/mpeg') === '' ? 'ogg' : 'mp3';

Loop though all links on the page, find the ones that point to .mp3

var dl = document.links;
for (var i = 0; i < dl.length; i++) {
  if (dl[i].href.split('.').slice(-1)[0] !== "mp3") {
    continue;
  }
  var p = document.createElement('button');
  p.innerHTML = playsym;
  p.onclick = play;
  dl[i].parentNode.insertBefore(p, dl[i]);
}

Forgot to mention, my markup is as simple as it gets:

  <p><a href="virus.mp3">Virus</a></p>
  <p><a href="yesterday.mp3">Yesterday</a></p>
  <p><a href="parting.mp3">Parting</a></p>
  <p><a href="faultline.mp3">Faultline</a></p>

So all I'm doing is insert a PLAY button right before the link. Onclick it should play.

The play() function initializes Audio with the appropriate extension, based on what the browser supports:

  function play(e) {
    var button = e ? e.target : window.event.srcElement;
    button.innerHTML = stopsym;
    var a = new Audio(button.nextSibling.href.replace('mp3', extension));
    a.play();

And if you click the same button as the music plays, you stop it and reset the button click handler:

    button.onclick = function() {
      a.pause();
      button.innerHTML = playsym;
      button.onclick = play;
    };
  }

That's it

So simple and tiny, it's all inline, no extra requests, not a SWF in sight. Support for 72.3% of all browsers. The other 30% can still download the file and play it with a separate program.

SoundManager and, I assume, sound.js have more features, events and other shiny, but for my simple purpose I'm so happy with the result I'll even blog about it :)

For full source - view source at http://anacondalimousine.com

Moarr info:

p.s. about the mp3 to ogg conversion... ffmpeg ftw:

$ ffmpeg -i in.mp3 -acodec vorbis -aq 60 -strict experimental out.ogg
 

Wish You a Merry Christmas 2011

Saturday, December 24th, 2011

Here's a cover of We Wish You a Merry Christmas I just did. It's in a Bulgarian (and other Balkan countries) style in 7/8 tempo (and 9/8th at one place). This is me channeling my inner Goran Bregovich :)

We Wish You a Merry Christmas (7/8th and 9/8th)

Continuing the tradition (why did I skip last year?! oh I know, because 7/8 is damn confusing and I failed last year), here are the others:

It's amazing to look back over the years and see how little I have grown as a musician and recording technician :P

 

Sultans of Speed

Monday, June 13th, 2011

#2 This post is part of the Velocity countdown series. Stay tuned for the last one tomorrow.

With only 2 days to Velocity, it's time to drop in the quality of these posts (but the one tomorrow will be great, I promise) with today's announcement of the immediate availability of the project called http://sultansofspeed.com.

I think we've had enough of experts, gurus, ninjas, jedis, pirates and overloards. Time for the sultans to step in!

So there: a slideshow of bios and photos of a number of Web Performance Sultans.

The background music is my heavy metal cover (sorry!) of "Sultans of Swing" by Dire Straits.

The Sultans you see there are the people who have written for the Perfplanet Calendar. But this is just the initial seed. (And because these are the bios/photos I have easy access to.)

Are you a sultan? Add/delete/edit your bio in the Github repo in the sultans.js file.

Want to change something - better slideshow maybe? Yes, the repository is still there.

In the immortal words of Mark Knopfler:

And he makes it fast with one more thing:
"We are the sultans, yeah the sultans of speed"

 

Silicon Valley (roughest place I’ve ever been)

Saturday, April 16th, 2011

Excuse me, my dearest reader for subjecting you to this (*cough vogon poetry*). My only excuse is it's Friday.

So here comes another one of those. This time a coverlet (a whatlet?) of Stevie Ray Vaughan's Tin Pan Alley (The Roughest Place in Town). Tin Pan Alley sounds almost like Silicon (Silly Con?) Valley :)

Went down to Silicon Valley
To see what was goin' on
Things was too weird down there
Couldn't stay very long
  Hey hey hey hey,
  Valley's the roughest place I've ever been
  All the people down there
  Livin' for their stock options, perks and dental care

I heard a woman scream
When she saw her team
"It's just a bunch of nerds out there
and no one cares to wash their hair"
  Hey hey hey hey,
  Valley's the roughest place I've ever been
  All the people down there
  Call them CEOs and next dotcom millionaire

I heard a pistol shoot
Yeah and it was a .44
Oh wait - just some engineers killing time
on their PlayStation 4
  Hey hey hey hey,
  Valley's the roughest place I've ever been
  All the people down there
  Killin' for their options, perks and dental care
 

Audio sprites

Wednesday, April 13th, 2011

Another "brilliant" idea that I had recently - how about combining audio files into a single file to reduce HTTP requests, just like we do with CSS sprites? Then use the audio APIs to play only selected parts of the audio. Unlike pretty much all brilliant ideas I have, I decided to search for this one before I dive in. Turned out Remy Sharp has already talked about this. So I knew it was possible and wanted to check the server-side or things. (Remy is amazing, by the way, and I was happy to have him as a reviewer of "JavaScript Patterns")

Here's the demo - parts of Voodoo Chile covered by yours truly.

Playing separate files

Markup is a few audio elements:

<audio id="in">
  <source src="in.mp3">
  <source src="in.ogg" type="video/ogg">
</audio>
<audio id="1">
  <source src="1.mp3">
  <source src="1.ogg" type="video/ogg">
</audio>
<audio>
  ...

I have the files:

  1. in.mp3 - intro
  2. 1.mp3 - figure 1
  3. 2.mp3 - figure 2
  4. out.mp3 - the end

1 and 2 repeat a few times.

I play these files in JavaScript using a next() iterator function, which contains (in a private closure) the melody (which file after which) and a pointer to the current file being played. After play()-ing each audio, I subscribe to the "ended" event and play the next() file.

var thing = 'the thing';
var next = (function() {
    //log('#: file');
    //log('-------');
    var these = ['in', '1', '2', '1', '2', '1', '2', '1', 'out'],
        current = 0;
    return function() {
        thing = document.getElementById(these[current]);
        //log(current + ': ' + these[current] + ' ' + thing.currentSrc);
        thing.play();

        if (current < these.length - 1) {
            thing.addEventListener('ended', next, false);
            current++;
        } else {
            current = 0;
        }
    }
}());

That was easy enough. And worked (except on iPhone, see later). But we should be able to do better with sprites.

Sprite

For the sprite I have this audio:

<audio id="sprite">
  <source src="combo.mp3">
  <source src="combo.ogg" type="video/ogg">
</audio>

There's only one file - combo.mp3 which contains all the other four files played one after the other.

So we need to know the start and the length of each piece of audio. There are two parts to playing the sprite. First is knowing the lenghts and the "song" (meaning the succession of audios) and starting to play:

var sprites = {
      // id: [start, length]
       'in': [0, 3.07],
        '1': [3.07,  2.68],
        '2': [3.07 + 2.68,  2.68],
        out: [3.07 + 2.68 + 2.68, 11.79]
    },
    song = ['in', '1', '2', '1', '2', '1', '2', '1', 'out'],
    current = 0,
    id = song[current],
    start = 0,
    end = sprites[id][1],
    interval;

thing = document.getElementById('sprite');
thing.play();

Next is "listening" and stopping when one audio should be stopped, then seeking through the file and playing another part of it. This is done with a setInterval(), I couldn't find a better audio event to listen to.

// change
interval = setInterval(function() {
    if (thing.currentTime > end) {
        thing.pause();
        if (current === song.length - 1) {
            clearInterval(interval);
            return;
        }
        current++;

        id = song[current];
        start = sprites[id][0];
        end = start + sprites[id][1]
        thing.currentTime = start;
        thing.play();
        log(id + ': start: ' + sprites[id].join(', length: '));
    }
}, 10);

And this is it. The property currentTime is read/write - you can figure out where we are and also fast-forward or rewind to where you want to go.

Results

  • Sprites play fine in FF, Chrome, O, Safari, iPhone's mobile webkit.
  • I haven't tested IE9.
  • All the browsers played y stuff off by a few milliseconds, I think some early, some late. This is probably due to unreliable setTimeout(). Also I didn't cut the audio pieces very well, so that might have someting to do. Also adding a few milliseconds of silence between the sprites may help. A follow up experiment will be to have a piano of sorts and see how timely the audio is played after a click/button press.
  • iPhone didn't play properly the non-sprited verison - I believe because it won't let you autoplay unless there's a user action. There might be a workaround, but I only cared about the sprites and they are fine!

Server side

I was imagining the whole thing as a combo service like YUI's JS/CSS combo handler. The browser says: i need these 5 files, the server then creates a new audio file and sends it back. In this case it should also somehow send the data about start/length of each audio, so maybe a JSONP thing. I was mostly curious about those file formats and how the stitching would work.

In terms of file formats, it's not that bad, turns out all I need is MP3 and OGG in order to support all these browsers (I was prepared for worse).

(I could also probably support IE3? and above with a <bgsound> and a WAV, but the WAV is too big to be practical. So any IE (before 9) enthusiasm should probably end up in Flash.)

I recorded my audio pieces in Garage Band and exported as MP3.

ffmpeg is teh tool! It's like imagemagick for audio/video.

Cutting out extra 4-5 seconds Garage Band adds to each file you export:

$ ffmpeg -i in.mp3 -ss 0 -t 2.43 in-ok.mp3

(I didn't do that very precisely I think)

Converting MP3 to OGG is like:

$ ffmpeg -i in.mp3 -acodec vorbis -aq 60 -strict experimental in.ogg

Then the stitching.

MP3 files can actually be concatenated together just like JS/CSS, provided they have the same bitrate. I've done it in the past.

You can also combine by reading the files and piping them into ffmpeg. That somehow feels better:

$ cat in.mp3 1.mp3 2.mp3 out.mp3 | ffmpeg -i - combo.mp3

You can also consider putting a bit of silence between the separate audios.

In order to get the length info to return it to the client, you can use ffmpeg -i filename.mp3 (I haven't done that part)

OGGs cannot be concatenated like MP3, so the combo service should `cat` the mp3s as shown above, then convert to OGG (also shown :) )

Voila

You can now roll your own on-demand audio combo handler and use audio sprites to have fewer HTTP requests a more responsive app/game/html5 thing.

 

Another LOC

Friday, February 11th, 2011
We don't need no docum'ntation
We don't need no source control
No dark sarcasm on the mail(ing) list
Ninjas leave them kids alone

No comments - code should speak alone!
All in all it's just another LOC

We don't need no code conventions
We don't need no (js)lint control
No YSlow rules, no validation
And who needs stinking unit tests?

Hey, guru, leave them kids alone!
All in all it's just another kick in balls

Alternatives:

Hey Crockford, leave them kids alone!

No dark sarcasm in the board room

Many thanks to contributions from @ltackmann, @lucidlifedream, @jalbertbowdenii, @jasonfry, @getify, @skilldrick, @marceloOrigoni, @jdbartlett, @pixsym, @jLix, @joedevon, @leopyc, @cramforce, Carlos!

 

Feliz Navidad Merry Christmas 2009

Friday, December 25th, 2009

Disregarding my dear wife's opinion that the best present to my blog readers would be to *not* publish my new recording.... I'll just go ahead and do it:

Feliz Navidad

'tis a heavy metal sort of cover of Jose Feliciano's Feliz Navidad. I hope you like Iron Maiden and Helloween (there's a special treat between 02:44 to 03:05) and I hope you would be kind enough to tolerate this show-off type of guitar heroism :) Another thing you may notice is at 03:54 - I played a part (a mashup if you will) of Slash's Sweet Child o' Mine solo (splic'd).

psst, here's my last year's Christmas cover - Jingle Bells. You can clearly see where I'm going with this - an album of Christmas songs within the next 10 years. Watch out Mariah Carey :P

 

Help write the lyrics to “Give PNG a chance”

Thursday, September 3rd, 2009

As you know yours truly is a guitar hero wannabe. So I'm playing with the idea of recording a song/video called "Give PiNG a Chance", cover of "Give peace a chance". Hopefully whoever hears it will then think twice before saving a GIF instead of PNG. Imagine. And the web will be as one... :D

Here's the lyrics so far, it's a work-in-progress. If anyone can think of rhyming Web 2.0 buzzwords, please comment.

Give PNG a Chance

#1
Everybody's talking about

Web 2
YouTube
WordPress
CMS
    Highrise
    Enterprise
    Crowd sourcing
    Open sourcing
Phone texting
Unit testing
Foo bars
Avatars

All we are saying is: give PNG a chance

#2
Everybody's talking 'bout

Long Tail
Junk Mail
Fail Whale
Ruby Rail
    Webcasting
    Screencasting
    Podcasting
    Vodcasting
Cloud computing
Tele commuting
Trackbacks
Pingbacks
    Less is More
    Apple store
    Link whore
    Browser war

All we are saying is: give PNG a chance

#3
Everybody's talking about
RSS, CSS
HTML, XML
    SOA, RIA
    API, CGI
REST-POST, GET-HEAD
SOAP? Nope!
    SEO, SMO
    CPM, CRM
SQL, YQL
SMS, MMS

All we are saying is: give PNG a chance
All we are saying is: give PNG a chance
All we are saying is: give PNG a chance
All we are saying is: give PNG a chance
Yup, no more GIFs
All we are saying is: give PNG a chance
All we are saying is: give PNG a chance...

Unused buzzwords

Here's my laundry list of buzzwords I thought of but didn't use so far in the lyrics. If you think of good rhymes as you look through the list, please comment.

  • flickr
  • blog
  • blogging
  • wiki
  • twitter
  • facebook
  • outlook
  • ajax
  • comet
  • firefox
  • chrome
  • ie6.. ie8
  • explorer
  • navigator
  • digg
  • blogger
  • safari
  • opera
  • RoR
  • PHP
  • CDN
  • SMS, MMS
  • WTF
  • FTW
  • web service
  • Perl, cURL
  • Ruby
  • Python
  • social
  • social media
  • social tagging
  • click-through
  • agile
  • photoshop
  • rounded corners
  • fluid layout
  • iPhone
  • Air, PEAR
  • Sliverlight,
  • mobile
  • JavaScript
  • flash
  • buzzwords
  • keywords
  • microblogging
  • microformats
  • micropayment
  • semantic web
  • validators
  • web standards
  • folksonomy
  • taxonomy
  • tagging
  • phishing scam
  • spam
  • widget
  • gadget
  • geotagging
  • linkbait
  • bookmarking
  • viral
  • tag clouds
  • view source
  • torrents
  • bit torrent
  • github
  • blog
  • mashup
  • pagerank
  • social network
 

Blog-to-podcast with ffmpeg

Monday, February 16th, 2009

ffmpeg is such an amazing tool, looks like it's for video what ImageMagick is for images. An all-powerful all-formats wicked cool command-line tool.

This blog post is an introduction to some of the MP3 capabilities of ffmpeg. I'll use ffmpeg to transform a blog post into a podcast-ready mp3 file. If you continue to read this longish post, here's what you can expect to see:

  • using PHP DOM
  • ffmpeg to convert to MP3
  • ffmpeg to crop (slice) an MP3
  • glue together several MP3s
  • Mac's say command for TTS (text-to-speech)

PHP DOM to get some blog content

This blog's feed is at http://phpied.com/feed. Let's create a small PHP script to extract the title, date and content of the last blog post. We'll feed these to Mac's say command to read then aloud.

Location of the feed:

$file = 'http://phpied.com/feed/';

Load the feed into a DOM instance:

$dom = new DOMDocument;
$dom->loadXML(file_get_contents($file));

Access the node that contains the first item, i.e. the last blog post

$post = $dom->getElementsByTagName('item')->item(0);

The title and a friendly-formatted date:

$title = $post->getElementsByTagName('title')->item(0)->textContent;
$date = $post->getElementsByTagName('pubDate')->item(0)->textContent;
$date = strtotime($date);
$date = date('F jS, Y', $date);

Get the content:

$ns = 'http://purl.org/rss/1.0/modules/content/';
$content = $post->getElementsByTagNameNS($ns,'encoded')->item(0)->textContent;

Strip out HTML tags and entities:

$content = strip_tags($content);
$content = html_entity_decode($content);

(Since this content will be read aloud, HTML tags and entities will make no sense. Here we cound've done better job by doing something more special for list, using ALT tags to replace images and so on...)

echo $title, "\n\n", $date, "\n\n", $content;

OK, so now let's call the script from the command line and write the output to a file:

$ php feed.php > thepost.txt

Here's the result - thepost.txt

Using Mac's say for text-to-speech

You can make your Mac talk on the command line, like:

$ say test

and it will say the word "test"

The say command can also read text from text files and write to AIFF audio files. Let's read thepost.txt into an audio file.

$ say -f thepost.txt -o thepost.aiff

Since I'll make this look like it's a part of an ongoing series of podcasts, I'll add some music and I also need a greeting and goodbye spoken text. So:
$ say -o welcome.aiff Welcome to phpied.com podcast
$ say -o thatsallfolks.aiff That was all for today, join us next time on... phpied.com

OK, so now I have three AIFF files:

Now I want to add some music before/after the podcast. I took four loops from Garage Band's library. Here they are:

Next?

Now I have a bunch of audio files. All I need to do is merge them, glue them together into one MP3. Glueing MP3 will be as easy as simply concatenating the files, using cat for example and them making a final pass through ffmpeg to correct dates and other meta data, so that the result looks like one single file, and not like a Frankenstein :)

In order for the concatenation to work, you only need to make sure all files are the same format, bitrate, etc.

Let's choose 22050 Hz, mono for the result. This means always add the options:

-ar 22050 -ac 1

to all calls to ffmpeg.

Let's get cracking.

ffmpeg to convert just about anything

The simplest use of ffmpeg is to convert from one file format to another, for example AVI to MPEG, WMV to FLV and what not. This is done like this for example:

$ ffmpeg -i input.avi output.flv

ffmpeg to get file information

It's useful to know what type of file we're dealing with, you can do this simply by omitting the output file:

$ ffmpeg -i input.avi

Let's check out one of the Garage Band loops:

$ ffmpeg -i opener.mp3 
FFmpeg version..... (more ffmpeg information)
Input #0, mp3, from 'opener.mp3':
  Duration: 00:00:12.6, start: 0.000000, bitrate: 191 kb/s
  Stream #0.0: Audio: mp3, 44100 Hz, stereo, 192 kb/s
Must supply at least one output file

Pretty good quality, more than I need. Plus, for some reason Garage Band added silence at the end of the files I exported, so let's cut it off.

ffmpeg to crop files

I want to remove trailing 5 seconds or so of each Garage Band loop. Here goes:

$ ffmpeg -i breaking-news.mp3 -ac 1 -ar 22050 -ss 0 -t 6 breaking-news-ok.mp3
$ ffmpeg -i opener.mp3 -ac 1 -ar 22050 -ss 0 -t 8 opener-ok.mp3
$ ffmpeg -i closer.mp3 -ac 1 -ar 22050 -ss 0 -t 33 closer-ok.mp3
$ ffmpeg -i squeeze-toy.mp3 -ac 1 -ar 22050 -ss 0 -t 2 squeeze-toy-ok.mp3

-i is the input file -ac is the number of channels (1 for mono) -ar is the rate, -ss is start, -t is length.

Now you can see how the meta information for the opener.mp3 has changed:

$ ffmpeg -i opener-ok.mp3
Input #0, mp3, from 'opener-ok.mp3':
  Duration: 00:00:08.1, start: 0.000000, bitrate: 63 kb/s
  Stream #0.0: Audio: mp3, 22050 Hz, mono, 64 kb/s

Convert AIFF to MP3

Now let's convert the AIFF files from our TTS say command to MP3, keeping the same 22050 mono rate:

$ ffmpeg -i thepost.aiff -ac 1 -ar 22050 thepost.mp3
$ ffmpeg -i welcome.aiff -ac 1 -ar 22050 welcome.mp3
$ ffmpeg -i thatsallfolks.aiff -ac 1 -ar 22050 thatsallfolks.mp3

Here are the new MP3s:

Glue the pieces with cat and ffmpeg

Now, last stage, let's glue all the pieces with cat which simply means append the next file at the end of the previous.

$ cat breaking-news-ok.mp3 welcome.mp3 opener-ok.mp3 thepost.mp3
            squeeze-toy-ok.mp3 thatsallfolks.mp3 closer-ok.mp3 > pieces.together

Then make these pieces a proper MP3 file

$ ffmpeg -i pieces.together final.mp3

Well, that's all folks, here's the final result:
final.mp3

 

Merry Christmas 2008!

Thursday, December 25th, 2008

Best wishes to everyone!

Here's a rendition of Jingle Bells I recorded today (kinda punky and heavily inspired by Pearl Jam's 2007 Christmas single). Enjoy.

» Jingle-Bells.mp3

 

Start wearing purple

Tuesday, December 2nd, 2008

Today was officially my first day at my new job at in Yahoo! Search. In the spirit of less-is-more I'm stepping out of the position of improving the performance of all Yahoo's sites worldwide to improving the performance of just one Yahoo! Search - in the US first, then maybe helping globally. I'm excited by the new opportunity and I'm not just saying it. Having in mind how smart I am (muhaha) and how committed YSearch is to performance, can't help but give a friendly warning to all the dear readers of my blog: if you own GOOG stock, now is the time to consider a second look at your portfolio :P

Anyway, I felt like doing something silly and here's what I came up - my first online video (videos of my kids don't count). I decided to play a rendition of "Start Wearing Purple" by Gogol Bordello on my acoustic and video tape it. This song (here's a vid of the original) is something of a hymn for Y!

So here's the video, enjoy!


start wearing purple @ Yahoo! Video
 

Seeing stars

Friday, August 8th, 2008

It's been interesting few days lately for me, celebrity-wise.

Agassi/Graff

First, last Thursday, Andre Agassi and his wife Steffi Graff came to the Yahoo! center in Santa Monica (my workplace) and played with our kids and signed tennis balls. This was fun, check out: vid, vid, vid, pics.

Here's my daughter almost hitting the ball:
Steffi:Zlatina

Craig Ferguson

Then I became part of the audience at a taping of Craig Ferguson's late night talk show. I find him funny and he was even funnier live. The audience environment is nice and small - 113 people. A nice surprise was that when there are supposed to be commercial breaks in the TV, Craig kept making fun and be there although there was no camera rolling. I always though that during those breaks, the host hides in a dressing room or something.

This was all good.

But the warm up guy and the whole warm up procedure was just awful. There's this guy telling stupid and mostly nasty adult jokes, who's not even remotely funny compared to Craig and he's supposed to warm up the audience so we can be prepared when the main dude arrives. He kept repeating how we should laugh, LOL, etc, even when we don't find something funny (who are we to judge ;) ), it made me feel uncomfortable as if I was on an exam or something. A friend told me he used to be a big Letterman fan, until he went to a show tapping in NY. Well, didn't happen to me, I still like Craig, but the whole event felt a little weird.

Buddy Guy

The last "seeing stars" experience was the best - this Tuesday I went to see Buddy Guy, the blues legend, live. The show was another taping but much more fun and natural then the Ferguson one. The show was part of the "live sets" by Nissan and Yahoo! Music which means a very intimate show, maybe about 200 people, mostly fan club members and "VIP". I was part of the VIP, which meant feeling uncomfortable bypassing a line of people and also not being able to be right in front of the stage. Whatever. The show was great, Buddy Guy is 70+ years old but you can never tell. At some point he was all around the audience and playing a meter or so from me, to the guy next to me. He mostly played songs from his latest "Skin deep" album, but he also did what is probably his usual routine playing Strange Brew like Eric Clapton and Voodoo Child like Hendrix. Can't wait to see the recording on Yahoo music, they said it should be ready somewhere in October. There was also a Q&A session with him, the whole event was so natural, human and anti-celebrity.

You can see how much fun is going on on these shows if you see how Weezer play Radiohead's Creep together with the fans.

 

Yahoo Music API

Thursday, August 7th, 2008

This was meant to be a longer posts with examples and such, but Jim Bumgardner said it and coded it better than I could :) He's been with Y!Music way longer than me and has done way cooler stuff.

As a front-end engineer for Yahoo! Music, I've always thought it would great if the web services we use to create the Y! Music pages were available to developers outside of Yahoo!, and, as of today, due to the herculean labors of our web services team, they are!

Full blog post and code examples are on the YDN (Yahoo! Developer Network) blog and the Music API docs are there too.

Could you come up with an idea of a mashup using music data like artists, songs, similarities? The APIs are here.

 

first book review and a new instrumental piece

Tuesday, August 5th, 2008

The first review for OOJS is posted on Amazon - 5 stars, yeey! (My copies still hasn't arrived, talk about weird, eh?). If anyone is interested in reading my book and posting a review on Amazon or some other site, let me know, my publisher might be willing to send you a copy.

Here's another song I just recorded today, a sort of metal/grunge thing with a melody of some sort even :) Enjoy loud!
» melody.mp3 (< 3 min)

 

Steppn

Tuesday, July 1st, 2008

So I got one year older last week, no, the week before and I got a gift: a guitar processor. A DigiTech RP250 Guitar Multi Effects Pedal, to be precise. Yeey! The thing has so many pre-build effects, some of them really weird as you can hear. And can be plugged into the PC via USB, so cool.

I recorded a sort of a piece today, using one of the pre-builds, the display says the name is of the effect is STEPPN, hence the name of my new song :D

Steppn

It's a long piece, actually, believe or not, I plugged the guitar 20 seconds after the start of my creation. Before that I'm just playing with the cable jack and enjoying the noises. There's also a drum machine that comes (absolutely free ;) ) with the guitar processor. There's no mixing going on (it takes so much time), just plug and play, one guitar and this is it. I eventually turn on the drums at some point. If you listen carefully you can hear Jimi Hendrix and Pearl Jam in there. Also something that resembles the fly of the bumblebee. And yeah, the whole thing is very Jimmy Pagelicious, Zeppelinicious and Dazedilicious and Confusedilicious.

 

Kiss alive

Saturday, May 17th, 2008

I've never been a Kiss fan, but went to see them while in Bulgaria. The show was excellent, lots of fireworks, fire breathing and all kinds of effects. More theatre than music, but fun nevertheless. It's a whole different experience than for example Pearl Jam, which is my kind of show, because it's all about the music and being simple, honest and non-celebrity. I was looking to recognize a piece that Mike McCready from Pearl Jam says he stole from Kiss, in turn stolen from The Doors. The piece in question is the beginning of the Alive (Pearl Jam) solo, which is like the beginning of Five To One (Doors) and the middle of the She (Kiss) solo, at least I think She was the song.

Tried to do a few photos with a camera phone.

cinderroad.jpg
The opening band, Cinder Road, apparently something like a post-glam band, inspired by bands (from one of the worst periods in pop music ;) ) like Poison, Motley Crue and obviously Cinderella.

cinderroad2.jpg
In fact I think Cinder Road sounded better than Kiss, maybe because they couldn't rely on effects but had to actually play.

kiss-gene.jpg
Gene Simmons

kiss-gene-paul2.jpg
Gene Simmons, Paul Stanley

kiss-gene-paul.jpg
Yep, I was close to the stage, although I moved away eventually. The sound from the back was better.

kiss-guitar.jpg
Starchild, I think was the nick name of this dude.

kiss-snow.jpg
At some point there were lots of flying little pieces of paper, lots and lots of them, much like snow.

kiss-moon.jpg
The moon

sister.jpg
My sister in the foreground, yet another explosion of sound and light on the stage in the background.

 

Crowes and Crows

Friday, March 28th, 2008

The Black CrowesCounting Crows

Currently enjoying two new albums by two older bands:

Cool stuff, especially the first one.

Can't help but be a little worried about the fact that I seem to have stopped my musical development somewhere in the nineties, and just keep listening to the same bands. Luckily some of them sometimes release new albums.

 

Sharpenning those flamenco skillz

Wednesday, February 6th, 2008

What's new today? Let me see.

[x] Wrote the first sentence of chapter 6 of the new book. Goes like this "After encapsulation, inheritance is probably the most important feature of the object-oriented programming". Promising, but not exactly progress. Good news is I already wrote all the code for the chapter.
[x] My teammate Nicole posted an interesting entry on developer.yahoo.com blog. Especially interesting if you happen to care about web page performance and you're also a US voter. I haven't voted in yeeeaars. Wasn't allowed to vote in Canada initially and just when I became Canadian I moved to US where I'm also not allowed to vote. Oh, well. Don't like any candidate anyway.
[x] Christian Heilmann posted on Ajaxian about the canvas Pie I published last night

... and ...

[x] I recorded again!!

It's a piece loosely based on a Paco De Lucia song I tried to figure out for myself long ago. For this recording I used a microphone specially designed for acoustic guitars (gift from my best-men) but the problem is I plugged it into the microphone jack on the laptop, so there is some nasty amplification. I tried to de-amplify in Audacity.

Here goes: Paco. Hope ya like it! :D

 

Audacity + Starcaster

Wednesday, January 30th, 2008

(if you see this in a RSS reader, come to the page to hear the music)

(Now that I got this Starcaster and also completed the first 5 chapters of the new book) Yesterday, I was wondering how I can record some music, so I searched for open-source sound recorder and came across this beautiful application called Audacity (French word for "courage", didn't know it existed in English).

Anyway, last time I've tried music editing software was yeeeears ago and they looked pretty intimidating. Audacity is nothing like this, it's so easy to get started. I just started the program, hit the big red "record" button and recorded away. Just as easy as Windows Sound Recorder. But! When I wasn't happy with what I recorder and hit "record" again, it played my previous junk but was recording on another track. How cool is that?! So easy to mix. Now I record something, then record again while listening with headphones to the previous thing.

I don't have any special equipment, so I just use the laptop's built-in microphone. Since those microphones amplify and therefore distort, I do a little trick. I play load (take that, neighbors!) and set the microphone level in Audacity to almost zero. The result is not too shabby for an amateur recording if you ask me. I do have an amp, no bigger than any average self-respected Java book, it was in the same package with the guitar.

So here goes. My take on Stevie Ray Vaughan's take on Jimi Hendrix' Little Wing intro - about 40 seconds.

Little Wing

Now if you feel brave, try the next piece. The theme is somewhat distantly loosely based on what I remember of a song called "Que Que Ha?" by Joe Pass. In this case I recorder the rhythm first then tried improvising some sort of a - for a lack of a better word, let's call it - solo on top. Didn't like the result, so tried again. Thought first time was definitely better. At this point the kids were finishing their bath so I had to forget about further recordings. Later on I tried playing both solos together - horrible, horrible idea. But then I moved (it's trivial with Audacity) the first solo to the left speaker and the second to the right. And here's the result. I suggest that if, for whatever unhealthy reason, you decide to listen to the next piece, do use the headphones. Otherwise it really is a handful, er, earful. Plus people around you will appreciate it, I assure you. Good luck!

Que Que Ha?

Ah, yeah and the nice player you use to hear these MP3s is the Yahoo! Media Player, which you can integrate on every page.

 

MP3 player from Yahoo! – bookmarklet

Wednesday, January 23rd, 2008

Update Jan 30, 2008: updated code based on comments and code from Carl
Update Dec 11, 2008: updated the code thanks to the comment from Nolan

Here's the scenario: you have a page that links to some .mp3 files. You add a line of code in your page and lo and behold, there's a nice media player embedded into the page. Your visitors no longer have to download the MP3s, they can just stream it right there. All the mp3s on the page become part of a playlist.

The line in question you need to add to your page is:

<script src = "http://mediaplayer.yahoo.com/js"></script>

More about the player here - yahoomediaplayer.wikia.com

For examples of sites using this player in the wild, try aurgasm.us

A bookmarklet

Now, here's what you can do if you want to use the player, but the web site owner haven't incorporated it yet. Take the player with you. Run my bookmarklet that will simply insert the required javascript into the page.

So here goes in two easy steps:

  1. Grab the bookmarklet:

    Right-click, add to favorites

  2. Go to any page that links to MP3s and click your new shiny bookmarklet

    Enjoy!

Source

The readable source code of the bookmarklet:

javascript:(function(){

  var start = function(){YAHOO.mediaplayer.loadPlayerScript()};

  var script = document.createElement('script');
  script.src = 'http://mediaplayer.yahoo.com/js';

  if(script.addEventListener){
    script.addEventListener("load", start, false);
  } else{
    script.onreadystatechange = function(){
      if(this.readyState=="complete"){
        start();
        script = null;
      }
    }
  }
  script.type="text/javascript";
  document.getElementsByTagName('head')[0].appendChild(script);

})();
 

Starcaster

Tuesday, January 8th, 2008

Look what Santa brought this year:

starcaster.png

A Starcaster by Fender! (Not to be confused with Stratocaster.) Packed with an amp and everything.

Looking forward to posting some recordings in 2008!

 

Charlotte and Beck

Sunday, November 5th, 2006

Some new music, well new for me, I'm listening to:

  • Charlotte Gainsbourg's 5:55, very nice, helps me with concentration :) Air contributed to this album, I love Air, saw them live in Montreal maybe a year or so ago.
  • Beck's The Information. Makes a Sunday midnight, spent in reviewing and deleting 896 comments held for moderation not so much of a drag. I also love his Mutations.

The new Audioslave is also maybe worth mentioning, although this album was a bit of disappointment. And what the hell is Chris Cornell doing in the new 007 movie. Only a few musicians out there can do a song for a blockbuster and do it with style, without coming across as "commercial sell-outs". One example comes to mind.

 

Audioslave live in Montreal

Sunday, October 9th, 2005

My ears are still bleeding form yesterday's show :) A great band, a great show! The venue was CEPSUM, which is a local university's venue for sports events. Most bigger names do their shows in the Bell Centre in Montreal, which is a terrible, terrible place for a rock concert. It's all iron and tin and resonances a lot of noise. CEPSUM was different. In this case, the fact that Audioslave are not (yet) that big a name is of fans' advantage. We got to see them in a cozier venue with better sound. I was on the ground level, I believe this is the only place where one should be in a rock concert ;)

There were two opening bands. I was too late for the first one, but did heard the second - Seether. They played very well, with a lot of energy, although... you know, not my type. They did a Nirvana cover - "Drain You".

As expected Audioslave did played some Soundgarden and Rage Against The Machine songs, but most of the songs were Audioslave's. After about 5 songs from the new Out of Exile album, they did Soundgarden's Spoonman while the the scene background was showing that thing from the cover of the Badmotorfinger album. Right after that the surprise was Temple of the Dog's "Hungry". Then after the encore break, Chris Cornell alone played a acoustic versions of Black Hole Sun and another Soundgarden's song I cannot recall the name of. As for RATM's songs they did two in the main part of the concert and then at about the end of the encores, they blew the place up with "Killing in the name of".

As for Audioslave's songs, I cannot really tell which ones they played. The way I listen to music is when I find something new I like, I listen to it all the time. At some point the different songs blur into one and I cannot really distinguish one from the other. I've been looping both Audioslave's albums for a few weeks and I pretty much know the songs by heart, but not by name. I'm sure I shouted the chorus of Like A Stone and I'm almost positive the show ended with Cochise, but that's about it. Oh, and in addition to the songs from their two albums they played a new one, not yet recorded!

The bassist was singing backing vocals on most of the songs, and the drummer did Eddie Vedder's part in "Hungry". I was most impressed by the guitarist. I always am, being an ex-guitarist myself. I was never a RATM fan, so before listening to Audioslave I had no idea what Tom Morello's style is like. Listening to some songs on the radio left me with the impression that he was overdoing the wah-wah effect , which seemed a bit amateurish to me. That is because the wah-wah is so great once you start experimenting with it, that it's very easy to get a little carried away (I know I was accused of wah-wah overuse by fellow band members at the time). Listening carefully to the Audioslave's albums proved my initial impressions wrong. The guitars are actually very good and innovative. And the energy and the enthusiasm in them may make them sound a bit next to amateurish, but that's how you can tell the really good musicians (and not only musicians for that matter) - their playing is not intrusive, but simple and may sound too easy, almost childish. That's only because they are so ... you know, clean and perfect. So it was a great experience to see and hear this novelty guitars live.

In two words - Audioslave are great live and of you have a chance to have them playing in your town, do not hesitate to go!

Oh, another thing, Chris Cornell's vocals! Amazing! Because of the way he sings, the high vocals and all, I was expecting that his voice will get exhaused after the first half of the songs and he'll have problems singing the rest live. No such thing! It was just great to hear him live. Like a guy from the crowd, a big fan apparently, noted: "Chris Cornell, babyyy!"

 

Pearl Jam live

Saturday, September 24th, 2005

Last week I went to see Pearl Jam! It was an amazing experience. I saw them about a year ago and really, really liked the show. This time it was ... different, at the same time a bit worse and a whole lot better.

The bad part was the sound - too loud and not clear. It's probably because of the venue, which, while maybe ideal for hockey games, is not designed to host concerts. It's all iron and tin that echo the sound. When you press your ears the sounds gets a whole lot better, but c'mon you cannot go to a concert and stay all the time with your hands on your ears!

The good part - the concert was awesome. They played a lot. (As a local paper put it - "best value for the money") They played so much that at the end the lights were on, the evening was officially over but they kept playing and playing. The whole show was about 2 and a half hours with two encore breaks.

In terms of songs, they started with "Release" from "Ten", just an intro to what followed. And what followed was all their fast, punky, heavy songs. Think "Do the evolution", "Habit" and "Lukin". Even songs that are not as noisy, like "Even flow", they played faster and harder. The only break to catch your breath was "Better man", somewhere in the middle of the show and probably only the first part of the song. Add this to the overall bad and loud sound and you get the picture, my ears were bleeding.

It all changed with the encores. I had the feeling that the encores were as lengthy as the main part of the concert. They played "Crazy Mary", "Last kiss", "Black", "Alive"... it was pretty amazing. I kept thinking OK, that's it, they are not going to play more, despite all our shouting (and there was a lot of shouting). But ... they did and they played and they kept on playing. At the end, like I said, the lights were on, the stage was even not as well lit as the people in the audience. So we had a chance to look at each other, the focus was on us. Then the last song was Yellow Ledbedder; it ended, everybody was ready to go; Matt Cameron, the drummer, threw his several pairs of drumsticks in the crowd, everybody left their instruments, ready to go, only ... Mike McCready, the guitarist, was still playing. And he was playing this Hendrix-SRV-like riff as if the concert was just starting. Honestly, I looked at the faces in the crowd, even the venue's personnel and everybody was smiling at the end of the concert. It's just the band is so natural, so honest and human. No poses or playing the big stars. Eddie Vedder's favourite was to put the back of his shirt, without undressing it, on top of his head, I mean how starry that can be?

Before I saw them last week for the second time I was wondering sometimes - which is my favourite live (and not only live) band. Now I know ;) PJ, PJ!

Oh, and Eddie Vedder is growing long hair again!

 

Coldplay live

Saturday, August 6th, 2005

Here's my ticket ;)

I went to visit them maybe about three years ago, on a tour right after their second album "Rush of Blood to the Head" was released. They were great back then and they still are now!

"...Birds go flying at the speed of sound,
to show you how it all began..."