Welcome to %s forums

BrainModular Users Forum

Login Register

Phase Vocoder Pack

Discussions about add-ons, announcements
Post Reply
User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 12 May 2009, 17:25

Phase Vocoder Pack
by senso Posted on 2009-05-12 15:11:33

The Phase Vocoder Pack opens a new area in spectral manipulations in Usine
Contains:

- FFT forward module using the Phase Vocoder algorithm, transforms the input sound into a set of two array’s, one containing the frequencies and the other containing the amplitudes for each frequency.

This module allows frequency manipulations.

- FFT inverse module to provide the transformation from frequency domain to time (audio) domain.

- ArrayDelay module which delays each incoming value of an array according the delay input values (stored them self into and array). The delays are set in ‘number of audio blocs’.

- Pich-Shifter example using FFT forward and reverse. This patch provide a higher quality that the original library version. Unlike the classic FFT version (see Spectral in the Library) this Pitch-Shifter preserve the tonality and can be used for a transposition of a musical instrument.

- Spectral-Delay example ready to use made with the ArrayDelay module.

This work is my first User Module in C++ and can be improved and optimized; those versions aren’t CPU friendly.

Based on the great job from Richard Dobson http://people.bath.ac.uk/masrwd/pvplugs.html

The source code is available in the wiki page.

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 12 May 2009, 17:54

really nice!

martignasse
Site Admin
Posts: 611
Location: Lyon, FRANCE
Contact:

Unread post by martignasse » 12 May 2009, 17:57

hey man,

Serious toy you made here :D result are so.....spectral ;)

and you said you don't know C++ hehe
Martin FLEURENT - Usine Developer - SDK maintainer

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 12 May 2009, 18:15

@martin: I've just made a copy/cut from your template!!!
you can take a look and try to optimize it?

martignasse
Site Admin
Posts: 611
Location: Lyon, FRANCE
Contact:

Unread post by martignasse » 12 May 2009, 19:16

senso wrote:@martin: I've just made a copy/cut from your template!!!
It's made for that, note that you are my first customer :lol:

But it's little more than a copy/past :rolleyes: i see some asm in there. and the FFT sources seems like a mess, at first look

senso wrote:you can take a look and try to optimize it?
It's exactly what i'm doing now (looking in)

Before optimization (if i can do something at this level), i propose to reorganize projects and solution files.

We have to think about a global way to publish these little jewels.
I think individuals project for each user modules is enough (like the Display Number and the Roll Array) :
- If we open just the vcproj file, VC construct automatically a solution for it (Good for instant access and compile)
- We can also open them in an existing solution, like explained in the wiki (Good for more deep studying and compare with other modules).



PS : the first optimization could be to compile them in release mode ;)
Martin FLEURENT - Usine Developer - SDK maintainer

ethnix73
Member
Posts: 604
Location: France, Caen
Contact:

Unread post by ethnix73 » 12 May 2009, 19:46

:cool:
Seb.Dub


moody33
Member
Posts: 338
Contact:

Unread post by moody33 » 16 May 2009, 23:10

Excellent !
Spectral delay remind me this plugin : http://www.artificialaudio.com/pluginmenu/2
I'd like to emulate it in the past in usine. Now it's really possible !

goyya76
Member
Posts: 69
Contact:

Unread post by goyya76 » 21 May 2009, 12:25

hello!

i have to admit i still have to learn how to deal with arrays...so here's my question: am i wrong if i think that i can use the output of the FFT forward module to do some resynthesis on the input sound (for example enhancing some frequencies, splitting the input sound into different bands etc), to find the fundamental frequency and maybe to generate a set of sine waves using the frequencies in the array??

BTW pitch shifting sounds pretty good!

Ciao,
Goyya

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 21 May 2009, 14:52

goyya76 , i'm sure there's many things you can do this way , but maybe better to add a new post in "patching "questions to have help if needed..?
;-)

goyya76
Member
Posts: 69
Contact:

Unread post by goyya76 » 21 May 2009, 15:54

Nay i guess you are right - i'll do some trial&error then re-post in the patching question to share (hopefully!)...

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 09 Jun 2009, 10:25

updated, now compatible with Usine 4.22 or higher.

nelson
Member
Posts: 36
Contact:

Unread post by nelson » 10 Jun 2009, 20:10

one modification could be useful : frequency range fader to make FFT not for full spectrum of 44400 Hz but for example from 0Hz to 500Hz but with full resolution (512 elements in arrays). now this frequency range is represented by just a few elements in both arrays.. im thinking in good way? its possible? I dont now much about FFT techniques...

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 10 Jun 2009, 20:13

actually not really possible since the FFT is 1024 length.
probably in futures versions of usine

pansoul
Member
Posts: 39
Contact:

Unread post by pansoul » 01 Sep 2009, 13:22

Hello Olivier
thank you for this fantastic tool with source !!
I try to make a transposition directly in PhaseVocoderForw and i saw that there is a function that seems dedicated :
pPrototype->ptran->tickTransp(float semitones);
But i can succed to use it, is it complicated to use ?

i try to put something in the process loop like that

while(--sampleFrames >= 0){
pPrototype->ptran->tickForw(*in1++);
}

sampleFrames = FFT_SIZE / 2;
pPrototype->PAmplitude->len = sampleFrames;
pPrototype->PFrequency->len = sampleFrames;

pPrototype->ptran->tickTransp(6);

while(--sampleFrames >= 0){

*amp2++ = *amp1++ ;
*freq2++ = *freq1++;

It doesn't work but, since the transpose function like what you did in the pitch shifter.pat modifies frequencies and amplitudes arrays lenght (sampleFrames), i suppose this function take place after the determination of sampleFrames. the way i use it is perhaps a non sense code speaking but i am not fluent yet about pointer manipulation.

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 01 Sep 2009, 17:22

the phase vocoder pack is separated into 2 modules:
- transform forward
- transform inverse

to create a pitch shifter, try to mix both of them, using the 'pitch shifter.pat' example.
forward ---- expand array ----- inverse into the same process loop.

pansoul
Member
Posts: 39
Contact:

Unread post by pansoul » 01 Sep 2009, 19:50

yes it's what i will try to do but since there is a pPrototype->ptran->tickTransp function i was wondering if it wasn't dedicated to transpose

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 02 Sep 2009, 09:57

I don't remember exactly how it works but you should take a look on the original source code of the plugin here:

http://people.bath.ac.uk/masrwd/pvplugs.html

the original works as a 'normal' shifter.

Post Reply

Who is online

Users browsing this forum: No registered users and 91 guests