kXd -- kX Project driver control plugin via PervTalk

Xlobby plugin development

Can't get it to work

Postby scalt on Fri Nov 24, 2006 8:05 pm

Ok, so I was able to get fades to work properly with the command line of kXd.exe

Now, I'm trying to get the volume to show up in XLobby, but it doesn't work.

Here is what I did...please point out any mistakes.

My xlobby dir is D:\xlobby

- I put kXd.exe, pervhub.exe and xPerT.dll in the plugins directory (d:\xlobby\plugins)
- I created the following ini file
Code: Select all
Den:0:3:0x8003
Kitchen:0:4:0x8003
Dinning:0:5:0x8003
FadeMute{
Den:0
Kitchen:0
Dinning:0
}
FadeDefault{
Den:500
Kitchen:500
Dinning:500
}


NOTE TO OTHERS : Make sure there is no leading space or enter in your default.ini file. It only appears here because of the "code" block

- Before starting Xlobby, I start pervhub.exe
- I created a text field with the following text "plugins>xPerT>Variable>Den>kX driver>Den bar"and changed the font to WebDings
- I gave the id "Den" to that field

But it doesn't work: the text of the field stays as plugins>xPerT>Variable>Den>kX driver>Den bar
What am I missing?
How does it know where to find kXd.exe?
How does it know where to find the default.ini?

Thanks
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby scalt on Fri Nov 24, 2006 8:12 pm

Oups.

Contraty to what is written in the previous posts, it shouldn't be "plugins>xPerT>Variable>Den>kX driver>Den bar" but "plugin>xPerT>Variable>Den>kX driver>Den bar"

Note the "s" at the end of plugins

It now works :D
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby P3rv3rt B3ar on Fri Nov 24, 2006 10:39 pm

scalt wrote:Oups.

Contraty to what is written in the previous posts, it shouldn't be "plugins>xPerT>Variable>Den>kX driver>Den bar" but "plugin>xPerT>Variable>Den>kX driver>Den bar"

Note the "s" at the end of plugins

It now works :D


OOPS, that is my bad. shouldnt write documentation while tired :)

well good u pointed it out for others. And even better u got confirmed that it works.

Now, i guess u would like to have instructions how to run it with two cards... the truth is its quite time already since i worked with kXd, so i need to check it out, how it was again :oops: :)

Meanwhile, now that u know how to use it. U could experiment with other kX-plugins, see if they work or not... i would be suspecting that many wont... i can fix them though, after i get report about prob...
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Re: Can't get it to work

Postby P3rv3rt B3ar on Fri Nov 24, 2006 10:58 pm

scalt wrote:- I put kXd.exe, pervhub.exe and xPerT.dll in the plugins directory (d:\xlobby\plugins)


BTW, this is the reason u have to manually launch pervhub. If u want it all to happen automaticly when xlobby is started, see the correct folders from xPerT thread.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby scalt on Fri Nov 24, 2006 11:16 pm

BTW, this is the reason u have to manually launch pervhub. If u want it all to happen automaticly when xlobby is started, see the correct folders from xPerT thread.


Maybe you could add a field in the plugin configuration dialog? (Which is non existent at the moment if i'm not mistaken)

As for the other kX plugins, many do not work, you are right. It's a matter of the values used for the different field. For exemple, the values typicaly used for GAIN are in dB and do not work. But values for volumes in % work, at least with the St Vol (Stereo Volume) plugin, which is EXACTLY what I needed :D

I'll be waiting for an update for my 2 card setup. In the mean time, I'm setting up my VAC and my Audio Repeaters.

I'll post some info on my setup once everything works

Thanks again for your plugin and your efforts!
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby P3rv3rt B3ar on Sat Nov 25, 2006 2:12 pm

Ok i try to describe the process with two cards from my memory, it might be that i remember it errorously, but if it doesnt work lets have more thorough look with the code... otherwise my lazy nature just keeps pushing this document duty just further and further away...

First of all i have to say that this solution is far from perfect, first i was thinking to have better solution for several cards (hence the DC value in .ini file), but cause i dont have two cards myself (i needed to start this alpha test program to have any change to test possible better solutions), later however i started to feel that simple solution which is currently implemented fits better in spirit of PervTalk architecture. So im not currently sure if there will ever be better solution for controlling several cards... allthough im just about to bid, for two cards currently available in our local net auction service. so it might be that i find current solution lacking in future and end up implementing more unified one.

Ok so basic idea is that u bring up as many instances of kXd as u have kX ncompatible cards u intend to control. Ull have to type different .ini files for each instance, and when u bring them up u need to give them different aliases.

In pervtalk each device has three names, we can call them as first name, surname, and calling name, because these analogies with real life persons reflect very well functions of those PervTalk IDs. first name of kXd is "kX driver" which u can see used in all our examples above. Reason for this being that all those examples only used one instance of kXd. First name of device is something which is shared between all instances of particular device. So if we want to refer just one of the instances we'll have to use something else, and here we use "call name", "AKA" or "alias", which u give for each instances when u create (launch) them. As u might remember there "alias" parameter which kXd takes, simply replace it whatever u wanna call istance controlling that particular card, for example "crappyLiveCard" or "kickAssAudigy", also note that kXd takes card number as well, these are same numbers kX uses, just make sure u insert right number with right alias. Also give each instance that particular .ini file which is made for card of that instance.

Now when we want to refer particular card within xlobby instead of using instances first name "kX driver" inside commands/variables we use call name of instance, like "kickAssAudigy". That should be all there is to it. But remember i really havent tested it, since for me it was impossible.

Oh still one more thing. Ofcourse if your fade needs functionality of both cards, u need .ini file for both of them. But u also need to call that fade for both of instances within xlobby, theres actually two ways to achieve that and i want u try them in this order (just because 1 is more likely to work):

1. Have parts of fade typed in both .ini files and name them however u want. Put two commands in event in xlobby which is activating the fade. one command for first instance/card and other for second. if theyre sequential xlobby launches them anyway almost same moment so there should not be too much time difference between fades...

2. Again like in strategy one have parts of two card fade in two separate .ini files meant for different instances, but unlike one name these fade halfs identically. In xlobby instead of calling two fade commands just use one, but instead of referring instances individually using their call name use first name of kXd. If everything is working like it should pervhub should deliver this command for both instances and they both should init their part of fade.

Like before let me know if theres some problems... and good luck :)
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby scalt on Sun Nov 26, 2006 8:32 am

Everything seems to work...even when using method 2 as described!! Considering i'm alittle lazy too, i figured I would just try the buttons I already had and they worked perfectly. For Fades present in both files, it executes them both!

I have one last little problem, which I'll look into more tomorrow, but I just want to give a heads up. I've been doing most of my work using Remote Desktop, and it's been going great. In particular, I can change volumes by clicking on the text area as described in the tutorial. (I just can't seem to get it to 100% though..)

However, for some reason, when I try changing the volume on my HTPC, which has an ELO Touchscreen, it doesn't work. Nothing happens when I click on the bar. The volume can still be changed with fades, but not when clicking with the touchscreen. Could this have anything to do with how you pick up the "clicks" on the volume bar?

Also, would it be possible to get some Vol+ and Vol- buttons in case this can't be solved??
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby P3rv3rt B3ar on Sun Nov 26, 2006 8:54 am

scalt wrote:Everything seems to work...even when using method 2 as described!! Considering i'm alittle lazy too, i figured I would just try the buttons I already had and they worked perfectly. For Fades present in both files, it executes them both!


that is so good news.

I have one last little problem, which I'll look into more tomorrow, but I just want to give a heads up. I've been doing most of my work using Remote Desktop, and it's been going great. In particular, I can change volumes by clicking on the text area as described in the tutorial. (I just can't seem to get it to 100% though..)


Yes that is know fact that how clicking point is implemented and all normalizations and roundings, cause it to be aproximation at best. U can try to make selection box size of bar element as close as size of bar as possible, but u can already notice there that its pretty imposible to make exact right size. Anyways i believe that real culprit is actually the debug bar im pretty sure that u can actually click it about 99% of volume but wingding bar still rounds it down and shows it 95%... ill have user modifiable graphical bar to beta version... that might take a while though, cause of xpert bugs...

However, for some reason, when I try changing the volume on my HTPC, which has an ELO Touchscreen, it doesn't work. Nothing happens when I click on the bar. The volume can still be changed with fades, but not when clicking with the touchscreen. Could this have anything to do with how you pick up the "clicks" on the volume bar?


yes that sounds like it could be inherent of the way i get mouse input (global hook) so it might be that i wont fix this issue, if i remember right it was actually working on touchscreen of my case, but ill have to try to make sure... but ofcourse we have different screen with different drivers...

Also, would it be possible to get some Vol+ and Vol- buttons in case this can't be solved??



This sounds very good idea... ill have to implement it.

I remember u mentioning 10 ch eq plugin earlier, have u tried it yet? if so did it work? and if not, do u still plan to?
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby scalt on Sun Nov 26, 2006 6:31 pm

Well it would seem that rebooting my HTPC solved the touchscreen issue..


As for the 10 band EQ, I am still using it, but more as a limiter and for tuning. I opted to use the Stereo Volume plugin for volume control. Since I have no volume control on my amp (Russound R1250MC), I can tweak the output of my sound card in a more permanent way that ensures a comfortable listening level when the Volume is at 100% in the Stereo Volume plugin.

NOTE: I hadn't tried it, since the representation of it's values is totallly different then that of the Stereo Mixer and the Stereo Volume plugins
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby P3rv3rt B3ar on Sun Nov 26, 2006 8:44 pm

scalt wrote:Well it would seem that rebooting my HTPC solved the touchscreen issue..


good news... that helps surprising range of issues anyway :) allthough power button is even more mighty... makes all issues disappear :)

NOTE: I hadn't tried it, since the representation of it's values is totallly different then that of the Stereo Mixer and the Stereo Volume plugins


Its not so much about external representation however... but it is ofcourse all about internal representation and your quess about cause of problem was 100% right, i stupidly made naïve asumption that internal value range would be same for each plugin... however fixes are extremely simple ofcourse... just calibrating variable for new value range... but what im saying it actually could be that 10 band eq might work, who knows internal representation might be same...

Anyways i just won a bid of SB0240 so if transaction goes well and card is actually working, testing possibilities are better for me in near future. Also im still thinking mayby to bid for another SB0090 with audigy panel, but we'll have to see how that goes...
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby P3rv3rt B3ar on Mon Nov 27, 2006 6:05 am

Scalt,

I was thinking if u could post some screenshots of your kXd screen... afterall kXd is very flexible plugin (atleast when we get other kX plugins work with it too) so i think it would be helpful for others to see it used for different contexts (afterall your usecase is prolly also more common than my analog mixer) and im curious too :)

I was also thinking about your request (well even though u might not need it anymore) it was a great idea and will get implemented, but i was just thinking rather how than if, and came to conclusion that i will implement it in xPert as general arithmetics, that way it will serve much more varied purposes than just incrementing kX register. Because there is (possibly undocumented) direct set and get commands implemented in kXd too, so together with these, function u described can be accomplished with addition of arithmetics in xPerT and that will also open loooot of new possibilities within XLobby. Also got few other ideas for xPerT so ill start some coding today, and release it as xperimental build for alphatesters...
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby scalt on Mon Nov 27, 2006 6:44 am

I'm currently putting the finishing touches on my zone control screen. I'll put some screenshots up soon. Do you know where I could host them? (I've never had to do this, but I know there's alot of free hosting available..)

Also, another reason why a Vol+ and Vol- command might be useful is with PPC control. Considering the size of the screen, a full bar might take up too much space.

This just made me think of something else. Is there a variable that give access to the value represented in the volume bar. I'm fairly sure this would be easy to implement and would be very usefull for a PPC to display the current volume of the zone (ie 85%)
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

Postby P3rv3rt B3ar on Mon Nov 27, 2006 9:23 am

scalt wrote:
This just made me think of something else. Is there a variable that give access to the value represented in the volume bar. I'm fairly sure this would be easy to implement and would be very usefull for a PPC to display the current volume of the zone (ie 85%)


I think it exists (other one of those undocumented functions i was referring to). I just documented my 6ch mixer as example and since it didnt made use of those, they never got documented. But i have to check the code to make sure, if i remember correctly, i get back to u with usage later.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby P3rv3rt B3ar on Mon Nov 27, 2006 9:52 am

Yes i checked it, and i remembered correctly it does exist.

and u access it simply by dropping " bar" ending from variable u use to show bar.

But problem is that it gives value from range 0-1000, and there is reason for this, i planned this range as normal range in xPerT and plan was to have different presentors for converting this range to user vievable presentation. Variable for presentations in xPerT is "present" and its in place. BUT for some reason there isnt presentation for percentile value, i dont know why, i defenetely thought i did it... but seems i didnt afterall.

Well just have to add it to future version. Meanwhile u can use 0-1000 range if it adds any value to u.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

kXd Zone Control Screen

Postby scalt on Mon Nov 27, 2006 8:44 pm

Well here it is..my Zone Control overlay. I finally got everything working thanks to the wonderfullness that is Xlobby, Virtual Audio Cables (the cables themselves and Audio Repeaters), Colby's Blueskin 2, the XScript plugin and P3rv3rt B3ar's kXd plugin.

Image

Here's how it works. You first have to select a source on the left, if you don't then you can't select any zones on the right. I'm using toggle buttons and the XScript plugin to make sure only one is selected at a time.

Once you selected a source, you can toggle which zones will play that source. This way, you have full control on what plays where and thanks to VAC, everything is in perfect sync.

You can also control the volumes of the zones independently with the volume bar and mute them separately or all of them at the same time with the appropriate buttons. The Stop All Zones button basically kills all the Audio Repeater processes

Don't hesitate if you have any questions
scalt
 
Posts: 75
Joined: Tue Dec 06, 2005 10:53 pm

PreviousNext