필터 지우기
필터 지우기

Only thing that I want to control is speed. not pitch.

조회 수: 17 (최근 30일)
Daeil Jung
Daeil Jung 2018년 12월 10일
댓글: adnan abid 2021년 1월 14일
[Q, S] = audioread("sample.mp3");
speed = 1.2;
S = S * speed;
soundsc(Q,S);
This is what I do.
as you know, this code makes increase both pitch and speed.
but I want to make change only speed.
How can I control it?
**and How can I only control pitch?

채택된 답변

Jan
Jan 2018년 12월 10일
  댓글 수: 3
michael antonios
michael antonios 2018년 12월 22일
pls how can i change pitch without changing speed ???
Jan
Jan 2018년 12월 24일
@michael: Did you read my answer?

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Bilal AKBANA
Bilal AKBANA 2020년 4월 3일
편집: Bilal AKBANA 2020년 4월 3일
THIS IS THE CLEAR ANSWER I THINK COVERING BOTH VOLUME AND SPEED OF THE SOUND WITH CONDITION THAT YOU HAVE stretchAudio FUNCTION RELEASED AS OF R2019b. THIS ALGORITM CAN CHANGE THE SPEED AND VOLUME OF THE AUDIO WITHOUT MAKING IT SOUND FUNNY.
[y, fs] = audioread("sample.mp3"); % read audio file.
speed = 1.2; % increase speed of sound 1.2 times than the given speed.
volume = 2; % increase volume of sound 2 times than the given volume.
y = stretchAudio(volume*y,speed);
sound(y,fs); % my recommendation is to use sound instead of soundsc
% clear sound; % to stop sound
% OR INSTEAD OF sound you can use
player = audioplayer(y,fs);
% play(player); % comment this out it will play.
% stop(player); % comment this out it will stop.
  댓글 수: 1
adnan abid
adnan abid 2021년 1월 14일
great work man thank you much your code helped a lot

댓글을 달려면 로그인하십시오.


Brian Hemmat
Brian Hemmat 2019년 12월 10일
Starting in R2019b, Audio Toolbox provides functions to shift pitch and time-stretch audio: shiftPitch, stretchAudio.
  댓글 수: 2
Brian Kardon
Brian Kardon 2020년 6월 18일
Those links appear to be invalid
Brian Hemmat
Brian Hemmat 2020년 6월 18일
sorry about that--fixed links

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

태그

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by