Question: [AudioTools] Wanna store two *.wav of different length in arrays with same length

 I read to *.wav, copy them into two arrays with same size and I'm not able to write it anymore.

Anybody here who can help?

 

with(AudioTools);

with(ArrayTools);

readlib(FFT);

signalfile := cat("C:/Documents and Settings/848380/Desktop/", "klar.wav");

hfile := cat("C:/Documents and Settings/848380/Desktop/", "church.wav");

x := Read(signalfile);

y := Read(hfile);

Preview(x);

Preview(y);

h := Array(1 .. 2^16, datatype = float[8], storage = rectangular, order = C_order);

s := Array(1 .. 2^16, datatype = float[8], storage = rectangular, order = C_order);

ArrayTools[Copy](x, h);

ArrayTools[Copy](y, s);

Size(h, 2);

Size(s, 2);

Write("C:/Documents and Settings/848380/Desktop/output.wav", h);


Error, invalid input: AudioTools:-Write expects its 2nd argument, audio, to be of type AudioTools:-Audio, but received Array(1..65536, {(1) = -0.23193359375e-2, (2) = -0.2288818359375e-2, (3) = -0.262451171875e-2, (4) = -0.25634765625e-2, (5) = -0.2227783203125e-2, (6) = -0.2349853515625e-2, (7) = -0.225830078125e-2, (8) = -0.201416015625e-2, (9) = -0.238037109375e-2, (10) = -0.244140625e-2, (11) = -0.1678466796875e-2, (12) = -0.146484375e-2, (13) = -0.1739501953125e-2, (14) = -0.1373291015625e-2, (15) = -0.1068115234375e-2, (16) = -0.1068115234375e-2, (17) = -0.946044921875e-3, (18) = -0.946044921875e-3, (19) = -0.1007080078125e-2, (20) = -...
#

Please Wait...