CLAMP - Command Line Winamp
Purpose
The purpose of this tiny program is to drive Winamp through command line in a simple way.
PROS
> This program is standalone :
- no external piece of software required (DLL, Winamp Plug-in etc.)
- no install procedure : just download it and run
> This program is safe :
- does not write to disk (except /PLSAVE option which purpose *is* to create a file),
- does not modify registry
- does not access network (local or Internet),
- does not interact with other programs running (except Winamp of course...)
so no special privileges are required to use it.
> This program does not contain any spyware :
- it does not record anything,
> This program requires very small amount of resources.
> This is freeware.
CONS
> No cute user-friendly install,
> No uninstall procedure,
> Many features still to be developped,
> It is still beta, it might not work as expected under unexpected circomstances, (feedback to author welcome !)
Usage
CLAMP {Options}
It is possible perform more than one task at a time by adding multiple options on the same line.
Each option must be preceeded by /
Upon success, program will quit with an exit code of 0.
Upon failure, exit code will be set to 1.
Program Control
| START | Start Winamp |
| QUIT | Exit Winamp |
| RESTART | Restart Winamp |
| TOFRONT | Bring Winamp window to front
|
Note : any following option will automatically start winamp if necessary - No need to use /START as first option.
General Control
| PLAY | Play (current file) - Quits Stopped or Pause mode |
| STOP | Stop playing |
| STOPFADE | Stop playing with fadout |
| STOPAFTER | Stop playing after current track (returns now, stops later) |
| PAUSE | Toggle pause mode |
| PAUSE ON|OFF | Sets pause mode |
| PLAYPAUSE | Same as PAUSE |
| NEXT | Play next song |
| PREV | Play previous song |
| FWD | Forward 5 seconds |
| FORWARD | Same as above |
| REW | Rewind 5 seconds |
| REWIND | Same as above |
| RESTART | Restart current track from beginning (not working with Winamp 2) |
| JUMP <time> | Seek to <time> (in millisecs) |
| QUITAFTER | Close winamp upon completion of current track - CLAmp will not return immediately |
Winamp Modes
| REPEAT | Toggle Repeat mode |
| SWREPEAT | Same as above |
| REPEAT ON | Set Repeat mode ON |
| REPEAT=1 | Same as above |
| REPEAT OFF | Set Repeat mode OFF |
| REPEAT=0 | Same as above |
| REPEAT STATUS | Query REPEAT status (ON, OFF) |
| GETREPEAT | Same as above |
| RANDOM | Toggle Random mode |
| RANDOM ON | Set Random mode ON |
| RANDOM=1 | Same as above |
| RANDOM OFF | Set Random mode OFF |
| RANDOM=0 | Same as above |
| RANDOM STATUS | Query RANDOM status (ON, OFF) |
| GETSHUFFLE | Same as above |
PlayList Control
| PLADD <file> | Add file(s) to end of playlist (like drag-n-drop) |
| LOAD <file> | Same as above |
| PLCLEAR | Clear Playlist |
| CLEAR | Same as above |
| PL | Show/Hide Winamp Playlist window |
| PLWIN | Same as above |
| PLPOS | Query Playlist position (requires Winamp 2.05+) |
| PLFIRST | Play first item of playlist |
| PLLAST | Play last item of playlist |
| PLSET <num> | Set current playlist item (note this does not interfere with curring playing, if needed, use /PLAY after to go to this item) |
| PLSET RANDOM | Set current playlist item to a random item within playlist |
| SETPLPOS | Same as PLSET |
| LOADNEW <file> | Same as /PLCLEAR /PLADD <file> |
| LOADPLAY <file> | Shortcut for /PLCLEAR /PLADD <file> /PLAY |
| PLSAVE <file> | Saves current playlist to <file> (as a M3U file) |
Winamp Volume Control
| VOLUP [X] | Volume up |
| VOLDN [X] | Volume down |
| VOLSET <value> | Volume set (scale 0-255) |
| VOL=<value> | Volume set (scale 0-100) |
| VOLMAX | Volume max |
| VOLMIN | Volume min (no sound) |
Windows Volume Control
Syntax: CLAMP /WAV <command> <args>
This set of commands will *not* start Winamp if not already running (no need to do so)
| WAV MUTE ON | Mutes speaker |
| WAV MUTE OFF | Unmutes speaker |
| WAV VOLGET | Prints current Windows volume as two figures (left speaker, right speaker) |
| WAV VOLSET <value> | Sets volume (for both speakers) on a 0-65535 scale |
| WAV VOLSET MIN | Sets volume to zero (for both speakers) |
| WAV VOLSET MAX | Sets volume to maximum (for both speakers) |
Examples
CLAMP /WAV MUTE ON
CLAMP /WAV MUTE OFF
CLAMP /WAV VOLGET
CLAMP /WAV VOLSET 32768
Infos
| POS | Query current position in file and track length |
| PATHNAME | Display pathname of current track |
| POSITION | Query current position in file only |
| STATE | Query current state (PLAYING;PAUSED;STOPPED;NOT RUNNING) |
| STATUS | Synonym for STATE |
| TITLE | Query current track title (Note that, as string is returned by Winamp, it uses a Windows charset - special characters might be corrupted in a DOS window) |
| VER | Query Winamp version |
| TRACKINFO <INFO> | Info on current track
POS = current position (MM:SS)
LENGTH = track length (MM:SS)
BITRATE = bitrate in KBPS
SAMPLERATE = Sample rate in KHz
CHANNELS
If no track current being played, result is zero (0 or 00:00)
|
| PLINFO <INFO> | Info on playlist
POS = current position
LENGTH = playlist length Note that even if play list is empty (Length = 0), pos is still 1.
|
Track rating
| RATING | Display current track's rating (1 to 5, 0 = No rating) |
| RATING=X | Set rating for current track |
Winamp Interactive Windows
| ABOUT | Display Winamp About window |
| PREFS | Display Winamp Preferences window |
| OPEN | Display Winamp Open File window |
| MEDIALIBRARY | Opens MediaLibrary |
| VIDEOFULLSCREEN | Toggles video window full screen mode - Works only if video window is open - This option has issues |
Equalizer Control
| EQWIN | Toggle Eq window (Works with Classic skins only) |
| EQINFO | Query Eq parameters (10 bands, Preamp, Status, Autoload) |
| EQSET <parms> | Set Eq parameters (Same format as EQINFO) |
| EQSTATUS | Toggle Eq status (ON / OFF) |
| EQSTATUS ON | Set Eq status ON |
| EQSTATUS OFF | Set Eq status OFF |
Winamp Display
| ONTOP | Toggle Always On Top option |
| MAINWIN | Toggle Main Window (Show / Hide) |
| MINIMIZE | Minimize Winamp |
Visualization plug-in
| VISUEXEC | Toggles visualization plug-in |
| VISUEXEC ON|OFF | Sets visualization plug-in on or off
|
| VISUEXEC STATUS | ON if running, OFF if not running
|
Bookmarks management
| BOOKMARK <file> | Add <file> to bookmarks |
| BOOKMARK CURRENT | Add current track to bookmarks |
Skin management
| SKINGET | Display name of current skin |
| OPGET | Display name of output plug-in |
| OUTPUTPLUGIN | Same as OPGET
|
Winamp install
| INSTALLDIR | Display Winamp install directory, as detected by CLAmp |
| INSTALLDIR=... | Force using this as install directory, overwriting result of default detection. Must be first option. |
| INIFILE | Display Winamp ini file |
| INIDIR | Display Winamp.ini directory |
Winamp process
| CLASS <class> | Force using this class name
Parameters are handled left to right, so the following provide different results :
CLAMP /CLASS MyClass /START /PLAY
CLAMP /START /CLASS MyClass /PLAY
First line means "Start Winamp with class MyClass (same as Winamp /class=MyClass) and play it"
Second line means "Start standard instance of winamp then search for MyClass instance and play this one"
Note: if all this means nothing to you, don't worry, you probably just don't need it !
|
| PID | Show Winamp process ID |
Misc.
| CDPLAY | Play CD |
| JUMPTOFILE | Open the "Jump to file" dialog window
|
Examples
CLAMP /PLAY
CLAMP /PLCLEAR /PLADD "MySong1.mp3" /PLADD "MySong2.mp3" /PLAY
Download
Current Version (1.13)
Click here
Previous Published Versions
0.0.1
0.0.2
0.0.3
0.0.4
0.0.5
0.0.6
0.0.8
0.0.9
0.0.10
1.11
1.12
FAQ
#1 - How can I uninstall CLAMP ?
Just delete the executable file. No more than this has been written on your disk.
#2 - Sound control does not work properly
Of course there might be a problem but also consider that, sound is managed by Windows, not by Winamp and CLAMP drives Winamp only so changes in winamp only have no impact on other programs.
For example, turning sound off in winamp (using CLAmp or not) will not prevent your computer from issuing sounds.
#3 - Are you affiliated with NullSoft ?
No.
#4 - Can I make a donation ?
Yes ! Consider your favorite charitative organization.
#5 - If you add this function, I will translate in that language
Go to hell.
If you want to help, you're welcome. Do it freely, not to get something. I'm not asking you anything for using this program and make my best to enhance it, always for free.
There is *nothing* to trade here. If you're in that mood, that's the wrong place.
#6 - Where should the binary file be copied ?
This does not matters much if this directory is in the PATH.
This can be your WINDOWS directory for example ...
They use CLAmp...
Alarm clock for Windows by William Sun
Useless Keys - A tool to use numeric keypad as function keys - by Wrybread
WoWAMP - Interactive Music for World of Warcraft - by Ryan Black
Launchy - Open Source Keystroke Launcher for Windows
LaunchOne - Start applications and documents via keyboard
Want to add yours ? send a mail to tools
caramail.com !
Change-Log
Version 1.13 - Aug 2008
/MEDIALIB was not working - fixed
/PLADD - directory parsing partially rewritten (code shared with /load, /loadnew, /loadplay so impacts the four of them)
/PLADD - was not working with https due to a bug
/PLADD - was considering strings starting with something different from http as a local filename, thus misleading for other protocols
(rtsp://... would be considered as a filename, not as a network location).
/OUTPUTPLUGIN - new synonym for /OPGET
/PLAYPAUSE used to be an alias for /PAUSE, now they behave differently
/PAUSE remains unchanged and toggles pause - if winamp is not playing, pause toggling will do nothing
/PLAYPAUSE new behaviour : if playing, same as /PAUSE - if not playing, same as /PLAY
/JUMPTOFILE opens the "Jump to file" dialog window
/TOFRONT - new option to bring winamp window to front
/VISUEXEC - now accepts optional argument ON, OFF, STATUS
Version 1.12 - May 2007 - Internal (non published) version
/QUITAFTER - New
/VIDEOFULLSCREEN - New - Beta (not working correctly)
/PLSET now accepts RANDOM as an argument
Version 1.11 - March 2007
Changed versionning to 1.x instead of 0.0.x.
Finalized /SKINGET (now working)
Enhanced args control
/PATHNAME - New
/JUMP - New
/TITLE - changed method to something easier and more reliable, behaviour unchanged
/PAUSE - Now accepts optional arg (ON | OFF) [Der-Spunk request]
/VOL - New
/RESTART - New
/LOADPLAY <file> - Shortcut for /PLCLEAR /PLADD <file> /PLAY
/WAV - many requests were made for a real MUTE command - unfortunately, winamp does not provides external access to mute
but Windows does. Added a small set of commands to drive windows sound.
This will not grow much as it outside the initial scope of CLAmp - should extensions be needed in that area,
it would be outside of CLAmp
Version 0.0.10 - Feb 2007
/CLASS - New
/VISUEXEC - New
/BOOKMARK, /BOOKMARKS_EDIT - New
/PLSAVE - New
Changed EXE search within registry due to problems with some installs, new option /INSTALL to display directory found
/INSTALL and /PID added to help troubleshooting
/INSTALL= to be able to use CLAmp even if it can't find Winamp using its own algorithms (or in case of multiple installs of Winamp) [Mr 8 Ball suggestion]
/TRACKINFO has new options : BITRATE, SAMPLERATE, CHANNELS
Version 0.0.9 - Jun 2006
/LOADNEW now accepts URL [Dave suggestion]
/REPEAT, /RANDOM, /EQSTATUS accept new argument : STATUS (/REPEAT STATUS or /RANDOM STATUS) returning ON or OFF
/TRACKINFO LENGTH (0:00 if not currently playing)
/TRACKINFO POS
/PLINFO LENGTH
/PLINFO POS - Note that even if play list is empty (Length = 0), pos is still 1.
Version 0.0.8 - Apr 2006
/VOLUP and /VOLDN now accept optionnal value
New: /VOLGET
/VER: bug fix
/START: enhancement
/PLAY now plays current playlist item (played first playlist item before)
New: /PLSET <pos> sets playlist to line <pos>
New: /MEDIALIBRARY opens media library window
Version 0.0.7 - Jun 2005
Not published
Version 0.0.6
/START could not be used with any further option on same line
/START sometimes reported errors with no cause
Registry scan enhanced
Version 0.0.5
New options :
/PLLAST, /PLFIRST (in Winamp V2, not really first, not really last (?))
/RESTART (not working with winamp 2)
/CDPLAY
Option /REPLAY in V 0.0.4 was /PLLAST in fact
Bug in function searching for winamp path from registry - Always returned as not found.
/PLADD option did not work if pattern contained a directory.
Version 0.0.4
- Now handling wildcards for PLADD (i.e. CLAmp /PLADD *.mp3)
- Now reads Winamp.exe path from registry.
- Added NOT RUNNING state.
- New options : /STOPFADE, /STOPAFTER, /REPLAY
Version 0.0.3
- New options : MINIMIZE, MAINWIN, all EQ opts, TITLE, VER, PLPOS, PLWIN.
Version 0.0.2
- Better handling of exit code.
- Many new options.
Version 0.0.1 - Jan 2005
First published version.
Technical facts
Development status : Beta
Operating Systems : Windows
Programming Language : Delphi 7
Any comment ?
Have a comment regarding this program ?
Suggestions for future enhancements ?
Want to provide help (translating this page in foreign languages for example...) ?
It is as simple as sending a mail to tools
caramail.com
Thanks / Credits
- The layout of this page is derivated from the Blue Robot Layout Reservoir
- Lycos Multimania hosts this site for free.
- Directory browsing uses SNIF
- "No" buttons created using Adam Kalsey Button Maker
Be/OS
I recently discovered that a program similar to Winamp for BeOS was called "CL Amp"
(please note the space between CL and Amp) written by Claes Lofqvist.
This program existed years before this one.
If you arrived here for this program, follow this link
Top :: This page has been viewed 48920 times since January 2005 :: Last updated : Mon, 21 Feb 2005 21:50:25 GMT