function varargout = piano(varargin)
% PIANO MATLAB code for piano.fig
% PIANO, by itself, creates a new PIANO or raises the existing
% singleton*.
%
% H = PIANO returns the handle to a new PIANO or the handle to
% the existing singleton*.
%
% PIANO('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in PIANO.M with the given input arguments.
%
% PIANO('Property','Value',...) creates a new PIANO or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before piano_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to piano_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help piano
% Last Modified by GUIDE v2.5 22-Feb-2020 01:57:08
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @piano_OpeningFcn, ...
'gui_OutputFcn', @piano_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before piano is made visible.
function piano_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to piano (see VARARGIN)
% Choose default command line output for piano
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes piano wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = piano_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(261.62557*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(293.66477*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(329.62756*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(349.22823*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton13.
function pushbutton13_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton13 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(277.18263*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton14.
function pushbutton14_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton14 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(391.99544*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton15.
function pushbutton15_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton15 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(440*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton16.
function pushbutton16_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton16 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(493.88330*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton18.
function pushbutton18_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton18 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(311.12698*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton19.
function pushbutton19_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton19 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(369.99442*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton20.
function pushbutton20_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton20 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(415.30470*x).*(1-x/(2*pi));
sound(y,10000);
% --- Executes on button press in pushbutton21.
function pushbutton21_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton21 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
x=linspace(0,2*pi,10000);
y=sin(466.16376*x).*(1-x/(2*pi));
sound(y,10000);