i'm in seek of information. Me and a other students like me have to create sound in Matlab. We create them, and we have to create also an interactif interface to play those sound.
So we create a piano, and when we click on a key, it's play the sound ( that is the function. )
We also wanted that we can push a key on the Keyboard that call the function. We heard about KeyPressFCN, but we don't know how to use it, because when we search every tutorial, they didn't give enough information about it.
So, when we rightclick on the element we want, and them we call KeyPressFCN, what is the next step ? What did we have to do to "put" the function on this KeyPressFCN.
For example, to make one of the sound, we have :
% --- Execution lors d'un appui sur le bouton Do (première blanche)
function pushbutton1_Callback(hObject, eventdata, handles)
octave = str2double(get(handles.zone1,'String'));
frequence = 2093; %--- Fréquence initialement Do6
frequence2 = frequence./ octave;
son = sin(2*pi*frequence2*(0:0.000125:0.2));
sound(son);