Am I on the right track??

Jan 1, 2007 at 8:19pm

Am I on the right track??

Hello, I am attempting some basic convolution of two sound files.
Is this how you’d go about it?
For some reason I get a funny error message…sfplay~ : no open file
but it seems to work ok. I just wonder if I’m not missing something here.
Thanks for taking a look. Any tips or suggestions are very greatly appreciated.
Thanks,
-B

max v2;
#N vpatcher 333 159 1008 673;
#P origin 0 34;
#P user gain~ 330 304 30 36 158 0 1.071519 7.94321 10.;
#P window setfont “Fixedwidth Serif” 10.;
#P window linecount 1;
#P newex 326 259 113 1441802 *~;
#P window setfont “Sans Serif” 9.;
#N sfplay~ 2 120960 0 ;
#P newobj 408 155 53 196617 sfplay~ 2;
#P message 408 117 30 196617 open;
#P toggle 301 35 15 0;
#P message 301 54 41 196617 loop $1;
#P comment 118 66 100 196617 “D” stop file play;
#P newex 278 92 58 196617 select 100;
#N sfplay~ 2 120960 0 ;
#P newobj 193 163 53 196617 sfplay~ 2;
#P message 193 114 30 196617 open;
#P message 230 125 15 196617 1;
#P message 278 125 14 196617 0;
#P newex 230 58 58 196617 select 115;
#P newex 230 36 40 196617 key;
#P comment 119 37 100 196617 “S” start file play;
#P window setfont Times 10.;
#P comment 222 320 41 1310730 Volume;
#P user gain~ 280 303 30 36 158 0 1.071519 7.94321 10.;
#P window setfont “Fixedwidth Serif” 10.;
#P newex 193 259 113 1441802 *~;
#P user ezdac~ 293 390 337 423 219312236;
#P connect 13 0 10 0;
#P connect 8 0 10 0;
#P connect 7 0 10 0;
#P connect 9 0 10 0;
#P connect 10 0 1 0;
#P connect 5 0 6 0;
#P connect 6 0 8 0;
#P connect 6 1 11 0;
#P connect 11 0 7 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P connect 16 0 1 1;
#P connect 14 0 13 0;
#P connect 10 1 17 0;
#P connect 18 0 0 1;
#P connect 17 0 18 0;
#P connect 2 1 18 0;
#P connect 13 0 16 0;
#P connect 8 0 16 0;
#P connect 7 0 16 0;
#P connect 15 0 16 0;
#P connect 16 1 17 1;
#P pop;

#29457
Jan 1, 2007 at 9:23pm

hello,

> Hello, I am attempting some basic convolution of two sound files.
> Is this how you’d go about it?

actually you’re not making a convolution, but just a ring modulation, a multiplication of the two signals in time domain. In order to do a convolution, you have to make this multiplication in frequency domain. take a look at the fft tutorials, there is also one convolution patch in the folder examples, in max folder.

> For some reason I get a funny error message…sfplay~ : no open file
> but it seems to work ok.

I think the patch is ok, you get the message if you begin before opening the two files, otherwise it should work without error messages.

alberto

#92163

You must be logged in to reply to this topic.