venta: (Default)
[personal profile] venta
Right, let's see if anyone's daft enough to play this game :)

At work, I listen to music. I almost always listen to my own mp3s (in complete albums), with occasional diversification into various streaming audio sources (last.fm, Xfm, 6Music, launchcast, etc).

However, I reckon now's my chance to get down with the cool kids, and have a random play list. I could just bung Winamp on shuffle, but where's the fun in that ? You're invited to choose my tracks. But, obviously, you don't know what music I have to hand (about 20Gb of mp3s).

So, you are invited to choose a number, of the form x-y-z.

The x chooses the artist, and should be a number between 1 and 262 inclusive, where 1 is the alphabetically first artist in my collection.

The y chooses the album. So, in general, it should be quite a low number, as I often have only one or two albums per artist. Albums are numbered in ripping order. If you choose a number greater than the number of albums I have by the chosen artist, I'll just take that to be the highest numbered album I've got.

The z chooses the track. So, in general, it should be a number between 1 and about 12 or so. I do have albums with over 20 tracks, though. If you choose a number greater than the number of tracks on the chosen album, I'll just play the last track.

So, as an example, 262-1-10 would be Remember Me, which is the tenth track off the first Zutons' album (The Zutons are the alphabetically last artist I own).

I'll do it as a poll to make life easier, but feel free to comment your number instead. Or feel free to tell me to stop being so damn lazy and make my own playlist. If anyone's interested, I'll post the resulting playlist later this afternoon.

[Poll #442090]

Date: 2005-02-22 02:42 pm (UTC)
From: [identity profile] wimble.livejournal.com
That's a bit wordy, innit? See the Poll Answers for a perl one liner ;-)

Date: 2005-02-22 03:07 pm (UTC)
From: [identity profile] broadmeadow.livejournal.com
Wait 'till you see it in COBOL.

IDENTIFICATION DIVISION.
PROGRAM-ID. LIZ-PLAYLIST.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
66  MAX-ARTIST VALUE 262.
66  MAX-ALBUM VALUE 5.
66  MAX-TRACK VALUE 20.
01  ARTIST  PIC 999.
01  ALBUM   PIC 9.
01  TRACK   PIC 9.
PROCEDURE DIVISION.
       COMPUTE ARTIST = 1 + MAX-ARTIST * FUNCTION RANDOM.
       COMPUTE ALBUM = 1 + MAX-ALBUM * FUNCTION RANDOM.
       COMPUTE TRACK = 1 + MAX-TRACK * FUNCTION RANDOM.

       DISPLAY ARTIST "-" ALBUM "-" TRACK.
       STOP RUN.


[My COBOL's rusty, so that's probably not quite right. And you can do it in one line using MF COBOL.]

Date: 2005-02-22 03:20 pm (UTC)
From: [identity profile] wimble.livejournal.com
I'll write it in SQL, if you're not careful!

Date: 2005-02-22 04:24 pm (UTC)
From: [identity profile] phlebas.livejournal.com
Bah, beaten to it!

COBOL

Date: 2005-02-22 05:26 pm (UTC)
From: [identity profile] ringbark.livejournal.com
Real cobblers don't use COMPUTE. It makes it too close to a useful language.

Re: COBOL

Date: 2005-02-23 12:17 pm (UTC)
From: [identity profile] broadmeadow.livejournal.com
I think there would be problems with the intrinsic functions if you used combinations of MULTIPLY and ADD instead. phlebas will be able to confirm, I am sure.

Profile

venta: (Default)
venta

December 2025

S M T W T F S
 123456
78910111213
14151617181920
212223 24252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 27th, 2025 05:17 pm
Powered by Dreamwidth Studios