|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
DriverHeaven Newbie
Join Date: Dec 2007
Posts: 2
Rep Power: 0 ![]() |
Tiny plugins, new member
Hello everybody!
I'm new to the forum, but not new at all at Kx! I've been using it since the "modified" APS drivers didnīt work anymore (WinXP). So, first of all, my big, big thanks to all of the team that let me make so many years of audio and music production using my Live! I've done two little dsp plugins yesterday, after reading some code. Theyīre not a big thing, just consider them a tiny collaboration to the cause. First one, I call it "Distributor". It routes a stereo signal to either two stereo outputs, but it makes a crossfade from out1(LR) to out2(LR). You could see it as the Crossfade plugin the other way around. I needed it to make a smooth transition between my two outputs, each one feeding a different power amp. The second, is named "Karaoke Crossfade". It uses the principle of summing the left and right channels with inverted phases to cancel the "central channel", that is, everything that is the same in both channels. The crossfade lets you choose the signal completely "Dry" at right, or completely "Karaoked" at left. This due to the fact that, depending on the audio material, the effect can be too extreme, leaving just a little of the original audio. Theyīre given "as it is" . I mean, there must be other ways to program this, and Iīd like your commentaries and suggestions.My first question (what do you think this is all about?) is, To develop any gui itīs necessary to combine this with c++, isntīt it? Even in simple cases i've seen code without "Control" keyword in it (for faders, etc.) Thank you, Pablo PD: Crop the file name so that it finishes in .da (I had to add the .txt extension to upload files) |
|
|
|
|
|
#2 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Welcome to the forum
.Yes, C++ is needed to make any GUI controls beyond the basic 0 to 100% slider that the "control" keyword gives you. Regarding your plugin code: Distributor: I do not think this is gonna do exactly what you want. The problem is that you are not just doing a fade, you are also increasing the volume of the side you are fading to, when (I think) what you wanna do is keep the volume at 100% at one output and decrease the volume to the other based on the slider position. This is one of those plugins might be better to do in C++, since you can set different parameters based on the position of the slider. What you probably want is something like the following: (psuedo-code) Code:
if (slider_value = 0.5)
{
vol1 = 1;
vol2 = 1;
}
if (slider_value < 0.5)
{
vol1 = 1;
vol2 = slider_value * 2;
}
if (slider_value > 0.5)
{
vol1 = (1 - slider_value) * 2;
vol2 = 1;
}
Karaoke Crossfade: As a general rule, you do not want to use input registers more than once in your code. You might consider using the "interp" instruction for Wet/Dry mixing. Last edited by Russ; Dec 15, 2007 at 04:09 AM. |
|
|
|
|
|
#3 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
BTW: My "Stereo Balance Plus Fade" plugin does similar to what you are trying to do with the "Distributor" plugin (except it includes balance as well). Check it out if you want. You can download it here.
Last edited by Russ; Nov 9, 2009 at 05:37 PM. |
|
|
|
|
|
#4 |
|
h/h member-shmember
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69 ![]() ![]() ![]() ![]() ![]() ![]() |
[color=gray]Wow! with all these years in C/C++, i have completely forgotten that "Out-AB" is a valid variable name in the Dane. I even could not believe it first (had to check the sources) - and... yes! - even if it looks more like easter egg - Dane allows to use "+", "-" and "." characters in symbol names
[/color]
|
|
|
|
|
|
#5 |
|
HardwareHeaven Extreme Member
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62 ![]() ![]() ![]() ![]() ![]() ![]() |
Regarding the "Distributor" plugin:
Here is a hint that should make it work more like how (I think) you want it to (using Dane only): Instead of multiplying the input by 2, try the following logic: Volume for the first output is: slider_value * 2. Volume for the second output is: (1 - slider_value) * 2. Factoring in saturation, the above should do the job (without the need for any conditional logic). Last edited by Russ; Dec 15, 2007 at 04:06 AM. |
|
|
|
|
|
|
|
DriverHeaven Newbie
Join Date: Dec 2007
Posts: 2
Rep Power: 0 ![]() |
Thanx for the quick answer. Russ, yeah, youīre completely right. After using it a few minutes i figured out that it should work as a "balance" knob in a mixer, and it was not. Just as you say.
I think Iīll instruct myself on how to interface c++ and dane and then keep trying other things. C++ is much human-friendly, of course!! I once adventured into programming z80's assembler, and remember those huge codes for simple tasks! If I canīt find the info about c++ and dane, iīll ask. Donīt have much time now. Thx again |
|
|
|
![]() |
| Thread Tools | |
|
|