Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get the powermap example working #59

Open
R3Ngfx opened this issue Aug 11, 2023 · 2 comments
Open

Unable to get the powermap example working #59

R3Ngfx opened this issue Aug 11, 2023 · 2 comments

Comments

@R3Ngfx
Copy link

R3Ngfx commented Aug 11, 2023

Hello, thank you for making this framework open and available! Sorry for the specific question, but after days of trying I have been unable to get a standalone implementation of the powermap example working.
I made a small C program based on the code available for the SPARTA powermap VST that reads an audio file and generates a series of image files of the audio power maps, but I have not been able to obtain correct results.

In my implementation, I read a chunk of the audio file, call the powermap_analyisis and powermap_getPmap functions with the read data, save the image to a file and then read the next chunk of audio data.

However, the power maps generated are incorrect, and they differ greatly from the results obtained when using the powermap SPARTA VST, but what I find really strange is that, for a given audio file, all the generated maps are identical despite the audio chunk data passed to the powermap_analysis function being very different. Interestingly, the map changes when using a different file, but the maps are always incorrect and identical between different chunks of the same file.

Here's are two examples of incorrectly generated PWD powermaps for different ambisonic sound files of first and third order respectively, where it seems to be repeated twice horizontally:
0000
0000

Lastly, I've noticed that when using the CroPaC LCMV mode it outputs the error:

 ** On entry to CPOSV NEYSafe minimumFULCPOSVX1FullEpsilon parameter number  1 had an illegal value
SAF WARNING: Could not solve the linear equation in utility_cslslv(). Output matrices/vectors have been zeroed.

So I'm inclined to believe there might be something wrong with the data being passed, but I think I'm using all the functions correctly and I'm certain that audio data is being read correctly, so I was wondering if there was any information I was missing on the format of the audio (as I'm using float32 audio samples), or other function calls that need to be in place when doing the powermap analysis.

Thanks!

@R3Ngfx
Copy link
Author

R3Ngfx commented Aug 31, 2023

Update:

After a shot break I was able to get the example running.
It turns out my code had two main issues:

  • Firstly I had to call powermap_requestPmapUpdate every frame in order to make sure the powermap was updated when powermap_analysis was called.
  • Secondly, when sampling the output data I had to change the horizintal and vertical axes.

However I do still get some errors when using the CROPAC_LCMV and MUSIC algorithms (but not when using MUSIC_LOG).

For posterity, if anyone else needs an example of how the framework can be used to generate individual powermaps, the code for a very minimal example is available in this repository.

@leomccormack
Copy link
Owner

Hi, apologies for the delayed reply!
I'm glad the example is now working for you. However, what kind of errors are you getting with CROPAC_LCMV and MUSIC?
Note that MUSIC_LOG, is simply log(pmapDerivedUsedMUSIC), so shouldn't be massively different. And CROPAC_LCMV is quite an experimental (and unfinished) mode, so maybe avoid this one if the results are unexpected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants