Piano en matlab

Solo disponible en BuenasTareas
  • Páginas : 3 (623 palabras )
  • Descarga(s) : 0
  • Publicado : 7 de mayo de 2011
Leer documento completo
Vista previa del texto
Piano en matlab

clear all
close all
clc
% MISC PARAMETERS
fontsize=[10];
timekeycolor=[0.7,0.0,0.0];
soundkeycolor=[0.0,0.0,0.7];
keycolor1=[1.0,1.0,1.0];
keycolor2=[1.0,1.0,1.0];keycolor3=[0.0,0.0,0.0];
keycolor4=[0.0,0.0,0.0];

% FIGURE
hFigure=figure(...
'Units','Pixels',...
'Position',[90 400 450 300],...
'Color','k',...
'MenuBar','none',...
'Toolbar','none',...'NumberTitle','off',...
'Name','PIANO');

% KEYS
hButtonGroup=uibuttongroup(...
'Parent',hFigure,...
'Units','Pixels',...
'Position',[0 0 450 300],...
'BackgroundColor',[0,0,0],...'SelectionChangeFcn',@noteSelection_callback);

% WHITE KEYS (t1 - t15)
t1=uicontrol(...
'Style','togglebutton',...
'Parent',hButtonGroup,...
'Units','Pixels',...
'Position',[ 0 0 60 300],...'String','DO',...
'FontSize',fontsize,...
'ForegroundColor',keycolor1,...
'BackgroundColor',keycolor2);

t2=uicontrol(...
'Style','togglebutton',...
'Parent',hButtonGroup,...
'Units','Pixels',...'Position',[55 0 60 300],...
'String','RE',...
'FontSize',fontsize,...
'ForegroundColor',keycolor1,...
'BackgroundColor',keycolor2);

t3=uicontrol(...
'Style','togglebutton',...'Parent',hButtonGroup,...
'Units','Pixels',...
'Position',[110 0 60 300],...
'String','MI',...
'FontSize',fontsize,...
'ForegroundColor',keycolor1,...
'BackgroundColor',keycolor2);

t4=uicontrol(...'Style','togglebutton',...
'Parent',hButtonGroup,...
'Units','Pixels',...
'Position',[165 0 60 300],...
'String','FA',...
'FontSize',fontsize,...
'ForegroundColor',keycolor1,...'BackgroundColor',keycolor2);

t5=uicontrol(...
'Style','togglebutton',...
'Parent',hButtonGroup,...
'Units','Pixels',...
'Position',[220 0 60 300],...
'String','SOL',...
'FontSize',fontsize,...'ForegroundColor',keycolor1,...
'BackgroundColor',keycolor2);

t6=uicontrol(...
'Style','togglebutton',...
'Parent',hButtonGroup,...
'Units','Pixels',...
'Position',[275 0 60 300],...
'String','LA',......
tracking img