electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Developers' Corner
Another vocoder
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 2 [45 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: 1, 2 Next
Author Message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Thu Sep 27, 2018 12:10 am    Post subject: Another vocoder
Subject description: designing a new concept
Reply with quote  Mark this post and the followings unread

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! Cool ) 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

Posted Image, might have been reduced in size. Click Image to view fullscreen.

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
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Thu Sep 27, 2018 12:25 am    Post subject: Reply with quote  Mark this post and the followings unread

This is what I have so far, software is working:

Posted Image, might have been reduced in size. Click Image to view fullscreen.
JP2 is the modulator input (Voice) and JP3 is the Carrier signal
And the filters I will use:

Posted Image, might have been reduced in size. Click Image to view fullscreen.

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Thu Sep 27, 2018 12:52 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Thu Sep 27, 2018 1:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
gasboss775



Joined: Jan 02, 2016
Posts: 217
Location: Scotland

PostPosted: Thu Sep 27, 2018 2:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Fri Sep 28, 2018 6:15 am    Post subject: Reply with quote  Mark this post and the followings unread

you lost me at bin Embarassed
_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
gasboss775



Joined: Jan 02, 2016
Posts: 217
Location: Scotland

PostPosted: Fri Sep 28, 2018 8:44 am    Post subject: Reply with quote  Mark this post and the followings unread

PHOBoS wrote:
you lost me at bin Embarassed


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
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Fri Sep 28, 2018 9:02 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
gasboss775



Joined: Jan 02, 2016
Posts: 217
Location: Scotland

PostPosted: Fri Sep 28, 2018 9:09 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
gasboss775



Joined: Jan 02, 2016
Posts: 217
Location: Scotland

PostPosted: Fri Sep 28, 2018 9:12 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Fri Sep 28, 2018 9:39 am    Post subject: Reply with quote  Mark this post and the followings unread

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.
Posted Image, might have been reduced in size. Click Image to view fullscreen.

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 5591
Location: Moon Base
Audio files: 705

PostPosted: Fri Sep 28, 2018 9:46 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp MixCloud Stickney Synthyards Captain Collider Twitch YouTube
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
gasboss775



Joined: Jan 02, 2016
Posts: 217
Location: Scotland

PostPosted: Fri Sep 28, 2018 9:51 am    Post subject: Reply with quote  Mark this post and the followings unread

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.
Posted Image, might have been reduced in size. Click Image to view fullscreen.


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
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Fri Sep 28, 2018 11:11 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
gasboss775



Joined: Jan 02, 2016
Posts: 217
Location: Scotland

PostPosted: Sat Sep 29, 2018 2:05 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Sat Sep 29, 2018 2:18 am    Post subject: Reply with quote  Mark this post and the followings unread

I did try it out for one channel:

https://youtu.be/whDypuHimjA

Very Happy

_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Sun Sep 30, 2018 2:39 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
gasboss775



Joined: Jan 02, 2016
Posts: 217
Location: Scotland

PostPosted: Wed Oct 10, 2018 9:52 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Wed Oct 10, 2018 10:50 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Fri Oct 12, 2018 4:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

Posted Image, might have been reduced in size. Click Image to view fullscreen.
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
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Fri Oct 12, 2018 4:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Cant help .. wondering about the back side of the board Laughing
_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Fri Oct 12, 2018 11:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Posted Image, might have been reduced in size. Click Image to view fullscreen.

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
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Sat Oct 13, 2018 5:08 am    Post subject: Reply with quote  Mark this post and the followings unread

Pretty neat Cool

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.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Sat Oct 13, 2018 10:36 am    Post subject: Reply with quote  Mark this post and the followings unread

Don't worry, I'll probably reach that point too, like I always do with analog electronics... Embarassed
_________________
my synth
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 1294
Location: Netherlands
Audio files: 30

PostPosted: Wed Oct 17, 2018 11:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 2 [45 Posts]
View unread posts
View new posts in the last week
Goto page: 1, 2 Next
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use