How to use the audioplayer timer function with a GUIDE GUI

조회 수: 3 (최근 30일)
David
David 2011년 8월 31일
I designed a GUI with GUIDE that plays an audio file and plots its waveform. I then wanted to go a little bit further and add a line that tracks across the waveform as the file plays. I know in principle that I can use the "currentsample" property of audioplayer and a callback function containing a plot function to accomplish this, and in fact I can make this work outside of GUIDE. However, I don't understand how to tell a callback function inside of a GUIDE GUI to plot to, say, handles.axes1. What I am finding is that the callback function cannot see the typical "handles" structure that GUIDE GUIs use, and I cannot seem to pass the handles structure to the callback function in the usual way.
In brief, my question is: is there a way to utilize an audioplayer timerfcn within a GUIDE GUI? I would bet that it's possible, I just don't fully understand the data handling process to make it work.
  댓글 수: 1
Daniel Shub
Daniel Shub 2011년 9월 2일
There are a number of ways of doing this. You need to provide a little bit more about how you are trying to accomplish it. Specifically, how is the audioplayer object being created?

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

답변 (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