Author Topic: (Version 1.8) Spectrogram Panel Plugin  (Read 101975 times)

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3831
  • MB Version: 3.6.8849 P
You can now access the Spectrogram Configuration Panel by right-clicking the panel.

Thank you for adding this  :)
MusicBee and my library - Making bee-utiful music together

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
I have just installed the plugin yesterday. Took me a while to figure out how to get it work.

My feedback on the installation process:

1. I am on Window 10. MusicBee Ver 3.2.6902 non-portable.

2. Re: Installation Instructions #3. "A message will appear telling you where to place the plugin's "Dependencies" folder; extract the whole folder there now."

After extracting the file mb_Spectrogram-Display.dll in the Plugin folder and place it in the MusicBee/Plugins, I restarted MusicBee. However, there is no message telling me where to place the "Dependencies" folder.

I spent some time reading through the forum postings and managed to find the correct folder.

The folder should be

C:\Users\YOUR_USERNAME\AppData\Roaming\MusicBee\".
For my case, it didn't work if I put it in the sub-folder \Plugin (I don't have such a folder and I created one by following the posting quoted by boroda in Reply #2).

Note: The above folder is a hidden folder and users need to enable viewing hidden folders in the window explorer options.

3. For the configuration, the chart is by default grey scale and without the "Frequency Legend" enabled.  As most of us would like to see color chart with the readings on x and y axis. I would suggest the following defaults:
Saturation be 1 instead of 0
Frequency Legend enabled
Color Scheme: Plasma

Great work. Thanks!

Thanks for the feedback! I'm still out of town, but I'll work on implementing this.

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
Thanks for the feedback! I'm still out of town, but I'll work on implementing this.

I don't mean to be a PITA, but instead of re-doing the plugin to show a message, why not just change the installation instructions on the first post and in the zip's readme.  Just eliminate the current step #3 altogether, and re-write step #1 to read:

1.  With MusicBee off, extract the file located in the "Plugins" folder to your MusicBee Plugins directory, and the "Dependencies" folder to your MusicBee/Appdata directory.

More time then to work on the dynamic seek indicator  ;)

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
As far as color display, I can display down to and including "Green", but the choices below that (Viridis-Plasma-Cividis-Terrain) do not display.  This is with a Zerranoe 32-bit build of ffmpeg.  But since we already have 11 working color choices, I don't see how anyone, even me, could possibly complain!  I use Rainbow at any rate.

Glad to hear that the bug is fixed!

Just wanted to let you know that the color scheme issue only affects 32 bit (I assume). I just tested every color on the 64 bit build and they all work.

Have found that the "nightly git build" of the Zeranoe 32-bit ffmpeg will indeed display all color options;  it's only the (currently) 4.1.1 release build that will stop with "Green."

Looking forward to the dynamic seek indicator addition.  Will greatly enhance the current seeking, which is already devoid of the click/pop in wasapi-exclusive some of us have experienced in that mode.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
As far as color display, I can display down to and including "Green", but the choices below that (Viridis-Plasma-Cividis-Terrain) do not display.  This is with a Zerranoe 32-bit build of ffmpeg.  But since we already have 11 working color choices, I don't see how anyone, even me, could possibly complain!  I use Rainbow at any rate.

Glad to hear that the bug is fixed!

Just wanted to let you know that the color scheme issue only affects 32 bit (I assume). I just tested every color on the 64 bit build and they all work.

Have found that the "nightly git build" of the Zeranoe 32-bit ffmpeg will indeed display all color options;  it's only the (currently) 4.1.1 release build that will stop with "Green."

Looking forward to the dynamic seek indicator addition.  Will greatly enhance the current seeking, which is already devoid of the click/pop in wasapi-exclusive some of us have experienced in that mode.

Ah, that's a good find.

I'm going to look back into the dynamic seek indicator. Been busy and didn't find an easy way to implement it from my original research.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
Update 7: Added two experimental features to the Configuration Panel - Enable Seekbar and Disable Header.  Added ability to pause/play by right-clicking the Spectrogram.

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
Thanks for the new version.  Can you give an explanation or screenshot as to what the "Enable Seekbar" setting is supposed to do/look like?  I have it enabled, and don't see any dynamic "seekbar" or time indication at all, just the normal spectrogram which will seek when the mouse is clicked through the image as before;  the "pointed finger" cursor replaces the normal mouse arrow cursor of 1.6.1.   A zero-byte "seekbar.txt" file is created in Dependencies.  Enabling the debug log produces no entries for "seekbar."

Contents of config.xml:

Code
<?xml version="1.0" encoding="utf-8"?>
<ConfigMgr xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ColorScheme>rainbow</ColorScheme>
  <Saturation>1</Saturation>
  <Gain>1</Gain>
  <WindowFunction>hann</WindowFunction>
  <ChannelMode>combined</ChannelMode>
  <Scale>log</Scale>
  <ClearImages>true</ClearImages>
  <ShowLegend>true</ShowLegend>
  <EnableDebugging>true</EnableDebugging>
</ConfigMgr>
In the GUI, "Enable Seekbar" is checked but not "Disable Header."

The right-click pause/resume works, but I don't find that useful personally as I always use spacebar for that.

In MusicBee (3.3.7035) I have "Progress Bar on Top" set, as I always have-- in case that may have something to do with your seek indicator not showing.  Using Dark Fine-Tuned series Maya Blue skin.

BTW, the file version of the dll still shows as "1.6.1" not 1.7, albeit with a mod date of today.
Last Edit: April 09, 2019, 04:13:42 AM by sveakul

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
Hey,

That's my bad...

I haven't implemented different colors for Dark skins.



There are definitely some limitations. I tried creating a seekbar that would cover the entire spectrogram (with translucency), but unfortunately I couldn't find a clever way of refreshing the panel without redrawing the bitmap.

I'll work on improving this.

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
I guess what I was hoping to see by "dynamic seek" was just an indication of the playing time of the file as the mouse was dragged or hovered through the spectrogram, as opposed to another seek "bar" itself.  In other words, a digital time indicator tied to the file playing time that would temporarily appear when the mouse was hovered through the display, resulting in a "seek" to that time point when "clicked."  IMO, the idea of a transparency drawing through the display would be a BAD idea, obscuring the attractive display of the graphics themselves.  Better just to leave it as-is in that case.

Is it possible to leave links to a couple of previous versions on the first post, instead of just the latest experimental version?

Would be nice to hear what other users' wishlists/opinions are.  I know I'm not shy about mine ;D  Thanks for putting up with us.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
I guess what I was hoping to see by "dynamic seek" was just an indication of the playing time of the file as the mouse was dragged or hovered through the spectrogram, as opposed to another seek "bar" itself.  In other words, a digital time indicator tied to the file playing time that would temporarily appear when the mouse was hovered through the display, resulting in a "seek" to that time point when "clicked."  IMO, the idea of a transparency drawing through the display would be a BAD idea, obscuring the attractive display of the graphics themselves.  Better just to leave it as-is in that case.

Is it possible to leave links to a couple of previous versions on the first post, instead of just the latest experimental version?

Would be nice to hear what other users' wishlists/opinions are.  I know I'm not shy about mine ;D  Thanks for putting up with us.

I did want to implement something that would show the time. That's actually a really good idea! Let me give it a shot.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
I guess what I was hoping to see by "dynamic seek" was just an indication of the playing time of the file as the mouse was dragged or hovered through the spectrogram, as opposed to another seek "bar" itself.  In other words, a digital time indicator tied to the file playing time that would temporarily appear when the mouse was hovered through the display, resulting in a "seek" to that time point when "clicked."  IMO, the idea of a transparency drawing through the display would be a BAD idea, obscuring the attractive display of the graphics themselves.  Better just to leave it as-is in that case.

Is it possible to leave links to a couple of previous versions on the first post, instead of just the latest experimental version?

Would be nice to hear what other users' wishlists/opinions are.  I know I'm not shy about mine ;D  Thanks for putting up with us.

Update 7.1: Added dynamic indicator (tooltip) of time in song. Fixed version.

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
The dynamic digital time indicator that follows the mouse cursor inside the spectrogram is great!  Thanks!  Um, but may I mention just two things...:-X

Current behavior is that when clicking into a seek point within the image, the song correctly jumps to that time point and continues playing as expected, but the MusicBee elapsed/total track time indicator in the corner will freeze, jumping to the correct time only when the cursor is moved out of the spectrogram panel.  Is it possible to synch the spectrogram seek point with the MusicBee timer so that the latter updates immediately?  This is easier to see than to describe.  And, to see how far out on a limb I can crawl, would be possible to have the mouse cursor while in the spectrogram retain the normal arrow pointer as it did in 1.6x instead of the "funky finger"?

I keep the plugin's own seek bar disabled as it's not needed with your new update, frees up a tiny bit more real estate, and I prefer to keep the MusicBee one available.  And with a dark (black) skin you can't see it anyway.

Thanks for your work on this, and for being so open to user requests!  Again, thanks for the "placeholder" option that allows the space to be used for a user-supplied image when playing radio streams, works perfect and much appreciated.  If it any point you feel like these requests (from me or anybody) start to kludge up the core operation/intent of the plugin, "just say NO!"

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
The dynamic digital time indicator that follows the mouse cursor inside the spectrogram is great!  Thanks!  Um, but may I mention just two things...:-X

Current behavior is that when clicking into a seek point within the image, the song correctly jumps to that time point and continues playing as expected, but the MusicBee elapsed/total track time indicator in the corner will freeze, jumping to the correct time only when the cursor is moved out of the spectrogram panel.  Is it possible to synch the spectrogram seek point with the MusicBee timer so that the latter updates immediately?  This is easier to see than to describe.  And, to see how far out on a limb I can crawl, would be possible to have the mouse cursor while in the spectrogram retain the normal arrow pointer as it did in 1.6x instead of the "funky finger"?

I keep the plugin's own seek bar disabled as it's not needed with your new update, frees up a tiny bit more real estate, and I prefer to keep the MusicBee one available.  And with a dark (black) skin you can't see it anyway.

Thanks for your work on this, and for being so open to user requests!  Again, thanks for the "placeholder" option that allows the space to be used for a user-supplied image when playing radio streams, works perfect and much appreciated.  If it any point you feel like these requests (from me or anybody) start to kludge up the core operation/intent of the plugin, "just say NO!"

Yeah, the cursor is buggy and I think I'm going to remove that.

In terms of the bug you're experiencing with seeking - I can't replicate it.

Can you attach a screenshot or video of it occurring?

sveakul

  • Sr. Member
  • ****
  • Posts: 2438
In terms of the bug you're experiencing with seeking - I can't replicate it.

Can you attach a screenshot or video of it occurring?

See the GIF at the link below:

1.  Song starts, time elapsed counter in lower right corner begins;

2.  At the 6 seconds point I drag the cursor into the spectrogram, which immediately stops the MB time counter and MB seekbar but not the music (the plugin-generated time by cursor doesn't show on the gif--some overlay problem in my gif app, sorry!).

3.  I drag the cursor to about 2/3 of the song, click it to seek, and then move it down out of the spectrogram window, which causes the MB seekbar and elapsed time to immediately jump to the right place and resume counting.

https://imgur.com/gLca5DE

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
In terms of the bug you're experiencing with seeking - I can't replicate it.

Can you attach a screenshot or video of it occurring?

See the GIF at the link below:

1.  Song starts, time elapsed counter in lower right corner begins;

2.  At the 6 seconds point I drag the cursor into the spectrogram, which immediately stops the MB time counter and MB seekbar but not the music (the plugin-generated time by cursor doesn't show on the gif--some overlay problem in my gif app, sorry!).

3.  I drag the cursor to about 2/3 of the song, click it to seek, and then move it down out of the spectrogram window, which causes the MB seekbar and elapsed time to immediately jump to the right place and resume counting.

https://imgur.com/gLca5DE


Thanks! Currently trying to replicate this issue.

Also working on fixing this app-hang:

Code
System.ArgumentException: Controls created on one thread cannot be parented to a control on a different thread.