|
| Notices |
Welcome to the DriverHeaven.net forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
 |
Sep 24, 2006, 01:34 AM
|
#1
|
|
DriverHeaven Extreme Member
Join Date: Jan 2005
Posts: 4,104
|
Simple plugin for use with 'ma' console command
I thought I would post a simple sample plugin for use with the 'ma' console command (for TV card users etc).
Code:
name "VolumeSt";
copyright "Copyright (c) 2006.";
created "09/24/2006";
engine "kX";
guid "dfc06b62-e952-43ac-8bee-241890ff931a";
; Registers
input InL, InR;
output OutL, OutR;
control VolL=1, VolR=1;
; code
macs OutL, 0x0, InL, VolL;
macs OutR, 0x0, InR, VolR;
end
<this should be a blank line>
Load the above plugin in the DSP.
Open kX Console and type:
ma 2 VolumeSt VolL VolR 0x7fffffff<enter>
Note: The above command is case sensitive.
Now the kX0/LineIn slider in Windows Mixer will control the volume registers of this plugin. In the DSP, connect the plugin in the pathway of whatever signal that you want to control the volume of, using that slider (eg: in between prolog and xrouting).
BTW: To set the slider back to its default setting:
Open kX Console and type:
ma 2 0 0 0 0x20000000<enter>
-Russ
Last edited by Russ; Apr 28, 2008 at 02:01 AM.
Reason: typo
|
|
|
Sep 24, 2006, 02:34 AM
|
#2
|
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 3,721
|
WAY COOL RUSS!
Is there some place that explains what can be accomplished with KX Console? - explaining the commands in more detail than the consoles '/help'
Is there a referece of windows API funcs specific to sound cards with DSP's (I see in the console help - that the MA command is to
'assign a microcode slider to DSP program')
This is hunky dory - but isnt that refering to DSP language 'microcode'? - or is that what M$ calls the interface to system sound card? Stuff like that is the knowledge in which I thirst.
|
|
|
Sep 24, 2006, 03:00 AM
|
#3
|
|
DriverHeaven Extreme Member
Join Date: Jan 2005
Posts: 4,104
|
The kX Console commands do not really have anything to do with any Windows API functions. It only controls aspects of kX, and the sound cards hardware. These commands are all a function of kX itself.
The help can be a little hard to decipher at times (and is occasionally wrong (i.e. typo)), but the source code for kxctrl is included in the SDK, and can help to understand some of the commands (if you understand the source code). Additionally, ikx.h has info on some of the parameters, etc.
Quote:
Originally Posted by Maddogg6
'assign a microcode slider to DSP program
|
That means 'assign kX slider in Windows Mixer to registers in a DSP plugin' (the usage instructions are not complete), which is what the above example does.
Currently it seems that only Master, Rec, Wave, and Synth can be reassigned.
As for the other console commands, it would probably be easiest if you just ask about the ones that you do not understand.
BTW: This functionality was Eugene's doing, I am only trying to explain how it can be used.
Last edited by Russ; Sep 24, 2006 at 03:59 AM.
|
|
|
Sep 24, 2006, 03:37 AM
|
#4
|
|
DriverHeaven Extreme Member
Join Date: Jan 2005
Posts: 4,104
|
BTW: The default (reset) values for each, appear to be as follows:
Master:
ma 0 epilog MasterL MasterR 0x7fffffff
Rec:
ma 1 epilog RecLVol RecRVol 0x7fffffff
kX0:
ma 2 0 0 0 0x20000000
kX1:
ma 3 0 0 0 0x20000000
Synth:
ma 4 0 0 0 0
Wave:
ma 5 0 0 0 0
Last edited by Russ; Mar 28, 2008 at 09:12 PM.
|
|
|
Sep 24, 2006, 09:50 AM
|
#5
|
|
DriverHeaven Senior Member
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 444
|
Is there any way to assign the synth slider to keyboard keys? (as the Master Mixer is usually the multimedia volume keys on a keybaord)... That would be very handy, we could then have multiple volumecontrols with our keys, if you never used home and end that could be a volume control, so could page up and page down 
|
|
|
Sep 24, 2006, 11:26 AM
|
#6
|
|
Tail Razer
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 3,721
|
@Russ: Ahh. Ok - I think Im beginning to understand...
@Chester & Russ:
Wouldnt you use the following to map the windows Synth Slider to Epilog Master Vol.?
ma 4 epilog MasterL MasterR 0x7fffffff
But Im not sure why your asking - as the MM keys work for me in 3538L - unless Im not seeing/understanding something..??
|
|
|
Sep 24, 2006, 12:30 PM
|
#7
|
|
DriverHeaven Senior Member
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 444
|
that is how you would map it, I am referring to assigning keys on the keyboard to control the synth slider (which in turn would control the kx driver volume control)
|
|
|
Sep 24, 2006, 01:47 PM
|
#8
|
|
DriverHeaven Extreme Member
Join Date: Jan 2005
Posts: 4,104
|
It would be easier to just control a plugin using hotkeys, and leave the Windows Mixer stuff out of it, but it could be done... You would have to write a program to do it. Look up 'Audio Mixers' and 'RegisterHotkey' in MSDN.
Do not forget about this:
Control KX with PC keys
Last edited by Russ; Sep 24, 2006 at 02:31 PM.
|
|
|
Sep 25, 2006, 10:53 AM
|
#9
|
|
DriverHeaven Newbie
Join Date: Sep 2006
Posts: 13
|
Is there a way to set console commands permanently?
When i reboot my pc, i have to write command to console again to assign synt slider to linein.
|
|
|
Sep 25, 2006, 03:26 PM
|
#10
|
|
DriverHeaven Extreme Member
Join Date: Jan 2005
Posts: 4,104
|
Hmm, that would appear to be a bug.
As a workaround, you could try creating a batch file that automatically executes the console command at startup.
i.e.
(put the following in a batch file, and put the file in the Windows startup folder)
kxctrl -ma 2 VolumeSt VolL VolR 0x7fffffff
Last edited by Russ; Mar 28, 2008 at 08:50 PM.
|
|
|
Oct 19, 2006, 11:45 AM
|
#11
|
|
DriverHeaven Junior Member
Join Date: Aug 2006
Location: Germany
Posts: 24
|
Thanks, Russ! With this little sample plugin you solved my problems. Now my tv-card volume works fine. I hope that the "reload-bug" of console commands will be fixed in later releases, but your batch-file tip is a good way too. ;-)
|
|
|
Mar 28, 2008, 08:50 PM
|
#12
|
|
DriverHeaven Extreme Member
Join Date: Jan 2005
Posts: 4,104
|
The kX0 and kX1 sliders (in Windows Mixer) are back in 3540, so this plugin can again be used with those sliders.
|
|
|
Apr 14, 2008, 01:53 PM
|
#13
|
|
DriverHeaven Senior Member
Join Date: Jun 2006
Location: Czech Republic
Posts: 1,396
|
Thanks Russ, I was afraid that I would have to use the Creative drivers because of my TV card 
|
|
|
|
|
|