Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cybiko:wmpremote [2009/11/27 17:54] (current)
Line 1: Line 1:
 +======Audio mp3 Player Remote Control======
  
 +{{cyamp.gif }} The Cybiko computer would make a very good remote for controlling a mp3 Media Player as it has a screen to display the current song, and a keyboard to enter and change songs.
 +
 +The screen will look something like this.
 +
 +{{cywmp4.gif}}
 +
 +The architecture overview of this program is very similiar to that of [[RFTerm]]
 +
 +{{ cybiko:​wmp-arch.gif }}
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +=====The Client=====
 +All the control surfaces of the cybiko application are defined using bitmaps, this means that the program can be easily reskinned with different look and feel; although this would require a recompilation of the code to include the new resources it will not require any code changes.
 +
 +The following control strings will be sent from the cyamp program to the media server to control its operation
 +  * REWD - Rewind
 +  * FFWD - Fast Forward
 +  * NTRK - Next Track
 +  * PTRK - Previous Track
 +  * PAUS - Pause
 +  * STOP - Stop
 +  * VOLUP, VOLDN - Volume up and down
 +
 +When adjusting the volume on the cybiko the graphical control will slide up and down, even thou the control might be completely jammed at either the top or the bottom of the gui widget the correct control sequence will continue to be sent.  The reason for this is that you can't guarantee that the volume setting on the cybiko matches that of the server program.
 +
 +====Keyboard control====
 +The following keys are available from the main screens; they being either PLAY or SEARCH.
 +
 +^ARROWS |Navigate controls|
 +^TAB | Switch modes; PLAY, SEARCH|
 +^SELECT | Locate other Cybiko, nominally one running [[SerialRelay]]|
 +^Fn-ENTER |Show Settings page|
 +^ESC |Exit the application|
 +
 +
 +====Settings====
 +
 +  * **Partner Type** - This program may wish to bounce the signal off of a [[Repeater]]
 +
 +
 +
 +
 +
 +====Usage====
 +
 +  - On the cybiko connected to the PC via the rs232 port start the [[SerialRelay]] program.
 +    * You may want to set the serial relay option **Partner quit notify** to **off**, this way the remote can come and go without having to acknowlege the "​Partner quit" dialog (which is modal).
 +  - Startup the audio player remote control on your other cybiko, press the **SELECT** button and find the cybiko running serialrelay,​ there will probably only be one in the list!
 +  - Startup Winamp on your PC.
 +
 +IF you can't figure out how to connect these applications together then I suggest you go do the [[serialrelay#​serialrelay_to_rfterm_walkthrough|RFTerm walkthrough]]
 +
 +
 +
 +
 +
 +
 +====Code====
 +
 +<note important>​
 +Only PLAY mode is implemented at the moment - pressing TAB will take you to search screen but there is nothing to be seen!
 +</​note>​
 +{{cyamp.zip}}
 +
 +===Change Log===
 +
 +   ?? 13-Oct-05 0.3 :: Moved track and track library count to the bottom of the screen, it had problems with large libraries due to the screen real-estate restriction where it was.\\
 +Improved the desktop icon.
 +!!
 +   ?? 9-Oct-05 0.2 :: When the application does not have focus don't update the gui with response data (winamp feedback).
 +!!
 +
 +
 +
 +
 +
 +====A few little bugs====
 +  * On suspend and multi-task switch, the cybiko sends a signal to the serial relay, which usually sends the song back to the beginning. This has only been tested on the xtreme.
 +  * The remote cybiko can randomly display the first couple of letters of the song name after the track time, but there is nothing sent from the serial relay cybiko. This has only been tested on the xtreme.
 +  * With large libaries of music, the track number and total tracks can be displayed partly off screen. Fixed 13-Oct-05 0.3
 +
 +
 +=====The Server=====
 +An information string will be sent from the server back to the client every 2sec to keep it up to date with what is playing.
 +
 +The string will have the syntax %0|%1|%2|%3|%4|%5 a vertical bar is used to delimit each entry\\ Where %x corresponding to the following entries.
 +
 +  * 0 song title
 +    * The song title is actually the compound of "​Artist - Song title"
 +  * 1 winamp status ​
 +  * 2 playlist position, ​
 +  * 3 total number of tracks ​
 +  * 4 song length in min:sec
 +  * 5 song position in min:sec
 +When the search mode is implemented,​ further data will be needed to be sent. This will consist of the following things.
 +  * Album / Artist list
 +  * Playlists
 +There are two posibilities.
 +  * Have the entire song libary data sent to the client at the beginning of the session
 +  * Have a menu (similar to an ipod) which requests data about the libary on demand
 +====Winamp====
 +
 +Integration with http://​www.winamp.com is quite straight forward using the serialcontrol plugin.\\
 +{{cybiko:​winampplugins.zip}}
 +
 +After you have downloaded and installed winamp grab the plugin pack I've provided here and place both the files into the **C:​\Program Files\Winamp\Plugins** directory.
 +
 +Now you've got a winamp cybiko remote control !
 +
 +
 +
 +====Windows Media Player====
 +This is not written yet :-)
 +
 +===How this will Work===
 +
 +Using the WMP API you can use the Interop calls to embedded a cybiko-plugin to the WMP application. ​ This plug-in would monitor the serial port for commands being sent to it via the [[SerialRelay]] program, and invoke the various API calls needed.
 +
 +The WMP plug-in would have a user interface to control such aspects as the baud rate, parity, stop bits etc.. when talking to the [[SerialRelay]] program.
 +
 +===WMP SDK===
 +WMP has an [[http://​www.msdn.microsoft.com/​library/​default.asp?​url=/​library/​en-us/​wmplay10/​mmp_sdk/​windowsmediaplayer10sdk.asp|API]] that can be used to access this program.
 +  * [[http://​msdn.microsoft.com/​windowsmedia/​downloads/​default.aspx|Windows Media Downloads]]
 +
 +Some samples of API access
 +  * Windows Media Player Standby Plug-in ​
 +    * http://​www.codeproject.com/​samples/​Mpst.asp
 +  * Interoperating with Windows Media Player using P/Invoke and C#
 +    * http://​www.codeproject.com/​csharp/​wmp_pinvoke.asp
 +  * Minimalistic C# media player
 +    * http://​blog.monstuff.com/​archives/​000070.html
 +  * [[http://​www.gotdotnet.com/​Community/​UserSamples/​Details.aspx?​SampleGuid=E1DBEA97-9731-4BDA-9442-AB82C8D78DA9|Remoting Windows Media Player in C#]]
 +  * [[http://​msdn.microsoft.com/​library/​default.asp?​url=/​library/​en-us/​wmplay10/​mmp_sdk/​remotingthewindowsmediaplayercontrol.asp|Remoting the Windows Media Player Control]]
 +  * [[http://​msdn.microsoft.com/​library/​default.asp?​url=/​library/​en-us/​wmplay10/​mmp_sdk/​windowsmediaplayeruserinterfaceplugins.asp?​frame=true|Information on Windows media player plug-ins]]
 +
 +
 +=====Other related projects=====
 +  * [[http://​www.giantdisc.org|GiantDisc]] - Remote control based on Palm handheld
 +  * [[http://​hobbiton.thisside.net/​mp3view/​|MP3View]] - A console based MP3 playlist viewer
 +  * [[http://​www.flippet.org/​wawi/​|WAWI]] - WAWI WinAmp Web Interface
 +
 +{{tag>​cybiko mp3}}