Pure Tone, increasing volume
이전 댓글 표시
Does anyone know how to create a pure tone that increases in volume according to a formula? I want to create a sound that increases in volume for 3 seconds, starting from some default value.
답변 (1개)
Jan
2011년 10월 20일
- Create the sound, here a sin wave.
- Create the shape of the volume as factor with values between 0 and 1.
- Multiply both:
freq = 8192;
w = sin(linspace(0, 2000*pi, freq * 3));
sound(w, freq); % full volume
iniVolume = 0.3;
finVolume = 1.0;
Volume = linspace(iniVolume, finVolume, length(w));
w2 = w .* Volume;
sound(w2, freq);
카테고리
도움말 센터 및 File Exchange에서 Audio and Video Data에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!