Forums > MaxMSP

phase bashing

June 7, 2007 | 8:28 pm

Just came across Miller’s article about phase bashing. Has someone started to look into this for a port to MSP?


June 7, 2007 | 8:42 pm

Hey Hans, I found this article…

http://crca.ucsd.edu/~msp/techniques/v0.11/book-html/node177.html

Is this the same technique you are speaking of? If so
and it has not been implemented, I think it would be
a great goup patch we could all work on.

Anthony

—– Original Message —–
From: Hans Mittendorf
Date: Thursday, June 7, 2007 3:30 pm
Subject: [maxmsp] phase bashing

>
> Just came across Miller’s article about phase bashing. Has someone
> started to look into this for a port to MSP?
>


June 7, 2007 | 8:48 pm

I read it here
http://crca.ucsd.edu/~msp/Publications/icmc05.dir/reprint.html
It looks great to me…


June 7, 2007 | 9:29 pm

hmmmm, that article seems to have a different way of doing it.
One uses an FFT, while the other does not. I would not mind
trying both. Give me a bit and I will post what I have.

Anthony

—– Original Message —–
From: Hans Mittendorf
Date: Thursday, June 7, 2007 3:54 pm
Subject: [maxmsp] Re: phase bashing

>
> I read it here
> http://crca.ucsd.edu/~msp/Publications/icmc05.dir/reprint.html
> It looks great to me…
>


June 8, 2007 | 5:22 pm

the word "phase bashing" sounds funny and reminds me a bit of kyma?s "distortion synthesis".

i dont get why the odd and even phase values inside the fft are split up into 2 groups, can anyone explain me this?

or should i just wait for your patches.


June 9, 2007 | 7:05 pm

Okay, so this is my first draft of the implementation
of the phase bashing algorithm. It still needs work,
but I wanted to share it with you guys so that I could
get some feedback on whether or not I am approaching
this the right way. The block diagram for the algorithm
can be found at

http://crca.ucsd.edu/~msp/Publications/icmc05.dir/node2.html.

some things to keep in mind…
- still not working
- i am currently using number~ to convert the audio
signal into a float to index into a buffer/table. It would
be nice to know a way to do this at the audio rate, without
having to convert.
- the block diag states "WRAP", i am not sure what range to
use. I assume [-0.5, 0.5]

Please look it over and post suggestions.

Thanks,
Anthony

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 177 248 100 9109513 range [-1 , 1];
#P comment 212 369 27 9109513 wrap;
#P newex 133 368 76 9109513 pong~ 1 -0.5 0.5;
#P user number~ 69 426 108 441 9 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221
221 221 222 222 222 0 0 0;
#P user number~ 385 436 424 451 9 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221
221 221 222 222 222 0 0 0;
#P user number~ 132 475 171 490 9 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221
221 221 222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P window linecount 2;
#P comment 19 63 345 9109516 This is an implementation of the phase
bashing synthesis algorithm. Information on this technique can be found
at…;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 133 174 66 9109513 loadmess 440;
#N vpatcher 189 144 789 544;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 142 292 92 9109513 peek~ my-window;
#P button 142 28 15 0;
#P message 279 292 28 9109513 clear;
#P window linecount 1;
#P newex 279 315 114 9109513 buffer~ my-window 23.22;
#P window linecount 0;
#P message 288 90 28 9109513 1024;
#P newex 142 49 45 9109513 loadbang;
#P window linecount 1;
#P newex 214 225 103 9109513 receive scale-factor;
#P newex 189 245 35 9109513 * 1.;
#P newex 159 206 241 9109513 expr 0.5*(1.0-cos(2*3.14159265*$f1/($f2-
1)));
#P newex 288 122 40 9109513 t i i i;
#P newex 142 122 67 9109513 t b b;
#P newex 142 265 57 9109513 pack 1 1.;
#P newex 142 146 50 9109513 uzi 1024;
#P newex 142 186 27 9109513 t i i;
#N counter 0 0 1024;
#X flags 0 0;
#P newobj 142 166 89 9109513 counter 0 0 1024;
#P connect 13 0 9 0;
#P connect 9 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 14 0;
#P connect 1 1 6 0;
#P fasten 5 0 2 1 293 143 187 143;
#P lcolor 2;
#P fasten 6 0 7 0 164 237 194 237;
#P connect 7 0 3 1;
#P connect 4 1 0 3;
#P connect 8 0 7 1;
#P fasten 5 1 0 4 308 154 223 154;
#P connect 12 0 11 0;
#P fasten 9 0 10 0 147 73 293 73;
#P connect 10 0 5 0;
#P fasten 5 2 6 1 323 172 395 172;
#P pop;
#P newobj 43 266 65 9109513 p HanWindow;
#P comment 366 184 100 9109513 load file;
#P user jsui 324 184 41 21 1 0 0 jsui_textbutton.js load;
#P user gain~ 29 333 24 100 158 0 1.071519 7.94321 10.;
#P user ezdac~ 29 464 73 497 0;
#N vpatcher 550 419 1150 819;
#P window setfont "Sans Serif" 9.;
#P user number~ 206 212 245 227 9 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221
221 221 222 222 222 0 0 0;
#P window linecount 0;
#P newex 174 182 25 9109513 sig~;
#P window linecount 1;
#P comment 226 107 100 9109513 scale to table size;
#P user number~ 175 130 214 145 9 139 3 2 0. 0. 0 0. 20 0. 0 0 0 221
221 221 222 222 222 0 0 0;
#P newex 175 103 46 9109513 *~ 23.22;
#P newex 174 155 82 9109513 peek~ my-window;
#P newex 175 73 34 9109513 +~ 0.5;
#P outlet 174 215 15 0;
#P inlet 175 38 15 0;
#P window linecount 2;
#P comment 213 68 100 9109513 this should shift audio signal range to
[0 , 1];
#P fasten 6 1 4 0 209 151 179 151;
#P connect 4 0 8 0;
#P connect 8 0 2 0;
#P connect 1 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 6 0;
#P connect 8 0 9 0;
#P pop;
#P newobj 241 396 100 9109513 p WindowTableLookup;
#P newex 133 431 27 9109513 *~;
#N vpatcher 89 53 689 565;
#P origin 0 -17;
#P window setfont "Sans Serif" 9.;
#P message 414 129 28 9109513 clear;
#P newex 257 102 74 9109513 prepend replace;
#P flonum 296 157 45 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 95 242 25 9109513 sig~;
#P flonum 47 244 41 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P user number~ 132 280 171 295 9 139 3 2 0. 0. 0 0.004456 250 0. 0 0 0
221 221 221 222 222 222 0 0 0;
#P user number~ 100 181 139 196 9 139 3 2 0. 0. 0 0. 20 0. 0 0 0 221
221 221 222 222 222 0 0 0;
#P message 257 45 33 9109513 sound;
#P newex 257 69 54 9109513 opendialog;
#B color 5;
#P comment 147 158 89 9109513 scale to buffer size;
#P newex 342 127 62 9109513 prepend read;
#P newex 257 126 79 9109513 sfinfo~;
#P newex 100 155 43 9109513 *~ 23.22;
#P newex 95 211 84 9109513 peek~ audiobuffer;
#P newex 101 45 34 9109513 +~ 0.5;
#P window linecount 2;
#P comment 139 40 100 9109513 this should shift audio signal range to
[0 , 1];
#P inlet 257 22 15 0;
#P window linecount 1;
#P newex 342 154 90 9109513 buffer~ audiobuffer;
#P outlet 94 281 15 0;
#P inlet 101 21 15 0;
#P connect 6 0 15 0;
#P connect 16 0 1 0;
#P fasten 13 1 6 0 134 203 100 203;
#P connect 6 0 16 0;
#P connect 5 0 7 0;
#P connect 7 0 13 0;
#P connect 0 0 5 0;
#P connect 16 0 14 0;
#P fasten 8 3 7 1 301 150 138 150;
#P connect 3 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 18 0;
#P connect 18 0 8 0;
#P connect 8 3 17 0;
#P fasten 11 0 9 0 262 98 347 98;
#P connect 19 0 2 0;
#P connect 9 0 2 0;
#P pop 1;
#P newobj 132 396 91 9109513 p AudioTableLookup;
#P comment 166 340 123 9109513 assuming shift factor S = 1;
#P newex 133 337 27 9109513 *~ 2;
#P window setfont "Sans Serif" 10.;
#P comment 203 317 67 9109514 GRANSAMP;
#P window setfont "Sans Serif" 9.;
#P newex 133 270 33 9109513 *~ 0.5;
#P newex 133 246 41 9109513 phasor~;
#P newex 133 222 27 9109513 / 2;
#P number 133 200 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 174 200 100 9109513 desired fundamental;
#P window setfont "Sans Serif" 12.;
#P comment 19 96 345 9109516
http://crca.ucsd.edu/~msp/Publications/icmc05.dir/node2.html;
#P user panel 116 310 250 191;
#X brgb 255 255 255;
#X frgb 0 0 0;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 9.;
#P comment 169 273 100 9109513 range [-0.5 , 0.5];
#P fasten 12 0 15 0 138 466 57 466 57 324 34 324;
#P connect 15 0 14 0;
#P connect 15 0 14 1;
#P connect 11 0 23 0;
#P connect 24 0 11 0;
#P connect 12 0 21 0;
#P connect 19 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 9 0;
#P connect 9 0 24 0;
#P fasten 13 0 12 0 246 422 138 422;
#P connect 11 0 12 0;
#P hidden fasten 16 0 11 1 329 385 218 385;
#P fasten 9 0 13 0 138 363 246 363;
#P connect 13 0 22 0;
#P window clipboard copycount 27;

—– Original Message —–
From: Roman Thilenius
Date: Friday, June 8, 2007 12:25 pm
Subject: [maxmsp] Re: Re: phase bashing

>
>
> the word "phase bashing" sounds funny and reminds me a bit of
> kyma?s "distortion synthesis".
>
> i dont get why the odd and even phase values inside the fft are
> split up into 2 groups, can anyone explain me this?
>
> or should i just wait for your patches.
>


June 10, 2007 | 7:14 pm

I tryed the patch, but no sound is coming out…


June 10, 2007 | 7:52 pm

Me too – I made a couple of alterations to get some sound out of it, albeit
not very promising ones as yet….
Cheers
Roger

#P window setfont "Sans Serif" 9.;
#P flonum 217 438 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P comment 177 248 100 196617 range [-1 , 1];
#P comment 212 369 41 196617 wrap;
#P newex 133 368 90 196617 pong~ 1 -0.5 0.5;
#P user number~ 69 426 108 441 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221
222 222 222 0 0 0;
#P user number~ 385 436 424 451 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221
222 222 222 0 0 0;
#P user number~ 132 475 171 490 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221
222 222 222 0 0 0;
#P window setfont "Sans Serif" 12.;
#P window linecount 2;
#P comment 19 63 369 196620 This is an implementation of the phase bashing
synthesis algorithm. Information on this technique can be found at…;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 133 174 80 196617 loadmess 440;
#N vpatcher 189 144 789 544;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 142 292 92 196617 peek~ my-window;
#P button 142 28 15 0;
#P message 279 292 28 196617 clear;
#P window linecount 1;
#P newex 279 315 114 196617 buffer~ my-window 23.22;
#P window linecount 0;
#P message 288 90 28 196617 1024;
#P newex 142 49 45 196617 loadbang;
#P window linecount 1;
#P newex 214 225 103 196617 receive scale-factor;
#P newex 189 245 35 196617 * 1.;
#P newex 159 206 241 196617 expr 0.5*(1.0-cos(2*3.14159265*$f1/($f2- 1)));
#P newex 288 122 40 196617 t i i i;
#P newex 142 122 67 196617 t b b;
#P newex 142 265 57 196617 pack 1 1.;
#P newex 142 146 50 196617 uzi 1024;
#P newex 142 186 27 196617 t i i;
#N counter 0 0 1024;
#X flags 0 0;
#P newobj 142 166 89 196617 counter 0 0 1024;
#P connect 13 0 9 0;
#P connect 9 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 14 0;
#P connect 1 1 6 0;
#P fasten 5 0 2 1 293 143 187 143;
#P lcolor 2;
#P fasten 6 0 7 0 164 237 194 237;
#P connect 7 0 3 1;
#P connect 4 1 0 3;
#P connect 8 0 7 1;
#P fasten 5 1 0 4 308 154 223 154;
#P connect 12 0 11 0;
#P fasten 9 0 10 0 147 73 293 73;
#P connect 10 0 5 0;
#P fasten 5 2 6 1 323 172 395 172;
#P pop;
#P newobj 43 266 65 196617 p HanWindow;
#P comment 366 184 100 196617 load file;
#P user jsui 324 184 41 21 1 0 0 jsui_textbutton.js load;
#P user gain~ 29 333 24 100 158 0 1.071519 7.94321 10.;
#P user ezdac~ 29 464 73 497 0;
#N vpatcher 550 419 1150 819;
#P window setfont "Sans Serif" 9.;
#P user number~ 206 212 245 227 9 3 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221
222 222 222 0 0 0;
#P window linecount 0;
#P newex 174 182 25 196617 sig~;
#P window linecount 1;
#P comment 226 107 100 196617 scale to table size;
#P user number~ 175 130 214 145 9 3 3 2 0. 0. 0 0. 20 0. 0 0 0 221 221 221
222 222 222 0 0 0;
#P newex 175 103 46 196617 *~ 23.22;
#P newex 174 155 82 196617 peek~ my-window;
#P newex 175 73 34 196617 +~ 0.5;
#P outlet 174 215 15 0;
#P inlet 175 38 15 0;
#P window linecount 2;
#P comment 213 68 100 196617 this should shift audio signal range to [0 ,
1];
#P fasten 6 1 4 0 209 151 179 151;
#P connect 4 0 8 0;
#P connect 8 0 2 0;
#P connect 1 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 6 0;
#P connect 8 0 9 0;
#P pop;
#P newobj 241 396 114 196617 p WindowTableLookup;
#P newex 133 431 35 196617 *~ 0.5;
#N vpatcher 89 53 689 565;
#P origin 0 -17;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P message 257 67 43 196617 replace;
#P message 334 68 28 196617 clear;
#P flonum 335 153 45 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 95 242 25 196617 sig~;
#P flonum 47 244 41 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user number~ 132 280 171 295 9 3 3 2 0. 0. 0 0.004456 250 0. 0 0 0 221
221 221 222 222 222 0 0 0;
#P user number~ 100 181 139 196 9 3 3 2 0. 0. 0 0. 20 0. 0 0 0 221 221 221
222 222 222 0 0 0;
#P comment 147 158 89 196617 scale to buffer size;
#P newex 257 126 105 196617 info~ audiobuffer;
#P newex 100 155 43 196617 *~ 23.22;
#P newex 95 211 84 196617 peek~ audiobuffer;
#P newex 101 45 34 196617 +~ 0.5;
#P window linecount 2;
#P comment 139 40 114 196617 this should shift audio signal range to [0 ,
1];
#P inlet 257 22 15 0;
#P window linecount 1;
#P newex 334 94 104 196617 buffer~ audiobuffer;
#P outlet 94 281 15 0;
#P inlet 101 21 15 0;
#P connect 6 0 12 0;
#P connect 13 0 1 0;
#P fasten 10 1 6 0 134 203 100 203;
#P connect 6 0 13 0;
#P connect 5 0 7 0;
#P connect 7 0 10 0;
#P connect 0 0 5 0;
#P connect 13 0 11 0;
#P connect 14 0 7 1;
#P connect 3 0 16 0;
#P connect 2 1 8 0;
#P connect 16 0 2 0;
#P connect 15 0 2 0;
#P connect 8 6 14 0;
#P pop;
#P newobj 132 396 105 196617 p AudioTableLookup;
#P comment 166 340 137 196617 assuming shift factor S = 1;
#P newex 133 337 27 196617 *~ 2;
#P window setfont "Sans Serif" 10.;
#P comment 203 317 67 196618 GRANSAMP;
#P window setfont "Sans Serif" 9.;
#P newex 133 270 47 196617 *~ 0.5;
#P newex 133 246 41 196617 phasor~;
#P newex 133 222 27 196617 / 2;
#P number 133 200 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 174 200 100 196617 desired fundamental;
#P window setfont "Sans Serif" 12.;
#P comment 19 96 409 196620
http://crca.ucsd.edu/~msp/Publications/icmc05.dir/node2.html;
#P user panel 116 310 250 191;
#X brgb 255 255 255;
#X frgb 0 0 0;
#X border 2;
#X rounded 0;
#X shadow 0;
#X done;
#P window setfont "Sans Serif" 9.;
#P comment 169 273 100 196617 range [-0.5 , 0.5];
#P fasten 12 0 15 0 138 466 57 466 57 324 34 324;
#P connect 15 0 14 0;
#P connect 15 0 14 1;
#P connect 11 0 23 0;
#P connect 16 0 11 0;
#P connect 24 0 11 0;
#P connect 12 0 21 0;
#P connect 19 0 4 0;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 9 0;
#P connect 9 0 24 0;
#P fasten 13 0 12 0 246 422 138 422;
#P connect 11 0 12 0;
#P connect 27 0 12 1;
#P fasten 9 0 13 0 138 363 246 363;
#P connect 13 0 22 0;
#P window clipboard copycount 28;

On 10/6/07 20:14, "Hans Mittendorf" wrote:

>
> I tryed the patch, but no sound is coming out…


June 11, 2007 | 5:37 pm

I think I found the problem. It looks as though peek~ is
not very good at doing audio rate playback. I think wave~ is
what we really want to use in this case. I am also using a
single cycle of a waveform to test with. I simplified the
patch a bit an removed things that did not make sense.

Anthony

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 177 248 100 9109513 range [0 , 1];
#P user number~ 75 313 114 328 9 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P user number~ 242 320 281 335 9 139 3 2 0. 0. 0 0. 250 0. 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 133 198 66 9109513 loadmess 440;
#N vpatcher 189 144 789 544;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 142 292 92 9109513 peek~ my-window;
#P button 142 28 15 0;
#P message 279 292 28 9109513 clear;
#P window linecount 1;
#P newex 279 315 114 9109513 buffer~ my-window 23.22;
#P window linecount 0;
#P message 288 90 28 9109513 1024;
#P newex 142 49 45 9109513 loadbang;
#P window linecount 1;
#P newex 214 225 103 9109513 receive scale-factor;
#P newex 189 245 35 9109513 * 1.;
#P newex 159 206 241 9109513 expr 0.5*(1.0-cos(2*3.14159265*$f1/($f2-1)));
#P newex 288 122 40 9109513 t i i i;
#P newex 142 122 67 9109513 t b b;
#P newex 142 265 57 9109513 pack 1 1.;
#P newex 142 146 50 9109513 uzi 1024;
#P newex 142 186 27 9109513 t i i;
#N counter 0 0 1024;
#X flags 0 0;
#P newobj 142 166 89 9109513 counter 0 0 1024;
#P connect 13 0 9 0;
#P connect 9 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 14 0;
#P connect 1 1 6 0;
#P fasten 5 0 2 1 293 143 187 143;
#P lcolor 2;
#P fasten 6 0 7 0 164 237 194 237;
#P connect 7 0 3 1;
#P connect 4 1 0 3;
#P connect 8 0 7 1;
#P fasten 5 1 0 4 308 154 223 154;
#P connect 12 0 11 0;
#P fasten 9 0 10 0 147 73 293 73;
#P connect 10 0 5 0;
#P fasten 5 2 6 1 323 172 395 172;
#P pop;
#P newobj 22 258 65 9109513 p HanWindow;
#P comment 342 199 100 9109513 load file;
#P user jsui 300 199 41 21 1 0 0 jsui_textbutton.js load;
#P user gain~ 134 350 24 100 158 0 1.071519 7.94321 10.;
#P user ezdac~ 134 481 178 514 0;
#N vpatcher 555 328 1155 728;
#P window setfont "Sans Serif" 9.;
#P newex 174 96 114 9109513 wave~ my-window 0. 0. 1;
#P outlet 174 215 15 0;
#P inlet 175 38 15 0;
#P connect 0 0 2 0;
#P connect 2 0 1 0;
#P pop;
#P newobj 242 286 100 9109513 p WindowTableLookup;
#P newex 134 320 27 9109513 *~;
#N vpatcher 580 142 1273 831;
#P origin 0 -17;
#P window setfont "Sans Serif" 9.;
#P flonum 335 130 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 103 109 116 9109513 wave~ audiobuffer 0. 0. 1;
#P message 257 45 43 9109513 replace;
#P message 334 46 28 9109513 clear;
#P newex 257 104 105 9109513 info~ audiobuffer;
#P newex 257 71 104 9109513 buffer~ audiobuffer;
#P inlet 257 22 15 0;
#P outlet 103 161 15 0;
#P inlet 101 21 15 0;
#P connect 0 0 7 0;
#P connect 7 0 1 0;
#P connect 2 0 6 0;
#P connect 5 0 3 0;
#P connect 6 0 3 0;
#P fasten 3 1 4 0 356 97 262 97;
#P connect 4 6 8 0;
#P pop;
#P newobj 133 286 91 9109513 p AudioTableLookup;
#P newex 133 246 41 9109513 phasor~;
#P number 133 224 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 174 224 100 9109513 desired fundamental;
#P connect 3 0 13 0;
#P connect 11 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 7 0;
#P connect 7 0 6 0;
#P fasten 5 0 4 1 247 313 156 313;
#P connect 7 0 6 1;
#P hidden fasten 8 0 3 1 305 268 219 268;
#P fasten 2 0 5 0 138 274 247 274;
#P connect 5 0 12 0;
#P window clipboard copycount 15;


June 12, 2007 | 6:01 am

apalomba@austin.rr.com schrieb:
> – i am currently using number~ to convert the audio
> signal into a float to index into a buffer/table. It would
> be nice to know a way to do this at the audio rate, without
> having to convert.

replace peek~ with index~ and connect directly.
The audiorate poke~ is index~.

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


June 15, 2007 | 6:33 pm

> I think I found the problem. It looks as though peek~ is
> not very good at doing audio rate playback. I think wave~ is
> what we really want to use in this case. I am also using a
> single cycle of a waveform to test with. I simplified the
> patch a bit an removed things that did not make sense.
>

for anybody still interested in this thread, here is a version
modelled after the first part of the paper, which is about generating
synthetic formants. no phase bashing is needed, since while creating
the wavetable we can make sure that all partials are phase-aligned.

volker

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden newex 177 51 52 196617 t 100 1 b;
#P hidden newex 176 33 48 196617 loadbang;
#N vpatcher 20 74 620 474;
#P window setfont "Sans Serif" 9.;
#P newex 50 92 32 196617 line~;
#P message 50 72 43 196617 $1 100;
#P inlet 50 30 15 0;
#P outlet 50 114 15 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 0 0;
#P pop;
#P newobj 189 117 30 196617 p;
#P message 236 250 25 196617 -40;
#P flonum 189 93 35 9 1. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user multiSlider 236 271 148 116 -40. -6. 12 2681 15 0 0 2 0 33 0;
#M frgb 79 47 37;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#N vpatcher 10 59 583 591;
#P window setfont "Sans Serif" 9.;
#P newex 383 45 48 196617 loadbang;
#P window linecount 1;
#P message 383 75 91 196617 sizeinsamps 1024;
#P newex 339 229 21 196617 t 0;
#P window linecount 0;
#P newex 339 207 46 196617 sel -40.;
#P newex 375 229 34 196617 dbtoa;
#N counter 1 1000;
#X flags 0 0;
#P newobj 246 249 80 196617 counter 1 1000;
#P newex 215 73 141 196617 t l b clear;
#P newex 90 340 54 196617 + 0.;
#P window linecount 1;
#P newex 90 314 45 196617 peek~ x;
#P window linecount 0;
#P newex 73 370 45 196617 peek~ x;
#P newex 215 157 29 196617 t b f;
#P newex 86 244 59 196617 uzi 1024 0;
#P newex 215 129 25 196617 iter;
#P newex 345 112 74 196617 buffer~ x 100;
#P newex 134 285 235 196617 expr sin(2*3.14159263*$i1*$f2/ 1024.) * $f3;
#P inlet 215 37 15 0;
#P fasten 4 2 6 0 139 268 78 268;
#P connect 5 0 4 0;
#P fasten 4 2 7 0 139 274 95 274;
#P connect 7 0 8 0;
#P connect 8 0 6 1;
#P connect 4 2 1 0;
#P connect 1 0 8 1;
#P connect 0 0 9 0;
#P connect 9 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 10 0;
#P connect 10 0 1 1;
#P connect 9 1 10 2;
#P connect 5 1 12 0;
#P connect 12 0 13 0;
#P connect 14 0 2 0;
#P connect 9 2 2 0;
#P connect 13 0 1 2;
#P connect 11 0 1 2;
#P connect 12 1 11 0;
#P connect 15 0 14 0;
#P pop;
#P newobj 236 392 48 196617 p wtable;
#N vpatcher 20 74 620 474;
#P window setfont "Sans Serif" 9.;
#P newex 50 92 32 196617 line~;
#P message 50 72 43 196617 $1 100;
#P newex 50 50 29 196617 * 2.;
#P inlet 50 30 15 0;
#P outlet 50 114 15 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 0 0;
#P pop;
#P newobj 122 115 30 196617 p;
#N vpatcher 20 74 620 474;
#P outlet 113 206 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 113 164 27 196617 -~;
#P newex 130 130 30 196617 >~ 1;
#P window linecount 0;
#P newex 113 90 40 196617 +~ 0.5;
#P inlet 113 60 15 0;
#P connect 0 0 1 0;
#P connect 1 0 3 0;
#P connect 3 0 4 0;
#P connect 1 0 2 0;
#P connect 2 0 3 1;
#P pop;
#P newobj 134 180 57 196617 p shift180;
#N vpatcher 20 74 551 511;
#P inlet 327 38 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 261 88 32 196617 *~ 1;
#P newex 50 352 27 196617 *~;
#P user scope~ 273 161 403 291 256 3 128 -1. 1. 0 0. 0 0. 102 255 51
135 135 135 0;
#P newex 261 115 61 196617 wave~ wnd;
#P newex 50 234 49 196617 wave~ x;
#P user scope~ 103 160 233 290 256 3 128 -1. 1. 0 0. 0 0. 102 255 51
135 135 135 0;
#P newex 50 122 72 196617 pong~ 1 0. 1.;
#P newex 50 86 33 196617 *~ 2;
#P inlet 50 29 15 0;
#P inlet 112 26 15 0;
#P outlet 50 374 15 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 6 0;
#P connect 6 0 9 0;
#P connect 9 0 0 0;
#P fasten 7 0 9 1 266 311 72 311;
#P connect 1 0 3 1;
#P connect 4 0 5 0;
#P fasten 2 0 10 0 55 51 266 51;
#P connect 10 0 7 0;
#P connect 7 0 8 0;
#P connect 11 0 10 1;
#P pop;
#P newobj 134 202 123 196617 p gransamp;
#N vpatcher 20 74 551 511;
#P inlet 327 38 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 261 88 32 196617 *~ 1;
#P newex 50 352 27 196617 *~;
#P user scope~ 273 161 403 291 256 3 128 -1. 1. 0 0. 0 0. 102 255 51
135 135 135 0;
#P newex 261 115 61 196617 wave~ wnd;
#P newex 50 234 49 196617 wave~ x;
#P user scope~ 103 160 233 290 256 3 128 -1. 1. 0 0. 0 0. 102 255 51
135 135 135 0;
#P newex 50 122 72 196617 pong~ 1 0. 1.;
#P newex 50 86 33 196617 *~ 2;
#P inlet 50 29 15 0;
#P inlet 112 26 15 0;
#P outlet 50 374 15 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P connect 4 0 6 0;
#P connect 6 0 9 0;
#P connect 9 0 0 0;
#P fasten 7 0 9 1 266 311 72 311;
#P connect 1 0 3 1;
#P connect 4 0 5 0;
#P fasten 2 0 10 0 55 51 266 51;
#P connect 10 0 7 0;
#P connect 7 0 8 0;
#P connect 11 0 10 1;
#P pop;
#P newobj 42 203 83 196617 p gransamp;
#N vpatcher 552 44 1001 321;
#P window setfont "Sans Serif" 9.;
#P newex 66 43 48 196617 loadbang;
#P window linecount 1;
#P newex 82 189 57 196617 peek~ wnd;
#P button 66 111 15 0;
#P window linecount 0;
#P newex 66 133 53 196617 uzi 512 0;
#P newex 108 162 224 196617 expr 0.5 – 0.5*cos(2*3.14159263*$i1/512.);
#P message 142 97 85 196617 sizeinsamps 512;
#P newex 143 126 86 196617 buffer~ wnd 100;
#P connect 6 0 4 0;
#P connect 4 0 3 0;
#P fasten 3 2 5 0 113 155 87 155;
#P connect 2 0 5 1;
#P connect 3 2 2 0;
#P connect 6 0 1 0;
#P connect 1 0 0 0;
#P pop;
#P newobj 358 155 39 196617 p wind;
#P user led 22 528 17 17 0 150;
#P newex 39 528 30 196617 dac~;
#P user gain~ 42 390 24 100 158 0 1.071519 7.94321 10.;
#P flonum 122 94 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden newex 129 381 48 196617 loadbang;
#P hidden message 129 403 32 196617 set x;
#P user waveform~ 129 422 363 137 3 9;
#W mode select;
#W mouseoutput none;
#W clipdraw 1;
#W unit samples;
#W grid 22.675737;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 0;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 146 179 217;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P newex 42 113 35 196617 * 0.5;
#P flonum 42 77 44 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 42 136 46 196617 phasor~;
#P comment 130 81 29 196617 S;
#P comment 197 80 47 196617 T;
#P comment 344 136 100 196617 hanning window;
#P window setfont "Sans Serif" 14.;
#P window linecount 2;
#P comment 390 313 100 196622 create a wavetable;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 25 58 100 196617 fundamental freq;
#P hidden connect 12 0 13 0;
#P hidden connect 14 0 13 0;
#P hidden connect 26 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 5 0;
#P connect 5 0 16 0;
#P connect 16 0 12 0;
#P fasten 17 0 12 0 139 246 47 246;
#P hidden connect 12 0 13 1;
#P fasten 19 0 16 1 127 163 83 163;
#P fasten 24 0 16 2 194 144 119 144;
#P hidden connect 26 1 11 0;
#P connect 11 0 19 0;
#P hidden connect 10 0 9 0;
#P hidden connect 9 0 8 0;
#P connect 5 0 18 0;
#P connect 18 0 17 0;
#P hidden connect 25 0 26 0;
#P hidden connect 26 1 22 0;
#P connect 22 0 24 0;
#P fasten 19 0 17 1 127 163 195 163;
#P hidden connect 26 2 23 0;
#P connect 23 0 21 0;
#P connect 21 0 20 0;
#P fasten 24 0 17 2 194 144 251 144;
#P window clipboard copycount 27;


June 25, 2007 | 6:22 pm

any other prograss on this matter?


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