HardwareHeaven.com

HardwareHeaven.com

Looking for the skin chooser?
 
 
  • Home

  • Hardware reviews

  • Articles

  • News

  • Tools

  • Gaming at HardwareHeaven

  • Forums

 

Go Back   HardwareHeaven.com > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > Effects and the DSP


Reply
 
Thread Tools
Old Jun 14, 2006, 12:12 PM   #1
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

Any midi controlled detuner in the DSP?

Just wondering...

Is there any fx in the DSP that can be used as a midi-controlled detuner?

The idea was to use it as a tremolo in a guitar (wich doesn't have it), for example simulating a slight detune of the strings (like when the lever is pushed down) with an expression pedal and going back to the original (unaltered) tune once the controller returns to zero. The transition would have to be smooth.

Anybody willing to code this?

specs:

- detune range
- modes: detune down only (0-127), detune up only(0-127), detune up/down (0-64, down;64-127, up), vibrato mode (0-127 controls the intensity). Can be 4 different sliders as well (takes a lot of pedals, lol).
- controller threshold set (example: (0-127) set for 10, acts as if it was 0 for values below 10.

Thanks.
JGSF is offline   Reply With Quote


Old Jun 14, 2006, 01:11 PM   #2
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

I think a detuner like you want would be difficult to implement in the DSP.
To do such a thing, you would need to be able to detect the frequency of the signal, and there is not really enough resources in the DSP to do FFT and stuff like that (afaik). I think the closest you would get is a pitch shifter like the APS Pitch plugin (and I do not think you would get anything close to what a real tremelo bar does).
Russ is offline   Reply With Quote
Old Jun 14, 2006, 01:59 PM Threadstarter Thread Starter   #3
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

Well, correct me if I'm saying any bullsh*** (I'm not an expert on this), couldn't that be done with some kind of LFO or something? Just using the descendent curve of the sine?

Even if you can't fully control the detune you could at least have a momentary detune that could be triggered by a switch or something.

Is it possible that way?
JGSF is offline   Reply With Quote
Old Jun 14, 2006, 04:25 PM   #4
Tail Razer
 
Maddogg6's Avatar
 
Join Date: Jun 2005
Location: Bernyurass, AZ - USA
Posts: 4,027
Rep Power: 0
Maddogg6 will become famous soon enoughMaddogg6 will become famous soon enough

theres 2 different kinds of 'tremolo'
1) like on a guitar amp - this modulates volume
2) tremolo bar on guitar - affects note pitch

both are *possible* - but as Russ already stated - KX DSP based pitch shifting is rather crappy. Yes, It works - but its 'low-fi'. Thus, it wont sound as good as say Digitech's 'Whammy Pedal' - as it seems thats what your going after.

With the 'APS pitch shifter' (or most any KX plugin) - you should be able to 'midi control' the pitch control via KX Automation.

OR to emulate #1 - above - theres a 'vibrato' plugin.
Maddogg6 is offline   Reply With Quote
Old Jun 17, 2006, 02:55 AM Threadstarter Thread Starter   #5
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

I think APS pitch will be able to do it, but I would need a small modification to the APS pitch code to be able to set a minimum and maximum pitch range, is this easy to do?

Thanks.
JGSF is offline   Reply With Quote
Old Jun 17, 2006, 05:45 AM   #6
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

That would depend on how much you want to change the range. If you wanted to use a narrower range it would not be difficult, but I am not sure a wider range would be possible (and any changes would need to be done in C++).

Additionally, it is one of the EMU/Creative Labs effects, so I am not sure that we should mess around with it.
Russ is offline   Reply With Quote
Old Jun 17, 2006, 12:05 PM   #7
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Quote:
Originally Posted by Russ
..Additionally, it is one of the EMU/Creative Labs effects, so I am not sure that we should mess around with it.
I really doubt anyone would mind if someone
would improve that code.. .

/Lex.
Lex Nahumury is offline   Reply With Quote
Old Jun 17, 2006, 01:49 PM Threadstarter Thread Starter   #8
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

Yes, I would like to be able to use a narrower range...

Such as 0,-2.(midi: 0=0;127=-2).

Thanks.
JGSF is offline   Reply With Quote
Old Jun 17, 2006, 02:51 PM   #9
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Ok, I did a quick modification to change the range to -2..0
You can download it here.

I changed the GUID so it will not replace the original APS Pitch, and changed the name to "APS Pitch (nr)". See if that works the way you want it to.
Russ is offline   Reply With Quote
Old Jun 17, 2006, 03:14 PM Threadstarter Thread Starter   #10
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

Thanks, Russ! Works great betwen my line in input and asio 00/01 routed to my guitar VST.

Awesome!

If you could this easily, I would just ask you two more things:

1 - If you could invert to 0,-2 instead of the actual -2,0 since it's more easy to control with the foot pedal (with the actual implementation 127 is 0 and 0 is -2). So it detunes when the pedal is pressed down (0,-2).

2 - It would be a cool feature If the minimum and maximum range could be set, although personally I'm happy with a -2 semitone detune range.

JGSF is offline   Reply With Quote
Old Jun 17, 2006, 03:18 PM   #11
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Ok, I think I can change it to 0..-2 easy enough.
As for setting the min/max range, it might be possible, I will have to think about it.
Russ is offline   Reply With Quote
Old Jun 17, 2006, 04:05 PM   #12
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Making it go from 0..-2 is a little more complicated than I thought.
I was able to reverse the slider, but the automation is acting up when I do that.
I need to do more testing with it, but I do not have the time at the moment. I will see, if I have time to work on it a later today.
Russ is offline   Reply With Quote
Old Jun 17, 2006, 04:42 PM Threadstarter Thread Starter   #13
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

Ok
JGSF is offline   Reply With Quote
Old Jun 17, 2006, 06:57 PM   #14
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Ok, I figured out why the automation was messing up. It was because I was testing with a saved automation config, and did not realize that it saved the parameter ranges as well. You can download the new version from the link above (make sure you redo the automation settings, rather using a saved config). Try it out it and make sure it works right for you.
Russ is offline   Reply With Quote
Old Jun 18, 2006, 03:03 AM   #15
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

@Lex,
Do you know how to modify kX Automation ranges (min/max values) dynamically?

I have tried changing _param_descr[].max_value, etc. but that does not seem to take effect if the automation settings are allready defined. If I unmap that automation parameter (that I changed) and then remap it, it then uses the new value, but not until then. Any ideas?

<edit>
Nevermind. I guess I do not need to modify the range. I should be able to just rescale the values depending on the desired range, rather than actually changing the range. I think it would probably work better that way anyway.
</edit>

Last edited by Russ; Jun 18, 2006 at 04:41 AM.
Russ is offline   Reply With Quote
Old Jun 18, 2006, 06:23 AM   #16
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

I made some modifications to the plugin:
The main plugin is back to the normal APS Pitch range.
The limited ranges are now only related to automation:
The original automation parameters are unchanged.
The new automation parameters are as follows:
Auto Max Range Up: Set the MAX range for pitch shifting up (default is 2, range is 0 to 12.50).
Auto Max Range Down: Set the MAX range for pitch shifting down (default is -2, range is 0 to -12.50).
Auto Up: Pitch shift up only (0 to Auto Max Range Up).
Auto Down: Pitch Shift Down only (0 to Auto Max Range Down ).
Auto Pitch: Pitch shift up or down (Auto Max Range Down to Auto Max Range Up).

Renamed plugin to APS Pitch (v2).

Give it a try and let me know if there are any problems, etc.
Russ is offline   Reply With Quote
Old Jun 18, 2006, 02:45 PM Threadstarter Thread Starter   #17
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

Sweet, I'm gonna try it right away... Thanks!
JGSF is offline   Reply With Quote
Old Jun 18, 2006, 03:33 PM Threadstarter Thread Starter   #18
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

Uh, Russ, only the pitch and level parameters show up in the DSP gui, although the other ones are shown in the automation... Couldn't try it.

I'm using 3538J.
JGSF is offline   Reply With Quote
Old Jun 18, 2006, 04:01 PM   #19
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Yeah, I did not add a GUI for those parameters as I did not think they should be part of the main gui (as they only effect automation stuff). I might add something later, but for now, you should be able to set the values (approximate value) using automation.

i.e.
Auto Max Range Up/Midi message values: 0 = 0, 127 = 12.50
Auto Max Range Down/Midi message values: 0 = 0, 127 = -12.50
Auto Up/Midi message values: 0 = 0, 127 = Auto Max Range Up
Auto Down/Midi message values: 0 = 0, 127 = Auto Max Range Down
Auto Pitch/Midi message values: 0 = Auto Max Range Down, 64 = 0, 127 = Auto Max Range Up

You should be able to approximate any values in between.
Also, you can see the Pitch slider move when you send the midi message to change pitch, so you can also use that to figure out the exact values.

Additionally, you should be able to test with the default values, if you do not feel like setting the values using automation.
i.e. (defaults)
Down Only: 0 to -2 (0 to 127)
Up Only: 0 to 2 (0 to 127)
Down/Up: -2 to 2 (0 to 127, centered on 64).

I will probably add some kind of gui for that stuff at some point, I just have not decided how I want to do it yet.

Last edited by Russ; Jun 18, 2006 at 04:09 PM.
Russ is offline   Reply With Quote
Old Jun 18, 2006, 04:40 PM Threadstarter Thread Starter   #20
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

Hum, I still couldn't work with it, the automation in the max/up range parameters seemed to have no effect, only in pitch/level but maybe it's a problem with the midi automation I made. I'll give it another go later, right now I have to go study for an exam (eeec).

Thanks for your time.

cheers.
JGSF is offline   Reply With Quote
Old Jun 18, 2006, 04:50 PM   #21
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

It should work.
I tested it using MIDI-OX to send the messages to kX Control to set the ranges, and I used the pitch wheel in VST-Host (set to output to kX Control), as well as MIDI-OX, to send the message to modify the pitch, and it worked for me (for all 3 types of pitch change). Make sure that you are using the AUTO automation paramters, and not the original ones (i.e. Level/Pitch), as the original one's are uneffected by the range settings. Aslo, be sure that you are sending the midi messages to kX Control (if you are using software to do it).

Quote:
I'll give it another go later, right now I have to go study for an exam (eeec).
Good luck on your exam
Russ is offline   Reply With Quote
Old Jun 18, 2006, 10:50 PM Threadstarter Thread Starter   #22
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

Thanks. I still haven't played around with the last version, but I forgot that simply inverting the midi controller (in the hardware controller itself) will make it detune when the pedal is pressed down and return to 0 when it's lifted up again. dope! (Why didn't I think of it before)

Another thing I haven't noticed before: APS pitch seems to induce some perceivable latency, although only a few ms, but it's there. Do you think anything could be done to solve that or it implies deep code changes?
JGSF is offline   Reply With Quote
Old Jun 18, 2006, 11:44 PM   #23
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Quote:
Originally Posted by Johnny1982
Another thing I haven't noticed before: APS pitch seems to induce some perceivable latency, although only a few ms, but it's there. Do you think anything could be done to solve that or it implies deep code changes?
No, the latency involved is a core part of how the pitch shift is implemented (using delay lines).
Russ is offline   Reply With Quote
Old Jun 19, 2006, 03:45 PM   #24
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Ok, I added the range settings for kX Automation to the GUI, and updated the link.

Remember that those settings do not effect the 'Pitch' automation parameter nor the slider (they still use the full range). Use the Auto Up/Auto Down/Auto Pitch (depending on what type of control you want) automation parameters instead.
Russ is offline   Reply With Quote
Old Jun 19, 2006, 04:55 PM Threadstarter Thread Starter   #25
HardwareHeaven Senior Member
 
Join Date: Jul 2004
Posts: 452
Rep Power: 0
JGSF is on a distinguished road

It's working great, Russ! Kudos for you.

Now I gotta mess with the buffer settings to see if I can reduce the small glitches I hear sometimes due to value changes...

Cheers!
JGSF is offline   Reply With Quote
Old Jun 19, 2006, 05:49 PM   #26
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

Some glitches may be due to the scaling, as the transition from one value to the next value (midi message value), is not going to equate to the next pitch slider value, so the values will jump a little bit (it will jump more, the wider the range is, but I do not think it will ever be more than @1/3 of a semitone).

i.e.
Going from the 128 possible midi values to 1251 (full range up or down) possible plugin setting values, obviously you cannot represent all the possible values. The up/down pitch (Auto Pitch), will suffer the worst, since it uses only half of the possible midi values to do the scaling (i.e. centered on 64, covering a range of 1250 (when using the full range) on each side, etc). Only a max range of +/- 1.27 would map one to one, with the slider values (when using the down only, or up only automation parameters).

BTW: I just noticed a small bug with the code to display the slider value (a bug in the orignal APS Pitch plugin as well). Sometimes it shows 10ths, when it should be 100ths. In any case, it only effects the value displayed and does not effect that actual range, nor the value used in the microcode. I will fix it when I have a chance.

Last edited by Russ; Jun 19, 2006 at 08:36 PM. Reason: typo
Russ is offline   Reply With Quote
Old Jun 19, 2006, 06:05 PM   #27
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

I updated the plugin with the bug fix mentioned above.
Russ is offline   Reply With Quote
Old Jun 19, 2006, 07:58 PM   #28
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Quote:
Originally Posted by Russ
Some glitches may be due to the scaling, as the transition from one value to the next value (midi message value), is not going to equate to the next pitch slider value, so the values will jump a ...
If code and resources permits we generaly solve this through 'parameter smoothing'.

/Lex.
Lex Nahumury is offline   Reply With Quote
Old Jun 19, 2006, 08:12 PM   #29
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,563
Rep Power: 62
Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!Russ is just super!

I think we are only talking about 1/3 of a semitone (max) here, so it should not be too bad (considering that this pitch shift implementation is not an exact thing anyway (afaik)).

Also, I did not really want to change the microcode (because it is Creative/EMU's code).
Russ is offline   Reply With Quote
Reply

Thread Tools