[Logo] Jaikoz and SongKong Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: rmgarnett  XML
Profile for rmgarnett -> Messages posted by rmgarnett [11]
Author Message
You're correct that sorting by a single column preserves the record number ordering, but that's not very useful. When I load an entire directory, the record numbers assigned to the files loaded seem almost arbitrary and certainly aren't useful in any way. I see no reason why I would ever want to sort my albums "on the record number."
Now what you want it to do is consider any previously sorted column when sorting a new column, so if you sort by track and then by album it should sort preserve the track no when ordering identical albums. 

No, it shouldn't preserve the ordering from the previously sorted column, it should merely preserve the previous ordering (whatever it was) when two items have the same key in the current sort.
In this particular case it would seem to be useful, but if you reversed things so that you sorted by album first and then by track no it wouldn't work because [albums would get split up because within an album all track nos are different. So sorting by Track/Album acts like mutiple column sort but sorting by Album/Track doesnt - an inconsistency. 

This is not an inconsistency. It's perfectly correct behavior. You HAVE to split up albums when sorting by track number. It's not inconsistent, it's just that it's not very useful to sort by track number and then by (ie breaking ties by) album. Although if you really want to see all the track numbers 01, 02, etc. sorted alphabetically by album, this would give you exactly that.
What you may want after sorting by album, is to sort tracks nos whilst keeping within the album. But this is a proper multi-column sort and we need a change in the gui to allow us to differentiate between multiple column sort to do this or there would not be a way to sort tracks without reference to the album. 

Esentially, the GUI component should simply say "Sort my tracks by: [key 1], break ties with [key 2], break further ties with [key 3], etc." Then, if the sort is stable, this can be implemented simply as
Code:
 tracks.sortBy(key3);
 tracks.sortBy(key2);
 tracks.sortBy(key1);
ie by stably sorting the columns according to the specified keys in reverse order. So if you want to sort by track number, but have tracks with the same track number sorted by album (the weird example you gave), the user could input that and you could
Code:
 tracks.sortBy(album);
 tracks.sortBy(tracknumber);
Equivalently, the user could click the column sort button for album, then by track number. Making the sort stable (according to the previous ordering, NOT the record number) gives the users the expected behavior and makes implementing a GUI multicolumn sort trivial for the implementor.

oillio wrote:
It would be nice.

Or at least think about moving the two ID fields to the end. I rarely use them (probably no human does) and they waste a lot of space.
I would much rather be able to see the track number and track length (which are off the screen for me). 

The MB ReleaseID field is incredibly useful!
(java.util.Arrays.sort() is stable too)
A workaround for users for the time being is to follow up a Remote Correct->Manual Correct Tags from MusicBrainz with a Remote Correct->Update Tags from Existing MusicBrainz Id, which does set the Sort Artist field.
I have this problem as well, but I can't remember the last time Remote Correct->Manual Correct Tags from MusicBrainz set the Sort Artist field. I always seem to be filling it in myself.

Here's the MBID (TrackID) for a track for which Jaikoz 2.4.0beta2/Linux did not set the Sort Artist with manual correct:
Code:
f582d3a0-83a0-43ae-b3c6-3de94b399c19
Oh, and having stable sorts would make eventually implementing a "multi-column sort" trivial, since a multi-column sort can be realized simply with a series of stable sorts on single columns.

paultaylor wrote:
I see, this may be possible - I'll look into it. 

Thanks! Great product, by the way! I spent months looking for a decent tagger for linux, and I finally found one that's more than decent, but superb! No longer do I have to run vmware and export my music over smb just to tag my collection.

paultaylor wrote:
What do you mean, that duplicates entries in a particulr column will always be sort in the same order ? 

Yeah, so a sorting algorithm is stable if when two entries have the same key, their original order won't be affected by the sort. java.util.Collections provides stable sorting methods, but obviously I have no idea about the internals of Jaikoz, but Collections.sort() just requires a List and a Comparator (or the Comparable interface). I'd guess we're just sorting Strings in most cases, though?

The functional result would be, e.g., that if I sorted by track number, then by album name, all tracks with the same album name would remain in the correct track order (since the sort by album name would not modify the original order [by track number] of the tracks with the same [album] sort key).

Anyway, I'm sort of shooting in the dark here.

rmgarnett wrote:
Just wanted to echo this request. I'd especially like to, for example, sort by artist, then by album, then finally sort the tracks within each album by track number. It's frustrating to sort by album then have the tracks all jumbled, especially when I have to figure out which one of 20+ tracks is missing.

Thanks! 

Thinking about this problem a bit more, a trivial fix that I'd be perfectly happy with would be making the routine that sorts the rows of the table by the keys in a column stable. Collections.sort() is guaranteed to be stable; not sure what Jaikoz is using. But if the sort were stable, I could click to sort by track number, then click to sort by album, and everything would be awesome.

JDany wrote:
And lastly how about multi-column sort. So I can click on the Disc No column then hold down the shift key and click on Track No so I can see the two CD separately and not mixed in one list. 


Just wanted to echo this request. I'd especially like to, for example, sort by artist, then by album, then finally sort the tracks within each album by track number. It's frustrating to sort by album then have the tracks all jumbled, especially when I have to figure out which one of 20+ tracks is missing.

Thanks!
Running Jaikoz 2.3.1 on Linux 2.6.24 with Java 1.6.0_05:
Code:
 $ uname -a
 Linux liverwurst 2.6.24-gentoo-r4-mactel #2 SMP PREEMPT Fri Apr 4 01:49:21 BST 2008 i686 Genuine Intel(R) CPU 1500 @ 2.00GHz GenuineIntel GNU/Linux
 
 $ java -version
 java version "1.6.0_05"
 Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
 Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)
I've been trying to go through a large number of files (~5k), closing groups of them when I'm happy with their tags. After a while, I try to close a file whose id (row number) is apparently larger than the size of some internal structure keeping track of the open files. I get a IndexOutOfBoundsException and can no longer continue.

Stack trace (trying to close file id 4405; status bar claims 4503 open files; not sure where 4353 comes from):
Code:
 06/04/2008 00.13.52:com.jthink.jaikoz.EventDispatchThreadExceptionHandler:handle:SEVERE: RuntimeException occurred in application
 java.lang.IndexOutOfBoundsException: Index: 4405, Size: 4353
         at java.util.ArrayList.RangeCheck(ArrayList.java:547)
         at java.util.ArrayList.get(ArrayList.java:322)
         at com.jthink.jaikoz.table.tablemodel.TagDisplayMetaDataModel.getValueAt(TagDisplayMetaDataModel.java:74)
         at com.jthink.jaikoz.table.JaikozRowHeaderTable.getValueAt(JaikozRowHeaderTable.java:105)
         at javax.swing.JTable.prepareRenderer(JTable.java:5653)
         at org.jdesktop.swingx.JXTable.prepareRenderer(JXTable.java:3499)
         at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
         at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
         at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1770)
         at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
         at javax.swing.JComponent.paintComponent(JComponent.java:763)
         at javax.swing.JComponent.paint(JComponent.java:1027)
         at javax.swing.JComponent.paintChildren(JComponent.java:864)
         at javax.swing.JComponent.paint(JComponent.java:1036)
         at javax.swing.JViewport.paint(JViewport.java:747)
         at javax.swing.JComponent.paintChildren(JComponent.java:864)
         at javax.swing.JComponent.paint(JComponent.java:1036)
         at javax.swing.JComponent.paintChildren(JComponent.java:864)
         at javax.swing.JComponent.paint(JComponent.java:1036)
         at javax.swing.JComponent.paintChildren(JComponent.java:864)
         at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1026)
         at javax.swing.JComponent.paint(JComponent.java:1036)
         at javax.swing.JComponent.paintChildren(JComponent.java:864)
         at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1026)
         at javax.swing.JComponent.paint(JComponent.java:1036)
         at javax.swing.JComponent.paintChildren(JComponent.java:864)
         at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1026)
         at javax.swing.JComponent.paint(JComponent.java:1036)
         at javax.swing.JComponent.paintChildren(JComponent.java:864)
         at javax.swing.JComponent.paint(JComponent.java:1036)
         at javax.swing.JComponent.paintChildren(JComponent.java:864)
         at javax.swing.JComponent.paint(JComponent.java:1036)
         at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
         at javax.swing.JComponent.paintChildren(JComponent.java:864)
         at javax.swing.JComponent.paint(JComponent.java:1036)
         at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)
         at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
         at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
         at javax.swing.JComponent._paintImmediately(JComponent.java:5070)
         at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
         at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:723)
         at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
         at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)
         at java.awt.Dialog$1.run(Dialog.java:1045)
         at java.awt.Dialog$3.run(Dialog.java:1097)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:1095)
         at java.awt.Component.show(Component.java:1422)
         at java.awt.Component.setVisible(Component.java:1375)
         at java.awt.Window.setVisible(Window.java:806)
         at java.awt.Dialog.setVisible(Dialog.java:985)
         at com.jthink.jaikoz.guielement.AbstractMessagePopupDisplayer.displayDialog(AbstractMessagePopupDisplayer.java:165)
         at com.jthink.jaikoz.guielement.ErrorMessagePopupDisplayer.display(ErrorMessagePopupDisplayer.java:48)
         at com.jthink.jaikoz.EventDispatchThreadExceptionHandler.handle(EventDispatchThreadExceptionHandler.java:50)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at java.awt.EventDispatchThread.handleException(EventDispatchThread.java:389)
         at java.awt.EventDispatchThread.processException(EventDispatchThread.java:295)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:287)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)
         at java.awt.Dialog$1.run(Dialog.java:1045)
         at java.awt.Dialog$3.run(Dialog.java:1097)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:1095)
         at java.awt.Component.show(Component.java:1422)
         at java.awt.Component.setVisible(Component.java:1375)
         at java.awt.Window.setVisible(Window.java:806)
         at java.awt.Dialog.setVisible(Dialog.java:985)
         at com.jthink.jaikoz.guielement.AbstractMessagePopupDisplayer.displayDialog(AbstractMessagePopupDisplayer.java:165)
         at com.jthink.jaikoz.guielement.ErrorMessagePopupDisplayer.display(ErrorMessagePopupDisplayer.java:48)
         at com.jthink.jaikoz.EventDispatchThreadExceptionHandler.handle(EventDispatchThreadExceptionHandler.java:50)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at java.awt.EventDispatchThread.handleException(EventDispatchThread.java:389)
         at java.awt.EventDispatchThread.processException(EventDispatchThread.java:295)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:287)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
 
Profile for rmgarnett -> Messages posted by rmgarnett [11]
Go to:   
Powered by JForum 2.1.6 © JForum Team