"Fred, why do you need a digital filter, while PSoC has analog (pseudo) blocks for filtering such as BPF?"- Ilya
Couple of reasons..
1.) I want to use the analogue blocks (particularly the SC blocks) for other analogue functions - even with the biggest PSoCs analogue resources are limited.. The DFB is a spare resource on the PSoC - Its there, does not consume anything which could be used for some other purpose, I am not using the DMA for anything, so can assign this exclusively for use by the DFB (although this is not essential - the DMA is powerful enough to handle multiple operations without hassle - I may use it for other operations as well), and the DFB has 2 "channels" each capable of implementing complex filters, so it seemed ideal for my application.
2.) My volume antenna is, in fact, an antenna "array", which detects hand position and provides X,Y and Z 'vectors' - (Z is the vertical, or 'volume' component) - I want to use X and Y to select the formant - effectively use X to tune the first formant, Y to select the 2nd formant.. Then hopefully compute other formants from X and Y and program filters (bandpass) using this data.
The idea is that the player can move their hand in the 'volume' field and actually get the theremin to sing recognisable vowels - I have an analogue prototype of this, but the formants are not particularly strong.. Having heard the EH "Talking Machine" I can now hear what is possible using DSP, and just want to explore this a bit (as I have time on my hands).
But - It looks like real-time manipulation of the coefficients is a lot heavier than I had imagined.. The EH-TM has selectable vowels, but does not vary these in real time - I could do this now (simply load up a different set of coefficients when the user selects a different vowel) - but 'morphing' between vowels in real-time (without any audio glitching) may be beyond reach at this time (certainly seems beyond my reach!) - so I think I need to be looking at more elaborate analogue filters... Unless I really master DSP and used the DFB assembler to write my own filter code and configure a new DFB "BPF component" with simpler controll over frequency.
I had thought about splitting off the functions into two seperate PSoCs - but there actually is little point.. The analogue filter implementations in the PSoC are actually inferior to what one can achieve with off-chip circuitry. There are some analogue functions where the PSoC can do things which would require quite complex off-chip circuitry to implement, but analogue filters are not one of these..
So, if I dont use the DFB, there is no point in adding another PSoC to implement the filters in its analogue blocks.
ps .. The analogue blocks in the PSoC are not "pseudo" - they are real analogue hardware, and run without any digital processing - one only needs 'digital interference' with them during configuration (the blocks are like components which are not connected together - configuration connects or 'wires' the circuit - putting resistors and capacitors etc into the circuit, setting component parameters, routing the interconects to other blocks / pins etc) once configured, the block runs without needing 'help' unless one wants to change something (configuration) in real time.
The S/C blocks are "mixed signal" (although implemented as analogue UM's) - they rely on switching capacitors at high frequency to achieve variable time constants (or other functions such as S+H or heterodyning), so, in as sense they could be regarded as "pseudo analogue" - The filters are implemented using S/C blocks, and for control over parameters such as cut-off frequency in real time, one needs to control the switched capacitor operation (change the switching frequency or ratio using a 'digital' signal derived from a digital block component such as a PWM ) - IMO, these filters are not well suited to variable operation, and I dont like how they sound when their frequency is varied.. one is limited to the resolution and concequential quantising of the mechanism employed to switch the capacitors in the block - a 10 bit PWM is the largest one can 'fit' if keeping latency tollerable, and even if one adds jitter the quality is not acceptable to me.
I should just say that the above comments relate to the S/C block in PSoC 1, I have not yet played with this block on the new (PSoC 3+5) parts, but I believe the S/C is the same (or close) and do not think I will change my opinion - Switched capacitor filters never sound good to me, no matter how they are implemented - even the best S/C filter IC's sound, IMO, crap.. I think this may be why one doesnt see them in any respectable musical instrument.
Fred.
BTW, I am an "official" Cypress PSoC consultant (Cypros).. But I have no particular "loyalty" to Cypress and earned my accreditation on PSoC 1 - I am new to 3+5. I had a big disagreement with Cypress when they tried to move PSoC 1 design over to their "Express" software (which was completely unusable) - eventually they abandoned "Express" for PSoC 1, and re-introduced "Designer" - But by this time they had lost many customers and Cypros (including me). The new "Creator" software is a completely different animal , and is damn good (as is PSoC Designer for the PSoC 1) - So I am now willing to spend time updating my knowledge to retain my Cypros accreditation.
The original "Express" was intended to provide a completely graphical "code free" programming environment - one patched pre-designed "components" together, and the software "wrote" the entire system - One was supposed to edit or modify the generated code to tailor the system for what one wanted.. Alas, thats not how I (or most serious designers) work - The code produced was slow, wastefull, incomprehensible, and somtimes just assenine - Modyfying this crap took far longer than writing ones own code - but the way the system was thrown together made doing this nearly impossible. PSoC designer was a great piece of software which allowed one to develop PSoCs without trouble - but upgrading this software was abandoned. They realized their error eventually, and dumped the original "Express" concept.