ForumsDIY ← dsp question


i've read the paper for your 8 x 8 control surface. i haven't read the Max implementation yet, but before i do, i was wondering a couple of pretty basic things 'theory of operation-type things. i am a bit of a noob on the dsp front and lots of other fronts too, but here goes ...

I have got to the point where I have a set of 8 ffts for the antenna sample sets I have taken. I can see magnitude real data and imaginary phase data ... I can discard a lot of the bins as empty. and I end up with a 64 sample data set , having statred with 32 point ffts x 8 ...sample rate 1/32 of original.

What next? how do I extract velocity information from this set? i suppose that there will be discontinuities in the phase information due to the decrease in distance between transmitter and antenna, and spotting them gives you position, but how do you pick up on velocity? Does the magnitude of the wave change in a noticeable way over such a short distance?

Also why do you upsample / filter the data set? is that to get a better look at 'points of interest' .... but what are they?

Edit: I re-read, and I guess you are using real magnitude, based on inverse squared....? I never thought about that working on a 'micro' level..

Assuming I got that right, what is the b-spline filter for? can't you just access the magnitude data directly in C++?

Final edit: so, is the b-spline filter for feeding the magnitude data into waveguide synthesis?? I could just access the magnitude date for "MIDIFYING" purposes myself without waveguide synthesis ... that said, I am interested in how the filtering gives you a signal to be fed into the synthesis engine, and how that synthesis engine works .... fascinating (if true).

I remember the B-spline is only needed for the audio synthesis. If you just want a controller, you are probably fine using the magnitude data directly. There is a paragraph somewhere in my thesis about the filtering being in some sense optimal. It doesn't preserve all the bandwidth but for sending controller data to an audio signal it's probably more important to avoid audible glitches.

how do I extract velocity information from this set?

Phase is just a detail of the FFT, which is being used as a multiplexer for real data. So you put real data in and get real data out. The magnitudes are proportional to 1 / distance. So the range of physical distances you use is very important. Having the magnitudes you take the inverse to get position and to get velocity you take the derivative.

Thankyou for your help!

sorry for the noob questions

... the transmitter sine waves .... I take it you need to have a fair bit of power in them 15 volts p-p? I suppose the distance between transmitter and pickup matters?

Also in the layout of the transmitter and the pickup, what is the optimal distance between strips to stop cross-talk.. I understand there is no ground plane around the pickups in your current design ...have you moved the pickups closer together or maintained separation.

And when you talk about the derivative of the magnitude to give velocity, could you not use 'absolute' magnitude on the basis that less distance means more force? Or is the design less for striking and more more for touching (in which case velocity is not so relevant anyway??? Perhaps we are talking at cross purposes ...true velocity vs MIDI velocity.

anyway, thankyou for all your work. And I see you have a patent!! Wow. so cool. thankyou for taking the time to help diy ers like myself.

but why is magnitude 1/distance, and not 1/ distance squared?

That is a very hard question to answer. Why do the laws of physics do one thing and not another in this case? It would be a long answer and I would have to look a bunch of stuff up. And then ultimately we would get to some aspect of quantum electrodynamics as we currently understand it and then same question would be there: why is it that way? And ultimately, we don't know.

I guess maybe the question you really want answered is, why do I say it is one over the distance, how do I know that? And the reason is that I looked up the equation for the capacitance between parallel plates. I really don't understand it any more deeply than that. 15 volts p-p?

sure, or whatever your audio interface is capable of putting out. It would depend on the interface. What you don't want is distortion. So use an oscilloscope or similar and make sure you don't have it.

what is the optimal distance between strips to stop cross-talk

I used to use bigger gaps but capacitance between the edges is very small. a few mm should be fine.

Or is the design less for striking and more more for touching

The design is for striking, touching, whatever. So as a basis for all these things you need an accurate position, the rest of the behavior depends on whatever you do with that data. Most of the time I am controlling envelopes directly with pressure. Or in a physical modeling setup I may be adding energy with velocity. I don't think about MIDI ever unless I have to, it is very limiting.

My overall advice as always is just to experiment with one or two junctions before you build a whole array.