Kodi Community Forum
New Audio Visualization - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: Screensavers and visualisations (https://forum.kodi.tv/forumdisplay.php?fid=38)
---- Thread: New Audio Visualization (/showthread.php?tid=157321)



New Audio Visualization - kmb32123 - 2013-02-23

I've recently started running xbmc on debian and so far I love it. The one thing I would like to add however is a new music visualization. Personally, I've never been grabbed by the standard waveform visualizations. More often then not, they just seem, for lack of a better word, stoney to me and generally take up a lot of CPU time. My call is for a visualization similar to what Microsoft's Zune software had:

Image

My visualization will consist of:
Fanart - Slowly moves in some direction, or zooms in or out, and changes to a new image after a certain interval. I also believe it has been desaturated, converted to greyscale.
Text - White Opaque Segoe UI font I believe, also moving in some direction. Contains a combination of artist, album, and song name and information.
Colored Spotlights - Move and fade between colors

More examples can be found here

The problem is, I am really not sure of where to start. I have experience coding and am quite skilled with Java and C# and have a good understanding of C, C++, SQL along with less useful languages like HCS12 assembly. However I have little experience with graphics, which is another major reason for me wanting to do this project.

Ideally this vis would be available for all distributions of xbmc, which would seem to steer me towards OpenGL and C++ but I could be wrong. Any insight here would be more then welcome.

The obvious first step for me would seem to be to focus on making a proof of concept and building from there. For this I would like to have coded a simple slide show of fanart gathered from some external site.

As of right now I do not know which site. A quick googleing offers this to be an early candidate but that remains to be seen. Again, any tips here would be great.

Anyone interested in helping or offering up any advice is appreciated.

Thanks!


RE: New Audio Visualization - mrhyde1969 - 2013-02-24

I am using Transparency theme(Frodo build) which gives something like this> with extrafanart enabled theres an option to have track name album name time left ect.ect scrolling allong the screen whilst fliiping through artist wallpapers. Check it out, not quiet as good as the 360's zuneplayer but the closest I have come across.


RE: New Audio Visualization - DDDamian - 2013-02-24

Windows uses DirectX and Linux uses OpenGL, so cross-porting would be necessary if you wanted to cover the majority of users. For performance C++ is the way to go.


RE: New Audio Visualization - kmb32123 - 2013-02-26

So is it that on windows xbmc can only run DirectX? Because I was under the interpretation that windows could normally run OpenGL without a problem. Also, as I would like to also support arm, I was thinking about starting with OpenGL ES 2 and porting it OpenGL 2 desktop at a latter point as I heard this to be easier then the otherway around.

Also mrhyde, do you know where the "extra fanart" is pulled from? If I could find a good source for images that would be one step in the right direction.

Finally does anyone around here know much about OpenGL? I need an opinion if im going at this in the right direction. I'm think about using a large flat object that uses the images as its texture and then moving this object, along with the spotlights, though the view of the camera


RE: New Audio Visualization - DDDamian - 2013-02-26

Pretty sure XBMC won't build/run with OpenGL - nobody's maintaining that. I could be wrong but...

@WiSo may be the authoritative dev on that issue.


RE: New Audio Visualization - zag - 2013-02-28

Very nice initiative, more simple visualizations would be great!

Some themes already do this including the default confluence but just with fan-art in the background.

The http://en.wikipedia.org/wiki/Ken_Burns_effect effect is the best one to use, but its better if its very subtle.

Different fonts, use of spotlights, fades should be quite simple with OpenGL 2.


RE: New Audio Visualization - ronie - 2013-03-02

(2013-02-26, 01:41)kmb32123 Wrote: Also mrhyde, do you know where the "extra fanart" is pulled from? If I could find a good source for images that would be one step in the right direction.

there are various sources available:
- last.fm
- htbackdrops.com
- theaudiodb.com
- fanart.tv


but the fact the visualization needs to download artwork from third party sites could be a bit of a problem.
if one of the sites pull the plug or changes their api, it would affectively break the visualization.

since we currently do not support binary addons (i don't even think we support python based visualizations)
there's not a way to fix it... apart from waiting till the next stable xbmc release.


RE: New Audio Visualization - kmb32123 - 2013-06-04

Yah I had been looking at fanart.tv until this whole project began to look more and more like a dead end. I feel like fanart.tv still is a good source of art though. The api here seems solid and the "ARTIST BACKGROUND" category should provide an abundance of uniform, screen filling art.

Only question here is this "musicbrainz_mbid" field. Looks like I would have to search for this id for each artist. Unlessss it just so happens a current music scrapper can provide this id number. *fingers crossed*

Any thoughts? Should I keep working on this or do you think Im doomed here.

Yah I had been looking at fanart.tv until this whole project began to look more and more like a dead end. I feel like fanart.tv still is a good source of art though. The api here seems solid and the "ARTIST BACKGROUND" category should provide an abundance of uniform, screen filling art.

Only question here is this "musicbrainz_mbid" field. Looks like I would have to search for this id for each artist. Unlessss it just so happens a current music scrapper can provide this id number. *fingers crossed*

Any thoughts? Should I keep working on this or do you think Im doomed here.


RE: New Audio Visualization - zag - 2013-06-04

Music Brainz support is being worked on yes but not implimented yet.

For now its best to search the Musicbrainz API, then do a fanart.tv search. Thats what all the music scrapers do and is suprisingly easy to do with their webservice. You don't need an API key or anything.


RE: New Audio Visualization - kmb32123 - 2013-06-05

Hmm interesting. Is it possible to get this id through XBMCs API here? It seems like I would need to get the current player via Player.GetActivePlayers and look for the audio stream. Then use that player id in Player.GetItem to get a List.Item.All object. I see that extends List.Item.Base which appers to have the property, [ string musicbrainzartistid = "" ]. So to answer my own question; yes?

I should be able to query the XBMC API to figure out the musicbrainzartistid of the currently playing artist and use that to get the fanart from fanart.tv. If that is correct, then all thats left is the graphics that are unkept, unsupported, and different for each distro. pshh easy...


RE: New Audio Visualization - NewYears1978 - 2013-06-06

I wish this was available..there are just not many visualization options.


RE: New Audio Visualization - kmb32123 - 2013-06-06

My thoughts exactly. I really wish there was some kind of sample OpenGL 2 visualization I could use as a starting point.


RE: New Audio Visualization - spiff - 2013-06-06

kmb32123; see here - https://launchpad.net/~arne-morten-kvarving/+archive/xbmc-addon-test/+packages

this is my work for binary add-ons. you can find some examples for opengl there (sources are available in the .orig tar balls) - in particular spectrum or waveform should be pretty straight forward.


RE: New Audio Visualization - push_pop - 2013-08-14

(2013-06-06, 13:56)spiff Wrote: kmb32123; see here - https://launchpad.net/~arne-morten-kvarving/+archive/xbmc-addon-test/+packages

this is my work for binary add-ons. you can find some examples for opengl there (sources are available in the .orig tar balls) - in particular spectrum or waveform should be pretty straight forward.

Thanks! Good timing. I JUST decided I wanted to dive in to gl programming and figured xbmc viz would be an enjoyable way to learn.
I downloaded your waveform example, and I have a question about building:

Do I need to build XBMC from source in order to build visualizations? It looks like it references the headers, so I'm guessing that may be the case?

I'm getting stuck on how to link to the xbmc dll. (I think)
The CMakeList didn't find XBMC_INCLUDE_DIR so I downloaded the xbmc source and pointed it to xbmc/addons/include but that didn't work.
I tried a few different directories but none of them worked. Any tips??

Hoping to try this out on arch linux arm (Raspberry Pi) eventually, but I have a Linux Mint laptop I can try it out on too if it's way easier.

Thanks!


RE: New Audio Visualization - spiff - 2013-08-14

well, you need the headers. they will be shipped as a package on ubuntu et al, and will be put in an archive for easy use on other platforms once we get there; there will be one version of the bindings per xbmc version. for now you indeed have to execute the 'make install' target of xbmc to get them files. you need the /usr/include/xbmc/* and /usr/lib/xbmc/*.cmake files.

note that the files are NOT transferable between architectures. that is; the headers are but not the cmake config files.


This forum uses Lukasz Tkacz MyBB addons.