2021 1

How to extend Markdown with custom blocks

One problem I’ve had in Markdown is rendering a content in columns. On Bootstrap, the markup would look like this: <div class="row"> <div class="col">...</div> <div class="col">...</div> </div> How do we get that into Markdown without writing HTML? On Python, the attribute lists extension lets you add a class. For example: This is some content {: .row} … renders <p class="row">This is some content</p>. But I can’t do that to multiple paragraphs. Nor can I next content, i.e. add a .col inside the .row. ...

2012 3

Streaming audio to iOS via VLC

You can play a song on your PC and listen to it on your iPhone / iPad – converting your PC into a radio station. As with most things VLC related, it’s tough to figure out but obvious in retrospect. The first thing to do is set up the MIME type for the streaming. This is a bug that has been fixed, but might not have made it into your version of VLC. ...

Audio data URI

Turns out that you can use data URIs in the <audio> tag. Just upload an MP3 file to http://dataurl.net/#dataurlmaker and you’ll get a long string starting with data:audio/mp3;base64... Insert this into your HTML: <audio controls src=”data:audio/mp3;base64...”> That’s it – the entire MP3 file is embedded into your HTML page without requiring additional downloads. This takes a bit more bandwidth than the MP3, and won’t work on Internet Explorer. But for modern browsers, and small audio files, it reduces the overall load time – sort of like CSS sprites. ...

Downloading songs from YouTube

Five years ago, I built a song search engine – mainly because I needed to listen to songs. Three years ago, I stopped updating it – mainly because I stopped listening to songs actively, and have been busy since. For those of you who have been using my site for music: my apologies. These days, I don’t really find the need to download music. YouTube has most of the songs I need. Bandwidth is pretty good too even when on the move. But when I do need to download music, this is my new workflow. ...

2008 1

Recording online songs

In the 1980s, we rarely used to buy audio cassettes. It was a lot cheaper to record songs from the radio. It’s amazing that in the 2000s, this technique seems to be less used than before. If you wanted to record a song that was streamed online, you could go through the complex procedures I’d mentioned earlier to download online songs, or you could use the 1980s technologies. Get a tape recorder, connect the headphones of your PC to the tape recorder’s microphone using a stereo cable, and record to your heart’s content. ...

2006 2

Playing sounds backwards

You can play a video backwards and still recognise the scenes quite well. Can you do that with sound? I tried it on this Bryan Adams clip of Summer of ‘69 (mp3). When played backwards (mp3), it almost sounds like Arabic! Instruments sound weird backwards too, like the guitar played backwards and drums played backwards. It’s seems obvious once you see the wave file. The picture below shows the guitar. The sounds are clearly not symmetric left to right. ...

MP3 bitrates and sound quality

At what bitrate should you encode your MP3 files? Listening tests show that at 256kbps, you can’t tell the difference. But that’s with 2 amplifiers and big speakers. What about headphones? I tried an experiment with my cousin, who has the best ear for music that I know. We ripped a good audio CD of his at 128 kbps. He put on a pair of headphones (the kind that fit into your ear) connected to my laptop. I played the first half a minute of the original and the ripped version 10 times, in a random order, asking him to guess which was which. Result: 5 correct and 5 wrong. He couldn’t tell the difference. ...

2001 2

Windows Media Player 8

Windows Media Player 8 lets you convert audio & video files into its new format. It compresses better than MP3, apparantly.

Legality of illegal MP3s

Sweden has ruled that it’s OK to have links to illegal MP3s, so long as the server is in a country where illegal MP3s are legal. That’s in stark contrast with France vs Yahoo. In fact, the norm is that linking even to the front page of commercial sites needs permission sometimes. A court in Utah ruled that providing links to copyrighted material could constitute copyright infringement. Better check out cyberlaws and ensure compliance with copyright rules on the Internet. ...

2000 1

CD-Recordable FAQ

Want to record downloaded MP3s into an audio CD? Want to take home software? See the CD-Recordable FAQ. Rookies, see Josh’s page