Author Topic: Making an auto tune device with fpga.  (Read 3108 times)

0 Members and 1 Guest are viewing this topic.

Offline kmesneTopic starter

  • Newbie
  • Posts: 4
  • Country: tr
Making an auto tune device with fpga.
« on: March 11, 2019, 10:51:28 pm »
Hi i am 2nd year ee student and i need to make a Project for my digital logic with vhdl course. I need to do it with fgpa basys3 board.
I want to make an auto tune device. When someone speaks it should tune it to 7 different chords like ( A, B, C, D, E, F,G and those minors/majors) and outputs the edited voice
There is computer programs which does is like fl studio vs.
My english is not my native i hope that i could tell what i have in my mind.
I really appreciate your helps.
Thanks
 

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: Making an auto tune device with fpga.
« Reply #1 on: March 12, 2019, 02:04:51 pm »
You mean a "vocoder", divide into building blocks first.

Make envelop follower, use mic as input.
Have your oscillators volume adjusted by that.

Then you have this :


Make more transformer voices by adjusting pitch also.
Sorry i dont know anything about FPGA.

 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Making an auto tune device with fpga.
« Reply #2 on: March 12, 2019, 03:51:19 pm »
.
« Last Edit: August 19, 2022, 02:18:20 pm by emece67 »
 

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: Making an auto tune device with fpga.
« Reply #3 on: March 12, 2019, 04:12:02 pm »
It was based on resampling and used only 2 interleaved circular buffers and AM modulation to get rid of time stretching due to resampling.

Do you have more info on this ?
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15270
  • Country: fr
Re: Making an auto tune device with fpga.
« Reply #4 on: March 12, 2019, 04:21:16 pm »
I really suggest learning about the necessary algorithms first (vocoder, pitch shifting, etc) and then implementing them on a computer (with whatever language/tool you're comfortable with - MatLab or similar would probably be the faster way). Probably first with floating point, then once you have something that's satisfying, re-implement that with fixed point for instance. That will be your preliminary work before going to digital design.

Do not dive right into the VHDL part. You'd waste a lot of time.
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Making an auto tune device with fpga.
« Reply #5 on: March 12, 2019, 10:28:02 pm »
.
« Last Edit: August 19, 2022, 02:18:34 pm by emece67 »
 
The following users thanked this post: mrflibble, hamster_nz, MT, Nitrousoxide, Jan Audio

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2812
  • Country: nz
Re: Making an auto tune device with fpga.
« Reply #6 on: March 13, 2019, 12:32:35 am »
Do you have more info on this ?

  • Write samples at a given sampling frequency onto a circular buffer.
  • Read samples from such circular buffer at a different sampling frequency. This will change the pitch maintaining harmony
  • The WR and RD pointers to the buffer will walk the buffer at different speeds (obviously), when they point to the same sample a glitch will be heard. This is because:
    • If the read pointer overtakes the write pointer, then it reads a sample it has read before, instead of a new, not yet available, sample
    • If the write pointer overtakes the read pointer, then the soon to be read sample is overwritten by a new one, as the buffer is overrun
  • In order to not hear such glitches you modulate the amplitude of the output samples. The amplitude varies linearly as a function of the distance between the 2 pointers. When they are coincident the modulation is 0. When they are n/2 samples apart (n being the buffer length) the modulation is 1. You do not hear the glitches because you decrease the volume to 0 when they occur
  • But you will now hear such periodic volume variations. To avoid them you use a pair of read pointers n/2 samples apart (n being the buffer length). When one gives 0 volume (and produces a not perceivable glitch) the other gives maximum volume and no glitch. The output of the circuit is the sum of the modulated samples from the 2 RD pointers. As the modulation varies linearly and both channels are interleaved the overall amplitude is constant over time and no modulation is heard
  • You can get better results with more read pointers (say 8 pointers n/8 samples apart).

As I remembered this I noticed that you do not need 2 buffers, but only one with 2 read pointers. It seems even simpler than I remembered earlier.

The obvious drawback is that the input and output sampling frequencies are different.

Regards.

That is a really neat, simple design. I might give it a go!
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: Making an auto tune device with fpga.
« Reply #7 on: March 13, 2019, 01:12:23 pm »
.
« Last Edit: August 19, 2022, 02:18:49 pm by emece67 »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8083
  • Country: ca
Re: Making an auto tune device with fpga.
« Reply #8 on: March 18, 2019, 11:04:33 pm »
Do you have more info on this ?

  • Write samples at a given sampling frequency onto a circular buffer.
  • Read samples from such circular buffer at a different sampling frequency. This will change the pitch maintaining harmony
  • The WR and RD pointers to the buffer will walk the buffer at different speeds (obviously), when they point to the same sample a glitch will be heard. This is because:
    • If the read pointer overtakes the write pointer, then it reads a sample it has read before, instead of a new, not yet available, sample
    • If the write pointer overtakes the read pointer, then the soon to be read sample is overwritten by a new one, as the buffer is overrun
  • In order to not hear such glitches you modulate the amplitude of the output samples. The amplitude varies linearly as a function of the distance between the 2 pointers. When they are coincident the modulation is 0. When they are n/2 samples apart (n being the buffer length) the modulation is 1. You do not hear the glitches because you decrease the volume to 0 when they occur
  • But you will now hear such periodic volume variations. To avoid them you use a pair of read pointers n/2 samples apart (n being the buffer length). When one gives 0 volume (and produces a not perceivable glitch) the other gives maximum volume and no glitch. The output of the circuit is the sum of the modulated samples from the 2 RD pointers. As the modulation varies linearly and both channels are interleaved the overall amplitude is constant over time and no modulation is heard
  • You can get better results with more read pointers (say 8 pointers n/8 samples apart).

As I remembered this I noticed that you do not need 2 buffers, but only one with 2 read pointers. It seems even simpler than I remembered earlier.

The obvious drawback is that the input and output sampling frequencies are different.

Regards.
Déjà vu....
I've seen almost identical to this (inverted in function by keeping the read & write speeds are identical, but shifting the read position in such a loop) in an old Panasonic digital tapeless answering machine patent which allowed playback speed/tempo adjustments while maintaining a constant pitch.

Anyways, the king of auto-tune tools, Melodyne 4, (free functional demo) is located here: https://www.celemony.com/en/trial

Of just Youtube Melodyne 4 examples to see what it does...
Example: https://youtu.be/DiW6XVFeFgo?t=415
« Last Edit: March 18, 2019, 11:17:57 pm by BrianHG »
 

Offline mrflibble

  • Super Contributor
  • ***
  • Posts: 2051
  • Country: nl
Re: Making an auto tune device with fpga.
« Reply #9 on: March 19, 2019, 04:31:03 pm »
That is a really neat, simple design. I might give it a go!
In stereo where available. Nice design! Perfectly suited for a fun bit of experimentation, without breaking the project-time-budget bank. :D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf