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 Feb 10, 2005, 11:36 AM   #1
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

exclamation NEW: DSP Oscilloscope/Signal Plot plugin

An oscilloscope plugin for 3538.

Take a look at this picture:
http://img.photobucket.com/albums/v483/MartinTT/osc.jpg

The upper image represents a signal from a song.
The lower image represents a sine signal comming from the WaveGenerator by eyagos. It shows the difference between the two resolutions. When the resolution checkbox is unchecked you see a relatively detailed view of the signal - a sample is taken every 20ms, so the view scrolls faster. When the checkbox is checked you see a more general view of the signal - a sample is taken every 100ms, so the view scrolls slower.

The stop checkbox simply stops the plot, so it could be examined for instance.

It consumes very little CPU power, but it is very sensitive to CPU activity, so if you open another window or move the mouse and a tooltip appears or whatever the plot gets a little screwed. So to get an accurate plot you shouldn't open any windows.

http://www.angelfire.com/jazz/tigers...cilloscope.rar
(Use "Save Target As" to download, if you can't - e-mail me)
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote


Old Feb 10, 2005, 12:48 PM   #2
kX Lover
 
Samir's Avatar
 
Join Date: Jan 2003
Posts: 520
Rep Power: 0
Samir is on a distinguished road

You are getting better!
__________________
MU3NKA 3A HAPO6!
Samir is offline   Reply With Quote
Old Feb 10, 2005, 12:52 PM   #3
DriverHeaven Addict
 
Join Date: Sep 2003
Posts: 266
Rep Power: 0
PITmaster is on a distinguished road

Quote:
Originally Posted by Samir
You are getting better!
Yes
Could you prepare parametric equalizer for kX 3538. That will be very useful.

PITmaster
PITmaster is offline   Reply With Quote
Old Feb 10, 2005, 01:06 PM Threadstarter Thread Starter   #4
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

Quote:
Originally Posted by PITmaster
Yes
Could you prepare parametric equalizer for kX 3538. That will be very useful.

PITmaster
We better wait and see if Max releases the UFX. I could make a parametric EQ but without the graph, becaue it will involve many hours of work and testing, which I can't afford. You can fashion your own in the dsp window, just connect several single filter EQs in a chain and you have a parametric EQ.

Quote:
You are getting better!
The plugins I release are basicaly things I need for my own musical work and I share them with others after a few touches on the visuals.
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote
Old Feb 10, 2005, 02:11 PM   #5
Audiotecna- Representante
 
Join Date: Dec 2002
Location: Bogota, Colombia
Posts: 173
Rep Power: 0
BiCho is on a distinguished road

Quote:
Originally Posted by Tiger M
www.angelfire.com/jazz/tigersplace/files/EFX_Oscilloscope.rar
(Use "Save Target As" to download, if you can't - e-mail me)
Gives me problems when downloading using Firefox, IE works fine...
__________________
Audiotecna - Innovación Musical
Distribuidora oficial de Ortofon DJ, Native Instruments and Moog Music para Colombia (1)8073934
BiCho is offline   Reply With Quote
Old Feb 10, 2005, 07:59 PM Threadstarter Thread Starter   #6
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

Quote:
Originally Posted by BiCho
Gives me problems when downloading using Firefox, IE works fine...
Please don't...

I imagine that many people don't know what this plugin could be useful for. The main use for me is when playing the guitar or other instrument I can not only hear the signal, but actually see it, see at which exact point I get clipping, examine the attack, the character and many other aspects. This lets me set up the best comressor/limiter/expander settings for real-time use. The main advantage is that it is very fast, the plot of each "beat" so to say comes practicaly immediately and it uses very little CPU power. The main disadvantage is the screwing up when other windows (in programming terms almost everything is a window) are open and manipulated, this is due to the inefficiency of win32 GDI.

Of course I would have killed for such a plug when I was doing waveshaping for the TubeDrive, because I had many soft-clipping functions each with a different character and this would have made the work much easier.

If there is interest I could make future improvements.
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote
Old Feb 10, 2005, 08:40 PM   #7
DriverHeaven Addict
 
Join Date: Dec 2002
Posts: 259
Rep Power: 0
eyagos is on a distinguished road

An osciloscope very usefull. Conglaturations!!
eyagos is offline   Reply With Quote
Old Feb 10, 2005, 08:48 PM   #8
Apple Fanboy?
 
dj_stick's Avatar
 
Join Date: Jun 2003
Location: Basement of the first floor
Posts: 17,485
Rep Power: 190
dj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his statusdj_stick is godlike in his status
System Specs

to download angelfire files you need to use IE - Firefox won't work
__________________
Chris - The Aussie Super Mod
Hardwareheaven Rules - Sig Request Thread

How you can help HardwareHeaven by using Digg!

Hardwareheaven Super-Moderator

Quote:
Originally Posted by OmegaRED View Post
You know, there's "off topic" and then there's so freakin' off topic it you gotta wear a straitjacket to join the conversation.
dj_stick is offline   Reply With Quote
Old Feb 10, 2005, 10:39 PM   #9
HardwareHeaven Extreme Member
 
Join Date: Jan 2005
Posts: 5,561
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!

Looks pretty cool

Does it have more than one input?

I have been playing around with ASIO-Scope (and some others), and I liked that it could display two signals at the same time, or each one independantly. I found it useful to be able to have the dry signal in one input, and the wet signal in the second, so I could see exactly how the effect modified the signal, etc.
Russ is online now   Reply With Quote
Old Feb 11, 2005, 03:43 AM   #10
DriverHeaven Senior Member
 
Daniel Drummond's Avatar
 
Join Date: Dec 2002
Location: Brazil
Posts: 1,137
Rep Power: 0
Daniel Drummond is on a distinguished road

Just load as many instances of the plugin as you wish (or can) Russ.
__________________
www.palcomp3.com.br/ed
Daniel Drummond is offline   Reply With Quote
Old Feb 11, 2005, 04:15 AM   #11
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

Very nice, was this inspired by my inquiry about an oscilloscope? just curious. Also, can we resize it? (make the window a bit bigger)

btw, try playing a 32 hz sine wave into it
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...

Last edited by Chester01; Feb 11, 2005 at 04:22 AM.
Chester01 is offline   Reply With Quote
Old Feb 11, 2005, 07:06 AM Threadstarter Thread Starter   #12
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

Quote:
Originally Posted by Chester01
Very nice, was this inspired by my inquiry about an oscilloscope? just curious. Also, can we resize it? (make the window a bit bigger)

btw, try playing a 32 hz sine wave into it
No, I've been thinking of making this for a while and I found a good histogram class on the net, so I modified it and made it into this.

At the moment it would not be practical to resize it, I first have to find a way to stop it screwing up so much.
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote
Old Feb 11, 2005, 09:05 AM   #13
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

Nifty tool Tiger..!!

/LeMury
Lex Nahumury is offline   Reply With Quote
Old Feb 11, 2005, 09:24 AM Threadstarter Thread Starter   #14
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

Since you entered the topic Lemury, I have to ask you something.

The oscillator screws up when the CPU does something intensive. I've found that this is not from the GDI drawing, so it might be caused either by irregular calls to OnTimer or get_param causes problems. I believe it might be the latter. What do you think?

EDIT: I meant get_dsp_register of course, not get_param.
__________________
Miss you, Steve...

Last edited by Tiger M; Feb 11, 2005 at 09:41 AM.
Tiger M is offline   Reply With Quote
Old Feb 11, 2005, 12:37 PM   #15
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

Hard to tell without profiling.
I don't think it's the plugin->get_dsp_register(..) call itself.
I suspect the plot class and/or timer implementation or maybe even kX.

I had similar problems with the 8x Vu meters in mx6. CPU usage went crazy.
The calls to kPeak's set_value(..), which does the seperation drawing,
uses up quite some cpu power.
Instead of lowering the timer I now only call set_value(..) when there actualy is a difference.
Cpu usage dropped down from ~50% to almost zero..!
So in my case get_dsp_register(..) is called alot of times (8x2 per timer interval) without problems.

Anyway;
To rule out possible 'kX GUI interference' you could easily write a dialog based w32 test app
using your plot class, multimedia timer and only iKX interface to access dsp registers.

You could even bypass kX driver completly by low level accessing all the cards registers directly.
(I've done this quite extensivly to get a picture what's really going on 'under the hood')
Review Max.M's Spyvoice util for details if you haven't already.

/LeMury
Lex Nahumury is offline   Reply With Quote
Old Feb 11, 2005, 01:13 PM Threadstarter Thread Starter   #16
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

Thanks for the advice, I'm shure that it's not the plot class, because I tested the plugin with a slider and a CEdit, the values of which were changed the same way in OnTimer. The behaviour is exactly the same.

The thing is that the plugin itself uses very little CPU power - 1-2%, but when the cpu does something else this immediately reflects to the plot.
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote
Old Feb 11, 2005, 02:18 PM   #17
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

Yes I see it uses almost no cpu.
Hmm,.. Isn't is just a design error in your algoritme?
Maybe both in C and microcode?
I mean stuff like;
- do you compensate for the asynchrone register access. (sample&hold, interpolation etc.)
- Judging from your code you read directly from the Input.
Have you tried storing input data in a static first then read out?
etc. etc.

It looks like samples are beeing skipped (missed)

Anyway, No doubt you'll find it.

/LeMury
Lex Nahumury is offline   Reply With Quote
Old Feb 11, 2005, 03:43 PM Threadstarter Thread Starter   #18
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

Quote:
Originally Posted by LeMury
Yes I see it uses almost no cpu.
Hmm,.. Isn't is just a design error in your algoritme?
Maybe both in C and microcode?
I mean stuff like;
- do you compensate for the asynchrone register access. (sample&hold, interpolation etc.)
- Judging from your code you read directly from the Input.
Have you tried storing input data in a static first then read out?
etc. etc.

It looks like samples are beeing skipped (missed)

Anyway, No doubt you'll find it.

/LeMury
The behaviour is obviously normal when there is no interference, so generally it works good. Each pixel represents a sample taken every 20ms or 100ms (I'll implement a slider for that if I manage to fix the problem). So when there is interference by other apps it seems that the values simply get inacurate but still in the range of 1.0 and -1.0 and close to the values they should represent(I'm testing it with the wave generator, so I'm pretty shure what the signal should look like ).

I tried with a static reg, but the result is the same. There are very few opereations performed in OnTimer, just the call to get_dsp_register, formula for converting UINT/DWORD to double and a call for updating the value of the plot.

What I noticed is that when the dialog is on focus the plot is fine, but when the dsp window gets minimized or closed and the dialog loses focus it gets screwed, so I'm guessing it must be the kX gui and don't know a fix for that.

For instance, when I play a mp3 and winapm's dialog is maximized (still testing with a sine from WaveGen) the plot is screwed and when I minimze winamp the plot is ok.

Please share your thoughts on that.
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote
Old Feb 11, 2005, 09:23 PM   #19
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

Hmm,..Ok, yes I see why you suspect the get_dsp_register() call since somehow/sometimes
you manage to read/get garbage from it.
Some thoughts;
-IIRC, get_dsp_register() returns an error code. Do you check it?
-maybe the timer gets messed up somehow

Didn't the plot class came with an demo/example?
If so, it has to be w32 dialog app which you could modify to read via ikx interface.
Just to trace down the problem.

/LeMury
Lex Nahumury is offline   Reply With Quote
Old Feb 11, 2005, 09:51 PM Threadstarter Thread Starter   #20
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

Quote:
-IIRC, get_dsp_register() returns an error code. Do you check it?
good idea, it does return an integer, but I'd have to test what it exactly represents and how should I interpret it. I'll have to check if it returns 1 or 0 on error or whatever...

Quote:
Didn't the plot class came with an demo/example?
If so, it has to be w32 dialog app which you could modify to read via ikx interface.
Just to trace down the problem.
In the end, if nothing else works I might have to... I'm scared even just thinking of this final mesure
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote
Old Feb 12, 2005, 12:32 PM Threadstarter Thread Starter   #21
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

Ok, now I'm convinced the problem is inefficient access to the dsp registers through get_dsp_register.

I created some code for sine wave generation in OnTimer, removing all previous routines. The sine is ploted perfectly no matter what the CPU does or how loaded it is.
See this picture:
http://img.photobucket.com/albums/v4...inTT/proof.jpg

The conclusions:
1. The problem is not caused by the timer, it works perfectly
2. The problem is not caused by the GDI drawing routines in the plot class or the plot class as a whole.
3.The problem is not caused by the kX GUI.
4.The problem must be caused by the access to the dsp register holding the current value for the plot.

I've noticed something else, when the value of the register is 0, the plot always displays 0, the screwing up occurs only when the value is different from 0.

This brings the question if the peak meters in kX are absolutely accurate, since they also make use of get_dsp_register.

I think Eugene could explain this issue.
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote
Old Feb 12, 2005, 12:56 PM   #22
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

peak does have problems, try addinga wave generator plugin, the default output is -3.0 db, peak will read -3.5. Also, if you set wave gen to 0.0, and you put a gain hq in parallel then set to -3.0 db, peak will read -3.5, unless both use the same gain code, we can assume that peak has a problem. (a slight problem)
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Old Feb 12, 2005, 01:17 PM   #23
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 Tiger M
I've noticed something else, when the value of the register is 0, the plot always displays 0, the screwing up occurs only when the value is different from 0.
But what happens if you read a fixed non-zero, non fluctuating value from dsp register?
(I believe you mentioned doing that)
If your theory about get_dsp_register() is right, it should srew up the straight plot line as well. Right?

/LeMury
Lex Nahumury is offline   Reply With Quote
Old Feb 12, 2005, 02:21 PM Threadstarter Thread Starter   #24
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

OK folks, I've figured everything out!

The problem is in the dsp WaveGenerator, not in the oscilloscope. Pretty surprising turn of events.

Take a look at this image:
http://img.photobucket.com/albums/v4...TT/finally.jpg
(maximize it to get rid of the artifacts in the browser)

I used Adobe Audition's wave generator, sent the output to wave 0/1 and connected the oscilloscope to it via a Src (as you can see I made it bigger, but still it exibits very low CPU usage).

I set it to generate 1Hz sine at approx -6dB, and as you can see the plot is 100% perfect!

So the problem is not get_dsp_register, it works perfect.

To all who intend to use the EFX Oscilloscope - IT WOKS PERFECT, THE PROBLEMS I REPORTED EARLIER DO NOT COME FROM THE PLUGIN.

I'll fashion an improved version and release it in the comming days.

Thanks for your idea in the previous post LeMury. I figured everything when I fashioned a simple plugin with a slider that outputs the value of the slider and tested the oscilloscope with it. The plot was perfect so at that point I pretty much became aware what was going on. Thanks.
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote
Old Feb 12, 2005, 02:34 PM   #25
HardwareHeaven Senior Member
 
Join Date: Jan 2004
Location: St. Cloud, MN
Posts: 492
Rep Power: 0
Chester01 is on a distinguished road

I have noticed a pixel worth of shift down (you can see the dotted line above the straight line when no signal is present, wouldnt it be on the dotted line?)
__________________
COMP: Dual Intel PIII 733 Mhz; GeForce 4 Ti 4600; 1.128 Gb RAM; SB0350 (Audigy 2 ZS Platnium)
STEREO(I UPGRADED):Crown Audio K1 and K2 amplifiers (4000 watts at .1% THD ), JL 13w7 Subwoofer (6.5 CF) (2) 18" PR's, Klipsch SB-1's, some cement blocks for speaker stands...
Chester01 is offline   Reply With Quote
Old Feb 12, 2005, 05:01 PM   #26
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:
So the problem is not get_dsp_register, it works perfect.
Good. That part is what I expected.

So the wavegen produces glitches/spikes under cpu load? Is that what you say?

/LeMury
Lex Nahumury is offline   Reply With Quote
Old Feb 12, 2005, 05:25 PM Threadstarter Thread Starter   #27
kX user
 
Join Date: Apr 2004
Posts: 851
Rep Power: 0
Tiger M is on a distinguished road

Quote:
So the wavegen produces glitches/spikes under cpu load? Is that what you say?
I thought so at first, but then I tested the WaveGen with Adobe Audition and there doesn't seem to be any problem with it. But there is no problem with the oscilloscope either - I'm 100% shure after a lot of thorough testing. I'm puzzled again, but I'm happy that the osc works as I intended.
__________________
Miss you, Steve...
Tiger M is offline   Reply With Quote
Old Feb 12, 2005, 10:47 PM   #28
DriverHeaven Addict
 
Join Date: Dec 2002
Posts: 259
Rep Power: 0
eyagos is on a distinguished road

Quote:
So the problem is not get_dsp_register, it works perfect.
Well, thats true. But this function is asinchronous, and probably it is not instantaneous:

- Why a low frecuency wave is ploted "well"? Because the change between 5 or 6 (in example) sample values is vey small.

- Why an high frecuency wave is not? Becuase the change between 5 or 6 sample values can be as greater as the total amplitude.

Maybe that get_dsp_register takes a short time (4 or 5 sample times) to give back the value, due to interruptions, delays, eficiency, .... (who knows).
eyagos is offline   Reply With Quote
Old Feb 12, 2005, 11:38 PM   #29
DriverHeaven Senior Member
 
ROBSCIX's Avatar
 
Join Date: Mar 2004
Posts: 1,732
Rep Power: 0
ROBSCIX is on a distinguished road

Another great addition. You the man tiger.
ROBSCIX is offline   Reply With Quote
Old Feb 13, 2005, 01:35 AM   #30
DriverHeaven Addict
 
Join Date: Dec 2002
Posts: 259
Rep Power: 0
eyagos is on a distinguished road

Have you tried to see what happens with an 8000Hz sine wave ??
eyagos is offline   Reply With Quote
Reply

Thread Tools