Skip to main content

Topic: foo_wave_seekbar (Read 507449 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • silkcut
  • [*][*]
foo_wave_seekbar
Reply #1175
Hi. Does anyone know how to script a wave with one color for the foreground and one color for the background?  Something like Sound Forge's default display....

I don't know how to code so any pointers on how to script this would be very much appreciated.

  • EpicForever
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1176
In addition to my previous post in this thread ( http://www.hydrogenaudio.org/forums/index....st&p=823130 ) when foobar wasn't colligated with only one core and it could use all six cores of my CPU, then average CPU usage by foobar2000 process was around 66% with maximum of  74%. Wave seekbar is configured to concurrently process 4 tracks (same is prevoius test, when foobar utilized only single core). CPU was quite hot before I speeded up my cooler (61*C)... Just for develeoper information

foo_wave_seekbar
Reply #1177
Are screenshots working now? I can't seem to find the files actually turning up anywhere. Certainly not in My Pictures or the song's directory.

EDIT: My bad, I just remembered this only works with Direct3D. Since I'm on a new Win 8 install it took me a minute to remember you literally have to install Direct X to enable this.
  • Last Edit: 19 February, 2013, 07:47:52 AM by Pixel Eater

  • EpicForever
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1178
I have one small sugesstion/request.

Zao - could you add another "display downmix" option? Currently we have "downmix display to mono" - could we have "downmix display to stereo (2ch)" additionally? It will be nice option for those, who often listen to multichannel tracks on headphones, and thus use "downmix multichannel to stereo" DSP plugin.

  • Zao
  • [*][*][*][*][*]
  • Members (Donating)
foo_wave_seekbar
Reply #1179
Version 0.2.30 released today should have a dropdown adding downmix-to-stereo. As a bonus unrelated change, it also scans tracks way faster than previous version.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • lvqcl
  • [*][*][*][*][*]
  • Developer
foo_wave_seekbar
Reply #1180

  • Zao
  • [*][*][*][*][*]
  • Members (Donating)
foo_wave_seekbar
Reply #1181
 The digest in my mailbox was confusing, as there's no formatting in those.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • EpicForever
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1182
Thanks Zao
I got one question... How procedure of downmix is prepared in your plugin? Why I am asking: stereo display of 6ch/24bit/48kHz FLAC files ripped from DVD-A tracks look on downmixed display like they were clipped during nearly whole track... Like 0 dBFS was reached at one point and held during 30 sec. for example. Foobar's Peak Meter shows the same thing. Peaks reach up to +6 dB... But audio doesn't sound like it was clipped at any point of time... Does it mean that both visualisation routines doesn't work properly or is there something that I miss about 5.1 downmixing or 24 bit FLAC decoding?

  • Zao
  • [*][*][*][*][*]
  • Members (Donating)
foo_wave_seekbar
Reply #1183
The coefficients used to mix-down can be found in the source code for that functionality.
They are scientifically taken from thin air, and might not quite match the "typical" downmix of many-channel content.
What it does is mix all the channels into left channel based on the coefficients, and similarly all the channels into the right channel. If mono is requested, the resulting stereo image is simply averaged.

What you have to realize is that you're asking for some sort of approximation of the original signal, and if you want to preserve energy in the mixdown, there's more energy in six channels than two. Feel free to contribute "better" mixdown matrices.
The following are the matrices for mixing from {mono, stereo, 4ch, 5ch, 5.1ch, 7.1ch} to stereo. The mono transformation is the same, but averaged at the end.

  • Last Edit: 22 March, 2013, 05:32:41 PM by Zao
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • Propheticus
  • [*][*][*]
foo_wave_seekbar
Reply #1184
I think above matrices are about right. A gain of 0.7 (root(1/2)=~0.7) is common.
My only concern is the 1 for LFE in both left and right downmixed channels. You're effectively doubling the low frequency channel, since normally this only gets fed to one sub-woofer.
I'd suggest completely ditching this channel all-together as normal stereo speakers/headphones can hardly produce sub-bass anyway. At the very least attenuate it by 3dB, cutting perceived volume in half to compensate for the fact you're using the LFE channel twice.

  • EpicForever
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1185
Hmmm... Yes, coeffs are generally OK and conform with old ITU-R-BS775-1 for 6 ch (except LFE coeff - as noted by Propheticus). But something like "volume normalisation" should be used to avoid "clipping" on displayed waveform that isn't present in the reproduced sound. I mean that values of displayed waveform should be calculated as (raw values calculated from coefficients) divided by (maximal value calculated in whole file).
  • Last Edit: 22 March, 2013, 08:15:17 PM by EpicForever

  • marc2003
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1186
i was just listening to a song and i noticed the waveform was blank. previous and next tracks in the playlist were ok so i went back to the track with the blank seekbar and it still wouldn't show.

i went to close foobar for a restart, but it just hung. i checked with process explorer and found it eating all the CPU.



not sure if you can do anything because i've killed the process now but i thought i'd mention it. there's nothing special about the track. it's just FLAC encoded from a normal CD. using latest component/foobar2000 1.2.4beta3/windows 7 x64.

after the restart, it now displays fine.
  • Last Edit: 23 March, 2013, 08:33:29 AM by marc2003

  • Zao
  • [*][*][*][*][*]
  • Members (Donating)
foo_wave_seekbar
Reply #1187
There's min(cores,3) processing threads (by default) that act on tracks in a largely queue-like manner.
Files are added to it if:
  • there's a missing waveform for a track that's just starting,
  • if there's a missing waveform for the next track (by guess at the playback order and playlist)
  • if the user invokes the Extract Waveform command.

The processing threads loop around (efficiently), picking tracks from the front(ish) of the queue, and once it has picked one, decodes and processes it from start to end.
They honor an abort callback raised at shutdown time whenever actively decoding, so your screenshot indicates that there's two threads that are stuck scanning some file(s), and these are most probably not the file that you're observing is missing a waveform, that's just a victim of a queue that never drains.
There's only one place in the analysis code where it could wedge like this, and it's one that I had to touch in the last speed optimization. Blargh.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

  • marc2003
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1188
i'm guessing it's irrelevant but i forgot to mention i have downmix to mono enabled.

i've just been trying to abuse it by opening a playlist of files that are all 1-3 hours long and i'm skipping tracks/order and there is no problem at all.

  • Kasen
  • [*]
foo_wave_seekbar
Reply #1189
My waveform seekbar was working fine up until today, when I tried to change the colours. Now, when "Mix-down to mono" is selected the seekbar is just the blank background colour; with no waveform, current time bar or highlight. Changing to "Mix-down to stereo" or "Keep as-is" everything displays fine, but I want the mono display. I tried updating to the latest version (0.2.30) and it hasn't helped. I tried changing the colours back to what they were, no colour combination is working. Any ideas?

  • derty2
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1190
I'm using foobar2000 v1.1.7 | foo_wave_seekbar 0.2.30 | OS: Windows XP SP3 | CPU: Intel Core 2 Quad Q9550 @ 2.83GHz | Memory: 4GB, 400MHz (DDR2 800)

I started playback of an album containing 11 tracks (24bit/96kHz FLAC)

Process Hacker (my task manager program) was showing red, indicating heavy CPU load caused by this process/thread:


I waited up to 10 minutes to see if CPU load would subside, but it did not!

CPU is continuing to hover at 25% even as I post this. This component has had plenty of time to scan and should not be using up 25% CPU indefinitely!

P.S. -- This waveform seekbar visualization lives in its own tab in my foobar2000, and the tab was not even active/showing when all the above was happening!

*EDIT*

30 minutes playback time has passed and 25% CPU usage continues . . . .
so I decided to click the "Stop" button, and track stopped playing . . . .
I then tried exiting fb2k by pressing the top right [X] button . . . . all foobar2000 exit functionality was immediately frozen and unusable!, in fact foobar2000 froze TOTALLY!, in fact other open windows are now being frozen and my desktop graphics are going to the dogs! . . . I am dragging an open notepad window around the desktop and it is leaving ghost images everywhere . . . I killed explorer.exe but it made no difference to the corrupted open windows . . . . BAD BAD CRASH! . . . I have one final quick look at foobar2000.exe process in Process Hacker before I "terminate" it . . .and CPU usage is frozen solid at 25% !!!!
  • Last Edit: 23 March, 2013, 12:07:55 PM by derty2

  • Zao
  • [*][*][*][*][*]
  • Members (Donating)
foo_wave_seekbar
Reply #1191
Analysis is a background task, and takes the opportunity to analyse files it doesn't know about when it finds out about them.
If you're afraid of it stealing your precious cycles, it runs with idle priority so the scheduler will never preempt something else to perform it.

The problem here isn't that it's scanning, that's a natural state of existence. The problem is that the scan is slightly broken and never terminates for some tracks.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

foo_wave_seekbar
Reply #1192
I'm also having a problem with CPU load since updating to 0.2.30. With certain audio files no seekbar is displayed and at least one CPU core spikes to 100%, stays there and never finishes. The Foobar process then has to be stopped by force.

For me this has only occurred with FLAC files so far and not with mp3 or ogg (at least so far). Also, not all FLAC files show this problem, only certain ones. The screenshot shows the properties of one such file. Most other files of the same album do not have this problem, however, only some.


I have also tried deleting the waveform database file but that didn't seem to help. Any way we can help finding the problem?

  • Zao
  • [*][*][*][*][*]
  • Members (Donating)
foo_wave_seekbar
Reply #1193
For you lads that get eternal scans, version 0.2.30.1 should hackfix this.
Please test this and report back so I can push it live.
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.

foo_wave_seekbar
Reply #1194
Thank you, Zao, I've tried one problematic file with 0.2.30.1. I still get an eternal scan and 100% core usage with the file but I've noticed one difference: when the CPU spikes, foobar can now be closed normally without killing the process.



Is there any way we can get you more information that may help?

  • derty2
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1195
Thanks for the prompt update Zao ++++++++++

I'm using the exact same configuration as (Post #1191) before . . . everything is running nicely! . . . CPU load is trivial now! . . . good fix +++++

  • marc2003
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1196
thanks for the update.

  • marc2003
  • [*][*][*][*][*]
foo_wave_seekbar
Reply #1197
unfortunately it's still very broken. it's rarely displaying waveforms for anything now and the CPU is being munched as before. the only difference is that i can close foobar normally. same as gundelgauk above really.

edit: i note the problem seems to start with very quiet tracks. if i start foobar with a problematic file as the only entry in the playlist. there is no CPU usage. i then start playback and the CPU usage jumps to max but there is no mention of any attempt to scan the file in the console. if i restart foobar and start playing a louder track, it behaves as normal and shows what it is doing in the console.

an example of a track that won't scan and causes the silly CPU usage. http://www.youtube.com/watch?v=IA0cjNTHlro

edit2: saying it's very broken was a bit harsh.  after some more testing i can confirm it's definitely quieter tracks causing the issue. after a restart, playing normal tracks is fine.
  • Last Edit: 23 March, 2013, 06:42:00 PM by marc2003

foo_wave_seekbar
Reply #1198
marc2003, that seems to be an interesting discovery about quiet files, since my current test file is also rather quiet. However it gets a bit louder at the end (orchestra kicks in). Also, the track just before my problem file is even more quiet and does not show this problem. The waveform for it was generated very quickly with 0.2.30.1 and no noticeable CPU spike. So I'm not entirely convinced if the problem is only caused by quiet files, no offense meant.

Screenshot 1 is the waveform of the problem file.



Screenshot 2 is the waveform of the track before it on the same CD, which scans normally.


  • Zao
  • [*][*][*][*][*]
  • Members (Donating)
foo_wave_seekbar
Reply #1199
As in that muxed MP4, or some rip of that track?
Zao shang yong zao nong zao rang zao ren zao.
To, early in the morning, use a chisel to build a bathtub makes impatient people hot-tempered.