Author Topic: Spectrum visualizer issue  (Read 7487 times)

redwing

  • Guest
Try Cover+List view (https://getmusicbee.com/addons/theater-mode/123/cover-list-view/) and notice the spectrum visualizer pauses for a very short time in every 3-4 seconds.
Other TM views behave the same, only the interval varies. Do you have any idea about what causes that?

redwing

  • Guest
It seems to have something to do with the length of playing tracks list. For the same track, the visualizer works fine if only that album is on the list and the issue arises when lots of (in my test more than 20,000) tracks are on the list.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32732
having a look at the code, the way the visualiser is currently implemented can definitely be improved but i wont change it until after v3.2 is released

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32732
I cant actually reproduce the behaviour with 30,000 tracks, nor can i see why the number of tracks would matter.
I dont deny the way the visualiser is implemented is not very efficent, but it is a lot harder than i realised to make it work better and i think i will leave it unsolved for now.
Last Edit: July 08, 2018, 07:49:02 PM by Steven

redwing

  • Guest
Figured out what causes the issue: it's not the spectrum visualizer but the track list on the right side.
Currently it shows 10 upcoming tracks on the right. If I remove them all, everything works fine regardless of the number of tracks in the playing list. Now if I re-add a track text element one by one to the TM skin, the visualizer starts pausing with a large number of tracks in the list (in my case the issue starts happening with more than 21,246 tracks when the full 10 track text is shown).
Also tried removing a specific element like album cover or duration, but that didn't make any differences.
Hope you can now address the issue.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32732
I still cant reproduce this. Are you able to determine if its the album covers, track text or both? (I assume you are still talking about the Cover List view)

redwing

  • Guest
It's track text. I can show covers without affecting visualizer.

The more the playing tracks, the shorter the gap between pauses. If you add more than 200k tracks, it pauses every second.

redwing

  • Guest
Try with this test view. It puts only tracks text except visualizer and 48 track ids would make it easier to reproduce the issue.
I tested with a fresh installation and noticed it requires a lot more tracks in the list to produce the issue, which may indicate library size also matters. But if you keep adding tracks to the playing tracks list, the visualizer starts pausing with a few seconds of an interval with more than 100k tracks.

Code
<?xml version="1.0" encoding="utf-8"?>
<root>
<settings enableScaling="true" />

<element type="Field" id="Tracks[1]" xAnchor="Panel.0" x="10" yAnchor="Panel.5" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[2]" xAnchor="Panel.0" x="10" yAnchor="Panel.10" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[3]" xAnchor="Panel.0" x="10" yAnchor="Panel.15" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[4]" xAnchor="Panel.0" x="10" yAnchor="Panel.20" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[5]" xAnchor="Panel.0" x="10" yAnchor="Panel.25" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[6]" xAnchor="Panel.0" x="10" yAnchor="Panel.30" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[7]" xAnchor="Panel.0" x="10" yAnchor="Panel.35" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[8]" xAnchor="Panel.0" x="10" yAnchor="Panel.40" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[9]" xAnchor="Panel.0" x="10" yAnchor="Panel.45" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[10]" xAnchor="Panel.0" x="10" yAnchor="Panel.50" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[11]" xAnchor="Panel.0" x="10" yAnchor="Panel.55" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[12]" xAnchor="Panel.0" x="10" yAnchor="Panel.60" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[13]" xAnchor="Panel.0" x="10" yAnchor="Panel.65" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[14]" xAnchor="Panel.0" x="10" yAnchor="Panel.70" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[15]" xAnchor="Panel.0" x="10" yAnchor="Panel.75" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[16]" xAnchor="Panel.0" x="10" yAnchor="Panel.80" y="10" widthDock="x:Panel.30" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[17]" xAnchor="Panel.33" x="10" yAnchor="Panel.5" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[18]" xAnchor="Panel.33" x="10" yAnchor="Panel.10" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[19]" xAnchor="Panel.33" x="10" yAnchor="Panel.15" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[20]" xAnchor="Panel.33" x="10" yAnchor="Panel.20" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[21]" xAnchor="Panel.33" x="10" yAnchor="Panel.25" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[22]" xAnchor="Panel.33" x="10" yAnchor="Panel.30" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[23]" xAnchor="Panel.33" x="10" yAnchor="Panel.35" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[24]" xAnchor="Panel.33" x="10" yAnchor="Panel.40" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[25]" xAnchor="Panel.33" x="10" yAnchor="Panel.45" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[26]" xAnchor="Panel.33" x="10" yAnchor="Panel.50" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[27]" xAnchor="Panel.33" x="10" yAnchor="Panel.55" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[28]" xAnchor="Panel.33" x="10" yAnchor="Panel.60" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[29]" xAnchor="Panel.33" x="10" yAnchor="Panel.65" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[30]" xAnchor="Panel.33" x="10" yAnchor="Panel.70" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[31]" xAnchor="Panel.33" x="10" yAnchor="Panel.75" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[32]" xAnchor="Panel.33" x="10" yAnchor="Panel.80" y="10" widthDock="x:Panel.63" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[33]" xAnchor="Panel.66" x="10" yAnchor="Panel.5" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[34]" xAnchor="Panel.66" x="10" yAnchor="Panel.10" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[35]" xAnchor="Panel.66" x="10" yAnchor="Panel.15" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[36]" xAnchor="Panel.66" x="10" yAnchor="Panel.20" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[37]" xAnchor="Panel.66" x="10" yAnchor="Panel.25" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[38]" xAnchor="Panel.66" x="10" yAnchor="Panel.30" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[39]" xAnchor="Panel.66" x="10" yAnchor="Panel.35" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[40]" xAnchor="Panel.66" x="10" yAnchor="Panel.40" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[41]" xAnchor="Panel.66" x="10" yAnchor="Panel.45" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[42]" xAnchor="Panel.66" x="10" yAnchor="Panel.50" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[43]" xAnchor="Panel.66" x="10" yAnchor="Panel.55" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[44]" xAnchor="Panel.66" x="10" yAnchor="Panel.60" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[45]" xAnchor="Panel.66" x="10" yAnchor="Panel.65" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[46]" xAnchor="Panel.66" x="10" yAnchor="Panel.70" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[47]" xAnchor="Panel.66" x="10" yAnchor="Panel.75" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>
<element type="Field" id="Tracks[48]" xAnchor="Panel.66" x="10" yAnchor="Panel.80" y="10" widthDock="x:Panel.96" width="0" font="Segoe UI" style="Regular" size="12" fg="240,240,240" mouseOverFg="200,255,200" onClick="PlayNow"><child id="Title"> </child></element>

<!-- Track Info -->
<element type="Field" id="Title" xAnchor="Panel.10" x="0" yAnchor="Panel.95" y="0" align="center" widthDock="x:Panel.90" width="0" font="Segoe UI" style="Regular"  size="13" fg="240,240,240" mouseOverFg="200,255,200">
<child>  •  </child>
<child id="Artist"></child>
<child>  •  </child>
<child id="Album"> </child>
</element>

<!-- Spectrum Visualiser -->
<element type="SpectrumVisualiser" xAnchor="Panel.0" x="0" yAnchor="Panel.0" y="0" widthDock="x:Panel.Right" width="0" heightDock="y:Panel.Bottom" height="0" fg="100,255,0,0" bdr="100,255,150,0"  ></element>

</root>

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32732
Pretty sure i have found the problem
https://getmusicbee.com/patches/MusicBee33_Patched.zip

once you have confirmed that, I also found a couple of smaller optimisations made in the plugin itself which i will give to you

redwing

  • Guest
Yes. It's indeed fixed and no longer pauses with however many playing tracks. Thanks!



Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32732
its just a couple of optimisations - it should reduce the cpu usage while the visualiser is running but visualisely you probably wont notice. I havent measured the difference yet but i do think it would improve a bit

redwing

  • Guest
You're right. It seems to have reduced about a third of CPU usage.

BTW can you support fractional movement with anti-aliasing for the progress bar like the main player bar setting?

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 32732
BTW can you support fractional movement with anti-aliasing for the progress bar like the main player bar setting?
happy to do this at some point, but not now as its too much of a change so near to the final release