================
imp3sh Changelog
================

-------------
Version 0.2.2
-------------

- Fixed a memory leak in buff.c

- Major code clean up.

- Will now save and load listnames that have whitespace in them.

- Added a new command 'fileq' that lets you directly queue streams or
  directories. The command can accept multiple streams and/or directories. If
  a directory is given as an argument, it will be recursively searched, and
  all streams found will be sorted by viewTF preference before they are added
  to the queue.

  When the 'play' command is given a directory as an argument, it no longer
  searches and queues the directory. This functionality has been passed to the
  'fileq' command.

- Added a '-k' option to 'addplayer'. If used, imp3sh will use SIGKILL instead
  of SIGTERM to terminate that external player. This is useful for external
  players who refuse to die from a SIGTERM.

- The 'seek' command now accepts incremental values. You can now give one 
  argument that represents how many percent (of total current track time) to
  seek forward or backwards.

  For example:

  > seek +10      # seek forward 10% of the total track time
  > seek 5        # seek forward 5% of the total track time 
	            (the '+' is understood)
  > seek -30      # seek backwards 30% of the total track time
  > etc...

  ..and you can still use the old syntax to seek to an exact point in the file:

  > seek 1 2      # seek to the exact middle of the song
  > seek 907 1000 # seek to the point at 90.7% total track time
  > etc...

  Of course, the seeking functionality still only works with MP3 and Ogg/Vorbis
  files, and will not work with external players.

- The 'volume' command also accepts incremental values. You can adjust the
  master volume, pcm volume, and balance with an offset of its current value.
  You can use static values or you can put '+' or '-' in front of any value to
  increment or decrement that value.

  Examples:

  >volume +5 +10 +0   

  >volume 10 20 -30

  >volume +5 +0 +0

  >etc...

- More emacs-like shortcuts added. Here is the list of Ctrl shortcuts so far:

  Ctrl-l   - clear screen
  Ctrl-a   - move cursor to start of text
  Ctrl-e   - move cursor to end of text
  Ctrl-p   - previous history entry
  Ctrl-n   - next history entry
  Ctrl-k   - clip everything after the cursor (including whats under it)
  Ctrl-u   - clip everything before the cursor
  Ctrl-b   - move cursor back
  Ctrl-f   - move cursor forward

  If you would like anything else added, let me know. Incorporating readline()
  is in the works, but it does not look very promising so far...

- Fixed a bug where ASCII characters above 127 (decimal) were not being
  accepted. Umlauts, among other characters, should work again

- The log notice has been removed.

--------------
Version 0.2.1a
--------------

- Fixed a segfault when 'addiX' commands were used without an argument

- Added EXT (exit) event type. All EXT events will be executed upon exit of
  imp3sh in the order that they were added.

  Here is an example of an exit event that will save the state of all of your 
  playlists when you exit imp3sh:

  >addevent -q -e saveall /home/ekratzer/music/list.txt

  This is especially useful when using SmartRandom or Learning playmodes.

- Improved tty detection. imp3sh should be able to be run in a shell pipeline
  now (not tested very well.)

-------------
Version 0.2.1
-------------

- Ok, this version has quite a bit changed in it (again). I am pretty sure 
  this will be the last time imp3sh's general list structure is changed....
  I think it is good to go for awhile now. Thanks for the great feedback that
  made these improvements possible!

- The fixed 'active' and 'master' lists have been thrown out in favor of 
  user-defined lists. There are no limit on the number of lists you can create.
  Each list has its own playmode and listview. The list commands have been 
  generalized:

	>addlist           # create a new list
	>dellist           # delete a list
	>resetlist         # reset list
	>renamelist        # rename list
        >uselist           # set active playlist
	>nextlist          # set active playlist to next list
	>editlist          # set the list you currently want to edit

  Most of the above commands take a list_name as an argument. However, for 
  editing, searching, sorting, etc.. you select which list you want to edit
  with the "editlist" command and the following commands will apply to the
  currently selected "edit" list:

  	>printlist         # display/search the list
	>copylist          # copy list entry(s)
	>addfile           # add a stream or file to the list
	>addir             # add the contents of a directory
	>addiR             # recursive addir
	>playindex         # play list index
	>moveindex         # move list index
	>delindex          # delete list indices
	>sortlist          # Errrrrrr... sort the list, of course
	>savelist          # save the list to a file
	>loadlist          # load entry(s) from a file
	>once              # set playmode to 'once'
	>repeat            # set playmode to 'repeat'
	>random            # set playmode to 'random'
	>viewTF            # set listview to 'Tag, then Filename'
	>viewTPF           # set listview to 'Tag, then Path/Filename'
	>viewPF            # set listview to 'Path/Filename'
	>viewF             # set listview to 'Filename'
	>addq              # queue list entry(s) 
	>printtag	   # when index given, print tag info of that index
	>addtag            # when index given, add/modify tag info

  The listview of the current "edit" list is used in the above commands.

  The current 'active' list is the list that imp3sh is choosing songs to play 
  from. The playmode of the current 'active' list is used when selecting songs
  from that list. Use "uselist" to set the current 'active' list.

- You can get status info on a (or all) list(s) by using the 'liststatus' 
  command with an optional <list_name> as an argument.

  The current 'active' list is denoted by a ">>>" in front of it instead of a
  "-->". The current "edit" list is denoted by a "*" placed in front of the
  list name.

- The 'listsize' command has been removed. All lists (including output 
  buffers) are dynamically self-sizing.

  The queue is still a circular buffer, and therefore the 'sizeq' command
  remains.

- The queue is now its own entity, and in no-way attached to any other list. 
  Entries will remain in the queue regardless of what happens to the current
  'active' list.

- Two new commands "saveall" and "loadall" will save/load the entire state of
  all your lists to one file. Stuff saved includes:

	- List name, playmode, listview, current position, weights  (per list)
	- Each entry's tag info (if available), and weight.

  Due to the format change, imp3sh can no longer read tag information from 
  lists created with imp3sh 0.2.0 and earlier. This had to happen because
  the earlier format was too sloppy to allow for the new stuffs.

- The prompt was changed to show the position and index of the current 
  'active' list:

	[31->mp3 -07:21 home]>

  When playing from the queue, "queue" will be shown instead of the current 
  'active' list (in this example, the current 'active' list is "mp3")

  When playing streams directly with the 'play' command, imp3sh will default
  back to its old prompt mode, and not show any list info.

- The 'play' command now accepts a directory name as an argument. The 'play'
  command, if given a directory name, will recursively search that directory
  for playable songs, sort them, and add them to the queue.

- The output-buffer size is monitored. If the size gets larger than 8192 lines,
  imp3sh will automatically resize it... to conserve memory.

- Four new event-types added. You now have the following events to choose 
  from:

	1) Timed event (with one second resolution)
	2) EOL (end of list) event
	3) EOQ (end of queue) event
	4) EOS (end of stream) event
	5) SOS (start of stream) event

  The EOL event happens when one of two things happen:

	-In 'repeat' or 'once' mode, when the end of the list is reached.
	-In 'srandom' mode, when all songs have been played and/or skipped

  The EOQ event happens when the last song in the queue has been played

  The EOS event happens after every song if-and-only-if it was allowed to play
  to its completion (using 'next' or the PgUp/PgDn keys will not generate an
  EOS event.) 

  The SOS event happens when a stream begins to play.

  Type 'addevent' with no arguments to see more in-depth help.

- External players now have a time-stamped prompt. It only does TP (time-
  played), and seeking is still not available.

- Auto-report info is now seen immediately, like it used to.

- Took out multi-level aliasing (just single level works now). Multi-level
  caused so many problems... I have no idea why I put it in there in the first
  place

- imp3sh can now accept input and give output via named pipes (fifo files) so
  external apps can easily have control.

  The command line options "-i" and "-o" specify what input fifo and output 
  fifo to use, respectively (these fifos will be created if they do not 
  already exist.) 

  There are several client/server utilities included for remote control of
  imp3sh sessions. Please read the source in the 'piped-io' directory for more
  information.

- You can also specify what resource file you would like imp3sh to use with
  a "-r" option on the command line. For example:

	>imp3sh -r /home/user/imp3sh/resource.txt

  Without this option, imp3sh looks for ~/.imp3rc as the default resource file.

- Added a "dj" mode. Kindof stupid really.... Enter "djmode" to turn this
  feature on/off. Then pressing "F1" through "F6" keys will act as song
  position memories. The pressing "F7" through "F12", respectively, will
  instantly zap you back to the corresponding remembered position. You can get
  down to <100 milliseconds accuracy with these keys... hehehe

  For you peoples running imp3sh on old Pentium 90's and whatnot, notice that 
  activating djmode will increase imp3sh's CPU usage from (practically) nothing
  to (practically) something... :)

- Various format improvements, minor bugfixes, and code-cleanup.

-------------
Version 0.2.0
-------------

- Almost all of imp3sh's commands have been renamed to longer, easier-to-
  understand names. The old, four-letter naming convention was becoming
  hard to comprehend with the 75+ built-in commands imp3sh now has.

  However, you can alias any imp3sh command to something shorter and more
  convenient for you.

- New and updated documentation: 
  
     -'USING.playlists' was updated and renamed to 'README.playlists'
     -'README' was updated
     -'EXAMPLE.imp3rc. was updated
     -'TODO' was updated
     - New doc file: 'INSTALL'
     - New doc file: 'EXTERNAL.players'
     - New doc file: 'README.advanced'
     - New doc file: 'BUGS'

- Added 'mute' command. Lets you mute/unmute xaudio output. Will not work with
  external players!

- Added a 10-band equalizer. Xaudio's 64-band (32 x 2 channels) equalizer 
  has been mapped down to one 10-band equalizer. The equalizer only works
  with the Xaudio decoder (external players are not mapped throught the 
  equalizer.) Type 'help eq' to see the new equalizer control commands.

  Valid vaules for the bands is between -128 and 127.

  New equalizer commands:

  eqprint - Print the 10 bands and their values

  eqsetband - Set a particular band or group of bands

	>eqsetband 0 30   # Set band 0 to 30
	>eqsetband * 5    # Set all bands to 5
	>eqsetband 0,1,2,3,7,8,9, 20,15,5,0,5,15,20 # Set bands 0,1,2,3,7,8 and
						      9 to 20,15,5,0,5,15 and
						      20, respectively.

  eqenable - enable the equalizer

  eqdisable - disable the equalizer

  Note: an eqsetband command will enable the equalizer if it is not already
        enabled.

  A new message is displayed showing the state of the equalizer when you use
  the 'status' command.

- Added ability to specify whether your audio driver can support multiple
  controlling processes with a new command 'audioprocs'. If your audio driver
  can support multiple controlling processes, than you should enable this 
  feature. The only benefit from this feature is that volume and balance
  controls will be available when an external player is running.

  Be careful! If you enable this feature and your audio driver does not 
  support multiple controlling processes, then all your external players will
  either not work, or send their output to default files.

  When you use the 'status' command, a new message is displayed showing the
  state of this new feature.

  I use a soundblaster live (which supports multiple processes) at home, and 
  a soundblaster 16 (which doesn't support multiple processes) at work.

- Added more job control functionality. This stuff is new to shells (I think :)
  imp3sh will buffer all output from a process if it is launched in the
  background (i.e., with a '&') or if it is launched by an event when the 
  console is occupied by another process or imp3sh's own output buffer.

  The output from stdout and stderr is stored until the process terminates, in
  which the process's output is flushed to imp3sh's console buffer.

  Alternatively, the user can flush the process' buffer by using a new command
  called "fjob". "fjob <job_number>" will dump the current contents of the 
  process buffer for <job_number> to the screen. Current jobs are displayed
  by using the "jobs" command, which was also updated to show status info
  about the job/process buffers.

  The user can bring the buffered process back to the foreground by using
  the 'fg' command, however, the process will not be able to recieve input 
  from stdin (break [Ctrl-C] and stop [Ctrl-Z] should still work, though.) If 
  a process is started in the foreground (no '&') and then stopped (Ctrl-Z),
  it can still be sent to the background ('bg') or foreground ('fg') like
  usual. 

  I added this functionality because sometimes I am using an app on the console
  and I forget that I have events waiting to execute. This way, any event can
  run and all the output will be stored for me to look at later.

  stdout and stderr output is mixed in the same buffer.

  The job buffers are circular with a maximum of 256 entries of (upto) 8192
  bytes each. Each entry allocated as needed.

- The xaudio and external player processes are now entered into the process
  list. The process list is viewable with the 'jobs' command. These processes
  cannot be manipulated with the 'fg' and 'bg' commands

- Added ability to save and load Active playlists with 'saveactive' and 
  'loadactive'

- Added external player support. imp3sh can now use other, command-line 
  players (like 'mikmod', or 'timidity') to play different file formats.
  Volume controls, muting, seeking, and time-stamped prompts are not
  available when using external players. Use 'addplayer' and 'printplayers'
  to add/view external players. 

  A '-q' option to 'addplayer' will suppress any console output from the
  external player. A '-b' option (instead of '-q'), will buffer all of the
  output from the external player. The buffered output is viewable via the
  'fjob' command.

  When using 'addir' or 'addiR', imp3sh will also add file-types that are 
  supported by any external players. These filetypes are defined as an 
  argument to the 'addplayer' command (see the 'EXTERNAL.players' file for
  examples.)

- Added ability to read/write fixed-location string identifiers from files.
  Any file type that has an identifier (i.e., song title) in a fixed location
  can be supported. Current supported formats are:

	.XM .ULT .STX .S3M .MTM .MOD .M15 .IT .IMF .GDM .FAR .DSM .AMF .669

  Also, ID3 tags can no longer be read/written from Ogg-Vorbis files.

- Added console-buffering. imp3sh output and messages will be buffered if the
  console is in use by another app or imp3sh's own output buffer. The 
  buffered console messages are displayed at the next earliest convenience
  (simliar to bash.)

- imp3sh can now execute multiple commands on one line. The commands must be 
  seperated by semi-colons ';'.

- You can now automate better using aliasing and semi-colons. For example:

	>alias und stop;delq *;addq underworld;play

  will create an aliased command 'und' that will empty the Queue, fill it with
  Active List entries matching "underworld" and start playing them.

- Added event mechanisms. This feature might be useless to most people, but I 
  have uses for it. imp3sh can now store commands (aka 'events') to be 
  executed sometime in the future or at a specified interval. The events can
  execute any imp3sh command (including aliased commands and commands
  seperated by semicolons.) The events work with 1 second resolution. Type 
  'help event' to see the new event-related commands.

  Examples:

  I use the following to create a persistent event to update my master list and
  save it every half hour (while I am downloading MP3's to my machine) so it is
  always fresh:

	>addevent -p 1800 delmaster *;addiR ~/music;savemaster ~/music/mp3.list

  NOTE: the "-p" option makes the event persistent. Without "-p", the command
        will only be executed _once_ and then removed from the event list.

  This command creates an alias 'intro' that only plays the first 15 seconds of
  a track before continuing to the next:

	>alias intro play;addevent -p 15 next

  This event will post a message to me every hour and tell me to get my ass up
  and do something productive with my time:

	>addevent -p 3600 echo "Get off the computer and do something useful!"

  ...and so on... I am sure somebody can think of some useful things to do with
  the event mechanisms... maybe.

- Added ability to queue tracks to be played back. The stream history functions
  were expanded to include adding songs into the "Future" as well as keeping
  track of songs that have been played in the past. New command 'addq' will 
  queue tracks to be played from the Active List by specifying an <index_spec>
  or <grep_strings>.

  The queue functions work on a circular array. So you can keep adding
  songs to it forever, but only the last HIST_SIZE entries are stored.

  NOTE: if you queue a bunch of entries, and then enter a 'playactive' command,
  the queue pointer will be updated past all previous entries and the
  song specified by 'playactive' will be added to the front of the queue. The
  entries you queued earlier are still stored, you just skipped over them.

  NOTE: the queue does not store filenames or tags --but references to entries
  in the Active list. If you remove or swap entries in the Active list that 
  would change the reference location of tracks in the queue, imp3sh will
  automatically update the queue to account for the removals/swaps.

- Added more queue manipulation commands:

  'delq ('*' | <index_spec> | <grep_strings>)' - delete queue indicese

  'sizeq <maximum_size>'                      - resize the queue dynamically

  'printq <grep_strings>'                     - print the contents of the queue

- Added Queue position to time-stamped prompt.

- Added '>>>' indicator when 'printactive' or 'printq' is used. The '>>>' 
  instead of '|||' denotes the current list/queue position.

- Added command "listsize" to dynamically increase maximum list size. This
  command effects the master and active lists, the 'played' array, and the 
  output buffer. 

  The maximum size you can enter is strictly limited by available memory.
  There is approximately 14 bytes of overhead per list entry (i.e., an empty
  playlist with maximum 10,000 entries will consume around 140 KBytes of RAM.)

- Added ability to specify an index range for 'addactive', 'delactive',
  'delmaster', 'addq' and 'delq' (i.e., anything that accepts an <index_spec>
  or <index_spec_list>).

  Some examples:

  >delmaster 13-48    # deletes indices 13 through 48 of the master playlist

  >addactive 38-      # adds all master list entries AFTER (and including)
                        index 38.

  >delactive  -9      # delete the first 10 active list entries

  >addq  0-15         # queue the first 15 active list entries for playback

- "addq" and "addactive" commands now accept an <index_spec_list>. An
  <index_spec_list> is a comma-seperated list of indices and/or index ranges.

  Some examples:

  >addq 1,3                      # adds Active list tracks 1 and 3 to the Queue

  >addactive 34,56,45-67,357,500-675  # adds a whole bunch of tracks from the
                                        Master list to the Active list.

  Note: There should be _no_ spaces in the <index_spec_list>. Spaces will cause
        everything after the space to be ignored.

  Note: <grep_strings> will be accepted into an <index_spec_list>, _but_ they 
	will cause UNPREDICTABLE behavior!! So for now, don't put them in!

-------------
Version 0.1.1
-------------

- Improved grep'ing. You can now put multiple strings for a <grep_string>. For
  example, if you wanted to list all songs by Euphoria, but not mixed by Alex
  Gold:

	>plpr Euphoria "!Alex Gold"

  Or if you wanted to add all Underworld songs except "Pearl's Girl" and 
  "Cowgirl" remixes:

	>acad underworld !pearl !cow

  Or, if you just wanted to get rid of everything except NIN, Orbital, Massive
  Attack, and Prodigy:

	>acdl !nin !orbital !massive !prodigy

  ...and so on and so forth...

  [You can specify up to a maximum of 2047 grep strings, but remember, that ALL
   of the specified grep strings must match a playlist entry for that entry to
   resolve to TRUE.]

- Fixed played[] array bug. Shifting wasn't working 100% correctly.

-------------
Version 0.1.0 : Major structural enhancements
-------------

- "USING.playlists" file added. Explains how to create and manipulate
   playlists.

- New "Active List" functionality added. Entries can be selectively added
  from the "Master List" to the "Active List" using grep functionality (see
  below.) Random and repeat playmode will only play from the active list now. 
  Type 'help' in imp3sh to see all the new commands.

- Grep'ing improved. You can now specify a "!" in front of any <grep_string>
  to specify a logical _not_. For example, if you were not in the mood to 
  listen to Classical music, you could add all but classical MP3's into the
  active playlist by typing:

	>acad !classical 

- If id3 tag present, but no artist defined, imp3sh defines artist as 
  "<unknown>"

- New command "source" allows you to execute imp3sh commands in a text file.
  Can be used to automate switching activelists/playlists and playmodes.

- Timestamps and playmodes can now be directly changed as an alternative to
  using the cyclic 'mode' and 'tims' commands. Type 'help' in imp3sh to see
  the new commands.

- List history bug fixed. Indices that are removed from the active list
  are now also removed from the history list (correctly) and remaining 
  history indices are updated to account for the removal.

--------------
Version 0.0.3a
--------------

- Got rid of all the whitespace in the id3 tag lines

- Playlist is now sorted by "Artist" first, like it should be!!

-------------
Version 0.0.3
-------------

- Playlist entries now display id3 tag information if available. 

- "plpr" with an argument will search id3 information if available.

- "plsr" sorts via id3 tag info first then filename on a per-entry basis.

- "Auto Report" now displays all id3 tag-info on one line.

- "pldr" and "pldR" will search the files for id3 tags and incorporate them
  into the playlist. 

  Good: you can search, sort, etc. your playlist by id3
        tag info. 
  Bad: "pldX" commands now take a lot longer since imp3sh has to
       open and read the tag off every file.

  I recommend not using "pldX" commands every time you start imp3sh. Save your
  list to a file, and have imp3sh read the playlist file upon startup (do this
  by editing your ".imprc" resource file.) 

- "plsv" was modified to store id3 tag information when saving playlists to
  files. Effort was made to keep the playlist files backward compatible with
  older imp3sh releases and other mp3 players.

- "plld" now loads id3 tag info (if available) from imp3sh-written
  playlist files.

- Minor file structure changes: "id3.c" now contains all id3-related functions.
  "id3.h" was incorporated into "imp3sh.h". 

--------------
Version 0.0.2a
--------------

- Added three id3 tag editing commands: 'psty', 'ptag', and 'atag'. (id3 manip
  code uses several functions stolen from Christopher Collins' 'id3tool')

- 'prst' and 'Auto Report' now display id3 tag information, if available.

- Added 'Auto-Restart' feature enabled with new command 'atrs'. Auto-Restart
  will automitically restart the decoder process if it unexpectedly dies
  (unfortunately, this happens quite frequently with Ogg/Vorbis files due to
  the beta-ness of the ogg and vorbis libraries.)

- If the decoder process bombs and imp3sh owns the terminal, the warning that
  is usually logged is also displayed on the console.

- Changed name of old makefile from 'makefile.old' to 'makefile.NoOgg'


-------------
Version 0.0.2
-------------

- Added support for Ogg/Vorbis files using libvorbis and a vorbis codec module
  ported to Linux by Ron Kellam.

- Added another makefile "makefile.old" for building without Ogg/Vorbis 
  support.

- Corrected handling of arrow keys after certain apps change tty settings.

- Corrected handling of F1 - F5 keys with certain terminals (including the
  'linux' [or text-login] terminal.)

- Added corrupted-tty detection in 'add_chist()'

- Improved (again) DCharBuf management. Less 'memmove()' calls now.

- Integrated 'rand' and 'rept' into one cyclic command: 'mode'.

- Changed 'Auto Report' to display only the name of the file/stream.

--------------
Version 0.0.1b
--------------

- Fixed segmentation fault when zero length (all ' ') command was entered.

--------------
Version 0.0.1a
--------------

- Split 'imp3sh.c' into multiple, more-organized files.

- Added 'auto' command. If enabled, 'Auto Report' will display
  stream name, duration, and MP3 characteristics every time a new stream
  is played (works best with a time-stamped prompt.)

- Re-vamped DCharBuf management. There is much less malloc'ing and free'ing
  going on now.

- Re-vamped 'arg' tokenizing to get ready for wild-character matching. 

- Got rid of tokenize() global pointer. Now multiple strings can be tokenized
  in the same scope.

- Fixed !bang command bug. Arguments placed after the !bang command are now
  kept.

- Added "<m>" (memuse) report. Displays total malloc'ed memory of the main
  imp3sh process (this was mainly for debugging purposes.)

- Other, minor bugfixes

-------------
Version 0.0.1 
-------------

- Initial release.
