|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
DriverHeaven Newbie
Join Date: Mar 2005
Posts: 9
Rep Power: 0 ![]() |
Using kxctrl to swap front and rear output
Hi
Can anyone give me the kxctrl commands to switch or set the front and read output (I'm using k1lt for output).. or at least if someone knows of a kxctrl tutorial? Tnx |
|
|
|
|
|
|
|
DriverHeaven Newbie
Join Date: Mar 2005
Posts: 9
Rep Power: 0 ![]() |
Nevermind, figured it out. I hoped someone who's familiar with kxmixer would help and save me a few hours, but oh well..
|
|
|
|
|
|
#3 |
|
S-3D enthusiast
|
Why did you need to use kxctrl?
Couldn't you use the GUI of the mixer and click on "Toggle 'Swap Front and Ream' mode"? |
|
|
|
|
|
#4 | |
|
Long Time ***** Friend
|
Quote:
__________________
![]() May a song always touch you in a positive way. Sonar 8.5.3 PE, Windows 7 Pro 64Bit, MOTU UltraLite MK3, 150 GB HDD, 250 GB HDD, 1 TB HDD 7200 rpm, My Music Production: Top 40, Contemporary Christian, Pop/Rock, Decent Rap, Inspirationals, and Children Songs |
|
|
|
|
|
|
|
||
|
DriverHeaven Newbie
Join Date: Mar 2005
Posts: 9
Rep Power: 0 ![]() |
Quote:
So now all she has to do is press a key and I'm off the hook.. Third reason, sometimes I want to play a game of warcraft and the game finds me a match, then when the game loads and I should be getting busy doing something, I figure out that nothing is coming out of my headphones so I have to alt+tab out of the game when nothing is happening (rarely), change the DSP config and come back, hoping I still have a base. And since it has happened to me that I pressed alt+tab accidentally during the game (with catastrophic results to my match), I got a program to disable it, using that thing there was NO way to switch my speaker config, other than forfeiting the match (sux). So now I wrote a batch file that starts my game and sets up my headphones like they should be, before the game starts.Quote:
It's not really complicated, it means 'connect register REG1 of plugin ID1 to REG2 of plugin ID2'. To switch front&back, you need to change four connections (since it's stereo, 2x2=4 ). The ID part can be seen on the DSP, it's the number in brackets. The reg number can be found out by hovering the mouse over the register you want to change, a tooltip will pop up. Here's a picture of what I mean: http://freeweb.siol.net/gregc666/KXSetup.jpgThe four lines are those that I use to set the speakers to the config that is shown. The first line is explained, the rest should be easy to figure out. To reverse the config, swap the last two parameters between the pair of lines (so the lines from the first output go to the second output and vice-versa). Just think of it as connecting the lines manually, only you don't even have to use your mouse.. Once you know which lines you have to use, make a batch file to do it automatically. I wrote myself a simple .exe program that switches my config when I press the 'media' button on my keyboard, since I don't use it for anything else. |
||
|
|
|
|
|
#6 |
|
DriverHeaven Newbie
Join Date: Oct 2005
Location: Virginia, USA
Posts: 8
Rep Power: 0 ![]() |
How does your batch know which way to change? Test the existence or content of a file?
|
|
|
|
|
|
#7 | |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61 ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
Another option is to use a scripting language like VB Script or Windows Scripting Host. Using a scripting language you could run kxctrl, retrieving the current settings that you want (redirect kxctrl's output to a file), read the file to determine the current settings, and use conditional statements to execute the correct kxctrl commands based on the current settings, etc. |
|
|
|
|
|
|
|
|
DriverHeaven Newbie
Join Date: Mar 2005
Posts: 9
Rep Power: 0 ![]() |
I wrote a small executable which makes a config file, where the current configuration is written, this way it swaps the config if I just run the file, or sets it to a specific config if I include command line parameters (this is where batch files are not enough, they're fine if you just need the switch functionality). It was faster for me than trying to figure out how to check it directly with the driver.
|
|
|
|
|
|
#9 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61 ![]() ![]() ![]() ![]() ![]() ![]() |
Also, aside from the above, if you have VC++, you can use the kX SDK to create an executable that works with kX directly (without going through kxctrl) to do what you want.
|
|
|
|
|
|
#10 |
|
S-3D enthusiast
|
My suggestion is to save the two DSP to .kx files. You just have to execute the .kx file to load the corresponding DSP.
You could use c++ code : Code:
static char path[ MAX_PATH ]; ShellExecute( GetForegroundWindow(), "Restore", path, NULL, NULL, SW_SHOWNORMAL ); |
|
|
|
|
|
#11 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61 ![]() ![]() ![]() ![]() ![]() ![]() |
Although the above would work as well, you can do the same thing without the need for C++, using Windows shell commands, or using kxmixer's command line switches.
i.e. Bind the following to a key (replacing 'saved_dsp.kx' with your saved config): kxmixer --shell --load-settings saved_dsp.kx |
|
|
|
|
|
#12 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,606
Rep Power: 66 ![]() ![]() ![]() ![]() ![]() ![]() |
to answer the initial question:
swap on: kxctrl -shw 4 1 swap off: kxctrl -shw 4 0 (but i guess this works only with default epilog) |
|
|
|
|
|
#13 |
|
S-3D enthusiast
|
You are right Russ, the c++ code is not needed. Another suggestion :
Make two shortcuts to the two .kx files. Right-click the shortcuts one at a time and enter a shortcut key in the shortcut key case (e.g. ctrl + alt + 1, ctrl + alt + 2). Place them on the desktop or in the start menu of windows. You can replace the .kx files by batch files that run the kxctrl commands. |
|
|
|
|
|
#14 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61 ![]() ![]() ![]() ![]() ![]() ![]() |
Good stuff, lots of options.
@Max M. Are the hardware parameters that can be set using 'shw' listed somewhere? |
|
|
|
|
|
#15 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,606
Rep Power: 66 ![]() ![]() ![]() ![]() ![]() ![]() |
it looks like they are at ikx.h:118
|
|
|
|
|
|
#16 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61 ![]() ![]() ![]() ![]() ![]() ![]() |
Thanks Max.
|
|
|
|
|
|
#17 | |
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 50 ![]() ![]() |
Quote:
Same with the console commands? :S |
|
|
|
|
|
|
#18 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61 ![]() ![]() ![]() ![]() ![]() ![]() |
The command line switches are listed in kX help under "Appendix C: Command Line Reference".
As for the console commands, if you type "?" in the console, you get a list and brief description of the console commands. Some of them are self explanatory, while some others are not. Many of the parameters are listed in the kX SDK, while some others might require you to do some research to know how to use them properly (i.e. AC97 registers would depend on the AC97 implemention used with your specific card, thus you would want to look up that specification, etc). BTW: Some of the command line switches that are not listed in the appendix (i.e. some of the additional parameters used with --shell) can be determined by looking at the Windows file associations set by kX. Last edited by Russ; Dec 11, 2005 at 06:10 PM. |
|
|
|
|
|
#19 |
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 50 ![]() ![]() |
Ahh. Thats hady to know abount command line switches.
Wow - quite a lot can be done with simple batch files too. I DID look in the Docs about the cmd line - And Shell *should* be in there (in more detail). Its says 'Internal Use Only' - which seems like all the other params are more 'advanced' than the shell.. ?? Thanks again Russ - Oh.. Im in the market for a new brain, let me know - Ill give ya a fair price for yours. |
|
|
|
|
|
#20 | |
|
DriverHeaven Newbie
Join Date: Nov 2005
Posts: 3
Rep Power: 0 ![]() |
I use the commandline switches combined with autohotkey to make my scrollLock key into a switch-toggle like this
Quote:
|
|
|
|
|
|
|
#21 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,507
Rep Power: 61 ![]() ![]() ![]() ![]() ![]() ![]() |
Good stuff, just be careful not to hold down any of the hotkeys. I have never used the autohotkey program, so I am not sure how it handles key repeats, but if it works like it does with most applications, you would end up with many instances of kxctrl running.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|