9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Axel Belinfante <Axel.Belinfante@cs.utwente.nl>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] Ideas???
Date: Mon, 18 Sep 2006 21:30:36 +0200	[thread overview]
Message-ID: <200609181930.k8IJUb405059@demeter.cs.utwente.nl> (raw)
In-Reply-To: Your message of "Mon, 18 Sep 2006 16:53:35 +0200." <15d663864e1f3c5a967cd9a32f4adf18@mail.gmx.net>

[I'm reposting this (slightly edited) after a first post seemed not to
 have made it through. I'm sorry if this is just a duplicate after all]

> >> And I have no idea how I easily create playlists.
> >> It's shell magic for mplayer, and GUIs using mplayer
> >> may also provide ways - as I read the manpages,
> >> I am supposed to write maps myself. :-(

> > it is possible to generate (template) maps.
> > either when you get the music from cd (readcd does this)
> > or using the tags that are present in (e.g.) mp3 files.

> As I recall you need a map to actually start up playlistfs/juke*,
> so how does one start? Can you give an example? :)

I think you were the one who mentioned
> >> man 7 juke # juke(7)
:-)

juke(7) does contain an example.
it can be even simpler, something like below, where you just
follow the file system hierarchy.
the following assumes that the actual files are like
/some/path/to/music/groupdirname/albumdirname/01_some_name.ogg
etc. (I used anyrhines audio/ogg-vorbis stuff)


work {
	some name you invent yourself
	path {/some/path/to/music}
	command {sort}
	work {
		group name
		path {groupdirname}
		command {sort}
		work {
			album title
			path {albumdirname}
			command {sort}
			track {
				02 name of second track
				file {02_second_track.ogg}
			}
			track {
				01 name of first track
				file {01_some_name.ogg}
			}
			...
		}
	}
}

if you put the tracks of the album in the right order
you can leave out the innermost 'command {sort}'.



however, the real power of the maps comes from being able to
use arbitrary attributes. this allows you to browse your
music via various 'angles'. for example, the juke(1)
example allows you to browse also by compose, orchestra
and conductor.
(some time ago I played a bit with the source of the juke gui
to improve the 'hyperlinking' you can get by 'clicking through'
the various attributes shown for each item (song). i.e. you see
the song that is playing. it has among the attributes: soloist=blup .
you click on it and now get are in the view by solist,
seeing the items that have solist blup. you pick one,
and it has among the attributes: composer=mahler .
you click on that and are in the view by composer,
seeing the items that have composer mahler. etc.
and from the view of items of soloist blup you can go up
to see all soloists. etc.
don't recall how much it differs from the distribution -
i haven't used it for quite some time.)


another use of attributes is the following:
i have run a script over my map that adds something
like the permuted index that we have for the manual pages,
by shifting names/titles around, which allows browsing
by any word in title or artist.

	track {
		artist = Fay~Lovsky
		artistpF = Fay~Lovsky
		artistpL = Lovsky~~--~~Fay
		title = Christmas~Was~A~Friend~Of~Mine
		titlepC = Christmas~Was~A~Friend~Of~Mine
		titlepW = Was~A~Friend~Of~Mine~~--~~Christmas
		titlepF = Friend~Of~Mine~~--~~Christmas~Was~A
		titlepO = Of~Mine~~--~~Christmas~Was~A~Friend
		titlepM = Mine~~--~~Christmas~Was~A~Friend~Of
		Fay Lovsky -- Christmas Was A Friend Of Mine
		file {Fay_Lovsky-Christmas_Was_A_Friend_Of_Mine.mp3}
	}

(in the 'name=value' lines ~ denotes a space)
this allows you to 'sort' your data on any word from title or name.
I split the permuted title and artist indexs on first letter, because
they would be to big otherwise, hence the artistpF, artistpL etc.


I have added two scripts (one to generate a map from 'du -a' output,
one to permute a map as discussed above) 'as is' on sources in
contrib/axel/music.  they are not polished. they are in perl.


of course, it should be possible to write something that,
to juke, offers the same interface as jukefs, but does not
read the maps but just takes the structure of the filesystem
instead.


Axel.


  parent reply	other threads:[~2006-09-18 19:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-17 12:21 tushar mahule
2006-09-17 12:24 ` Sascha Retzki
2006-09-17 12:28   ` tushar mahule
2006-09-17 12:34     ` Sascha Retzki
2006-09-17 12:41       ` tushar mahule
2006-09-17 13:03         ` Sascha Retzki
2006-09-17 15:31           ` Russ Cox
2006-09-17 20:49             ` geoff
2006-09-17 20:05         ` Paweł Lasek
2006-09-17 20:10           ` John Floren
2006-09-18  9:32             ` Harri Haataja
2006-09-18 10:54               ` Paweł Lasek
2006-09-18 13:15             ` Sascha Retzki
2006-09-18 14:32               ` Axel Belinfante
2006-09-18 14:53                 ` Sascha Retzki
2006-09-18 17:48                   ` Axel Belinfante
2006-09-18 19:30                   ` Axel Belinfante [this message]
2006-09-19 13:43                     ` juke - does it need some love? (was: Re: [9fans] Ideas???) Sascha Retzki
2006-09-20  1:12                       ` Charles Forsyth
2006-09-17 20:34           ` [9fans] Ideas??? erik quanstrom
2006-09-17 12:44       ` tushar mahule
2006-09-17 12:54         ` Benn Newman
2006-09-17 13:02         ` Sascha Retzki
2006-09-17 18:26         ` erik quanstrom
2006-09-18 16:13     ` Ronald G Minnich
2006-09-18 16:49       ` jmk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609181930.k8IJUb405059@demeter.cs.utwente.nl \
    --to=axel.belinfante@cs.utwente.nl \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).