Forums > MaxMSP

Transposing while keeping formants

October 23, 2006 | 11:27 am

Hello,

I would like to build a so-called "formant-preserving" transposition
patch.

However, I am not sure about the methodology. Is the following
procedure correct ?

1. FFT analysis (pfft~ + fftin~)
2. Extraction of the original spectral envelope.
3. Removal of the original spectral envelope.
4. Transposition of the sound whose spectral envelope has been removed.
5. Application of the original spectral envelope to the transposed
sound (convolution)
6. FFT resynthesis (fftout~)

I am mostly dubious about step 3. To remove the original envelope,
should I apply some kind of super-amplification and clipping so to
raise all the non-zero partials to the maximum magnitude? But it leads
to the question : how can one calculate the maximum possible magnitude
according to the FFT window size and window step?

Also, about step 2 : can I consider cartopol~’s left output as a
spectral envelope or should I apply some kind of smoothing (with
rampsmooth~ for instance)?

Roald Baudoux
——————————–
Next event : Graph?mes, an installation created with the plastic artist
Michel Cleempoel during the AVXL festival – at the Gn?thi Seauton
bookshop, 347 Ch?e d’Ixelles 1050 Ixelles/Bruxelles – from 11/16/06 to
12/02/06
——————————–
Composer of electroacoustic art (acousmatic music, sound installations,
live electronics).
(http://robaublog.canalblog.com/)

Junior Lecturer for the Royal Conservatory of Music (Mons, Belgium).
(http://www.conservatoire-mons.be)

Journalist for "Les Cahiers de l’ACME-Audio Pro", Brussels.
(http://www.cahiersacme.com)
——————————–
Tel/fax: +32.(0)2.503.23.46
Mobile: +32.(0)497.32.38.13
VoIP : Skype – nesdnuma


October 23, 2006 | 12:07 pm

Have a look at guizmo~ or psych~ if you are using "voiced" sounds.

best,

O0o./


October 23, 2006 | 12:21 pm

cepstrum "method" :

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 164 52 97 196617 fftin~ 1;
#P newex 164 210 81 196617 ifft~ 256 256 0;
#P newex 164 128 78 196617 fft~ 256 256 0;
#P newex 164 233 81 196617 pow~ 2.718282;
#P newex 164 102 29 196617 log~;
#P newex 164 78 53 196617 cartopol~;
#P connect 3 1 4 1;
#P connect 3 0 4 0;
#P connect 5 1 0 1;
#P connect 5 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 3 0;
#P connect 4 0 2 0;


October 23, 2006 | 1:02 pm

Sorry to be thick, but I do not understand there…

Is there a white paper somewhere I can read to understand the process?

pa

Le 23 oct. 06 ? 13:21, olivier pasquet a ?crit :

> cepstrum "method" :
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 164 52 97 196617 fftin~ 1;
> #P newex 164 210 81 196617 ifft~ 256 256 0;
> #P newex 164 128 78 196617 fft~ 256 256 0;
> #P newex 164 233 81 196617 pow~ 2.718282;
> #P newex 164 102 29 196617 log~;
> #P newex 164 78 53 196617 cartopol~;
> #P connect 3 1 4 1;
> #P connect 3 0 4 0;
> #P connect 5 1 0 1;
> #P connect 5 0 0 0;
> #P connect 0 0 1 0;
> #P connect 1 0 3 0;
> #P connect 4 0 2 0;
> _______________________________________________
> maxmsp mailing list
> maxmsp@cycling74.com
> http://www.cycling74.com/mailman/listinfo/maxmsp


October 23, 2006 | 1:09 pm

Hello Olivier,

I am not sure to understand which part of the problem your patch is
solving.

Also, the iifft~ following the fft~ without any other object in between
is weird…

Could you please comment a little bit?

Thanks.

Roald Baudoux

Le 23-oct.-06, ? 14:21, olivier pasquet a ?crit :

> cepstrum "method" :
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 164 52 97 196617 fftin~ 1;
> #P newex 164 210 81 196617 ifft~ 256 256 0;
> #P newex 164 128 78 196617 fft~ 256 256 0;
> #P newex 164 233 81 196617 pow~ 2.718282;
> #P newex 164 102 29 196617 log~;
> #P newex 164 78 53 196617 cartopol~;
> #P connect 3 1 4 1;
> #P connect 3 0 4 0;
> #P connect 5 1 0 1;
> #P connect 5 0 0 0;
> #P connect 0 0 1 0;
> #P connect 1 0 3 0;
> #P connect 4 0 2 0;
> _______________________________________________
> maxmsp mailing list
> maxmsp@cycling74.com
> http://www.cycling74.com/mailman/listinfo/maxmsp
>
>
Roald Baudoux
——————————–
Prochain ?v?nement : installation Graph?mes cr??e en collaboration avec
le plasticien Michel Cleempoel dans le cadre du festival AVXL – ? la
librairie Gn?thi Seauton, 347 Ch?e d’Ixelles 1050 Ixelles/Bruxelles –
du 16 novembre au 3 d?cembre 2006
——————————–
Compositeur de musique ?lectroacoustique acousmatique et cr?ateur
d’installations sonores.
(http://robaublog.canalblog.com/)
-
Charg? de cours et assistant aupr?s de la section des musiques
?lectroacoustiques du Conservatoire Royal de Mons.
(http://homeusers.brutele.be/rdbx/
Depliant_section_EA_Mons_juin_2005.pdf)
-
Journaliste et r?dacteur pour le magazine "Les Cahiers de l’ACME-Audio
Pro".
(http://www.cahiersacme.com)
——————————–
T?l/fax: +32.(0)2.503.23.46
Mobile: +32.(0)497.32.38.13
VoIP : Skype – nesdnuma


October 23, 2006 | 1:17 pm

[gizmo~] might give you what you want.

The enormous amount of undocumented functions (means, they could change in
next version of MSP) should enable that. Find the functions with
option-shift-right click on the object, as usual.
See this patch that someone posted once on the list (I can’t access the
archives right now):

#P window setfont "Sans Serif" 9.;
#P flonum 205 269 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 38 288 15 0;
#P window linecount 1;
#P message 55 288 87 196617 enable $1;
#P flonum 18 271 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 271 87 196617 coeff $1;
#P flonum 18 254 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 254 87 196617 slope $1;
#P number 18 237 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 237 87 196617 clip $1;
#P number 18 220 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 220 87 196617 filter $1;
#P number 18 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 203 87 196617 smooth $1;
#P number 18 186 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 186 87 196617 correction $1;
#P number 18 169 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 169 87 196617 logscale $1;
#P number 18 152 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 152 87 196617 inharmonic $1;
#P number 18 135 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 135 87 196617 drawout $1;
#P number 18 118 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 118 87 196617 drawinh $1;
#P number 18 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 101 87 196617 drawenv $1;
#P number 18 84 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 84 87 196617 drawcentroids $1;
#P number 18 67 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 67 87 196617 drawpeaks $1;
#P number 18 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 55 50 87 196617 drawoutput $1;
#P message 55 33 87 196617 ft2 $1;
#P flonum 18 33 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 3;
#P comment 260 268 166 196617 For more detailed information see the
Proceedings of the 2002 ICMC , Goteborg , Sweden , pp. 126-129.;
#P window linecount 1;
#P hidden message 255 143 14 196617 0;
#P user kslider 303 121 35 1 -24 48 19 7 0 128 128 128 128 128 128 255 255
255 0 0 0 0 0 0;
#P flonum 303 161 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 303 180 112 196617 expr pow(2.\,$f1/12);
#P hidden newex 255 121 45 196617 loadbang;
#P newex 176 293 39 196617 *~ 0.2;
#P user ezdac~ 176 319 220 352 0;
#P message 176 168 55 196617 $1 , loop 1;
#P flonum 303 201 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 176 149 15 0;
#P message 145 149 29 196617 open;
#N sfplay~ 1 80640 0 ;
#P newobj 176 190 43 196617 sfplay~;
#P newex 176 224 137 196617 pfft~ gizmo_loadme 4096 4;
#P connect 4 0 0 1;
#P connect 9 0 4 0;
#P connect 10 0 9 0;
#P connect 11 0 10 0;
#P hidden connect 12 0 11 0;
#P hidden connect 8 0 12 0;
#P connect 7 0 6 0;
#P connect 7 0 6 1;
#P connect 46 0 7 1;
#P connect 0 0 7 0;
#P hidden connect 44 0 0 0;
#P hidden connect 28 0 0 0;
#P hidden connect 42 0 0 0;
#P hidden connect 26 0 0 0;
#P hidden connect 40 0 0 0;
#P hidden connect 24 0 0 0;
#P hidden connect 38 0 0 0;
#P hidden connect 22 0 0 0;
#P hidden connect 36 0 0 0;
#P hidden connect 20 0 0 0;
#P hidden connect 34 0 0 0;
#P hidden connect 18 0 0 0;
#P hidden connect 32 0 0 0;
#P hidden connect 16 0 0 0;
#P hidden connect 30 0 0 0;
#P hidden connect 15 0 0 0;
#P connect 1 0 0 0;
#P connect 2 0 1 0;
#P connect 5 0 1 0;
#P connect 3 0 5 0;
#P hidden connect 45 0 44 0;
#P hidden connect 43 0 42 0;
#P hidden connect 41 0 40 0;
#P hidden connect 39 0 38 0;
#P hidden connect 37 0 36 0;
#P hidden connect 35 0 34 0;
#P hidden connect 33 0 32 0;
#P hidden connect 31 0 30 0;
#P hidden connect 29 0 28 0;
#P hidden connect 27 0 26 0;
#P hidden connect 25 0 24 0;
#P hidden connect 23 0 22 0;
#P hidden connect 21 0 20 0;
#P hidden connect 19 0 18 0;
#P hidden connect 17 0 16 0;
#P hidden connect 14 0 15 0;
#P window clipboard copycount 47;

By the way, did you know gizmo~ does also freqshift? And this is documented
(see MSP Reference).
Jean-Fran?ois.


October 23, 2006 | 1:54 pm

Yeah, the famous fft of the fft.
That gives the cepstrum coefficients.
And among them, you will have to retain only the first coefficients of each
fft frame. Because the first coefficients are those describing the spectral
envelope.
Right?
Please don’t rely on me, I’m just guessing!
Yes, a comment with the patch would be more than welcome. Even more helpful
would be to have the "end" of the patch, after pow~, that will take only the
meaningful coefficients and draw the real-time spectrum envelope.
Jean-Fran?ois.

At 10/23/06 8:21 AM, you wrote?:

> cepstrum "method" :


January 3, 2007 | 5:36 pm

This fragment appears to be incomplete. Max produces nothing when making a
patch from the clipboard.

On 10/23/06 8:21 AM, "olivier pasquet" wrote:

> cepstrum "method" :
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 164 52 97 196617 fftin~ 1;
> #P newex 164 210 81 196617 ifft~ 256 256 0;
> #P newex 164 128 78 196617 fft~ 256 256 0;
> #P newex 164 233 81 196617 pow~ 2.718282;
> #P newex 164 102 29 196617 log~;
> #P newex 164 78 53 196617 cartopol~;
> #P connect 3 1 4 1;
> #P connect 3 0 4 0;
> #P connect 5 1 0 1;
> #P connect 5 0 0 0;
> #P connect 0 0 1 0;
> #P connect 1 0 3 0;
> #P connect 4 0 2 0;

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


January 6, 2007 | 8:36 pm

I’ve looked online for the 2002 ICMC Proceedings mentioned in the gizmo~ help but can’t really spare the $111 to purchase it. Does anyone have a description of these undocumented functions (or know of documentation)? Playing with them in the patch helps a little but some don’t seem to do anything I can actually hear, and my knowledge of ye olde fft is not sophisticated enough to extrapolate meaning from the messages themselves. Any help or link to a copy of those 4 pages would be greatly appreciated!

Quote: jeanfrancois.charles wrote on Mon, 23 October 2006 06:17
—————————————————-
> [gizmo~] might give you what you want.
>
> The enormous amount of undocumented functions (means, they could change in
> next version of MSP) should enable that. Find the functions with
> option-shift-right click on the object, as usual.
> See this patch that someone posted once on the list (I can’t access the
> archives right now):
>

*patch omitted from quote*

> Jean-Fran?ois.
>
>
—————————————————-


January 8, 2007 | 7:09 am


January 8, 2007 | 4:09 pm

mindwarp~ in the FFTease collection does formant adjustment. You could transpose up with gizmo~ and then push the formants back down with mindwarp~.

http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/MaxMSP/FFTease/

Eric


Viewing 11 posts - 1 through 11 (of 11 total)