NetAmp is here – the nightly build of 1 week

I had talk about it sometime ago – A better place to get into music…a better way to do that
And I had written that I am working on this project to extend its functionality and now let me tell you – one, it is not a project anymore. It has turned into full-fledged product. Two – it is completely revamped.

It has turned into a fabulous outcome. I don’t think I will ever be able to write documentation for it but let me try something here to say something about this product as I came to know about it from my colleagues here…specially the SB* team mates.

.
.
.
.
History

This project was started in about last quarter of 2005 when Manas had joined. He is a muzic lover ( just like me :M) ). He used to play/listen songs all the day on his PC after he joined SB* team leaving *T team. Luckily he got good mates with same interests and his TL was one of them – Dhiraj. So they thought of doing something big. And they got speakers – completely funded by Dhiraj (Thank you Dhiraj).

Well, that was a small part of super beginning. Only Manas had control over songs being played on speakers. Now, the fight was that everyone should be given the access.

.
.
.
.
Development

Version 1.0

For providing access to central resources, this unnamed project was started (Let us call it Z). So Z was started in order to provide access to every developer for playing songs on single resource – PC/speakers lying at center and it was possible only through web-interface accessible to every user with some app server running in background. Dhiraj had already something to contribute – a piece of code which can retrieve complete folder list from a given directory path. For example, if path is D:\Net\S, it will retrieve all the directories, sub-directories & files from this path. And there was click-able interface on a webpage where you can handle click events for every folder and file.

Half part was there. Another half part was – how to control winamp. For that, a plugin was found and it was an exe file. This file provided calls using which you can perform following operations on winamp running on server –

  • Play Controls –
    • Play Song
    • Enqueue Song
    • Pause Song
  • Volume Controls –
    • Up
    • Down
    • Mute

That’s it. Full stop.

Whenever a file name is clicked, a separate screen is opened after submitting the form is submitted. Same thing happens when a song is enqueued in winamp. So at the same time, you have to keep 2 windows open (that was the thing users used top hate the most – as it took long time [form submission] and 2nd window was for nothing but to submit the form and perform operation). And no one could see the playlist. Therefore, most of the times, long playlists prepared by concerned users used to be diminished by those who wanted to play songs directly clicking on song name and not on Add to playlist link. It used to lead to lot of confusions.

Why the hardcore developers out here were not able to develop their own interface???

Because,

  • Time Limitation
  • Winamp libs are provided in C. No java at all we are Java punters.
  • No Java libraries available over net
  • Not ample time to convert C libs into Java or making calls to native C methods

Duh, I think, enough reasons!
So, for about next 1 year, this interface was used in SBS team sitting in basement with OA* and AG* teams.

Here are the main features of Version 1.0 of project Z

  • Common interface for all the users accessible over CE network
  • The application running on central machine using Apache Tomcat and Servlets
  • Play Controls –
    • Play Song
    • Enqueue Song
    • Pause Song
  • Volume Controls –
    • Up
    • Down
    • Mute
  • Nice Stylesheet based Web UI

.
.
.
.
Screens
1.

2.

The complete project contained 3 files – one java and 2 Servlets and 356 lines of code.

.
.
.
.

Version 2.0

On Friendship day of this year, 4 teams were moved to top floor – Ours, SB*, OA* and AG*.

From there started discussions about renovation of project Z. But how…still Java libs are not released for winamp. We found few plugins but they all lacked in functionality at one place or other but the search was on. After a months quest, there was which was found to be useful – it was an ActiveX control. It provided an interface to control winamp. ActiveX control can be handled using ASP but how can we access it using Java/JavaScript – that was the Q. I started working on making this new thing to happen on last Tuesday – 05/09/2006. Found a way of getting handle to ActiveX control in JavaScript. Then I started working on common interface. Used extensive Java and JavaScript – I love it! It is J2EE. It was a great learning experience and there have been so many new things I came to know. Ok, one of them is:

When you use window.open() method inside JavaScript, it opens a new window with the URL mentioned in the method. It sends data to new JSP/Servlet using get method. Now suppose, you have lot of data to pass and get method can pass only limited data, how can you pass all the code to new window. Of course, using post method! But how to use post method? That is the trick. You need to create a dummy form inside initial JSP, open the window, set its method of form to post, set action of form to new JSP, target of form to new window’s name and submit the form.

There was a weekend without single line of code and the project turned product was finished yesterday – 12/09/2006 after 6 days, 992 lines of code, 8 files and One Product.

Now this product has name – NetAmp (AMP over NETwork) – a copyright of CE as is the message displayed on its screen.

The stylesheet and Javascript functions are neatly organized and are very beautifully designed by me :D. There is no more system/user overhead as everything is being handled in JS and no form is being submitted/reloaded.

 

User Guide

It is a very robust and useful application for corporates which want to create healthy work environment among its employees by providing open work ambiance and rhythmic surrounding. It is an interactive music application which can be easily accessed over network without worrying about the internal details of implementation.
Pre-Requirements

  • A Web Server (Tomcat is for free)
  • Winamp
  • Speakers
  • And as many users as web-server can handle

What does NetAmp contain and How to use it!

1. There are following controls displayed to user on top of every screen in form of buttons:

  • Volume
    • Up (Increases the volume)
    • Down (Decreases the volume)
    • Mute (Sets volume level to 0)
  • Play
    • Previous Track
    • Play
    • Pause
    • Next Track
    • Forward
    • Rewind
  • Playlist
    • Show Playlist (Opens a new pop-up window which displays complete Playlist. The current playing song is shown in marquee and different style. On clicking a song title, it starts playing in winamp.)
    • No. of Songs in Playlist
    • Elapsed Time
    • Track Length
  • Jump to track number (Enter the track number in text box and specified track will start playing)

2. Whenever a button is clicked in user control panel, the specified function is performed and the status is displayed in the status label at bottom of screen.
3. On the main screen, the user is presented with song directory.

  • Links
    • Play Song (Plays a song on clicking a song name)
    • Add to Playlist (Enqueues song in winamp playlist)

The F and symbols on left of every string specify whether it is a folder or a file

F: Folder

: File

4. The Playlist window which opens up on clicking the Show Playlist button in User Control Panel, displays all the enqueued songs in winamp playlist window. The playlist is auto-refreshed on every 5 seconds. Playlist can be refreshed manully but clicking the button at top of playlist.
5. There is also a logging functionality for logging in the user and action. Also the access control can be implemented for users.

So those are the major UI features.

Ohhh, I have completed the documentation! Hopefully, I can provide this link for manual to this product – NetAmp!

So here goes my next achievement at CE. I could had preferred to go for some internal process improvement tool, if offered or had been given an idea but this too wasn’t a bad exp at all.

And now i am thinking, if I had any idea of creating it at Univ, what a great exp it had been…playing songs over n/w in hostel or lab :roll:…

 

Updated (June 15, 2007): Added direct link to User Guide section of document.

Leave a Reply

Your email address will not be published.