Code Monkey home page Code Monkey logo

playlist_sequencer's Introduction

playlist_sequencer

Fixes (renames) music and podcast files so that mp3 players will play numerically named files in the (proper) lexical order

Running playlist_sequencer:

./playlist_sequencer.py

Directory must contain similar named files and it will pre-append a letter code to each file so that they can be played on a mp3 player in the correct order

Testing:

To test the playlist sequencer run the runtest.sh script.

===============================================

Problem statement:

When playing a series of multiple music files that are numbered some mp3 players do not play them in the correct order, this is because there is a difference between lexical and numerical listings.

Most file management systems use lexical ordering of files and this can be a problem.

Here is an example which will illustrate the problem:

For the list of files below

Disk10_Track1.mp3 Disk1_Track1.mp3 Disk2_Track1.mp3 Disk3_Track1.mp3 Disk3_Track1.mp3 Disk5_Track1.mp3 Disk6_Track1.mp3 Disk7_Track1.mp3 Disk8_Track1.mp3 Disk9_Track1.mp3 Disk10_Track2.mp3 Disk1_Track2.mp3 Disk2_Track2.mp3 Disk3_Track2.mp3 Disk3_Track2.mp3 Disk5_Track2.mp3 Disk6_Track2.mp3 Disk7_Track2.mp3 Disk8_Track2.mp3 Disk9_Track2.mp3

My mp3 player will play these files in this order:

Disk10_Track1.mp3 Disk10_Track2.mp3 Disk1_Track1.mp3 Disk1_Track2.mp3 Disk2_Track1.mp3 Disk2_Track2.mp3 Disk3_Track1.mp3 Disk3_Track2.mp3 Disk4_Track1.mp3 Disk4_Track2.mp3 Disk5_Track1.mp3 Disk5_Track2.mp3 Disk6_Track1.mp3 Disk6_Track2.mp3 Disk7_Track1.mp3 Disk7_Track2.mp3 Disk8_Track1.mp3 Disk8_Track2.mp3 Disk9_Track1.mp3 Disk9_Track2.mp3

The playlist_sequencer will examine the files in a directory and pre-append a letter code to each file so that the files are in the correct order when viewed lexically.
After running the playlist_sequencer on the list of files my mp3 player will play the files in this order:

aaa_Disk1_Track1.mp3 aab_Disk1_Track2.mp3 aac_Disk2_Track1.mp3 aad_Disk2_Track2.mp3 aae_Disk3_Track1.mp3 aaf_Disk3_Track2.mp3 aag_Disk4_Track1.mp3 aah_Disk4_Track2.mp3 aai_Disk5_Track1.mp3 aaj_Disk5_Track2.mp3 aak_Disk6_Track1.mp3 aal_Disk6_Track2.mp3 aam_Disk7_Track1.mp3 aan_Disk7_Track2.mp3 aao_Disk8_Track1.mp3 aap_Disk8_Track2.mp3 aaq_Disk9_Track1.mp3 aar_Disk9_Track2.mp3 aas_Disk10_Track1.mp3 aat_Disk10_Track2.mp3

playlist_sequencer's People

Contributors

hockeyhabit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.