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

Question about beat detection #17

Open
WindowsNT opened this issue Apr 22, 2020 · 3 comments
Open

Question about beat detection #17

WindowsNT opened this issue Apr 22, 2020 · 3 comments

Comments

@WindowsNT
Copy link

It's very cool, I 've included it in my sequencer. However it doesn't seem to feed properly the wave.

I 've used float* botter to feed:

int PluginRender(unsigned char *pWaveL, unsigned char *pWaveR);
And I 've modified the code in DoCustomSoundAnalysis:

memcpy(mysound.fWave[0], m_sound.fWaveform[0], sizeof(float)*576);
memcpy(mysound.fWave[1], m_sound.fWaveform[1], sizeof(float)*576);

but still, no reaction in the visualization. Any clues?

@AlwinEsch
Copy link
Member

AlwinEsch commented Sep 11, 2021

A very late answer here, sorry.

Think thats comes like on other addons by limit of stream data to the fixed size of 576, see here https://github.com/xbmc/visualization.milkdrop2/blob/Matrix/src/Milkdrop2XBMC.cpp#L69-L82, if now more data, does it interrupt between and audio always only partly given to milkdrop library.

@AlwinEsch
Copy link
Member

Normally should also the Start() function called from Kodi's API (see https://alwinesch.github.io/group__cpp__kodi__addon__visualization.html#gaa4ba9bea676e0bccf5bcc7ac33b80f49), but them on this addon not used.

To have it works correct should it check by "Start" the channels, sample rate and bitsPerSample and do on "AudioData" call a wanted resample to match Milkdrops wanted sound.

Problem for me is that I'm not a good WIndows guy to know how exact this addon here works with his DirectX and not looked to fix itself for things like this.

If we could find someone who would look into it and fix these bugs would be great.

@AlwinEsch
Copy link
Member

As example here I used a way on another addon with OpenGL to make a very small resample, with no audio corrections (as only for GUI and not for the ears 😏).

https://github.com/xbmc/visualization.waveform/blob/Nexus/src/Main_gl.cpp#L252-L279

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