Author |
Message |
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Thu Sep 27, 2018 12:10 am Post subject:
Another vocoder Subject description: designing a new concept |
|
|
Ok, here's the thing...
I'm in the process of designing a vocoder and I think I have a nice, new concept.
Some parts are already built, but I'd like to have comments from someone who knows about the ins and outs of vocoders and diy design.
It's going to be a 12 channel vocoder in the range of 300Hz - 3kHz (the human speech bandwidth).
First the modulator signal is going into an arduino (ofcourse! ) where an FHT is calculated (FHT is a faster FFT methode), 12 bins are sent to a 12 channel 8 bit Trimdac AD8804, this way I have 12 analog signals representing the power of a certain frequency.
The Vref input of the trimdac is connected to the carrier signal, so I have 12 carrier signals with an amplitude analog to the power of the modulator signal in that particular bin.
These 12 signals are fed into 12 band-pass filters with a F0 the same as the bin they are connected to.
The output of these 12 BP filters go thru a potentiometer and are summed and this is the output signal.
Pro's (as I see them):
1 - only 12 filters for a 12 band vocoder
2 - NO vca's (although you can never have enough..)
3 - software patchable: easy to rearrange the signal from the bins to the filters
The Arduino FHT library is a fast implementation of a standard FHT algorithm which operates on only real data. READ MORE HERE
Any thoughts? _________________ my synth Last edited by Grumble on Thu Sep 27, 2018 12:30 am; edited 1 time in total |
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Thu Sep 27, 2018 12:25 am Post subject:
|
|
|
This is what I have so far, software is working:
JP2 is the modulator input (Voice) and JP3 is the Carrier signal
And the filters I will use:
_________________ my synth |
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Thu Sep 27, 2018 12:52 am Post subject:
|
|
|
About software patchable:
When using LIN_OUT8 the frequency bins are:
2 300 Hz
3 445 Hz
4 600 Hz
5 775 Hz
6 910 Hz
7 1060 Hz
8 1200 Hz
9 1360 Hz
10 1530 Hz
11 1650 Hz
12 1800 Hz
13 2000 Hz
14 2400 Hz
15 2500 Hz
16 2700 Hz
17 2800 Hz
18 3000 Hz
19 3150 Hz
20 3333 Hz
21 3440 Hz
22 3600 Hz
23 3700 Hz
24 3800 Hz
25 4000 Hz
And this code:
Code: |
void spi_to_dac (void)
{
uint8_t total_number = 12;
uint8_t channel = 0;
for (uint8_t byte_number = 0; byte_number <total_number;byte_number++)
{
PORTB &= ~(1<<PB2); // drive CS low
SPDR = channel; // send which dac channel
while ( !(SPSR & (1<<SPIF))) {}; // ready?
SPDR = (fht_lin_out8[(byte_number+2)]);// send low Byte
while ( !(SPSR & (1<<SPIF))) {}; // ready?
PORTB |= (1<<PB2); // drive SS high again
channel++;
}
}
|
This code sends 12 bins to the trimdac in subsequent order. This can easily be rearranged bij putting the bin numbers in an array and have that sent to the DAC,
So now DAC1 gets the data for 300Hz, DAC2 445Hz etc. but it is easy to invert that order so DAC1 gets data for 2000Hz, DAC2 for 1800Hz etc. _________________ my synth |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Thu Sep 27, 2018 1:23 pm Post subject:
|
|
|
Interesting idea ... seems to me that the concept should work. FHT was new to me - will need to look into that a bit more. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
gasboss775
Joined: Jan 02, 2016 Posts: 217 Location: Scotland
|
Posted: Thu Sep 27, 2018 2:43 pm Post subject:
|
|
|
Seems like a great idea grumble. How did you pick the 12 frequency bands are they just arbitrary or chosen for a specific reason? |
|
Back to top
|
|
|
PHOBoS
Joined: Jan 14, 2010 Posts: 5591 Location: Moon Base
Audio files: 705
|
|
Back to top
|
|
|
gasboss775
Joined: Jan 02, 2016 Posts: 217 Location: Scotland
|
Posted: Fri Sep 28, 2018 8:44 am Post subject:
|
|
|
PHOBoS wrote: | you lost me at bin |
I think it means binary numbers, correct me if I'm wrong Grumble!
As I see it the microcontroller plays the part of the analyser from a traditional vocoder, which provide the magnitudes of the frequency bands based on the controlling signal, traditionally the human voice. in Grumbles set up the voice signal is digitized and processed within the microcontroller then a multichannel Digital to analogue converter provides the 12 magnitude signals that control the VCAs in the signal path being modulated.
Grumble One thing I just thought, the microphone signal needs to be preamplified ( and possibly compressed a little ) prior to being sent to the Arduino. Last edited by gasboss775 on Fri Sep 28, 2018 9:03 am; edited 1 time in total |
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Fri Sep 28, 2018 9:02 am Post subject:
|
|
|
The bin is the power of the frequencies within the bandwidth of the FFT (or the FHT in this case).
And yes, the microphone signal needs to be amplified.
In another discussion about this design I was pointed to the error I’m making by putting VrefL to gnd while VrefH goes from 0 to 5 volts. But I’m working on that. _________________ my synth |
|
Back to top
|
|
|
gasboss775
Joined: Jan 02, 2016 Posts: 217 Location: Scotland
|
Posted: Fri Sep 28, 2018 9:09 am Post subject:
|
|
|
Grumble wrote: | The bin is the power of the frequencies within the bandwidth of the FFT (or the FHT in this case).
And yes, the microphone signal needs to be amplified.
In another discussion about this design I was pointed to the error I’m making by putting VrefL to gnd while VrefH goes from 0 to 5 volts. But I’m working on that. |
Ahh I get it now, you won't be using VCAs to modulate the carrier but using the DAC as a multiplying DAC to perform the dual function of D to A and carrier modulation...very clever my good man! |
|
Back to top
|
|
|
gasboss775
Joined: Jan 02, 2016 Posts: 217 Location: Scotland
|
Posted: Fri Sep 28, 2018 9:12 am Post subject:
|
|
|
I think you need to bias the carrier at 2.5 volts prior to application to the DAC and constrain the amplitude of the signal to around 4 V peak to peak ( using a limiter)
EDIT : I think there are multiplying DACs that can handle bipolar signal, they would seem ideal for this application. ( probably more expensive though ) |
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Fri Sep 28, 2018 9:39 am Post subject:
|
|
|
gasboss775 wrote: | I think you need to bias the carrier at 2.5 volts prior to application to the DAC and constrain the amplitude of the signal to around 4 V peak to peak ( using a limiter) |
I will use a different opamp that is rail to rail at the output, also put the VrefL to 2.5 volt to minimise bleedthru.
_________________ my synth |
|
Back to top
|
|
|
PHOBoS
Joined: Jan 14, 2010 Posts: 5591 Location: Moon Base
Audio files: 705
|
|
Back to top
|
|
|
gasboss775
Joined: Jan 02, 2016 Posts: 217 Location: Scotland
|
Posted: Fri Sep 28, 2018 9:51 am Post subject:
|
|
|
Grumble wrote: |
I will use a different opamp that is rail to rail at the output, also put the VrefL to 2.5 volt to minimise bleedthru.
|
I'm not sure if it will work putting Vref lo at 2.5 volts as v refhi would be going bellow 2.5 volts on the negative halves of the carrier signal. This might be ok but best to check the datasheet for the chip you are planning on using. |
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Fri Sep 28, 2018 11:11 am Post subject:
|
|
|
I did check the datasheet and it is ok to have the VrefL going more positive as the VrefH because how the dac is organised, like a bunch of 4066_es _________________ my synth |
|
Back to top
|
|
|
gasboss775
Joined: Jan 02, 2016 Posts: 217 Location: Scotland
|
Posted: Sat Sep 29, 2018 2:05 am Post subject:
|
|
|
Grumble wrote: | I did check the datasheet and it is ok to have the VrefL going more positive as the VrefH because how the dac is organised, like a bunch of 4066_es |
That sounds ideal then.
The only other thing I did wonder about is if the steps due to the varying bin values would be perceptible as they would be unfiltered ( ordinarily there would be an anti aliasing filter to smooth the stepped output of a DAC )
I suspect the only way of predicting if this will be ok or not is to actually try it out. |
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Sun Sep 30, 2018 2:39 am Post subject:
|
|
|
PHOBoS wrote: | thanks, I think I see some light at the end of the tunnel.
If I understand correctly then what you are doing with the arduino is similar to what an MSGEQ7 chip does.
interesting idea using the Vref of the DAC. |
Yes, didn’t know that chip, maybe for some other project...
The idea about the dac I used b4 to modulate an adsr signal. _________________ my synth |
|
Back to top
|
|
|
gasboss775
Joined: Jan 02, 2016 Posts: 217 Location: Scotland
|
Posted: Wed Oct 10, 2018 9:52 am Post subject:
|
|
|
I love the level of creativity displayed by circuit designers on this forum. This thread is just another great example of this. |
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Wed Oct 10, 2018 10:50 am Post subject:
|
|
|
Well, thank you!
At this moment I’m waiting for ordered capacitors from tayda, so I can build the 12 filters. _________________ my synth |
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Fri Oct 12, 2018 4:23 pm Post subject:
|
|
|
Got my caps today and started building as soon as I could.
This is a out all the electronics except for the potmeter (12 pcs) and some additional electronics for mixing, filtering and amplification of the microphone signal. _________________ my synth |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Fri Oct 12, 2018 4:48 pm Post subject:
|
|
|
Cant help .. wondering about the back side of the board _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Fri Oct 12, 2018 11:28 pm Post subject:
|
|
|
There are no wires yet from the dac to the filters and to the potmeters/mixer. Only the 1st filter is connected.
I should’ve left more room between the two rows of quad opamps... _________________ my synth |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24079 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Sat Oct 13, 2018 5:08 am Post subject:
|
|
|
Pretty neat
I used to make a big mess with wire wrap wires, this seems like thought out. _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Sat Oct 13, 2018 10:36 am Post subject:
|
|
|
Don't worry, I'll probably reach that point too, like I always do with analog electronics... _________________ my synth |
|
Back to top
|
|
|
Grumble
Joined: Nov 23, 2015 Posts: 1294 Location: Netherlands
Audio files: 30
|
Posted: Wed Oct 17, 2018 11:05 pm Post subject:
|
|
|
Have been working on this, but encountered a drawback:
There is a lot of noise induced by the processor and amplified by the input signal of the voice being to low (my educated guess).
I have to redesign and build proper input signal processing, get the impedance's and amplitudes right (5volt P/P)
Also I saw this in the datasheet:
REFH Input Resistance RREFH Digital Inputs = 55H, VREFH = VDD 1.2 kΩ
REFL Input Resistance3 RREFL Digital Inputs = 55H, VREFL = VDD 1.2 kΩ
but that seem to be covered by the input buffers. _________________ my synth |
|
Back to top
|
|
|
|