GithubHelp home page GithubHelp logo

csci3280project's Introduction

csci3280Project

Brief Description

This is a pure Java application with zeroMQ. It is a music player that supports P2P function with basic player requirement.

Program’s Operation Manual (README)

For Windows devices, please run commands in Developer Command Prompt, use “nmake” instead of “make”, and replace all colons (“:”) with semicolons (“;”) in “makefile” file.

  • Server Side open the server by typing make run-ts in Terminal in folder “Phrase1”, then input the server address (default is port 4444)

startServer

  • Client Side
    • Open Program open the server by typing make run-mp in Terminal in folder “Phrase1”, then the application will start and appear.
    • Load Music Location Click “Library” Tab on the top. In library path, input your path and click “SYNC” button. client The list will display the music from the path.
  • Music Management The music will be displayed in Library Tab. library Search Music by inputting the keyword on textbox and click “search” button searching We can click one song and click “Play” button to play it, click “Pause” to pause and click “Stop” to end the song. The range input on the right is the volume control. control We can click “Lyrics” button in the bottom of “library” Tab or click “Lyrics” tab to switch to “Lyrics” tab. The lyric will appear in the “Lyrics” tab and support synchronized lyric display. lrc
  • P2P Make sure the server is on. In “P2P” tab, input the server IP and client IP, then click “Connect” Button. p2pConn Then this application is connected to server and can use P2P sync function.
    • Assume two client is online: p2pSync When we click the “P2PSync” button in one of the clients, other client songs will sync to that client song list. p2pSyncDone And those songs can be played. p2pPlay

Third-party Libraries

  • ZeroMq for socket connection

Phrase 1 feature:

  • Basic User Interface UI
  • Music Decoding and Playback
  • Music Management
  • Information Display infoDisplay
  • Music Searching
  • Lyrics Display (with LRC)

Phrase 2 feature

  • Network connection Users are required to connect to a tracker server. Then the subsequent actions willpull the peer list from the server and send requests to the peers.

  • Music Searching All music from peers is pulled to the “Library” tab. Such music will have the “tcp” column filled if not contained in the local library. Otherwise the column is empty.

  • Availability Check Availability check is done when users try to play music not existing locally. It asks all peers for the music, and those peers either send a ‘1’ for available or ‘0’ otherwise.

  • Real-Time Audio Streaming, and Peer-to-Peer Playing. After availability check, the user asks peers with music available for audio chunks. Received chunks will be written to a Stream in order. MusicPlayer will read data from the Stream if there is data available. If multiple peers said the music is available, the audio chunk index requested will be interleaved along peers.

InterleavingBitmaps.java

  1. To test the interleaving bitmap feature, first compile the InterleavingBitmaps.java:

    javac InterleavingBitmaps.java

  2. Then run the code:

    java InterleavingBitmaps

This is a Java program that takes a set of bitmap images stored in a folder called "p2pDemo", and saves the result as a new bitmap image named "interleaved_bitmap.bmp" in interleaving.

Enhanced Features you have implemented

  • Synchronized lyric display lrc realtime lyrics are displayed at the “Lyrics realtime” in the “Lyrics” tab.
  • Progress bar A progress bar is placed at the bottom of the UI. The current progress of the music is calculated according to the current playback position of the music. Support Mac and Windows.

Advance feature in phrase 2

  • Support more than three clients p2p
  • Support more than two sources We support more than two sources when the user plays a locally unavailable music, as demonstrated in the “InterleavingBitmaps” part. First peer will have chunk 0,3,6,second peer will have chunk 1,4,7, third peer will have chunk 2,5,8 being requested accordingly.

csci3280project's People

Stargazers

 avatar

Watchers

 avatar  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.