This version of the Music Player example shows what can be done with a specialized display that looks a bit more like an actual music player rather than a refuge spreadsheet.
This is a simulation. That is, we're actually simulating the passage of time. The "Current Time" field in the far right is the simulated time from when we start the player, given in minutes and seconds. Commands take five seconds. This isn't because the box is particularly slow, it's because the operator has to take some time to push the buttons. Since we don't want to create a random time (it would make duplicating the times impossible) and we also don't want to enter a time for each command, we'll just arbitrarily use five seconds.
The first thing we're going to do is invoke a DoFixture and then have it load our music player simulator. We slide it to the right and grey it out because it contains a bunch of "technology facing" stuff that the end user shouldn't have to deal with.
fitLib.DoFixture | |
start | eg.MusicPlayer2 |
The first table is below. Each entry is the same: it starts with a command and the top of the music player. Each of the fields in the first row is checked after each command.
The music player also displays the inventory sorted in various different ways. However, the inventory display does not have to be included in the table. If it isn't there, it isn't checked.
reset player is simply the starting command; it puts the music player into its starting state, which is displayed below.
reset player | |||||
Total Songs | Songs Displayed | Player Status | Alarm | Time Remaining | Current Time |
57 | 1 to 10 of 57 | Stopped | 0:00 | 0:00 |
Now we want to select a song to play. We select the song by specifying the number from the far left column on the display. The selection list doesn't have to be displayed, but it does help. After the command, the selected song is marked with an * instead of the number.
select song | 2 | ||||
Total Songs | Songs Displayed | Player Status | Alarm | Time Remaining | Current Time |
57 | 1 to 10 of 57 | Stopped | 3:42 | 0:05 | |
# | Name | Artist | Album | Year | Time |
1 | Akila | Toure Kunda | The Toure Kunda Collection | 1996 | 4:25 |
* | American Tango | Weather Report | Mysterious Traveller | 1974 | 3:42 |
3 | Ananas | James Taylor | Hourglass | 1997 | 5:44 |
4 | Another Grey Morning | James Taylor | JT | 1977 | 2:44 |
5 | Cellohachi Part 1 | Gideon Freudmann | Sound Of Distant Deer | 1998 | 4:04 |
6 | Cellohachi Part 2 | Gideon Freudmann | Sound Of Distant Deer | 1998 | 3:35 |
7 | Cellohachi Part 2 | Gideon Freudmann | Sound Of Distant Deer | 1998 | 2:04 |
8 | Coolsville | Laurie Anderson | Strange Angels | 1989 | 4:37 |
9 | Copperline | James Taylor | New Moon Shine | 1991 | 4:22 |
10 | Dice Are Rolling | Andrew Lloyd Webber | Evita | 1979 | 5:07 |
Selecting the song doesn't do anything but mark it as selected in the display. However, it does take a small amount of time. The actual selection is almost instantanious, but the person operating it takes 5 seconds.
The next logical thing to do is tell the player to start playing it. All operator commands are presumed to take five seconds, at least if the player isn't playing. Loading the CD takes four seconds (you didn't think this was a really modern player with everything in flash memory, did you?)
start playing selected song | |||||
Total Songs | Songs Displayed | Player Status | Alarm | Time Remaining | Current Time |
57 | 1 to 10 of 57 | Loading | 3:42 | 0:10 |
Now what happens? We hear it go click, whir and then play our song. Not much to see, so we're just going to move ahead a minute and see what the status will look like at that time. The command, as usual, also takes five seconds.
advance | 60 | seconds | |||
Total Songs | Songs Displayed | Player Status | Alarm | Time Remaining | Current Time |
57 | 1 to 10 of 57 | Playing | 2:41 | 1:15 |
Much as someone likes this song, waiting for it to finish is somewhat like watching grass grow, or at least listening to grass grow. So let's see how many songs we have by James Taylor. We can do this while the current song is playing - this player can do searches while it's playing something.
show all songs where | artist | is the same as song | 3 | ||
Total Songs | Songs Displayed | Player Status | Alarm | Time Remaining | Current Time |
57 | 1 to 5 of 5 | Playing | 2:36 | 1:20 | |
# | Name | Artist | Album | Year | Time |
* | American Tango | Weather Report | Mysterious Traveller | 1974 | 3:42 |
1 | Ananas | James Taylor | Hourglass | 1997 | 5:44 |
2 | Another Grey Morning | James Taylor | JT | 1977 | 2:44 |
3 | Copperline | James Taylor | New Moon Shine | 1991 | 4:22 |
4 | Handyman | James Taylor | JT | 1977 | 3:18 |
5 | Sailing to Philadelphia | James Taylor | October Rose | 2001 | 5:43 |
The command has, as usual, taken five seconds. While it found five songs, there are six displayed. This is a very smart little box: if the display doesn't include the currently playing song, it puts it into the display anyway, with an * for the number.