Is there an audio output variable for plugins?
#1
Let's say I want to make an audio visual plugin. I would like to tap into the audio that Kodi produces. Is there a function or variable in Kodi that I can use for audio input? Can I access Kodi's audio interface to listen in on what Kodi plays for audio?
Reply
#2
(2015-06-06, 10:27)Skram0 Wrote: Let's say I want to make an audio visual plugin. I would like to tap into the audio that Kodi produces. Is there a function or variable in Kodi that I can use for audio input? Can I access Kodi's audio interface to listen in on what Kodi plays for audio?

Hi Skram0,

what exactly you wanna achieve? Something like FishBMC, Spectrum, projectM, Waveform or MilkDrop?
If yes then AudioDSP ist not the correct starting point. AudioDSP is for signal processing (transformation) e.g. boost up the low frequency in an audio signal.

If you really wanna start a visual plugin you should be familiar with C/C++. I'm not very familiar with the viz API, but I think the subforum can help you.

Here are some links as quick start:
Latest news about AudioDSP and my libraries is available on Twitter.

Developers can follow me on Github.
Reply
#3
(2015-06-06, 13:37)wisler Wrote: Hi Skram0,

what exactly you wanna achieve? Something like FishBMC, Spectrum, projectM, Waveform or MilkDrop?
If yes then AudioDSP ist not the correct starting point. AudioDSP is for signal processing (transformation) e.g. boost up the low frequency in an audio signal.

If you really wanna start a visual plugin you should be familiar with C/C++. I'm not very familiar with the viz API, but I think the subforum can help you.

Thanks, I'll check out those links. I'm familiar with C, did a lot of programming in DOS back in the late 80's early 90's, hobby stuff. Didn't do much C++, but then got into VB for a while too. I'm a bit rusty.

But what I'm looking for is to access the audio that's being played at all times. Create a plugin to access this info. I'd like to filter out the frequencies so I can know the lows, mids, and highs. I want to basically create a spectrum analyzer. If I can tap into the audio buffer I might be able to run some algorithms to extract the frequencies. It seems like some visualizations know when the bass is hitting, or when you have highs chirping away. I figure they're doing the same thing. Though it's not really going to be a visualization for the main screen.

I love Milkdrop, btw. Have used it in Winamp for many years. One of the main reasons that drew me to XBMC years ago. Once I found out XBMC had Milkdrop, looking elsewhere was over.
Reply
#4
(2015-06-07, 02:59)Skram0 Wrote: But what I'm looking for is to access the audio that's being played at all times. Create a plugin to access this info. I'd like to filter out the frequencies so I can know the lows, mids, and highs. I want to basically create a spectrum analyzer.
Again as wisler noted, then instead of an audio DSP addon you want to look at creating a visualization addon in C or C++ for the C API used for screensavers and visualizations in Kodi.

Best would probably be to begin by modifying the code for an existing "visualization.glspectrum" addon to create a new addon https://github.com/xbmc/xbmc/tree/master...GLSpectrum

Suggest to first checkout this discussion here http://forum.kodi.tv/showthread.php?tid=204991 then follow all the threads here http://forum.kodi.tv/forumdisplay.php?fid=38

Anyway, audio visualization is not what the AudioDSP's API or addons is meant for, again see http://forum.kodi.tv/forumdisplay.php?fid=38 (and you can't use Python regardless).
Reply
#5
(2015-06-08, 13:12)RockerC Wrote: Again as wisler noted, then instead of an audio DSP addon you want to look at creating a visualization addon in C or C++ for the C API used for screensavers and visualizations in Kodi.

Best would probably be to begin by modifying the code for an existing "visualization.glspectrum" addon to create a new addon https://github.com/xbmc/xbmc/tree/master...GLSpectrum

Suggest to first checkout this discussion here http://forum.kodi.tv/showthread.php?tid=204991 then follow all the threads here http://forum.kodi.tv/forumdisplay.php?fid=38

Anyway, audio visualization is not what the AudioDSP's API or addons is meant for, again see http://forum.kodi.tv/forumdisplay.php?fid=38 (and you can't use Python regardless).

If all else fails I might end up defaulting to a visualization addon. But If I create a visualization addon, then that's the only one that can be played, i.e. no one can use the Spectrum addon too. I want video to go to a 2nd display, not the main display. I think I have libraries for that. But what I don't have is a way to access audio through a non-visualization addon. All I need are values for the current playing bass, mids, and highs. I don't want to modify the audio, just listen in on it.
Reply
#6
I'm not sure what your goal is, it should be possible if our AudioDSP sytem is enabled and you use our PreProcess Mode. With that you receive all audio samples in an 2D array.
I had a similiar Idea for my adsp.biquad.filters addon to show the current spectrum and then parametrize the EQ mode.
If you need more infos feel free to pm me and if you can speak German we can also switch the language Wink
Latest news about AudioDSP and my libraries is available on Twitter.

Developers can follow me on Github.
Reply

Logout Mark Read Team Forum Stats Members Help
Is there an audio output variable for plugins?0