Name that tune [entries|reading|network|archive]
simont

[ userinfo | dreamwidth userinfo ]
[ archive | journal archive ]

Mon 2005-11-07 10:06
Name that tune

I woke up this morning with a fragment of a tune running round my head, and no idea where it came from. I've just managed to identify it, thankfully, but it's been driving me mad in the two hours between then and now; and there's another tune fragment which I've been trying to identify for months if not years.

What I'd therefore like to do is to post the tune in my diary so that all my readers can see if they know it; but I don't know of any sensibly standard way to represent music in ASCII. I could sing it into a microphone and post a link to an MP3 (or, probably more usefully, synthesise it programmatically into an MP3, which wouldn't require recording hardware and also wouldn't involve my poor singing voice complicating the issue), or I could write it down in musical notation and post a link to a picture; but both of those solutions strike me as woefully wasteful of bandwidth given that the actual information content of the few bars I can remember ought in principle to be no more than a line or two of text. I could enter it into some sort of sequencer program and post the file saved from that, but that suffers from standardisation problems: it would limit my audience to people with the same sequencer program.

If only everybody had a Spectrum, I could post a sequence of BEEP commands which would play the tune, and this would actually be a more standard low-bandwidth approach than anything else I'd thought of. It even briefly occurred to me that you can get Spectrum emulators for most operating systems… But that's not a good idea either, because the trouble with Spectrum emulators is that you can't cut and paste into them, so it would be a matter of everyone manually typing in the BEEP commands I posted.

I must be missing something obvious. Is there no sensible way at all for me to post a few lines in a text-based forum and have the majority of readers be able to cut and paste that text into something which will convert it into a possibly recognisable tune?

LinkReply
[identity profile] pseudomonas.livejournal.comMon 2005-11-07 10:09
ABC format (http://abc.sourceforge.net/)?
Link Reply to this | Thread
[personal profile] simontMon 2005-11-07 10:15
Looking at that page, it's not obvious to me what set of software I'd have to download to be able to play an ABC fragment I'd acquired from somewhere. I suppose the most likely thing is abcMIDI plus a MIDI player of some sort. It certainly doesn't have the same out-of-the-box convenience of the Spectrum BEEP command :-/
Link Reply to this | Parent | Thread
[identity profile] pseudomonas.livejournal.comMon 2005-11-07 10:19
ABC is a fairly-widely supported format, there certainly exist ABC to MIDI and ABC to Lilypond. If there doesn't already exist a web gateway where you can paste in a chunk of text and have a Midi file spat out at you I'll try and set one up tonight.
Link Reply to this | Parent | Thread
[personal profile] simontMon 2005-11-07 10:20
That still needs me to have a MIDI player. Do those come as standard on (say) Windows these days?
Link Reply to this | Parent | Thread
[identity profile] pseudomonas.livejournal.comMon 2005-11-07 10:27
Yes. Windows Media Player handles Midi, as do QuickTime, RealPlayer, and just about all the others. On my desktop at home I have to use timidity, but that's just because my sound card drivers are iffy.
Link Reply to this | Parent
[personal profile] mair_in_grenderichMon 2005-11-07 10:23
do mobile phone "compose" functions have a standard format?
Link Reply to this | Thread
[personal profile] simontMon 2005-11-07 10:26
Ooh, that's a lateral solution. I don't know; my own mobile doesn't even have a compose function as far as I know :-/
Link Reply to this | Parent | Thread
[identity profile] pseudomonas.livejournal.comMon 2005-11-07 10:27
I don't think there's a standard there, but ICBW.
Link Reply to this | Parent | Thread
[identity profile] womble2.livejournal.comMon 2005-11-07 10:43
Some phones support MIDI files; others use some bastardisation thereof.
Link Reply to this | Parent | Thread
[personal profile] mair_in_grenderichMon 2005-11-07 11:32
I guess most people download ringtones etc these days, rather than entering them manually. My phone certainly has a function where I can type in something like d1b1d1b1g2, and have it play oranges and lemons at me. I forget how it handles octaves, but it does manage a couple.
Link Reply to this | Parent
[personal profile] shortcipherMon 2005-11-07 10:45
Link Reply to this | Parent | Thread
[identity profile] pseudomonas.livejournal.comMon 2005-11-07 21:19
Ah, and you can write a player for it with the system beep:
($B,$D,$O,$/)=(63,4,6);$f{(qw/C C# D D# E F F# G G# A A# H/)[$_%12].(int($_/12)
+2)}=440*(2**(1/12))**($_-45)for(1..88);for(split(/[^\w\=\#\.]+/, uc(<>))){if(
/(\w)=(\d+)/){$$1=$2;next}if(/^(\d*)([PA-H]\#?)(\.?)(\d?)$/){$n=($3?60:90)/$B/
($1||$D);`@{["xset b 75 ".int($f{$2.($4||$O)}||1)." ".($2=~/P/?0:int($n*1000))]
}`;print chr(7),`sleep $n`}} # I apologise for this, I really do. I was bored.
Link Reply to this | Parent
[personal profile] shortcipherMon 2005-11-07 10:32
Not text-based, but... MIDI?
Link Reply to this
[identity profile] cartesiandaemon.livejournal.comMon 2005-11-07 10:35
Don't the notes have names like C and D#? Can't you just write those down?

Or find a font with music notes in, or write a program which will draw them in ascii art?

Come to think of it, parhaps a gif of the music *is* the right solution -- it should compress fairly well, no?
Link Reply to this | Thread
[personal profile] simontMon 2005-11-07 10:39
Writing down the note names is only half the problem. You also have to write down which octave they're in (C followed by G could equally plausibly be going up or down, and it makes a difference which), and also specify the note durations and any rests in between. Also you have to make it clear enough that it isn't too much effort for the reader to reassemble it in their own head...

I think I'm currently leaning more towards audio solutions than musical notation ones, simply because not everybody can read music.

(That said, my work PC doesn't have working sound, so audio wouldn't be good for me if someone else posted a tune. Perhaps [livejournal.com profile] pseudomonas is right, and my best bet is to use a format which can be converted into audio or a printed score.)
Link Reply to this | Parent | Thread
[identity profile] cartesiandaemon.livejournal.comMon 2005-11-07 10:48
I assumed recognising a famous a snippet was likely to have relatively simple timing/octave, to the extent you could just write it in brackets or something, or use an accent mark (which most people should figure out). ("GGGEb...")

"I think I'm currently leaning more towards audio solutions than musical notation ones, simply because not everybody can read music."

Indeed. Though there's probably some correlation between not recognising stuff and

Have you tried services like http://www.shazam.com/music/ where you ring them up and hum it and they tell you the answer? I've never tried it, but I've heard it's a lot better than I expected.
Link Reply to this | Parent | Thread
[personal profile] simontMon 2005-11-07 10:51
The website suggests you're supposed to hold the phone out to the actual music, and doesn't mention humming it. I fear that might imply it matches on more than just the primary tune, which might imply that humming won't work.

I would certainly like to see a working tune search engine...
Link Reply to this | Parent | Thread
[identity profile] cartesiandaemon.livejournal.comMon 2005-11-07 12:12
Mmm. But I'm sure I remember *some* service it was worth trying with. It'd almost be worth the cost of the call just out of curiousity imho
Link Reply to this | Parent
[identity profile] songster.livejournal.comMon 2005-11-07 16:32
Write it out on a proper stave, scan it, post the link?
Link Reply to this | Parent | Thread
[identity profile] songster.livejournal.comMon 2005-11-07 16:33
I take on board the point that many people can't read music - on the other hand, those who can actually answer your question are vastly more likely to be able to...
Link Reply to this | Parent
[personal profile] simontMon 2005-11-07 16:33
That was one of the things I suggested in my original post. I could do it, but it seems woefully wasteful of bandwidth by comparison with what ought to be achievable.
Link Reply to this | Parent | Thread
[identity profile] songster.livejournal.comMon 2005-11-07 16:36
Hum. Only if you're considering *your* bandwidth and processor time, as compared to everyone else's who has to decode the information from the textual representation, surely? I include wetware processor time in this calculation.
Link Reply to this | Parent | Thread
[personal profile] simontMon 2005-11-07 16:39
This is where we came in. If there were something of roughly the order of Spectrum BASIC available on every damn machine in the modern computing world, then there'd be no wetware time involved at all. I'd post some BEEP commands, everyone who cared would cut and paste them into their nearest BASIC window, and the tune would immediately come out of their speakers.

It's precisely the fact that there simply doesn't seem to be anything nearly so convenient in modern operating systems which annoyed me. This post was mainly an effort to find out if there was anything obvious I'd missed. It appears not.
Link Reply to this | Parent
[identity profile] mooism.livejournal.comMon 2005-11-07 10:40
There are unicode characters for music notes, presumably with <pre> and <s> or <u> you could mock up a stave to display them on.
Link Reply to this | Parent
[identity profile] mooism.livejournal.comMon 2005-11-07 10:41
Bandwidth is cheap.
Link Reply to this
[personal profile] gerald_duckMon 2005-11-07 11:06
Quite a few of us grok mup, which is a fairly legible textual format. Unfortunately, the software that converts it into postscript or MIDI, while being available as source code, isn't free of charge.

Personaly I have an even more serious soft spot for the music notation used by AMPLE, which isn't designed to be converted nicely into staff notation but is much easier on the (well, my) eye in textual form. But the software died with the BBC Micro platform; I keep feeling I should resurrect it.
Link Reply to this
[identity profile] dave hollandMon 2005-11-07 11:43
What was the tune, just out of interest?
Link Reply to this | Thread
[personal profile] simontMon 2005-11-07 11:53
The one I successfully identified this morning was two bars of instrumental section from the middle of "Kids In America" by Kim Wilde, which was on [livejournal.com profile] lark_ascending's favourite 80s compilation when we were going out five years ago. I don't think I've heard it since then, so it was a difficult retrieval job, although it would have been easy if I'd been able to remember what came after the two bars I had.
Link Reply to this | Parent | Thread
[identity profile] cartesiandaemon.livejournal.comMon 2005-11-07 12:12
Did you just remember?
Link Reply to this | Parent | Thread
[personal profile] simontMon 2005-11-07 12:14
I think I suddenly remembered what came next, and then it was easy to identify the song. It took me another twenty minutes to be sure I'd got it right, though; I kept being worried that I'd transplanted my two bars into completely the wrong song and not noticed.

I'm now fairly convinced I'm right, although nothing has actually changed except concepts continuing to shift around my head.
Link Reply to this | Parent
[identity profile] antifuchs.livejournal.comMon 2005-11-07 11:54
For linux users, there's...
beep(1):

beep allows the user to control the pc-speaker with precision, allowing
different sounds to indicate different events. While it can be run
quite happily on the command line, it's intended place of residence is
within shell/perl scripts, notifying the user when something interest-
ing occurs. Of course, it has no notion of what's interesting, but
it's real good at that notifying part.

It runs from the command line, tone pitch and duration are controlled by its arguments.
Link Reply to this | Thread
[identity profile] satanicsocks.livejournal.comMon 2005-11-07 13:10
Re: For linux users, there's...
I've used beep in the past to simulate mobile phone rings (to annoy a colleague *grin*) and I think, various trickery with xset b too. You could assemble those into some sort of shell script, et voila?
Link Reply to this | Parent
(Anonymous)Mon 2005-11-07 13:48
Re: For linux users, there's...
You could implement the relevant escape sequences in PuTTY and wait for people to upgrade. Most people reading your journal use PuTTY, right? :)
Link Reply to this | Parent
[identity profile] naath.livejournal.comMon 2005-11-07 13:51
Phone post?
Link Reply to this
[identity profile] marnanel.livejournal.comMon 2005-11-07 15:32
I'm sure I remember a book, many years ago, which listed thousands of tunes in perhaps the simplest possible format:

* = first note
U = up from previous note
D = down from previous note
S = same as previous note

e.g.

*SUSUSDDSDSDSD = "Twinkle Twinkle Little Star"

And then the keys were just sorted into alphabetical order.

I'm sure an online database could be used for this these days.
Link Reply to this | Thread
[personal profile] simontMon 2005-11-07 15:44
Musipedia does exactly this (except that it uses "R" instead of "S"), as a colleague pointed out this morning. Sadly, its database seems rather small; also, it appears not to find fragments which don't begin at the very start of the song, making it unhelpful if all you can remember is a couple of bars from the middle. I tried both my fragments in there and it didn't find either.
Link Reply to this | Parent
[identity profile] senji.livejournal.comWed 2005-11-09 13:08
Parson's Code (http://en.wikipedia.org/wiki/Parsons_code).
Link Reply to this | Parent | Thread
[identity profile] marnanel.livejournal.comWed 2005-11-09 15:29
Gosh, thank you. It's really good to have a name attached to it.
Link Reply to this | Parent | Thread
[identity profile] senji.livejournal.comWed 2005-11-09 15:53
I happened to have been coïncidentally talking about it to [livejournal.com profile] claroscuro the other day and it took me about an hour to remember the name…
Link Reply to this | Parent
[identity profile] feanelwa.livejournal.comMon 2005-11-07 17:29
You could write 16 stars (or however many beats the tune goes on for) on the first line, and then on the second line you could write the notes where they happen and a dash if the previous one was long and still continuing. This would however require either a piano or [livejournal.com profile] deborah_c.
Link Reply to this
[identity profile] keithlard.livejournal.comMon 2005-11-07 19:05
There are such things as dictionaries of melodies, where all the tunes are transposed into C and just written down as 'C C D A B C' ekcetera.

There's probably an Intarwebs version of that now.
Link Reply to this
navigation
[ go | Previous Entry | Next Entry ]
[ add | to Memories ]