Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Play single track from iPod? Ideas? Failed Attempts?: (11 Items)
   
Play single track from iPod? Ideas? Failed Attempts?  
I was wondering if anyone was working on methods for playing a single track from iPod. It would be interesting to know 
what things have been tried by others even if these attempts failed.

I know that the iPod manages it's own playback queue, and that it currently continues to play the next track. But I was 
curious if anyone had attempted any workarounds based on the playback time and trying to mute/fadedown/pause/stop the 
iPod before the track is finished.

Any ideas or experiences anyone could share would be appreciated.

Thanks,
Chris
Re: Play single track from iPod? Ideas? Failed Attempts?  
Hi Christian,

This is something we're planning on implementing in the near term.  So far we don't have any experiences to share with 
you but we're happy to discuss it once we start.  What are your timeframes?

With stalker mode comes the need for synchronization.  We have rudimentary support for this in 1.2 but will be re-
implementing sync for iPods at the same time as we do stalker mode.  This will leverage newer iAP commands so that we 
can sync quickly and persistently across device reinsertions.

One of the issues we see with stalker mode is that it overrides the iPod playback engine.  So if the user were to play a
 list of tracks with their headphones, go in the car, and then back to their headphones the user would not be able to 
resume playing from what they were listening to before they entered the car.  Because of this we plan on implementing 
this feature as an option where you can use the iPod with either stalker mode or not.
Re: Play single track from iPod? Ideas? Failed Attempts?  
Hi Dan,

> What are your timeframes?

For prototyping/specifications anytime between now and August.

> With stalker mode comes the need for synchronization.  

Could you provide a bit more info what you mean by "stalker mode"?

> This will leverage newer iAP commands so that we can sync quickly and persistently across device reinsertions.

You should be careful with those newer iAP commands that are not supported on all iPods...

> One of the issues we see with stalker mode is that it overrides the iPod playback engine.  So if the user were to play
 a list of tracks with their headphones, go in the car, and then back to their headphones the user would not be able to 
resume playing from what they were listening to before they entered the car.  

This has been identified as a showstopper and we've been prohibited to specify to anything that would break the "walk 
into car" usecase. That means any metadata scanning process has to exclusivly use commands that are based on the iPod 
Database Engine, not the iPod Playback Engine.

> Because of this we plan on implementing this feature as an option where you can use the iPod with either stalker mode 
or not.

Atleast for us, this would mean that we would never use "stalker mode" or features that require it.
Re: Play single track from iPod? Ideas? Failed Attempts?  
> > With stalker mode comes the need for synchronization.  
> 
> Could you provide a bit more info what you mean by "stalker mode"?

It is just a term used in place of "a method of controlling the iPod to play only a single track at a time". It means 
following what the iPod is doing very closely (so that you can tell it to stop playing right at the end of the track)

> > This will leverage newer iAP commands so that we can sync quickly and 
> persistently across device reinsertions.
> 
> You should be careful with those newer iAP commands that are not supported on 
> all iPods...

Our solution would attempt to use the the best command set available. If an older iPod doesn't support certain iAP 
commands the operations would still work, just perhaps be less efficient.
 
> > One of the issues we see with stalker mode is that it overrides the iPod 
> playback engine.  So if the user were to play a list of tracks with their 
> headphones, go in the car, and then back to their headphones the user would 
> not be able to resume playing from what they were listening to before they 
> entered the car.  
> 
> This has been identified as a showstopper and we've been prohibited to specify
>  to anything that would break the "walk into car" usecase. That means any 
> metadata scanning process has to exclusivly use commands that are based on the
>  iPod Database Engine, not the iPod Playback Engine.

I think most, if not all, customers would agree with your statements (must be able to resume where the iPod left off 
previously).  

> > Because of this we plan on implementing this feature as an option where you 
> can use the iPod with either stalker mode or not.
> 
> Atleast for us, this would mean that we would never use "stalker mode" or 
> features that require it.

I think what we would have to do is allow the iPod when first plugged in to resume from the playback engine and only 
when a user overrides the playback engine (by choosing to play something new discovered through the database engine) 
would this new mode come into effect.

However, one thing this new mode does do, is "disturb" the "walk out of car" experience. If the car said you were 
playing 1/200 songs (songs picked by your software, which means a combination of songs that the iPod could never contain
 in its playback engine), and you are controlling it be resetting the playback engine between songs to enforce your 
specific selection, if the user unplugs their iPod they will be left with whatever happened to be in the iPod Playback 
engine at the time (certainly not the 200 songs that would have played when controlled by the car in stalker mode).

Regards,
Gilles


Re: Play single track from iPod? Ideas? Failed Attempts?  
We figurued it's ok to have a different "walk out" experience as long as the following conditions are met:
1.) The currently playing song will be the same song, continued from the same position. (works)
2.) If the user reconnects the iPod without making a new selection outside of the car, the in-car playback queue should 
be restored. This is important for the "gas-station" usecase. We think this could be implemented by saving the last 
playback queue, and checking if the iPod is in the "all-tracks" list (if that's what you're using), and then restoring 
the previous playback queue. The iPod should of course continue to play the track that was playing when the user "walked
 in", not the track that was playing when the user walked out...
Re: Play single track from iPod? Ideas? Failed Attempts?  
> I was wondering if anyone was working on methods for playing a single track 
> from iPod. It would be interesting to know what things have been tried by 
> others even if these attempts failed.
> 
> I know that the iPod manages it's own playback queue, and that it currently 
> continues to play the next track. But I was curious if anyone had attempted 
> any workarounds based on the playback time and trying to mute/fadedown/pause/
> stop the iPod before the track is finished.

I think you'd have to do exactly what you mention above. You can try it yourself. It would be better if we do it here at
 QNX, as we can implement it at the iPod driver level (if your application is using the MME it will be receiving time 
updates behing a few extra layers of software, it could be more difficult to stop at the correct time).

Regards,
Gilles Roy


Re: Play single track from iPod? Ideas? Failed Attempts?  
We had tried this using our own iAP stack and some special content with a easily identifiable start/end pattern. Our 
conclusions were that the iAP time status updates reported by the iPod are not accurate enough and have too great of a 
variance. This resulted in too many audio glitches.

I also considered looking at the USB Audio stream to more accuratly identify the "gap" between tracks, but we didn't 
have the time/resources to implement this... and we were concerned that these types of hacks would start to produce 
audio gliches if Apple implements some sort of cross-fading between tracks as some point in the future...

Most promising would looks to be an timer-based audio fade down, but as you mentioned you may have better luck then us 
if you can go a few levels deeper...





Re: Play single track from iPod? Ideas? Failed Attempts?  
> We had tried this using our own iAP stack and some special content with a 
> easily identifiable start/end pattern. Our conclusions were that the iAP time 
> status updates reported by the iPod are not accurate enough and have too great
>  of a variance. This resulted in too many audio glitches.

The trickiest part would be if you are in fast forward mode, the iPod increases its speed as it progresses towards the 
end of the song. It would be difficult to judge when the end of the song is going to arrive.

> I also considered looking at the USB Audio stream to more accuratly identify

If you buffer the audio data slightly before playing it back it might be easier.

> the "gap" between tracks, but we didn't have the time/resources to implement 
> this... and we were concerned that these types of hacks would start to produce
>  audio gliches if Apple implements some sort of cross-fading between tracks as
>  some point in the future...

It isn't supported by Apple, so it is possible they release iPod firmware that can break this. 

> Most promising would looks to be an timer-based audio fade down, but as you 
> mentioned you may have better luck then us if you can go a few levels deeper..

Yes, that would help as well.

Regards,
Gilles

Re: Play single track from iPod? Ideas? Failed Attempts?  
> We had tried this using our own iAP stack and some special content with a 
> easily identifiable start/end pattern. Our conclusions were that the iAP time 
> status updates reported by the iPod are not accurate enough and have too great
>  of a variance. This resulted in too many audio glitches.

Can you clarify why you need the single track playback?

Another downside is that you loss gapless playback ability (i.e. if you had an album on the iPod you do single track 
playback, there will be a much larger gap between tracks that flow into each other, I'm thinking Pink Floyd type albums)
.

Gilles



Re: Play single track from iPod? Ideas? Failed Attempts?  
We have a number of different usecases that require multi-source playlists. Being able to play a single track from iPod 
is just a pre-requisite.

The gapless playback is not an issue, since is we're playing back an entire album we would still let the iPod manage the
 playback queue.
Re: Play single track from iPod? Ideas? Failed Attempts?  
> We have a number of different usecases that require multi-source playlists. 
> Being able to play a single track from iPod is just a pre-requisite.
> 
> The gapless playback is not an issue, since is we're playing back an entire 
> album we would still let the iPod manage the playback queue.

If you are playing a series of albums in a user defined order, you can do that today with our iPod driver. You can 
create a file based track session of:

/Music/Albums/item~3
/Music/Albums/item~56
/Music/Albums/item~24

The MME will then proceed to ask the iPod to play all songs from album 3, then 56 and then 24. Of course, turning on 
things like random and repeat won't repeat all of the songs, it will only work within the current album.


Regards,
Gilles