kXd -- kX Project driver control plugin via PervTalk

Xlobby plugin development

Postby samgreco on Tue Nov 28, 2006 12:57 am

scalt,

You have my attention! That concept is exactly what I have been trying to accomplish, except that I am using a multizone preamp (8 in x 10 out). But it looks as though I could adapt what you have done, if you are willing to share.

But I'd like to know more about the way you have implemented the Virtual Audio Cables and do you have the radio going through an input?

Sam
samgreco
 
Posts: 246
Joined: Tue Mar 25, 2003 1:04 am
Location: Villa Park, IL

Postby P3rv3rt B3ar on Tue Nov 28, 2006 3:34 am

I like how u managed to make horrible wingdings debug bars look decent. I also manage to camoflauge one rather nicely (not in my skin example though, was for ZPd), but credit for that goes to Rika's exellent dragon though.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby scalt on Tue Nov 28, 2006 4:17 am

But I'd like to know more about the way you have implemented the Virtual Audio Cables and do you have the radio going through an input?


I've setup 6 VACs (Virtual Audio Cables) and each of my "sources" (except the line-in) outputs it's audio to one of these cables. For example, the sources Music Player 1, Music Player 2 and Radio are instances of WinAmp that output to VAC1, VAC2, and VAC3. The other sources will be ZoomPlayer and TheaterTek (I haven't gotten there yet).

So the screen to control my MP1 is basicly a normal music screen (the one from Colby's BlueSkin2 in my case) and where the xlobby zone is set to "Music Player 1". It then plays the music to the VAC1.

In my zone control screen, I toggle MP1 (the process behind it in fairly simple..each button has an ON and OFF state and I use a script to set all the other sources to OFF when I select one of them. I also save a variable as to which source is selected in the process) then I can toggle which zones play that source.

To control my zones, I was planning at first to use WinAmp instances and the Line-In plugin, but instead I opted for Audio Repeaters that come with Virtual Audio Cable. These allow you to connect different inputs to different outputs. In my case, I can connect a VAC to an output of my soundcard. Originally, these Audio Repeaters couldn't be ran from the command line, but I asked the author to add that functionality and he did! (Quite quickly I might add). So now, to toggle a Zone, once I selected a source, it's a simple matter of clicking on the button, which runs a script that launches an Audio Repeater that connects the appropriate source (from the variable I mentioned earlier) to the output of my sound card that corresponds to that zone.

In your case, you might be able to adapt my ideas if you were able to control your preamp remotely. So instead of using Virtual Audio Cables and Audio Repeaters, your preamp would be in charge of the connections

To answer your question regarding the Radio, I'm using the fm radio tuner that is included with my Radeaon AIW 2006 PCI-E. I could have used an external tuner, plug it to the line-in and control it remotly, but since I have an onboard tuner, might as well use that :)
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby samgreco on Tue Nov 28, 2006 4:30 am

scalt,

Thanks for the info. I could almost sell the Xantech and use your method as long as I could setup lines in for my external tuners. I need AM for the Cub games :)

But I could also use your setup with what I have, since it is controllable via RS-232. The only issue is feedback from the Xantech, since XLobby doesn't seem to want to deal with incoming data from Girder.

I have Girder setup to talk to the Xantech now thanks to PhilB's setup. I just changed his Sonance events to mine. Works great.

Now if I could only get native RS-232 in Xlobby...
samgreco
 
Posts: 246
Joined: Tue Mar 25, 2003 1:04 am
Location: Villa Park, IL

Postby scalt on Tue Nov 28, 2006 4:32 am

I need AM for the Cub games


I needed AM for habs games (Montreal Canadiens for those who don't know :P) and I have it! My cable company broadcasts AM stations in FM over cable. So instead of plugin in an antena to my tuner, I plug the same cable that I use for TV.

The reason why it's there is because there's a law in Canada by the CRTC that forces cable companies to broadcast local AM stations over their cable.

I just sent a message to the CRTC to get a list of the stations and their frequency. We'll see what that gives


**EDIT** Had pressed Submit instead of Preview...oups
Last edited by scalt on Tue Nov 28, 2006 4:35 am, edited 1 time in total.
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby samgreco on Tue Nov 28, 2006 4:34 am

habs?
samgreco
 
Posts: 246
Joined: Tue Mar 25, 2003 1:04 am
Location: Villa Park, IL

Postby scalt on Tue Nov 28, 2006 4:43 am

P3rv3rt B3ar, I think I found a bug in kXd. I worked around it without too much trouble, but I thought I'd let you know.

When you had mentioned 2 methods to implement fades for 2 cards, I had only tried method 2, which worked great. To implement my mute buttons for each zone, I tried to send the command to only one card at a time using an alias, but it didn't work. I had replaced "kX driver" with "Card1" in the call, but nothing seemed to happen. (Bug #1).

Also, at first I only had the mute fades in the .ini file for the zones of the corresponding card. (ie in Card1.ini I had the fades for 3 zones, in Card2.ini I had the ones for the 3 others). When I tried calling the face with the "first name" (kx driver), it would crash. I later realised that when using "kx driver" the fades have to be in ALL the ini files, even if the fades don't accomplish anything. It would seem that pervhub crashes when I can't find it instead of just skipping it.

I thus solved the problem by putting the fades for all 6 zones in both ini files.
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby P3rv3rt B3ar on Tue Nov 28, 2006 6:03 am

For first bug i have to ask are u certain u r running newer of the PervHub.exes available from alphatester area (cause "aliases" ruoting was only implemented on later one) also when u launch that instance u gave it alias right? if both answers are yes ill have to investigate this bug further...

Second bug on other hand its easy too see without looking code how it came to be. PervHub routes command to all instances, and some of them dont know what to do with it... Ill need to add exception handler there...

Anyways i hope ill have other card in my hands tomorrow... so i can then run some 2 card tests too.

and thanxs for letting me know.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby P3rv3rt B3ar on Tue Nov 28, 2006 8:23 am

Scalt,

I really like how your setup is implemented. Ive decided that i will model something similar after it for myself, after ive purchasen VAC and have time to dedicate to it. I was wondering that is it sources in your setup which are actual winamp instances and do u launch each of them at startup?

only major difference is that i wanna have sources and zones in categories, so that if i wanna add new source or room theres no skin changes. New enchanced cat features (mapcats and collagecats) in experimental xpert gives most if not all (if something else is needed i just add it) tools i need to achieve this...
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby scalt on Tue Nov 28, 2006 8:34 am

The sources in my setup are instances of winamp that are "zones" in the pure xlobby sense (added them with F2...) for Music Player 1 and 2 and Radio. The other sources will be a video player (zoomplayer most likely...or MPC) and a DVD player (most likely TheaterTek...or maybe PowerDVD...I'll see). I might also use another WinAmp instance for the TV source (with the WinAmp TV plug-in...K!TV doesn't work with my tuner for some reason, so I won't be able to use the XLTV plug-in...at least not out of the box). So since they are "xlobby zones", they are launched at startup and I can use the%zone>***>status% variable to display information in my zone control screen. Basicly, I tried to reuse xlobby commands and procedures as much as possible so simplify implementation

I had thought about using categories for sources and zones, and I'm still not ruling it out because it would be more versatile, but it would complicate things for me right now since my setup is kind of a hack (although still a very clean and efficient hack). I say it's a hack because i'm using 2 scripts with XScript and using some "save to variable" commands to make everything fit together
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby P3rv3rt B3ar on Tue Dec 19, 2006 7:02 pm

Ok Scalt, as i promised, here is documentation how to use few of those added features.

First of all upgrades have been done only to xPerT, so theres no bug fixes yet for bugs u found. But before replacing your xPerT with new one, please copy old one to safekeeping so u can rollback if it doesnt work as well as old one. Thats is your first mission just try the new file to see if it works like old one.

then u can try new features.

if u want to see register value expressed as percentage instead of debug bar, u typesomethin along lines:

Code: Select all
plugin>xPerT>!0!present>percent>[!0!xPerT>Variable>Aux Front>kX driver>Aux Front]


notice that is example from my skin, u just need to change names matching for your registers.

And here is command for button which increases register value with 10% of full value.
Code: Select all
xPerT

Delegate

kX driver;Set;Aux Front>[[!instant!xPerT>Precise>kX driver>Aux Front]+100]

Notice use of Precise instead of Variable, that is because this is command so value needs to be fetched right away. Also notice use of arithmetics, they ve been added to xPerT now, if u wanna decrease value just replace '+' with '-'

As usual report me how it works...

EDIT: oops latter command was left little short, edited it to right one.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby P3rv3rt B3ar on Thu Dec 28, 2006 7:07 am

Scalt,

I was mentioning embarrasing bug in xPerT on other thread, well as far as i know u r only one besides me it aplies to.

Have u ever noticed that your stereo mixers have live of their own? settings change by themselves? Well i did sometimes but it took me real long to realise the culprit. Button clicks were actually checked on each and every screen, not just on screen those bars were located. I know really stupid one, im embarrased... for my defense i can only say that i thought XL SDK would provide info only about buttons on current screen...

Anyway this has been now fixed. But it means some changes for u. First of all u have to migrate to new version of xPerT ive just made available. Also this new version works only with newest (nov 24th) build of XL. And third, ull need to make some changes to clickable text elements (bars). first of all ull need to change their ID values to comply with:

Code: Select all
screenname_asbefore


where screenname stands for filename of the screen or overlay where bar in question is displayed

and asbefore is the current ID value u r using, which ofcourse is alias name of the kX register the bar represents.

ull need to make same changes to actual text variable:

Code: Select all
...Variable>screenname_asbefore>...


I also fixed problem with graphical bars, so u can ditch webdings debug bars and skin them as u like, here is example of use from my setup, using Xmpc bars.

Code: Select all
plugin>xPerT>!0!present>progress bar>[!0!xPerT>Variable>kxmixer_Aux Front>kX driver>Aux Front]>horizontal>C:\Program Files\xlobby\plugins\xmpc.png>C:\Program Files\xlobby\plugins\xmpc_bkgrnd.png
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby scalt on Fri Dec 29, 2006 7:13 am

P3rv3rt B3ar,

Thanks for the fixes...

Hadn't noticed any issues with the graphics bar...but then again I wasn't the only one using the system. I don't have time to take a look at the new stuff right now since I was on a skiing trip and now i'm leaving for a week under the sun 8)

I'll take a look when I get back!
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby P3rv3rt B3ar on Sat Dec 30, 2006 1:27 am

Oh boy! i could use a week sitting on beach under palm tree sipping caiperinha and watching those bundas float by... hehe have a good vacation!

Anyways, hope u got the file before i took servers down... having some problems with DHCP so i need to do some network debugging here... Well, incase u didnt, ill probably be back up anyway when u return from beach :)
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby scalt on Mon Jan 22, 2007 10:10 pm

Ok, so I'm finally getting back into this and I'm in the process of trying out your new build with the new bars

I decided to try out the skinned bars but I'm having some troubles with them.

I'll give you one example of a bar as I set it up

Code: Select all
ID : overlay_zones_Den
Text : plugin>xPerT>!0!present>progress bar>[!0!xPerT>Variable>kxmixer_Den>Card1>Den]>horizontal>D:\xlobby\skins\ColbySkin\buttons\xepg-time.png>D:\xlobby\skins\ColbySkin\buttons\xepg-program.png


Now, the screen where my bars are is an overlay. When I access the overlay through the skin editor, the bars work fine, except for a tendency to show loading when controlling them through fades. However, when accessing it through regular means (opening an overlay through a button on another screen), the bars display the volume correctly, but I can't change it.

Also, pervhub crashes from time to time, but I haven't been able to reproduce it consistently.
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

PreviousNext