PROJECT: JxMusic


Overview

JxMusic is a desktop music player application developed as a school project for the learning of Software Engineering principles. The project is built upon AddressBook(Level 4). The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.

Summary of contributions

  • Code contributed

  • Commits contributed

  • Major enhancement: added the ability to manage playlist by adding and deleting tracks, including writing tests

    • What it does: allows the user to add or remove tracks. Adding tracks is done in two ways. Firstly, by using index of the track in the panel. Otherwise, by using the track’s name. Multiple tracks can be added in one line of command, by track index or track name. Deleting tracks are done by referencing tracks in the playlist card.

    • Justification: This feature improves the usability of playlists because a user can initiate multiple tracks into a playlist with one line of command. Tracks can be be deleted too.

    • Highlights: The implementation of adding and deleting tracks extend beyond commands, into model, playlist and track. To reduce coupling, implemented methods in Playlist and ModelHelper.

    • Credits: AddressBook’s implementation of rest operator in arePrefixesPresent(). Applied the idea for multiple parameters to overloading TrackAddCommand() constructor to accept multiple Tracks.

  • Minor enhancement: added playlist methods, enhanced track and model methods to support major enhancements. Small changes with helper methods in CommandTestUtil, ParserUtil and ModelHelper. Notable mention:

    • [Playlist] boolean:isEmpty, Playlist:copy, boolean:deleteTrack, boolean:hasTrack, Index:getTrackIndex

    • [Track] boolean:equals (critical for TrackAdd and TrackDel), int:hashCode

  • Other contributions:

    • Project management:

    • Community:

      • PRs reviewed: #61, #55, #100

      • Reported bugs for other teams in the class: 1, 2

    • Tools:

      • Integrated a new Github plugin (CircleCI) to the team repo

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

Adding a track into a playlist : track add

Adds a track into a playlist. Track can be chosen by using its name or its index in the track list panel.
Format: track add p/PLAYLIST [t/TRACK]…​ Format: track add p/PLAYLIST [i/INDEX]…​

  • PLAYLIST refers to an existing playlist’s name.

  • TRACK refers to the name of an existing track in the library folder.

  • INDEX refers to the index of a track in the track list panel.

Examples:

  • track add p/Favourites t/Some Song t/Some Song2
    Adds the track named "Some Song" and "Some Song2" to the "Favourites" playlist.

  • track add p/Favourites i/1 2
    Adds the first and second track in the track list panel to the "Favourites" playlist.

Deleting a track from a playlist : track del

Removes a track from a playlist. Track can is chosen by using its appeared sequence in playlist card.
Format: track del p/PLAYLIST INDEX

Track is selected by its index not its name.
  • PLAYLIST refers to an existing playlist’s name.

  • INDEX refers to the index of the track in the PLAYLIST.

Examples:

  • track del p/Favourites i/3
    Deletes the 3rd track in "Favourites" playlist. == Command Summary

Commands for controlling playback

  • Play track : play t/[TRACK]

  • Play playlist : play p/[PLAYLIST]

  • Pause track : pause

  • Continue track : play

  • Stop playing : stop

  • Seek time point : seek d/TIME
    eg. seek d/1 10

  • Step : step [s/SECONDS]
    eg. step s/100

  • Stepback : stepback [s/SECONDS]
    eg. stepback s/100

  • Replay : replay === Commands for controlling sequence of playback

  • Skip to next track : next

  • Skip to previous track : prev

  • Repeat track : repeat track

  • Repeat playlist : repeat playlist

  • Turn off repeat mode : repeat off

  • Shuffle playlist : shuffle

  • Turn off shuffle mode : shuffle off

Commands for managing playlists in library

  • List all playlists : playlist list

  • Search for playlist : playlist search QUERY
    eg. playlist search Fav

  • Create playlist : playlist new p/PLAYLIST [t/TRACK]…​
    eg. playlist new p/Favourites t/Some Song t/Some Song 2

  • Delete playlist : playlist del INDEX
    eg. playlist del INDEX

Commands for managing tracks in playlist

  • Add track to playlist : track add p/PLAYLIST t/TRACK
    eg. track add p/Favourites t/Some Song

  • Delete track from playlist : track del p/PLAYLIST i/INDEX
    eg. track del p/PLAYLIST i/1

  • List all tracks : track list

  • Search for tracks : track search QUERY
    eg. track search Fav

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Track Adding and Removing Feature

Simple-to-use track management commands that add tracks to a specified playlist.

Current Implementation

When managing a playlist, you can customise it by adding and removing tracks from it.

TrackAddCommandSequenceDiagram
Figure 1. Sequence diagram: track add command
TrackAddCommandActivityDiagram
Figure 2. Activity diagram: track add command
TrackDeleteCommandSequenceDiagram
Figure 3. Sequence diagram: track delete command

Design Considerations

To add new tracks to a playlist can be a very mechanical task, hence the ease of allowing for adding multiple entries helps to ease the need for repetition. It also makes sense for the inclusion of adding tracks by referring to its index on the panel.

Hence, there are two ways that tracks can be added. Firstly, with track name. Secondly, with its index from filteredTrackList panel.

The omission of repeating the index prefix is also added to reduce typing required to perform deletion. Having to type the prefix with every index means including up to 200% more typing per index to add.

Deleting tracks does not support deletion in multiples, and it omits the need for index prefix.

While tracks can be added by name, it makes sense to allow the user to make case-insensitive references to tracks. This helps to reduce the need to follow case convention for track names.

Future Enhancements

Deleting multiple tracks could be implemented as more advanced features are added.

Adding multiple tracks by substrings can be implemented to facilitate quick modification of playlists.