How to use 2 datacursors to dynamically change audio files in GUI's?

조회 수: 4 (최근 30일)
In my GUI, I have loaded an audio file ( .wav ) into the variable storedStructure, and saved it in the handles structure - handles.str1
Now, i would like to use 2 data cursors to dynamically alter the audio playing length. For example, if the length of the audio is 5 seconds, if I were to choose 2 cursors at 2 seconds and 4 seconds, it would play only that part of the audio.
I need to put this code right away in my .m file for my GUI.

채택된 답변

Walter Roberson
Walter Roberson 2013년 12월 31일
편집: Walter Roberson 2013년 12월 31일
Is there a reason why you need to use data cursors instead of (for example) ginput() ?
What is the data cursor to be applied against? Data cursors require a graph, but you have not indicated anything as being graphed. Are you graphing the signal level, or are you graphing the time?
Why not use a couple of sliders?
  댓글 수: 13
Mayank Amencherla
Mayank Amencherla 2014년 1월 1일
편집: Mayank Amencherla 2014년 1월 1일
There are no errors but the Audio axes aren't plotting the graph....
Walter Roberson
Walter Roberson 2014년 1월 1일
Correction:
plot(handles.Audio, first_samp : nsamp, sig(first_samp:end, :));

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by