theremin sensor controller ip - fpga-theremin/theremin GitHub Wiki
- Low latency (<= 1 sample interval - 1/48000 of second)
- High precision and sensitivity
- AXI4Lite interface with PS (CPU)
Oscillator output is 3'3V logic level signal with duty cycle near to 50%.
The goal of theremin sensor is to convert oscillator frequency to:
- note number and note frequency for pitch antenna signal
- volume multiplier for volume antenna
- Measure signal period
- Moving average filter with adjustable window length (1..1024)
- Scale to 000000..FFFFFF range for working range of hand distance, clamp to 000000 or FFFFFF if distance exceeds range
- Convert scaled period value to distance from hand to antenna using lookup table and linear interpolation
- Convert distance to note number using lookup table and interpolation
- Convert note number to pitch phase increment (fractional part of 0x1000000 of phase increment for single sample) - lookup table and interpolation
- Measure signal period
- Moving average filter with adjustable window length (1..1024)
- Scale to 000000..FFFFFF range for working range of hand distance, clamp to 000000 or FFFFFF if distance exceeds range
- Convert scaled period value to distance from hand to antenna using lookup table and linear interpolation
- Convert distance to volume multiplier