Items tagged with audiotools

Feed

Hello there, my first time posting in this forum and using Maple, so sorry if I make some mistakes.

I'm trying to read a wav audio file, but there's this weird error that I can't understand : 

with(AudioTools);

[Audio, Clip, Convolution, Create, Duration, Extract, FormatFromName, Formats, Modulate, Normalize, Play, Preview, Read, Record, Resample, Scale, ToMono, ToStereo, Write]


audio := Read("C:\\Users\\Simon\\Desktop\\Test\\440.wav");

Error, (in readbytes) WAVE Error: unexpected end of file

Do you know what it can mean ? I'm sure it's a wave file, so I don't really get it

I attempted to use convolution in AudioTools to convolve 2 vectors with arbitrary values, but could not since the operation is expecting numeric values.  Can this be done?    Is there not a convolution operastor in the LinearAlgebra package?  See attached:

convolutionWithAu[1].mw

I performed the following procedure to simulate the function of Matlab soundsc(Scale data and play as sound).



N := 16000;
 t := Vector(N, i-> evalf(2*i/(N-1)) end proc);

sound1 := sin~((2*evalf(Pi)*440)*t);

aud := Create(sound1, duration = 10.0);

PlayWave := proc (data, SampleFreq)
local SoundFile;
setattribute(data, SampleFreq, 16, 1);
SoundFile := "Bflat3.wav";
Write(SoundFile, data);
process[launch](cat("sndrec32.exe ", SoundFile))

Page 1 of 1