[mythtv] Predictive text input method

Ian Campbell ijc at hellion.org.uk
Wed Dec 15 18:01:00 UTC 2004

On Wed, 2004-12-15 at 17:16 +0000, Colin Guthrie wrote:
> Ian Campbell wrote:
> > I did some experiments (with a crappy Perl script) over my mp3
> > collection (around 200 albums) on Sunday I posted some stuff here but it
> > was caught by the list filters (too big) and I was on my way out the
> > door and I never managed to trim it down and post it again.
> > 
> > The script did a depth first search across the possible numeric pad
> > inputs, and creates a regex by mapping 2-9 to the letters (and numbers)
> > marked on my remote, 0 to "0" or whitespace and 1 to everything else (so
> > 1 and punctuation basically). It stopped when the list of matching
> > albums (artist and title) reached <8 (which was my target for fitting on
> > a TV screen).
> Is there any reason to stop it at 8 result? 

Not at all, that was just for the purposes of investigating the number
of key presses to take a large list down to a manageable one. In a real
implementation I'd keep going so long as the user pressed buttons.
Perhaps cutting off when the next press results in zero matches makes
sense but that is the sort of thing I'd need to try with running code to
see how it 'felt'...

> Also, how do you think is best to present "search term" box in UI terms? 

I wasn't going to show the search term itself, but rather hi-light the
matched part of every entry in the list somehow, with the selected entry
being completely hi-lighted by a background hi-light bar like current
selection methods... 

For example, if you consider <> to be bold text and [] to be the
selected entry with an input of 0786 => "[0\s][7pqrs][8tuv][6mno]"
followed by down, down on my collection then you might see:

  `Bush' - `Sixteen <Sto>ne'
  `Daft <Pun>k' - `Discovery'
 [`Jimi Hendrix' - `First Rays Of the New Rising <Sun>']
  `Kyuss' - `Blues for the Red <Sun>'
  `Queens of the Stone Age' - `Queens of the <Sto>ne Age'
  `Queens of the <Sto>ne Age' - `Songs for the Deaf'
  `Smashing <Pum>pkins' - `Adore'
  `Smashing <Pum>pkins' - `Zero'
  `The Rolling <Sto>nes' - `Big Hits (High Tide and Green Grass)'
  `The Rolling <Sto>nes' - `Bridges To Babylon'

up and down move in the list and pressing another num key would keep the
selection on Hendrix or move to the next item that is still in the list
if Hendrix disappears (which is likely since it is matched right at the
end of the album title).

it's another thing that needs working code to really get a feel for how
nice it will be but I reckon it's a good starting point for

> For what it's worth, this is quite a generic interface, so I think it 
> would be worth while to try to incorporate a generic implementation into 
> libmyth rather than poking specifically with just mythmusic. Anyone agree??

Absolutely. I was planning to prototype in mythmusic till I learnt my
way around the source base then figure out how it can be made generic.

Ian Campbell

Love is sentimental measles.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041215/f5072444/attachment.pgp

More information about the mythtv-dev mailing list