Using visualisation as a graphic element
#1
I've been fooling around with using the music visualizer as a graphic element, in this case ShaderToy.
Image

I used <control type="visualisation"> to add the viz with some pings above and below.

I would prefer to add the visualiser like this:
<control type=" ? ">
<visualisation>visualization.shadertoy</visualisation>

Can I do this and what would I use for type? TIA.

PHP Code:
    <include name="home-visualisation3">
        <
control type="image">
            <
texture>custom/home-fanart-bg.png</texture>
            <
fadetime>600</fadetime>
            <include>
VisibleFadeEffect</include>
            <
visible>Player.HasAudio</visible>
        </
control>
        <
control type="visualisation">
            <
description>visualisation</description>
            <
left>1145</left>
            <
top>553</top>
            <
width>354</width>
            <
height>200</height>
            <
visible>Player.HasAudio</visible>
        </
control>
        <
control type="label">
            <
description>Codec</description>
            <
left>735</left>
            <
top>485</top>
            <
label>$INFO[MusicPlayer.Codec]</label>
            <
align>center</align>
            <
aligny>center</aligny>
            <
font>font-17</font>
            <
textcolor>white</textcolor>
            <
shadowcolor>black</shadowcolor>
        </
control>
        <
control type="image">
            <
texture>custom/home-fanart-music-fg.png</texture>
            <
fadetime>600</fadetime>
            <include>
VisibleFadeEffect</include>
            <
visible>Player.HasAudio</visible>
        </
control>
    </include> 
Reply
#2
nope, type should always be 'visualisation'.
kodi will use the visualization that's been selected by the user, it's not possible to hardcode one in the skin.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
OK, ronie thanks for the info. I guess that's as far as I can go with that.
Reply
#4
Have you got a sample video of this? Looks totally awesome!
Reply
#5
I use a visualisation as background as well, but perhaps a bit more simple in execution than what you are wanting to do:

Image

I use it in the background of the info bar as above.
SKIN: Aeon Madnox
RIP Schimi2k, we miss you.
When I grow up I want to be a skilled skinner
Thank me by ⬇ adding to my + reputation
Reply
#6
Thats awesome!

I wish estuary did something like that.

A blue faded EQ viz would look amazing enbedded instead of lyrics Smile
Reply
#7
Estuary doesn't look amazing with it full screen in the background, it would be much nicer in a panel on the right I think.

Image

It looks a lot better with a darker fanart

Image
Reply
#8
Thank you for the nice comment. I don't have a video but the viz moves like normal, just shrunk down. The gears don't move, but I think it would look nice if they turned really slowly. Mike_Doc, I like your idea, do you mind if I steal it?
Reply
#9
Just a follow up.

I've noticed that while you can't use the visualizer within a control, you can turn it on and off from xml:

<include name="HomeMusicButton">
<item id="6">
<!-- Rye -->
<label>2</label>
<onclick>Skin.SetBool(Vis-Visualization)</onclick>
<onclick>ActivateWindow(10502,&quot;upnp://c0229ce2-87cc-4771-adf1-a6bd66cc4ba7/&quot;,return)</onclick>
<include condition="!Skin.HasSetting(Home_Music_Fanart_Background)">home-music-background</include>
<include condition="Skin.HasSetting(Home_Music_Fanart_Background)">home-music-background-fanart</include>
</item>
</include>

So at this point ShaderToy only shows up on the home screen, and ScrollTitle becomes the "standard" visualizer when the music screen-saver is activated. This is what I had hoped to do. This opens a big door. Once again thank you Team-Kodi!!!

P.S. none of you are old enough to remember when 10k of data was conveniently stored on a 20 pound reel of magnetic tape and a programmer's salt was measured by the weight of the box of punch cards they carried around, but a game called "Colossal Cave Adventure" was kind of a big deal. Drifting through Kodi's vast amount of XML is the same kind of fun.
Reply
#10
(2016-12-12, 20:20)RyeHumor Wrote: Just a follow up.

I've noticed that while you can't use the visualizer within a control, you can turn it on and off from xml:

<include name="HomeMusicButton">
<item id="6">
<!-- Rye -->
<label>2</label>
<onclick>Skin.SetBool(Vis-Visualization)</onclick>
<onclick>ActivateWindow(10502,&quot;upnp://c0229ce2-87cc-4771-adf1-a6bd66cc4ba7/&quot;,return)</onclick>
<include condition="!Skin.HasSetting(Home_Music_Fanart_Background)">home-music-background</include>
<include condition="Skin.HasSetting(Home_Music_Fanart_Background)">home-music-background-fanart</include>
</item>
</include>

So at this point ShaderToy only shows up on the home screen, and ScrollTitle becomes the "standard" visualizer when the music screen-saver is activated. This is what I had hoped to do. This opens a big door. Once again thank you Team-Kodi!!!

P.S. none of you are old enough to remember when 10k of data was conveniently stored on a 20 pound reel of magnetic tape and a programmer's salt was measured by the weight of the box of punch cards they carried around, but a game called "Colossal Cave Adventure" was kind of a big deal. Drifting through Kodi's vast amount of XML is the same kind of fun.

Well, I'm almost that old !!

Just wondered, what will happen to your code if I'm not using uPNP (as I'm not) Huh
Learning Linux the hard way !!
Reply
#11
Please excuse the delay. I think it will work OK. Here's my button for Radio:

</include>
<include name="RadioButton">
<item id="18">
<label>Radio</label>
<onclick>Skin.SetBool(Vis-Visualization)</onclick>
<onclick>ActivateWindow(10502,&quot;library://music/addons.xml/&quot;, return)</onclick>
<icon>custom/home-radio.png</icon>
<thumb>-</thumb>
</item>
</include>

It works the same as music.
Reply

Logout Mark Read Team Forum Stats Members Help
Using visualisation as a graphic element0