Home

Storing Music Metadata Nicholas Johnston Computing with

image

Contents

1. 49 Appendix F Sample XML Document lt xml version 1 0 encoding utf 8 gt lt DOCTYPE volume SYSTEM musiclist dtd gt lt volume device fixed date 2002 04 28 start C mp3 test name Testing gt lt directory name Edward Shearmur K PAX OST absname C mp3 test Edward Shearmur K PAX OST gt lt file name 10 Edward Shearmur Powell s Return mp3 bitrate 192 encoding CBR size 1716059 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt Powell s Return lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 71 lt duration gt lt file gt lt file name 02 Edward Shearmur Good Morning Bess mp3 bitrate 192 encoding CBR size 4028209 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt Good Morning Bess lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 167 lt duration gt lt file gt lt file name 03 Edward Shearmur Taxi Ride mp3 bitrate 192 encoding CBR size 5543520 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt Taxi Ride lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 230 lt duration gt lt file gt lt file name 04 Edward Shearmur Constellation Lyra mp3 50 bitrate 192 encoding CBR size 3875236 format mp3 stereo jointstereo gt lt artist gt Edward S
2. Music Organiser should provide some form of progress bar and change the mouse pointer to an hourglass symbol to indicate that the application is busy A few other problems were also discovered One user had difficulty using the search function to find the test song because the search function is case sensitive Another user thought the menu names and location of menu items were unintuitive More positively however all users correctly guessed that it was necessary to select a volume before it could be deleted and all users seemed comfortable with the tree structure and how it related to the list box The raw results from the user testing can be found in appendix C 32 5 3 XML DTD Evaluation In addition to evaluating the application the XML DTD was evaluated in the con text of its viability as an interchange format for different music organiser applica tions This was done by discovering exactly what metadata the existing solutions de scribed in section 1 3 stored and then seeing if the XML DTD has provisions for storing all of this metadata in a clean and efficient manner Discovering the meta data that each program stored for a file was a relatively simple process In both applications I viewed the Properties or similar window for a given song and noted the all the different pieces of metadata available I then considered whether each of these pieces of metadata could be represented using the music list XML DTD
3. The result of this evaluation is below 33 Metadata Music Music item Library MAC List XML DTD Title Yes Artist Yes Album Yes Genre Yes Year Yes Track number No No Bitrate Sampling rate File size Yes Duration EA Yes Stereo mode EE 3H Mood Fm No Tempo Yes No No Occasion Yes No No Scanned cover image s No Yes Record company Release date No Yes It is clear from the above table that the XML DTD created in this project is a potentially effective interchange format between music organiser applications As can be seen in the table above the following items of metadata cannot be easily stored using the XML DTD e Track number I originally did not include this in the DTD mainly because I follow the common practice of including the track number in the actual filename of the MP3 Not including the track number explicitly in the XML DTD was an error however it should not be necessary to parse the track number out of a filename e Sampling rate the vast majority of MP3 files have the same sampling rate and most users have not heard of this term and are certainly not familiar with what it means However this item should be included in the XML DTD 34 for the sake of completeness and to improve the DTD s ability to act as interchange format e Mood tempo and occasion only the Music Library application offered these settings While classifying a song in these ways would be
4. functionality provided by the program The program s main window is shown in figure G 1 Music Organiser ofi x File Edi Tools Help X amp Music Collection Filename Length Title Arit Album Bitrate Size H Q Test Volume ttl Elvis Presley Suspicious Minds mp3 04 00 Suspicious Minds Elvis Presley Unknown 192 0 50 MB C Elvis Presley songs Elvis Presley Guitar Man mp3 03 00 Guitar Man Elvis Presley Unknown 192 0 50 MB zy Michael Jackson Test Volume 2 amp A CD ROM Welcome to Music Organiser Sun Apr 28 12 53 21 2002 Figure G 1 Main Music Organiser Window Adding a volume is a two step process as illustrated in figure G 2 The user must first select the starting location of the volume and then input the volume s name Before users can delete a volume they are prompted with the familiar are you sure question figure G 3 While some users find this intrusive it is important to make sure that a volume is not deleted accidentally 53 The search feature of Music Organiser is illustrated in figure G 4 Searches are carried out by entering the search string and selecting the scope of the search Music Organiser also has considerable validation code When a user attempts to play a file from a volume stored on removable media he is prompted to insert the relevant volume figure G 5 After the user confirms that the removable media is correctly inserted Music Organiser compares the serial numb
5. native appearance The only real advantage of using Java would be that it is significantly more portable than C in the sense that code requires fewer modifications Visual Basic VB This language would be a poor choice VB applications are restricted to the Win dows platform and while VB makes GUI generation trivial it is a very unpleasant programming environment and language to use The only advantages of using VB would be the ease of distribution of the final program and the ease of GUI generation As a programmer does not need to be aware of each individual platform s quirks and slightly different behaviour 17 Perl I have considerable experience of Perl and believe that this would be a suitable language for implementation Perl is a very high level loosely typed language providing advanced and high level data structures built in to the language and very powerful text processing support 8 Perl is not traditionally thought of as a language for creating GUI applications yet there are several GUI toolkits at the Perl programmer s disposal primarily Perl TK and the new wxPerl toolkit Perl has many advantages It is highly portable well written Perl code is known to run without any modification on UNIX Windows and Macintosh systems A large number of extension modules are freely available on the Perl community s CPAN Comprehensive Perl Archive Network Perl s built in regular expressions m
6. 128 192 REQUIRED format MP3 oggvorbis WAV PCM REQUIRED name CDATA REQUIRED size NMTOKENS REQUIRED he The following elements are allowed only inside file elements The type of PCDATA is used since entity references might be used to shorten names of record companies gt lt ELEMENT artist PCDATA gt lt ELEMENT title PCDATA gt lt ELEMENT duration PCDATA gt lt in seconds gt lt ELEMENT album PCDATA gt lt ELEMENT reldate PCDATA gt lt release date gt lt ELEMENT label PCDATA gt lt record company gt lt miscellaneous info gt lt ELEMENT misc PCDATA gt lt genre one of the defacto Winamp genres gt 48 lt ELEMENT genre PCDATA gt lt Cover element is used to store details on any scanned CD cover images for a particular directory gt lt ELEMENT cover EMPTY gt lt Attributes of the cover element File The image s filename Format One of three possible values representing the image s format Can be either JPEG GIF or PNG Width Width of the image in pixels Height Height of the image in pixels Side Used to represent what side or face of the CD this image is of gt lt ATTLIST cover file CDATA REQUIRED format JPEG GIF PNG IMPLIED width NMTOKEN IMPLIED height NMTOKEN IMPLIED side front back cd inlay IMPLIED
7. 44 100 samples per second If stereo encoding is used each sample is recorded once for the left channel of the stereo signal and once for the right channel Each sample is stored as a n bit value usually 16 bits 2 1 4 Motivation for Compressed Digital Audio In section 2 1 the general process of converting audio from analog to digital form was explained The problem with this approach is that storing audio in digital form requires a vast amount of space We can calculate the amount of storage required for one second of audio using the following formula Sample rate x Bits per sample x 2 8 Total size kilobytes i021 The multiplication by 2 is included to take account for the left and right stereo channels The division by 8 is included to convert the bits to bytes and the division by 1 024 is included to convert from bytes to kilobytes Using this formula the total size required for one second of stereo audio sampled at 44 1 KHz is 44100 x 16 x 2 8 1 024 1411200 8 1 024 176400 1 024 172 265625 Total size per second kilobytes A minute of audio would therefore require 10 1 MB of data to store Assuming an average song length of 3 minutes a single song would require 30 3 MB of data While the low cost of storage today might make this seem insignificant it is not A large amount of redundant data is being stored and transferring such large files over networks is still relatively tedious In additio
8. collection and inserts them into the tree object e Code to generate the user interface and event handling code Amongst other things this component is responsible for inserting items into the list box when a tree node is activated This component is also responsible for most validation user input is validated before functions in the XML subsystems are called The architecture of Music Organiser is illustrated in figure 4 3 I used several ex isting third party Perl modules to speed up development of Music Organiser The 28 XML Parser Wx App Wx ListCtrl I a MusicOrganiserApp f 7 gt Wx TreeCtrl v CreateXML ee Y ES Win32 DriveInfo MP3 Info File Find Figure 4 3 Music Organiser Architecture UML Diagram relationship between these modules and native components of Music Organiser is illustrated in figure 4 3 The purpose and functionality of these modules is briefly described below XML Parser A non validating XML parser The parser does however check for well formedness Win32 DriveInfo A module that provides information such as type free space and serial number about drives on a Windows system MP3 Info A module that provides information such as artist album duration and bitrate on a given MP3 file File Find A module that uses an event driven approach to traverse a directory
9. structure 29 Chapter 5 Evaluation and Conclusion 5 1 Evaluation Criteria There are two main parts of the solution that must be evaluated the user interface and the XML DTD The evaluation criteria are e The proportion of metadata stored by other music organiser applications that can be represented in the XML DTD e The application s ease of use measured by the number of usability problems revealed in user testing 5 2 User Interface Evaluation As previously stated one of the deliverables for this project is a simple application designed to illustrate the feasability of XML to store music metadata I evaluated the user interface of the application using a simple user testing ap proach This user testing approach was a combination of e Task or goal oriented use Users were given a number of tasks to carry out Adda volume 30 Play a song from the volume added Search for a song Delete a volume e Thinking aloud 9 users were encouraged to say out loud what they were thinking as they were carrying out the above tasks The value of this approach is that it allows an observer to determine not just what they the users are doing with the interface but also why they are doing it 9 p18 e Surveying users were asked to rate the application on a subjective scale for a set of factors based on Jakob Nielsen s usability heuristics 9 The program was easy to use Th
10. the European Community s Office of Official Publications 14 In addition many of us use SGML every day without realising it HTML Hypertext Markup Language is an SGML application SGML is not without its problems however Its main problem is that it has a very flexible and complex grammar and this makes parsing SGML very difficult and SGML processing software expensive In addition most SGML applications use only a tiny subset of the language SGML s complexity is both a strength and weakness but it has motivated the development of a more lightweight general purpose markup language XML 13 3 3 Introduction to XML It is difficult to define exactly what XML is It has been described as a protocol for containing and managing information 13 p2 and a family of technologies that can do everything from formatting documents to filtering data 13 p2 XML documents are composed of fags Tags can be nested and can have attributes to control optional or additional behaviour of the tag A simple XML snippet would be lt directory name Singles gt lt file name Elvis Presley Guitar Man mp3 bitrate 192 encoding CBR format mp3 stereo jointstereo gt lt artist gt Elvis Presley lt artist gt 12 title Guitar Man lt title gt lt file gt lt cover file front jpg format JPEG side front gt lt directory gt This XML snippet shows several of XML s main features e directory f
11. useful it would be a tedious process and it is difficult to imagine users having the patience to classify each song in their collection in this way However it is certainly an interesting idea and it would be very interesting to attempt to devise an automated way of guessing these values e Comment this is an ID3 field containing some comment associated with a file I originally did not include this in the DTD because this field is rarely used and when it is used it usually does not contain any meaningful in formation However for the sake of completeness the XML DTD should be able to represent this data It is unsurprising that there is some difference in the metadata stored between the two existing solutions described in this report and the XML DTD The XML DTD was developed in a relatively closed fashion In an ideal situation the DTD would be developed through an iterative refinement process based on feedback from au thors of music organiser applications This is emphasised by the fact that two items of metadata record company and release date can be represented in the DTD but not in the existing solutions examined However even with a feedback or con sultation approach it is still likely that some applications will use certain items of metadata that cannot be represented in the XML DTD The best approach to resolv ing this situation is to provide a way of storing miscellaneous data for example via the misc element of th
12. 01 date format where a date like 5 January 2002 would be represented as 2002 01 05 The root element of the document is a volumes element that can have unlimited directory and file elements included within lt ELEMENT volume directory file gt erc Attributes for the volume element Volumes are constructed in a recursive fashion the user supplies a start directory or location and the list is constructed by recursing through this directory or location and all its subdirectories Device What kind of physical device the volume is stored on It can be either a CD ROM a directory on fixed media a network location generally FTP or a form of removable media other than CD ROM e g Zip disk Date The date on which the volume was created or if it has 46 been updated the date of the last update Start The initial directory drive name or network location where recursive volume generation started Serialno An optional attribute for a CD ROM or other removable media s serial number This can aid identification of different media although these numbers are supposed to be unique they are best thought of as semi unique Name A user supplied name of the volume This is required since it will be user s primary means of identifying volumes manually gt lt ATTLIST volume device cdrom directory network removable cdrom date CDATA REQUIRED start CDATA REQ
13. 3 bitrate 192 encoding CBR size 9229293 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt New Mexico lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 384 lt duration gt lt file gt lt file name 11 Edward Shearmur July 27th mp3 bitrate 192 encoding CBR size 6735331 51 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt July 27th lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 280 lt duration gt lt file gt lt file name 12 Edward Shearmur Coda mp3 bitrate 192 encoding CBR size 4823168 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt Coda lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 200 lt duration gt lt file gt lt file name 01 Edward Shearmur Grand Central mp3 bitrate 192 encoding CBR size 6695834 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt Grand Central lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 278 lt duration gt lt file gt lt directory gt lt volume gt 52 Appendix G Music Organiser Screenshots This appendix includes several screenshots of Music Organiser showing the ap plication from a user s perspective The screenshots aim to show the full range of
14. 4 3 23 Problems 4 3 3 Change of Focus Solution ln 441 XMLDTD 4 44 2 Application 5 Evaluation and Conclusion 5 1 Evaluation Criteria 5 2 User Interface Evaluation 5 3 XML DTD Evaluation 5 4 Conclusion 5 4 1 Future Improvements Bibliography A Reflection B Revised Schedule C User Testing Raw Data iv 37 40 41 42 D User Manual D 1 Introduction D 2 Managing Volumes D 2 1 Adding a Volume D 2 2 Updating a Volume D 2 3 Deleting a Volume D 3 Searching D 4 Browsing and Playing Songs E XML DTD F Sample XML Document G Music Organiser Screenshots 46 50 53 Chapter 1 Introduction 1 1 Background The mass transition from audio cassette to CD marked a significant change in how people organise their music Music lovers liked the CD s durability it did not de grade every time it was used like a cassette Near instant access to songs anywhere on the disc and no more chewed tapes made people willing to invest in their music collections However perhaps the most significant change yet in the music world has been the amazing rise in popularity of highly compressed digital audio primarily in the form of MP3 MPEG 1 Audio Layer III files Critics argue that all MP3s have done is increased piracy and deprived record companies and artists of revenue This may be partially true but the mai
15. Apple s iPod spurs mixed reactions World Wide Web 2001 http news cnet com 2 100 1040 274821 html 5 April 2002 Julian Smart Robert Roebling et al wxWindows 2 2 A portable C and Python GUI toolkit 2001 Larry Wall Tom Christiansen and Randal L Schwartz Programming Perl O Reilly and Associates Inc 2nd edition 1996 Jakob Nielsen Usability Engineering Academic Press Inc 1993 Jakob Nielsen Test With 5 Users Alertbox Mar 2000 World Wide Web 2000 http useit com alertbox 200003 19 html 20 April 2002 Patrick Niemeyer and Jonathon Knudsen Learning Java O Reilly and As sociates Inc 2000 38 12 13 14 15 16 17 18 19 Martin Nilsson ID3v2 Made Easy World Wide Web 2000 http www id3 org easy html 31 March 2002 Erik T Ray Learning XML O Reilly and Associates Inc 2001 SGML Users Group A Brief History of the Development of SGML World Wide Web 1990 http www sgmlsource com history sgmlhist htm 3 April 2002 Andrew S Tanenbaum Computer Networks Prentice Hall Inc 3rd edition 1996 Norman Walsh and Leonard Muellner DocBook The Definitive Guide O Reilly and Associates Inc 1999 Don Wells What is Extreme Programming World Wide Web http www extremeprogramming org what html 1 March 2002 Wensoftware Music Library Help 2001 World Wide Web Consortium Extensible Markup Language XML 1 0 World Wide Web 2001 h
16. Storing Music Metadata Nicholas Johnston Computing with Management Studies 2001 2002 The candidate confirms that the work submitted is their own and the appropriate credit has been given where reference has been made to the work of others I understand that failure to attribute material which is obtained from another source may be considered as plagiarism Signature of student Summary Digital audio mainly in the form of MP3 files is radically altering how we listen to and manage our music People are increasingly converting their CD collections to MP3 files allowing them to listen to their music in more flexible ways Yet this gives rise to a problem With potentially thousands of songs spread out over numerous disks and CD ROMs finding a given song is a frustrating and difficult process The aim of this project is to produce a simple application to help a user organ ise their MP3 collection and to research different technologies such as XML for storing music metadata An XML DTD called music list has been created to store music metadata A simple GUI application Music Organiser which uses the music list DTD has been created to demonstrate the viability of using the music list DTD to store music metadata Acknowledgements I would like to thank my project supervisor Dr John Stell for his help advice support and encouragement throughout the project process I would also like to thank the m
17. UIRED serialno CDATA IMPLIED name CDATA REQUIRED lt ELEMENT directory directory file cover gt lt Attributes for the directory element name the name of the directory absname the absolute name or path to the directory This is not required Is included since some processing software may find it difficult to infer the absolute directory name from the XML hierarchy CDATA is used as attribute type since NMTOKENS removes whitespace and users regularly use space in directory names gt lt ATTLIST directory name CDATA REQUIRED absname CDATA IMPLIED lt A file element is a container element that stores details of a given file gt lt ELEMENT file artist title duration album reldate label gt 47 lt Attributes for the file element Type For future expansion not required and will be assumed to be simply audio Encoding Represents whether Constant Bitrate or Variable Bitrate encoding is used Defaults to CBR since this is by far the most common encoding Stereo Certain file formats such as MP3 permit various stereo modes such as mono full stereo joint stereo File format The type of file format such as MP3 or Ogg Vorbis Name The file s filename Size Size of the file in bytes gt lt ATTLIST file type CDATA IMPLIED encoding CBR VBR CBR stereo mono stereo jointstereo REQUIRED bitrate 64
18. ake it extremely powerful for text processing The Perl language is very seman tically dense a small amount of code can perform what would take many lines of code in other languages In addition Perl s garbage collection approach leaves the programmer free of memory allocation worries The one disadvantage of using Perl is that it is a semi compiled language Perl code is not compiled in the sense that it produces a native code executable rather it is compiled and subsequently executed each time a Perl program is run Therefore the Perl compiler is required in some form or other for a user to run a Perl program 4 2 2 GUI Toolkit As previously stated there are several GUI toolkits available to the Perl program mer There are Windows only toolkits such as Win32 GUD toolkits or bindings to Linux UNIX desktop environments such as GNOME and KDE and finally more general and portable toolkits such as Perl Tk and wxPerl Perl Tk is the most commonly used GUI toolkit in Perl It is reasonably well docu mented and runs on UNIX and Windows platforms It tries to emulate the appear ance of a native application but does not actually use the native GUI functions of 18 the underlying system In addition Perl Tk is a very difficult and relatively low level toolkit to use wxPerl is a relatively new Perl GUI toolkit It is based on wxWindows a C framework providing GUI Graphical User Interface and other facilities
19. ans are bypassing the traditional approach to selling music through a record company and are now increasingly selling music direct to the public MP3 technology previously only accessible to owners of expensive computers is becoming far more widespread The cost of computers in general and CD writers is falling The use of MPEG Motion Picture Experts Group technology in the DVD and MP3 standards means many DVD players can also play MP3 files burnt onto CDR Compact Disc Recordable effectively bringing MP3 into the living room Consumer electronics giants such as Panasonic and Goodmans are also launching portable MP3 players that play MP3 files burnt on CD 1 2 The Problem All the innovations discussed in section 1 1 go a long way to improving a music lover s control over his collection but there is still much to be done As a user s collection grows in size it becomes unfeasible to remember where all his music is located Finding a particular song or album becomes a tedious process of hunting around numerous disks or CD ROMs and will often end in frustration A simple integrated software package that can organise a user s music collection in all for mats and add value to the music lover s listening experience is required A solution is required that e Conceptually separates a user s collection into volumes a volume might be a directory on fixed media a removable disk or a network location e Stores metad
20. any others who have helped me with the technical aspects of the project Special thanks to the members of the PerlMonks web site for their invaluable help with any Perl related problem Also thanks to the members of the wxPerl mailing list who answered my many questions about wxPerl Finally I would like to thank my family and friends for their support during this project and throughout my entire degree il Contents 1 Introduction 1 Tl Background ss ga cnet esker rae ado oC 1 12 TheProblem 22e 2 1 3 Existing Solutions 4 aa Aa ana ok we m emos dU Sup e an ie gore 3 1 3 1 MPEG Audio Collection 3 L3 2 Musie Library ts LEER 4 2 Digital Audio and MP3 5 2 1 Introduction to Digital Audio llle 5 2 1 1 Motivation for Compressed Digital Audio 2 6 2 2 MP3 A Compressed Digital Audio Format 7 2 2 1 Key MP3 related Terms naaa 8 2 2 2 Legal Issues Surrounding MP3 9 2 3 Copyright and Ethical Issues llle 10 3 XML and Markup 11 3 1 Introduction to Structural Markup oaaae 11 32 History of Markup eee 12 33 Introduction to XML een 12 iii 4 Design and Implementation 4 1 4 2 4 3 4 4 Design Methodology 4 1 1 Extreme Programming Tools une SUAS eg iesu 4 2 1 Programming Language 42 2 GUIToolkit 4 23 Data Storage Project Management 4 3 1 Original Schedule
21. arkup can make documents more amenable to interpretation by software 16 Versions of a document can be created in other formats and can be tailored to these formats For example in a print version of a doc ument cross references to other parts of the document take the form of the section number However an online hypertext version of the document could use hyperlinks to implement cross references e The author of a document is freed of presentation and other stylistic issues allowing them to concentrate on the content of the document e Data is stored in an open non proprietary form Markup documents become databases of information Programs can compile retrieve and otherwise manipulate the documents in predictable useful ways 16 It should be noted however that some DTDs Document Type Definition are proprietary re stricting the use of any markup that uses that DTD 11 3 2 History of Markup SGML Standardised General Markup Language was the first major markup lan guage After several years of work by the Computer Languages for the Processing of Text committee of ANSI American National Standards Institute SGML was ratified in the ISO 8879 standard 14 As an interesting aside the actual published standard itself was written in SGML and was published in record time after ap proval 14 SGML is widely used Some of its users include the US Department of Defence US Internal Revenue Service and
22. ata for each volume in a user s collection e Permits searching of metadata on a variety of criteria 1 3 Existing Solutions There are a number of existing programs claiming to help users organise their col lections The existence of other solutions including several commercial ones in dicates that users do want to organise their collections and justifies further research into the subject The solution I am proposing is not however just intended to introduce yet another program onto the market My solution differs significantly in that it uses XML Extensible Markup Language see section 3 3 to store its data Most existing solutions use proprietary file formats effectively holding users data to ransom and committing them to further use of that application While most solutions do allow data to be exported in some other formats these are usually only display formats such as RTF Rich Text Format or simple formats such as CSV Comma Separated Values that are suitable only for storing tabular data and cannot easily represent complex relationships within data For example in CSV it is difficult to easily represent hierarchical data yet in XML storing data in a hierarchical manner by nesting tags is very common and easy to do Using XML to store data on a user s collection is the main differentiating feature of this solution With the data stored as XML and the DTD Document Type Def inition readily available the data
23. ation about a volume into other formats such as HTML Music Organiser s modular design see figure 4 3 and separation of interface code from core functionality make it easier to add new functionality to the program Any new functionality could be implemented as a separate Perl package that can be called from within interface handling code Separate Perl packages can still communicate with the interface by being passed a reference to the relevant wxPerl object The XML DTD could be improved by adding the unsupported elements see section 5 3 Two new elements track number and sampling rate could be added These would be permitted only inside lt file gt tags Finally the XML DTD could be placed under an open source license such as the Free Software Foundation s GNU General Public License and placed on a web site to encourage authors of different music organiser applications to use it 37 Bibliography 2 3 4 5 7 10 11 Bitzi Bitzi World Wide Web 2001 http bitzi com 12 December 2001 Alligator Descartes and Tim Bunce Programming the Perl DBI O Reilly and Associates Inc 2000 John C Dvorak MP3 Gives Way to Ogg Vorbis World Wide Web 2000 http www forbes com 2000 09 18 dvorak_ index print html 31 March 2002 Nick Efford AR21 Handbook School of Computing University of Leeds 2000 Jurgen Faul MPEG Audio Collection Help 2001 Ian Fried
24. auses 4 3 Project Management 4 3 1 Original Schedule The original schedule for the project was as follows Project Part or Phase Problem understanding Christmas vacation and exam period Initial user interface evaluation Design and implementation User testing interface evaluation 21 Several serious problems required significant deviation from this schedule and a re focusing of the entire project The project s revised schedule can be found in appendix B 4 3 2 Problems I encountered a number of problems Firstly creating the XML DTD took far longer than expected Despite its name XML is not a language as such It is a metalanguage for creating other markup languages This means that creating an XML DTD is really like inventing a new language Finding validator software to test the DTD also proved difficult I had not expected creating the XML DTD to be so complex and time consuming Secondly the wxPerl toolkit caused major problems Installing wxPerl was diffi cult Unlike most Perl modules which are written in Perl wxPerl is an XS module a module written in some other language usually C or C with a Perl interface Installing XS modules is more difficult than ordinary Perl modules In order to install them it is necessary to have a copy of the compiler used to compile the Perl implementation in use or it is necessary to find a binary version of the module for the platform in use The binary distribu
25. ayed in the user s default MP3 player However if the song is stored on removable media Music Organiser prompts the user to insert the relevant removable media The volume users added was a CD ROM so when they tried to play a song from it Music Organiser prompted them to insert the CD ROM even though the CD ROM was still in the drive This confused all the test users to varying degrees Comments such as But do we have that disc and Oh is this an error now were common All users did eventually reason that the CD ROM that Music Organiser was asking for was already in the drive Users commented it Music Organiser should check the drive first I agree with the test users views on this Music Organiser should only prompt for a CD ROM if it is not already inserted The second problem was a lack of feedback when adding a volume As stated in section 4 4 2 creating the XML for a volume is handled by a separate subsys tem This XML creation subsystem is not well integrated into the main application Adding a volume can sometimes take up to a minute and during this time the appli cation becomes unresponsive Two of the test users asked questions like Is it doing it now and Is it working One user guessed that the program was still func tioning correctly by noticing the noise from the CD ROM drive but users should not have to rely on such primitive mechanisms for feedback Again I agree with the test users views
26. crosoft SQL Server etc as well as ordinary text and CSV files The advantage of the DBI is that a program can actually use SQL to store and retrieve information in CSV files The final option is that of XML XML has increased in use and importance in recent years I feel that it would be a good choice for a number of reasons 13 e XML is becoming increasingly widely used and is likely to become the de facto standard for cross platform document and data exchange e XML is an open standard produced by the World Wide Web Consortium it is not tied to the fortunes of one particular company However XML is not 20 a standard designed for the sake of it It has the support of top companies in the computing industry and is widely used today e XML is both machine and human readable XML parsers now exist for a wide variety of programming languages and environments In addition even a human looking at a well written XML document will be able to understand it e XML uses Unicode as its default character set Unicode greatly simplifies the storage and distribution of text in different languages and scripts This is especially important as computing is becoming more accessible to users all over the world many of whom do not speak English Unicode resolves the previous problems of having various character encoding schemes for the same language such as Shift JIS and Euc JP for Japanese and the inevitable confusion this c
27. directory elements have just one attribute name corresponding to the name of the directory file elements have a number of attributes type The type of content stored in the file i e audio or video For future expansion only will currently be assumed to be audio encoding The type of encoding CBR or VBR used Defaults to CBR stereo The stereo mode used bitrate The file s bitrate format The file s format MP3 Ogg Vorbis or WAV name The file s name size The file s size in bytes 25 file elements can also contain other elements artist The artist of the track title The track title duration The track s duration in seconds album The album that the track is taken from reldate The release date of the album in ISO8601 format label The track s record label genre The track s genre misc Miscellaneous data associated with the file directory elements can include cover elements It is common for users to include scanned image files of a CD s front and back covers in their collection cover elements have a number of attributes file The filename of the cover format The image file s format Can be one of JPEG GIF or PNG width The width of the image in pixels height The height of the image in pixels side The side or face of the CD that this is an image of Can be one of front back inlay or CD 26 4 42 Application The other part of the solution is a simple applicati
28. e music list XML DTD 5 4 Conclusion The evaluation criteria set out in section 5 1 have been satisfied to varying degrees The proportion of metadata stored by other music organiser applications that can be represented in the XML DTD is relatively high This was measured by counting the number of items of metadata that were stored in both existing solutions and 35 seeing how many of these items could be stored in the XML DTD Both solutions stored 11 identical items of metadata The XML DTD could represent 9 of these so a high proportion of metadata can be represented in the XML DTD Two significant usability problems were identified during user testing While these do affect the application s usability it is good that these problems have come to light and that users generally found the overall interface of the program simple and easy to use With these results in mind it can be assumed that on the whole the aim of the project has been achieved 36 5 4 1 Future Improvements There are several ways in which the solutions provided by this project could be improved Music Organiser could be improved in several ways e The usability problems detailed in section 5 2 could be fixed e Use of acoustic fingerprinting along with remote music identification ser vices such as Bitzi 1 could be used to automatically identify music e XSLT see section 3 3 could be used to transform the XML files used to store inform
29. e program used simple and natural language The program s error messages were good The program minimised the user s memory load The program used words and terms consistently and followed platform Windows standards The program provided good feedback and status information Jakob Nielsen s usability heuristics are ten heuristics or factors by which an in terface can be measured These heuristics are a practical and an almost analytical method for analysing interfaces and improving them I did not carry out a large scale user test Jakob Nielsen states that elaborate us ability tests are a waste of resources 10 and that the best results come from testing no more than 5 users and running as many small tests as you can afford 10 In addition I simply do not have the resources to conduct a large scale user test I tested three users Each user was given a brief introduction to Music Organiser including an explanation of the concept of a volume I strictly obeyed the shut up rule 9 p204 during the testing I did not give users any assistance in completing the tasks set as it would be difficult to provide equal assistance to all users and providing assistance to some users and not others would bias the results 31 The user testing revealed two main usability problems in the application The first problem was that of playing songs When an entry in the list box is double clicked the song is pl
30. er of the disk in the drive with the serial number stored in the volume s XML file and issues an error message figure G 6 if the wrong removable media has been inserted If a user at tempts to play a file from a fixed disk Music Organiser first checks to see if the file still exists If the file does not exist Music Organiser issues an error message ad vising the user to update the volume so that files deleted after the original creation of the volume are no longer displayed figure G 7 If a user attempts to update a volume Music Organiser checks to see if the start location of the volume exists If this start location no longer exists the volume will no longer be accessible and Music Organiser issues an error figure G 8 54 Browse for Folder Desktop 20 3 Floppy E e C e D HS Removable Disk E E F B 25 My Documents E Zig Network Neighborhood C mp3 EC Stuff Set volume name New Volume Wines a Figure G 2 Adding a Volume 55 Really delete volume Elvis Presley Suspicious Minds mp3 Test Volume 1 04 00 Elvis Presley Guitar Man mp3 Test Volume 1 03 00 Figure G 4 Searching for Elvis 56 Insert CD ROM x 2 To play 18 Joy Division Love Will Tear Us Apart mp3 you must insert the CD ROM with serial number E 495 13E 4 that holds volume 4 CD ROM into drive F E Cancel Figure G 5 Prompting to Insert Removable Media Wrong disk Incor
31. he patent on the LZW Lempel Ziv amp Welch compression algorithm used in GIF Graphics Interchange Format files Fraunhofer has enlisted the services of Thomson Multi media to collect the fees The fees that Fraunhofer are attempting to charge are excessive The fee to pro duce an MP3 encoder is 15 000 plus a per unit fee of 2 50 Fraunhofer are also attempting to charge for playback devices and require anyone using streaming MP3 audio to pay a fee These fees are above industry norms and threaten to halt the development of new MP3 consumer electronics devices Growing dissatisfaction with these excessive fees has lead to the development of patent free and open formats such as Ogg Vorbis 3 Ogg Vorbis claims to be technically superior to MP3 and shows great future potential however it is not yet implemented in any consumer hardware devices The legal issues surrounding MP3 continue to be a problem but will not prevent the rise of digital audio as a whole The benefits of highly compressed digital audio see section 1 1 are simply too good 2 3 Copyright and Ethical Issues Piracy is not a technological issue It s a behavior issue Steve Jobs CEO Apple Computer The above quote shows one of the possible views on piracy Technological solu tions are inadequate time and time again new encryption and copy protection schemes touted as unbreakable have been cracked only days after release Tech nol
32. hearmur lt artist gt lt title gt Constellation Lyra lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 161 lt duration gt lt file gt lt file name 05 Edward Shearmur Bluebird mp3 bitrate 192 encoding CBR size 5576121 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt Bluebird lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 232 lt duration gt lt file gt lt file name 06 Edward Shearmur 4th of July mp3 bitrate 192 encoding CBR size 6112781 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt 4th of July lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 254 lt duration gt lt file gt lt file name 07 Edward Shearmur Prot Missing mp3 bitrate 192 encoding CBR size 3605026 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt Prot Missing lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 150 lt duration gt lt file gt lt file name 08 Edward Shearmur Sarah mp3 bitrate 192 encoding CBR size 4402492 format mp3 stereo jointstereo gt lt artist gt Edward Shearmur lt artist gt lt title gt Sarah lt title gt lt album gt K Pax Soundtrack lt album gt lt duration gt 183 lt duration gt lt file gt lt file name 09 Edward Shearmur New Mexico mp
33. ication s main window I decided against this since the search 27 feature would not be used all the time and should therefore not be visible and oc cupying space permanently This follows the idea that dialogues should not con tain information that is irrelevant or rarely needed 9 p20 emphasis added A screenshot of Music Organiser s main window illustrating the final user interface is shown in figure 4 2 Further screenshots illustrating other aspects of the program s interface can be found in Appendix G Music Organiser ioi x File Edi Tools Help X amp Music Collection Filename Length Title Artist Album Bitte Size a amp Test Volume 1 Elvis Presley Suspicious Minds mp3 04 00 Suspicious Minds Elvis Presley Unknown 192 0 50 MB C Elvis Presley songs Elvis Presley Guitar Man mp3 03 00 Guitar Man Elvis Presley Unknown 192 0 50 MB 3 Michael Jackson Test Volume 2 amp A CD ROM Welcome to Music Organiser Sun Apr 28 12 53 21 2002 Figure 4 2 Main Music Organiser Window Music Organiser is composed of three main components e An XML creation subsystem responsible for creating the XML files for vol umes in a user s collection A sample XML document produced by this sub system can be found in appendix F e An XML processing subsystem responsible for interacting with the standard Perl XML parser module XML Parser This component parses the XML files representing a user s
34. ile artist titleand cover are all examples of tags Tags usually have an opening tag e g lt directory gt and an ending tag e g lt directory gt e name bitrate encoding format and stereo are all examples of attributes e The artist tag is inside a file tag which is in turn inside a direc tory tag This is called nesting and is what makes XML so suited to storing hierarchical data e The cover tag is an empty element it has no contents Instead of including a lt cover gt closing tag a forward slash has been inserted immediately before the tag s closing angle bracket This is merely a syntactic shortcut XML documents can be either freeform or modeled Freeform XML is described as making up your own words but observing the rules of punctuation 13 p6 In freeform XML any tags can appear in any order Problems arise when tags are misspelt they will simply be taken to be part of the actual language For instance if had misspelt the directory tag in the above example and had instead written directry the XML would still be valid but would cause problems for a program parsing the XML and expecting to find a directory tag Providing a document model is a far more robust and powerful solution This is most commonly done with a DTD Document Type Definition A DTD is a set of rules or a specification describing what tags can be used in a document and what they can contain 13 XML documents can be valida
35. imitless For example an XML document used to represent a volume in a user s digital music collection could be e Transformed into an HTML document for placing on the user s web site e Transformed into a playlist so that all the songs in the XML document could be played easily with an MP3 player e Transformed into a format for printing such as PostScript or PDF XML is a very powerful way of storing data in a structured hierarchical form Its wide support open and non proprietary nature guarantees its position as an important data storage system for years to come Readers wishing to find out more about XML should consult the XML specification 19 14 Chapter 4 Design and Implementation The purpose of this chapter is to explain how the solution was designed and what tools were used to implement it 4 1 Design Methodology 4 1 1 Extreme Programming I used part of the extreme programming methodology in creating the solution Ex treme programming is a deliberate and disciplined approach to software develop ment 17 Extreme programming has a number of key features e Code should be written as simply as possible avoid clever generalisation Simply written code should be easy to extend any way e Use consistent style rules indentation identifier names etc e All programming should be done in pairs e All code must have unit tests and must pass these tests e Little formal documentation for code Code
36. including directory elements is optional e Including directory in an element s declaration means that the element must include one or more directory elements Attributes are declared in a similar fashion lt ATTLIST cover file CDATA REQUIRED format JPEG GIF PNG IMPLIED width NMTOKEN IMPLIED height NMTOKEN IMPLIED side front back cd inlay IMPLIED 24 This declares attributes for the cover element Each individual attribute s decla ration takes the form of the attribute name its type character data an enumeration or name token and a description of attribute behaviour i e REQUIRED means the attribute is required IMPLIED means it is optional The DTD s root element is volume This element has a number of attributes device The kind of physical device the volume is stored on This can be fixed media removable media or a remote location such as an FTP server date The date the volume was created or if it has been updated the date of the last update Like all dates in the DTD it is represented in ISO8601 date format start The initial directory or starting point of the volume Similar to HTML s BASE tag serialno The unique serial number of the removable media containing the volume This can be useful for identifying the media at a later time name A user supplied name of the volume directory elements can contain unlimited directory file and cover el ements
37. is openly stored and will be of the best use to its owner Using XML also guarantees that the data will be easily usable by other applications for years to come 1 3 1 MPEG Audio Collection MPEG Audio Collection MAC is a freeware handy program designed to orga nize and catalog your MPEG audio file collection 5 In addition to just organis ing a digital audio collection MAC provides several other features including e A utility to create CD case sleeves e A mass file renaming feature allowing the user to rename files to a user defined format e An ID3 tag see section 2 2 1 editor MAC uses a similar interface to most music organiser applications Volumes and their directories are displayed as a tree structure and when a directory is selected its contents are displayed in a multi column list box MAC uses its own file format for data storage 1 3 2 Music Library Music Library is a program that can help you manage and organize you music collections such as MP3s audio CDs or tapes 18 As this quotation shows Music Library takes a different approach to most digital music organisers Rather than limiting itself to storing details about MP3 files Music Library stores details on a wide variety of music formats Music Library has a vast array of features and would almost be intimidating to a new user Its interface is similar to MAC but more complex It includes a web browser style address bar to bro
38. ll before work on the solution is started Had I adopted this approach I might not have encountered the problems that forced a change of the project s focus see section 4 3 3 40 Appendix B Revised Schedule As stated in section 4 3 2 a number of problems were encountered that meant the project s original schedule was significantly deviated from Milestones in the project s development and completion dates are illustrated in the schedule below Milestone Completion Date XML DTD 17 February 2002 Parsing XML 11 March 2002 XML creation subsystem 10 April 2002 Other application functionality 20 April 2002 User testing 24 April 2002 Write up 29 April 2002 41 Appendix C User Testing Raw Data This appendix includes the test users ratings of the application on the criteria listed in section 5 2 Strongly Strongly Agree E The program was easy touse The program was easy touse was easy to use a eae ud E R the pogramisenormessassweresood x _ The pros minimised my memory toad _ The program used words and terms consistently and followed platform Windows standards The program provided good feedback x and status information 42 Strongly Strongly e ee Fmemwsnweew ws f 1 The program wed sinpleandratuatiangwese x f The program s error messages weregooa x _ Crne program mininised my memory ad x _ The program used words and ter
39. me first select the volume you want to update Then select Update Volume from the Edit menu D 2 3 Deleting a Volume To delete a volume first select the volume you want to delete Then select Delete Volume from the Edit menu Music Organiser will ask you to confirm whether you really want to delete the volume or not Once you have deleted a volume you cannot retrieve it D 3 Searching One of the most useful features of Music Organiser is its search feature To search for a song in your collection select Search from the Tools menu Type in what you want to search for and select what fields such as artist title etc you want to search Then click Search to start the search Note that the search feature is case sensitive i e elvis would not match Elvis D 4 Browsing and Playing Songs You can browse your collection by double clicking on directories within volumes This will show all the files contained in that directory in the list box To play any song double click its entry in the list box You may be prompted to insert a CD ROM or other removable media if the volume is not stored on fixed media Songs will be opened in your default MP3 player 45 Appendix E XML DTD las li DTD for an XML application to store details of a digital audio collection February 2002 Nicholas Johnston Notes All dates should be represented in the IS086
40. ms x consistently and followed platform Windows standards The program provided good feedback x and status information Strongly Strongly emm AH The program was easy touse program was easy to use The program was easy tousse xf The program wed simple and raal angee lt Crne prosramsenornesagesweresood _ Te program minimised my memo The program used words and terms x consistently and followed platform Windows standards The program provided good feedback x and status information 43 Appendix D User Manual D 1 Introduction Music Organiser is a simple application that helps you organise your MP3 col lection Music Organiser separates your collection into volumes A volume can be either a directory or drive and all its contents Music Organiser then stores details about these volumes which you can browse and search through D 2 Managing Volumes D 2 1 Adding a Volume To add a volume to your collection select Add Volume from the Edit menu Select the volume s starting directory and then enter the volume s name In a few moments the newly added volume will appear in alongside the other volumes in your collection D 2 2 Updating a Volume If you know that a volume has been changed you can update the volume This simply regenerates the volume thus taking account of any files that no longer exist or any new files 44 To update a volu
41. n many PDAs Personal Digi tal Assistant and other mobile computing devices have limited storage capacity making compression essential It should now be clear that to make digital audio more practical some kind of compression is required The motivation behind compressed digital audio is simply the sheer size of uncompressed audio Lossy and Lossless Compression Compression algorithms can be placed into two broad categories lossy and loss less In lossy compression some data is discarded during compression and cannot be retrieved during decompression In other words if data is compressed and subse quently decompressed the decompressed data will not necessarily be identical to the original uncompressed data In lossless compression no data is discarded during compression If data is com pressed and subsequently decompressed the decompressed data will be identical to the original uncompressed data Lossy compression is useful for diffuse data such as audio and video Human per ception can tolerate minor visual or audio artifacts For example we can watch a TV programme with poor reception without significantly reducing the enjoyment of it Lossless compression is useful for symbolic data such as a spreadsheet It would clearly not be acceptable to compress a spreadsheet file and discover upon decom pression that some values in it had changed Most digital audio schemes use ossy compression Using lossy com
42. nstream media frequently neglect to mention that certain assumptions made by record companies and intellectual property holders in general about the impact of unauthorised copying are seriously flawed In addi tion the fact that a given technology can be abused should not be considered valid justification for not using it at all MP3 and other new and up and coming digital audio technologies have had mas sive impact on the way we listen to and manage our music These new technologies Motion Picture Experts Group It is often said by intellectual property holders that every unauthorised copy made of their prop erty is a loss Clearly it is not a loss unless the person obtaining an illegal copy would otherwise have purchased an original one This is of course not justification for piracy however allow users to enjoy music in ways never before possible such as e Having over 100 average length songs on a single CD ROM e Creating playlists to play part or all of their collection in a certain order The uses of this are almost limitless Users might make a playlist containing all the songs of a particular genre songs reflecting a certain mood or songs of particular sentimental value to the listener e Having thousands of songs easily accessible on their hard disk MP3 and new digital audio technologies are not only affecting how music is lis tened too it is also affecting how music is created sold and distributed Musici
43. ogical solutions might slow down piracy but will certainly not stop it Techno logical solutions often constrain legal use of a product and make using the product more difficult It is for this reason that Steve Jobs chose to make Apple s new jPod portable digital audio player free of any technological solution to piracy 6 Apple s TV advertising and product packaging have stated don t steal music 6 It is difficult to decide how to tackle the problem of unauthorised copying Users need to realise when copying is acceptable and when it isn t Users adopting a more responsible attitude towards copying would generally be a superior solution to ineffective technological schemes The copyright and ethical issues relating to digital audio and piracy are complex and an in depth discussion is beyond the scope of this project Indeed this is a topic worthy of a project in its own right It will be interesting to see the future approaches taken to solve this problem 10 Chapter 3 XML and Markup 3 1 Introduction to Structural Markup Structured markup explicitly distinguishes the structure and semantic content of a document 16 Structured markup does not in general store any presenta tion information a separate appearance specification usually a stylesheet can be created and then applied to the document 16 This approach to document creation and data storage has several advantages e Semantic m
44. on designed to illustrate the fea sibility of using XML to store music metadata This application Music Organiser is described in detail in this section Music Organiser uses a similar user interface to the program described in section 1 3 1 Volumes and the directories they contain are shown in a tree widget When a user activates usually by clicking or pressing enter a node in the tree widget the contents of this node are displayed in a multi column list box opposite The other functionality of the program for instance adding a new volume to the collection is accessed using the pull down menus A toolbar is provided to offer quick access to the most commonly used functions Music Organiser File Edit Tools Settings Help Toolbar Search icon Volume 1 Scoped search options displayed here icon Volume 2 Filename Artist Title Album Bitrate Filesize Year icon Volume 3 icon Volume n Figure 4 1 Initial User Interface Design The original user interface design was significantly different to the final interface The original user interface illustrated in figure 4 1 did not use a tree structure Instead it merely used icons to represent the volumes in a user s collection The most significant difference however is the search feature Originally I planned to put this in the appl
45. on more than one platform 7 wxPerl is a wrapper to the wxWindows library wxPerl usually uses the native GUI functions of the underlying system creating applica tions that are virtually indistinguishable from their native counterparts wxPerl is highly portable it is known to run on most platforms where wx Windows runs i e Windows UNIX using GTK UNIX using Motif and Macintosh wxPerl pro vides high level GUI controls such as toolbars advanced list controls and tree con trols However wxPerl provides more than just GUI functions it provides many other useful features for modern application development including e A very easy to use and high level printing and print preview framework In wxPerl it is possible to print some text using just this short piece of code use Wx HTML my page lt html gt lt body gt Hello world lt body gt lt html gt Wx HtmlEasyPrinting new Printing PrintText page e Clipboard support e An easy to use online help framework e Network support via socket and protocol classes wxPerl is still beta code but it is relatively stable The wxPerl developers adopt a conservative release policy it is likely that many would consider wxPerl a stable 1 0 release as it currently stands wxPerl and wxWindows is also freely available and open source No one com pany controls wxPerl This is particularly important in GUI development GUIs seem to move in and ou
46. pression usu ally provides better compression ratios and by using advanced algorithms a large amount of data can be discarded without the user noticing 2 2 MP3 A Compressed Digital Audio Format In 1988 the Motion Picture Experts Group a working group of the International Organisation for Standardisation released the MPEG 1 standard MPEG 1 Layer 3 specifies how to compress sound and is commonly referred to as MP3 MP3 audio uses a lossy compression approach to compress audio Resulting MP3 files are usually about one tenth the size of their uncompressed counterparts MP3 files are created from raw audio files via an MP3 encoder MP3 encoders use psychoacoustics the study of how people perceive sound and perceptual encoding to achieve high compression In these approaches for example a note might not be encoded if a louder note is obscuring or blocking it Three main factors determine the quality of an MP3 file e Bitrate the bitrate is the number of bits used to represent one second of au dio There is a trade off between disk space and quality Usually a bitrate of 128 or 192 kilobits per second kbps is used roughly equivalent to CD quality A useful analogy for bitrate is drawing a diagram on a piece of pa per If the diagram uses only a small piece of paper it will appear squashed untidy and difficult to read If the diagram uses a larger piece of paper it will be well spaced out and easy to read bu
47. rect CD ROM inserted Serial number does not match that of this volume Figure G 6 Wrong Removable Media Inserted File not found AN The file 07 Edward Shearmur Prot Missing mp3 could not be found on volume Testing It is recommended that you update the volume Figure G 7 File Not Found 57 Cannot update volume Figure G 8 Starting Location No Longer Exists 58
48. ror prone process The advantages of using C would be e It is relatively portable and distribution of the final application would be relatively easy 16 e A wide range of GUI toolkits is available for C including GTK and QT on UNIX and MFC Microsoft Foundation Classes on Windows Java If the program was written in Java the end user would have to have the JRE Java Runtime Environment installed on their system As this is a fairly large piece of software distribution would be made more difficult Performance of Java code is also a concern and GUI Java programs often have a certain sluggish feel to them There are two main GUI toolkits available for Java the AWT Abstract Window Toolkit and Swing AWT uses native toolkits on the platform it runs on 11 but Java developers saw this as a problem fearing that AWT applications might be subtly incompatible on different platforms 11 p361 This motivated the de velopment of Swing where components are implemented in Java itself 11 p361 It could certainly be argued that implementing components manually is bet ter from a programmer s perspective but using non native components can create alien applications This is clearly not good from an HCI Human Computer In teraction perspective Admittedly Swing can emulate the visual appearance of windows and controls on different platforms but this appearance is still different from a true
49. should be well commented and easy to follow 15 Due to the nature of this project programming cannot be done in pairs so this aspect of extreme programming cannot be used However it is still possible to obtain some of the benefits of extreme programming without pair programming 4 2 Tools The solution being proposed is not specialised in the sense that a particular pro gramming language or technology stands out immediately as an obvious means of implementation The relative advantages of various programming languages must be examined and the most suitable language chosen The choice of programming language is based on the relative advantages and dis advantages of programming languages that I am familiar with As the program will have a GUI Graphical User Interface a suitable GUI toolkit must also be chosen 4 2 1 Programming Language I am familiar with a number of programming languages C Java Visual Basic and Perl As stated above none of these languages immediately stands out as an obvious candidate for use so the advantages and disadvantages of each must be considered in turn C Although C is a higher level language than C it is still relatively low level While the new ISO standard for C addresses this with templates and the STL Standard Template Library C programming is still relatively difficult C also requires the programmer to allocate and free memory manually a complex and er
50. t of fashion very quickly code can very quickly become obsolete if it addresses the wrong platform or audience wxWindows helps to insu late the programmer from these winds of change 7 19 I decided to use wxPerl because e Its API Application Programming Interface and general style of program ming seemed easier cleaner and more intuitive than Perl Tk e It is portable yet produces applications with the native look and feel of their target platform e It is very high level and therefore works well with the Perl philosophy of getting your job done as easily as possible 4 2 3 Data Storage Like many computer applications this program is fundamentally one of data stor age manipulation and retrieval Data stored on the user s collection must clearly be persistent between different invocations of the program It follows from this that there must be some means of storing data on disk There are a number of possibilities a proper RDBMS Relational Database Man agement System could be used to store the information This approach is likely to be unfeasible since installing a large complex database server would be beyond the average home computer user and would clearly destroy the light weight nature of the application The Perl DBI module could be used to manage storage The DBI is Perl s abstract database interface providing a consistent interface to all kinds of storage 2 true RDBMSs e g Oracle Mi
51. t will occupy more paper As the size of the diagram increases readability will increase but only to a point Beyond this point further increases will not actually improve readability but will make handling of the diagram cumbersome e Encoder used there are many MP3 encoders available currently with sig nificant variation in output quality Using a poor quality encoder or using an incorrectly configured encoder can result in tinny or flat sounding output Currently LAME a recursive acronym standing for LAME Ain t an MP3 Encoder is widely held to be the best MP3 encoder available LAME pro vides presets to optimise encoding for different types of music such as rock and classical e Original source of audio MP3 is not a magic wand it cannot work miracles If poor quality audio is fed into an MP3 encoder the output is likely to be equally poor 2 2 1 Key MP3 related Terms A number of MP3 related terms are used throughout the remainder of this report These are explained below Encoding Type The above definition of bitrate assumes that CBR Constant Bi trate is being used i e the same number of bits are used to encode each second of audio VBR Variable Bitrate encoding can also be used In this approach the number of bits used to encode each second of audio can vary usually within a user specified range The effect of using VBR can be im proved quality complex sounds can have the space the
52. ted against a DTD to ensure they are valid This is a very powerful concept it makes it possible to check very easily whether or not a document conforms to an exact specification XML Schema 13 an alternative syntax for specifying document models that is currently under devel opment will make this approach even more powerful XML Schema allows data types to be specified for attributes Attributes could be declared as strings positive integers dates or even a user specified pattern This approach will fundamentally alter data processing since a large proportion of a program s validation code could potentially be carried out automatically by an XML parser XML is being used for a wide range of applications e SVG Scalable Vector Graphics is a vector graphics format defined in XML e RDF Resource Description Framework is an XML application that pro vides a framework for web based metadata e MathML Mathematics Markup Language is an XML application that can be used to encode equations This example in particular is a good illustration of the power of XML One application might use a MathML document to typeset or display the equation but another might use it to solve the equa tion with a series of a values 13 p5 Another very interesting component of XML is XSLT Extensible Style Language for Transformation With XSLT documents can be transformed from one form into another The applications of this are nearly l
53. tion I obtained did not work with In digoPerl the binary Perl distribution I was using so I had to switch to ActivePerl Eventually the module did install correctly but this problem took several weeks to resolve 22 Problems with wxPerl were not just limited to installation however wxPerl has no significant documentation of its own users are merely pointed towards the wx Windows C documentation which contains very minimal notes about some cases where the Perl version differs Clearly C and Perl are very different lan guages and attempting to use the C documentation was very difficult at first For example given a method declaration like wxTreeItemId AddRoot const wxString amp text int image 1 int selImage 1 wxTreeItemData data NULL I had to convert this into Perl form i e AddRoot is a method of Wx TreeCtrl objects that returns a reference to a Wx TreeItemId object and takes a refer ence to a Wx TreeItemData object as a parameter e g my treeId tree AddRoot Root 1 1 Wx TreeltemData new Foo This process was difficult at first and it significantly slowed down my progress My main sources of help for learning how to use wxPerl were the sample programs and very basic online tutorials The sample programs were somewhat of a double edged sword while they did show how to use aspects of wxPerl that I needed they did so in a complicated way for instance adding men
54. ttp www w3 org TR 2000 REC xml 2001006 12 December 2001 39 Appendix A Reflection This project was challenging and rewarding It has also been a hugely educational experience I have learnt more about digital audio data representation and storage usability and Perl programming Although the tools and techniques used in the project are not directly covered by any School of Computing module the general programming theory and concepts presented in first and second year programming modules were very helpful The nature of the project made initial research difficult Since digital audio is such a fast moving field there is little published literature available on the subject This meant I had to look for information on the Web and attempt to sort the accurate information from the vast amount of outdated incorrect information available I have learnt several valuable lessons from this project Firstly I underestimated the amount of work required to become comfortable with the wxPerl GUI toolkit With hindsight it is easy to see how I let my confidence in my general Perl programming ability lure me into a false sense of security about my Perl GUI programming skill Secondly I underestimated the time required to become comfortable with XML and create an XML DTD Therefore I would advise anyone considering a similar project or considering using similar tools to become fully comfortable with the tools and techniques they plan to use we
55. us to alter the behaviour of the example which made it difficult to understand the example 4 3 3 Change of Focus The problems encountered during implementation meant that achieving the project s original aim of a powerful easy to use music organiser application was no longer feasible with the limited amount of time available I felt it was better to change the focus of the project to examining the viability of using XML to store music metadata The eventual aim or idea is that this DTD will become an interchange format allowing metadata from one particular music organiser application to be shared with other applications in a seamless and easy manner 23 4 4 Solution 4 41 XML DTD The first part of the solution is an XML DTD to specify an XML based music metadata markup language The full DTD can be found in Appendix E DTD syntax is relatively straightforward Elements are declared like lt ELEMENT volume directory file gt This declares an element called volume that contain 0 or more directory and file elements DTDs use a similar syntax to regular expressions for denoting the number of elements accepted For example e Including directory in an element s declaration means that the element must include exactly one directory element e Including directory in an element s declaration means that zero or more directory elements can be included e Including directory in an element s declaration means that
56. wse drives on the user s system and includes an alphabet bar and search bar in the main window Music Library s approach to data storage is interesting It uses the Microsoft Jet database engine to store data and even allows the user to enter SQL Structured Query Language queries to search for items in their collection Using this ap proach does however add significant overhead to music metadata and makes it almost impossible to access data without using Microsoft tools Chapter 2 Digital Audio and MP3 In order to fully understand this project it is necessary to have an understanding of compressed digital audio in general and of MP3 a digital audio format This chapter introduces these concepts the legal issues surrounding them and explains key terms 2 1 Introduction to Digital Audio In 1980 Philips Electronics and Sony developed the compact disc audio standard specified in a document referred to as the Red Book The compact disc was the first real digital audio product marking the start of the digital audio revolution To convert audio to digital form the audio s analog waveform is sampled Sampling is a process of discretisation in time or space 4 In the case of an audio signal sampling involves taking measurements of signal amplitude at regular intervals The sampling rate is the number of times a signal is sampled every second 4 For CD quality audio an analog waveform is sampled at 44 1 KHz
57. y require and usu ally a reduction in file size simple sounds can use less space Stereo Mode MP3 files can be encoded in full stereo joint stereo or mono In full stereo mode data for both stereo channels is stored even if the data in both channels for a given sample is equal In joint stereo mode two channels are only stored if their content is different In other words interchannel redundancy is exploited 15 p739 In mono mode only one channel is used ID3 tag ID3 tags are best thought of as an MP3 file s header block ID3 tags store metadata such as artist track title and year of release on their associ ated track ID3v2 tags a new and improved version of ID3 are gradually becoming more widespread ID3v2 allows for more metadata to be stored including complex metadata such as time synchronised lyrics 12 2 2 2 Legal Issues Surrounding MP3 Although there is a formal ISO International Organisation for Standardisation standard for MPEG and therefore MP3 the MP3 standard is not truly open Fraunhofer IIS A holds patents on certain key aspects of the MP3 standard Fraun hofer alleges that no one can create an encoder which does not infringe on their patents even if the encoder is not at all based on the ISO standard reference imple mentation Fraunhofer has waited until MP3 has become widespread before enforcing its patents and demanding royalties similar to Unisys tactic when enforcing t

Download Pdf Manuals

image

Related Search

Related Contents

USER MANUAL - produktinfo.conrad.de  4071 Manual - Richmond Film Services  Chief SLB133 project mount  Bedienungsanleitung Operating Instructions Mode d'emploi  Manual de Instrucciones 3.2000    Chief FHSVB flat panel ceiling mount    ZTE C70 CDMA 1X Digital Mobile Phone User Manual  2012Sp_00  

Copyright © All rights reserved.
Failed to retrieve file