This discussion is archived
1 2 Previous Next 17 Replies Latest reply: Sep 13, 2009 10:25 AM by 793415 RSS

Tracker sound tool - test results required

793415 Pro
Currently Being Moderated
Woo-hoo! I have just uploaded my little sound player to the 'wilds of the internet' (OK - my site, which is more an 'overgrown back yard of the internet').

The Tracker test applet can be found at [http://pscode.org/tracker/applettest.html|http://pscode.org/tracker/applettest.html]

Once it is loaded, the start() method will invoke loading the 'Dead End' Jazz MP3 that is described and linked to from [http://pscode.org/media/#sound|http://pscode.org/media/#sound].

Whatever documentation exists (very incomplete) is to be found via [http://pscode.org/tracker/|http://pscode.org/tracker/].

Would appreciate any test reports. Does it load OK, is the GUI logical/unfathomable, etc..?

Some random technical notes.

- The applet (it will also be available as an application) uses both a manifest to identify the main Jars, but also adds the JMF MP3 plugin to the classpath in the archive element of the HTML. The main components of Tracker come in 8 Jars, but I wanted to 'have my cake and eat it to' by keeping the 9th Jar (the SPI/codec) separate, to allow easy deployment using other forms (vendors) of the MP3 parser, and entirely new formats.

- A side project (one of many) is that I want to offer this at my site using a number of different MP3 codecs, just to get an idea of the relative merits of them (what tracks they can and cannot load).

- The 'rewind' and 'stop/start' buttons work well separately, but after a Clip finishes it is an odd combination of clicks to get it to replay (and I won't describe them, since I am not sure what they are). Hopefully I'll get that fixed soon.

- Tracker should pop a progress dialog if loading a track is looking to take more than a few moments, but I have been having enormous trouble getting the progress dialog to appear correctly. I think it is OK now, but I would like to get the delay down between loading the clip and the dialog disappearing, and the track starting to play.

- Tracker uses a BigClip that I wrote after becoming disillusioned with a variety of Clip implementations I battled with for weeks. BigClip uses a couple of tricks to allow it to jump forwards/backwards in a clip more responsively, that I am not too sure about. They work here, but in the earlier forms, the tweaks made a slight 'clicking' sound on Clip start-up, at least until it 'settled in'.

- Compressed tracks are expanded out to an uncompressed form before being played. This requires huge amounts of memory for tracks of any length, but the small tracks on my site should be OK in 64 meg.

- I am a bit worried about the usability of the 'full-screen' mode (it includes a sound-plot, of course!). Formerly I had it pop to full-screen on F-11, but then I discovered that the web page gains the input focus after the doing so, meaning that here at least, it was impossible to return it from full-screen. I have changed the hot-key to Ctrl- F-11, but that might cause problems for Macs and lap-tops that do not usually have an F-11 key (and might use Ctrl as part of a key-combo to map to it).

- Another thing that has me confounded about the full-screen mode is that here, the JWindow becomes 'always on top', despite that I never asked for that, then explicitly called setAlwaysOnTop(false). I recall on Windows being able to pop a modal dialog over the top of the full-screen window, but my experiences here on Ubuntu Linux (I cannot even bring other applications in front of the JWindow!) caused me to suppress most dialogs if in full-screen mode. It is annoying to me, to be forced to return from full-screen just to tweak the trace colors or options!

- The applet will eventually be digitally signed, but for the moment it is not (which makes the 'Open File' menu item useless). I will be looking to launch it using web start for 1.6.0_10+ JREs, for the many advantages that offers - including being able to sandbox it, but still get access to the file system if the user wants to open a track.

- I'll probably remember the 10 other things I meant to mention, as soon as I post this..

Edited by: AndrewThompson64 on Aug 11, 2009 5:12 AM
  • 1. Re: Tracker sound tool - test results required
    793415 Pro
    Currently Being Moderated
    Somebody? Anybody?

    Note that you can score some points by aiming a browser at the test page and giving a works/fails report.

    The second test page of the applet has been uploaded. It can be seen at [http://pscode.org/tracker/applettest02.html|http://pscode.org/tracker/applettest02.html]. The Jars are now signed (but the test can be done sand boxed, just 'refuse' the digitally signed code).

    The JavaDocs are now also available at [http://pscode.org/javadoc/|http://pscode.org/javadoc/]. The docs link to an HTML rendition of the source used.
  • 2. Re: Tracker sound tool - test results required
    captfoss Pro
    Currently Being Moderated
    AndrewThompson64 wrote:
    Somebody? Anybody?
    I tried your applet out, but all it did was yell at me for not asking questions in a smart way, and refused to do anything until I presented it with an SSCCE...
  • 3. Re: Tracker sound tool - test results required
    793415 Pro
    Currently Being Moderated
    captfoss wrote:
    AndrewThompson64 wrote:
    Somebody? Anybody?
    I tried your applet out, but all it did was yell at me for not asking questions in a smart way, and refused to do anything until I presented it with an SSCCE...
    Huh.. Your comment (combined with the delay since I first posted) underlined that this was not necessarily the best forum for my 'does it work/fail' query. I think I should have sent it to either Java Programming (for the more techy people) or maybe New to Java, to hopefully try and snag a couple of newbies into giving some test results.

    But more specific to your comments..

    1) S-SC-C-E? What's that? (OK no, just kidding, just kidding.)

    I do intend to post some more specific (and code oriented) questions to Java Sound, most especially about BigClip, which is quite a funky class (if I say so myself). But the size of the [source code for BigClip|http://pscode.org/javadoc/src-html/org/pscode/xui/sound/bigclip/BigClip.html] is largely dictated by the methods it is required to implement, and it is already 423 lines of code that goes over the 7500 char limit of the forum. Add a main() or Test class and that will be another 50 or so lines.

    Even then, it will not be an E without some sound clips to test it with. To really test it, requires some large samples, of which I only have a few MP3s (that I could distribute to other people) and that would require adding an MP3 codec to the run-time class-path, which means it is not SC.

    2) Smart question? I guess my 'does it work/fail?' question might not have seemed too clever on such a specialist forum, but if moved to a more general forum, I still think it is a specific question that is to the point, and am hoping to get some feedback.

    I'll ask to have it moved to the Java Programming forum.
  • 4. This Thread is now moved
    EJP Guru
    Currently Being Moderated
    Note: This thread was originally posted in the [Java Sound|http://forums.sun.com/forum.jspa?forumID=541] forum, but moved to this forum for closer topic alignment.
  • 5. Re: Tracker sound tool - test results required
    807580 Newbie
    Currently Being Moderated
    -
  • 6. Re: Tracker sound tool - test results required
    793415 Pro
    Currently Being Moderated
    scphan wrote:
    Can I trust it? :-)
    I don't know. Can(1) you?

    Note that the basic test of loading and playing an MP3 can be done while the entire project is sand boxed.

    (1) As to whether you are able to trust the code, this might be
    - barred by your system administrator (to accept a certificate that is not verified by a CA)
    - up to your discretion as to whether you trust my integrity (that I am not going to deliberately trash your machine) and competence (that I am not going to accidentally trash your machine). I assure you my intent is not the former, but while on the subject, I can provide the source and build file (that was pegged for 'coming soon' - but if it is of that much interest, I'll shift it up the priority list). As to the latter, after extensive testing there are still some niggling bugs, but none I've observed that affected the system adversely (beyond locking up the sound lines, in the early versions).
  • 7. Re: Tracker sound tool - test results required
    807580 Newbie
    Currently Being Moderated
    The first applet test I couldn't get to work, it kept giving me the class not found exception. The second did work and seemed pretty nice especially the animation the ability to change the color theme while it was playing. I ran into a problem with the full screen mode which I couldn't seem to exit out of (tried typing 'esc' and right/left clicking) which led me to closing my browser window.

    edit: I see your solution for the full screen ;)

    When the playing stops, it seems unable to replay it. What about reopening the stream?

    edit: I think I found your secret combination: press play, make sure it's displaying the stop icon and while that press the 'skip backward' button.

    Your controls are okay, it would be nicer if the player would continuously forward or rewind while the button was held down but I think that should be handled later.
  • 8. Re: Tracker sound tool - test results required
    793415 Pro
    Currently Being Moderated
    scphan wrote:
    The first applet test I couldn't get to work, it kept giving me the class not found exception.
    Oops. Sorry! I should have either removed it, or made more comment. For odd reasons, I was trying something a little different in that 1st applet. It seemed to confirm that the browser/JRE I was using parsed both the manifest in the first Jar on the class-path in the archive attribute, yet also added the second mp3plugin.jar mentioned in the archive attribute.

    This was handy in that the manifest for Tracker includes a number of Jars that I did not want to have to add at run-time, yet I wanted to explicitly add the mp3plugin.jar in order to be able to swap it out for other parsers for MP3s, or other formats, easily.

    For the sandboxed applet, that actually worked just fine, somewhat to my surprise.

    But after I had signed the Jars, the JRE seemed to become more strict about what it would consider to be the class-path, and I found it was necessary to add all the Jars in the archive attribute, and have since removed the part of the build that added Jars to the path in the manifest, since it was not needed by the JWS based launches that I have in mind for a free floating version (if only I can figure why the blooming JWS version fails consistently to load tracks!).
    ..The second did work and seemed pretty nice especially the animation ..
    Thanks. I've been waiting for someone to say that! :-)
    ..the ability to change the color theme while it was playing.
    Ahh.. Despite the fact that I am creating the dialogs for those config. panels on the EDT, I sometimes, very occasionally, get the app. hanging when I go to pop the color dialog. Only ever the color dialog, and only rarely. I am hoping it is just a buggy JRE here.

    I'm glad to hear it worked OK for you.
    ..I ran into a problem with the full screen mode which I couldn't seem to exit out of (tried typing 'esc' and right/left clicking) which led me to closing my browser window.

    edit: I see your solution for the full screen ;)
    I had a 'to/from full-screen on double-click' functionality, but had problems with the click timing, so I removed it and added the menu item instead. I might re-add both 'esc' and single click to toggle. After all, pretty or not, it can be irritating for the user if they cannot figure how to get it off full-screen.
    When the playing stops, it seems unable to replay it. What about reopening the stream?
    Ahh yes. I had been meaning to debug that, but there was always something seemed more important.

    The thing is, the entire track is cached, and an odd combination of button clicks (rewind and play/stop) will get it to rewind and play again without any need to reload.
    -----------------
    Thanks for your reports.

    Edit 1:
    If you (other people) were considering helping out on this, please 'watch' the thread and hold off for the moment. I have decided to implement the changes suggested by scphan and will put notification on the thread when those changes are ready.

    Edited by: AndrewThompson64 on Aug 19, 2009 4:30 PM
  • 9. Re: Tracker sound tool - test results required
    captfoss Pro
    Currently Being Moderated
    AndrewThompson64 wrote:
    captfoss wrote:
    AndrewThompson64 wrote:
    Somebody? Anybody?
    I tried your applet out, but all it did was yell at me for not asking questions in a smart way, and refused to do anything until I presented it with an SSCCE...
    Huh.. Your comment (combined with the delay since I first posted) underlined that this was not necessarily the best forum for my 'does it work/fail' query. I think I should have sent it to either Java Programming (for the more techy people) or maybe New to Java, to hopefully try and snag a couple of newbies into giving some test results.
    That was a joke, btw... playful ribbing. I was pretending your applet was programmed to be like you, so all it did was yell at people for not asking questions in a smart way and not posting an SSCCE...

    See how that's funny, because you often times...chide people for...anyway...
  • 10. Re: Tracker sound tool - test results required
    793415 Pro
    Currently Being Moderated
    captfoss wrote:
    ..
    That was a joke, btw... playful ribbing.
    ...
    See how that's funny, because you often times...chide people for...anyway...
    And that is why I added..
    1) S-SC-C-E? What's that? (OK no, just kidding, just kidding.)
    ..even with emphasis, which got lost in the copy/paste.

    Maybe I should have added a wink. ;-)
  • 11. Re: Tracker sound tool - test results required
    793415 Pro
    Currently Being Moderated
    The latest version is uploaded.

    That link again is [http://pscode.org/tracker/applettest02.html|http://pscode.org/tracker/applettest02.html]
    scphan wrote:
    When the playing stops, it seems unable to replay it.
    After an overhaul of the stop/start/restart logic, that behaviour now seems a lot more predictable and reliable. My changes had introduced a problem with loading a new track while still playing (the track new would sometimes load - but not start), but I think that was fixed by detaching/reattaching the LineListener when changing tracks.
    ..edit: I see your solution for the full screen ;)
    I liked your suggestions better. After a major rethink I refactored out the full-screen JWindow for a (modal, undecorated) JDialog *(1),* and I am a lot happier with the results.

    The full-screen mode now has a KeyListener attached to detect esc and (Crtl) F-11 to close it and return to windowed mode. The listener prompted me to add functionality to control the track and volume while in full-screen mode so I passed any KeyEvent that it does not recognise onto it's parent, TrackerPanel (which does). They are..
    up-arrow: volume up
    down-arrow: volume down
    left-arrow: skip back
    right-arrow: skip forward
    r: rewind
    s: stop
    p: play

    But since I was running riot with key based functionality, I added
    v: toggle show volume
    b: toggle volume boost
    m: toggle volume match trace colors

    *(1)* But the reason I truly enjoy having swapped to a JDialog is that I can now reliably pop dialogs over the top of it, so that led to adding keystrokes for..
    c: pop the color options dialog
    t: pop the trace options dialog

    In the last case, the main menu mnemonic for showing the trace options has also been changed (from O) to T. Now all mnemonics 'match' the keystroke used in full-screen mode.
    Your controls are okay, it would be nicer if the player would continuously forward or rewind while the button was held down but I think that should be handled later.
    Yeah. I've been thinking something along those lines. The truth is, I am not really happy with any fast-forward/rewind functionality I have seen in any player, ever. My current system player does not offer FF/fast-rewind at all.

    Maybe if I skip every 'N' frames, and compact the rest into a single sound byte block. That would increase the frequency(2) by an integral factor, but maybe that would not be so bad..

    (2) I have no idea how to 'frequency shift' an harmonic signal - but AFAIR it starts with a Fourier transform and they are beyond my understanding. :-(

    But as an interim measure, click on the progress bar to jump to that position in a song. This is a better alternative for a track of 20 minutes duration, anyway. ;-)

    Edited by: AndrewThompson64 on Aug 25, 2009 3:38 PM
  • 12. Re: Tracker sound tool - test results required
    793415 Pro
    Currently Being Moderated
    AndrewThompson64 wrote:
    The latest version is uploaded.

    That link again is [http://pscode.org/tracker/applettest02.html|http://pscode.org/tracker/applettest02.html]
    Latest changes uploaded. Some improvements to the lissajous rendering mode, addition of logging (for the trusted version only, unfortunately) and a seriously lying 'info' dialog (which was crudely adapted from another project, and includes some components not actually used in the current app.). (1)

    I have revised my hopes of what can be achieved on this thread. Originally I wanted 5 separate reports, but now I'll settle for a second report of the quality of the first two by scphan.

    Anybody?

    Edit 1:
    (1) Also new are the help pages for Tracker and AudioTrace.

    Edited by: AndrewThompson64 on Sep 13, 2009 4:21 PM
  • 13. Re: Tracker sound tool - test results required
    807580 Newbie
    Currently Being Moderated
    Tried it out. Worked well for me. Not a huge fan of the default swing look and feel, I'd use something a little more original/nice if I were you. But that's minor.

    Only real suggestion is relabel the stop button to a pause. People understand stop as meaning "stop play and reposition the cursor to the beginning," and pause as "stop playing and remember the current position." Your button does the latter.
  • 14. Re: Tracker sound tool - test results required
    807580 Newbie
    Currently Being Moderated
    Actually one other thing: you should change the fast forward/rewind buttons to detect when they're depressed instead of fully pressed and released. When it's depressed, continue forwarding/rewinding until the user lets go. I didn't find those buttons useful because I had to rapidly press them.

    Edit:

    I haven't been able to make Ctrl-F11 work to get fullscreen mode (though the menu button works just fine). Most little applets like this have a button right in the main UI for going fullscreen.

    Edited by: endasil on 13-Sep-2009 12:33 PM
1 2 Previous Next