Notas de Aula EAC1008


Anexos - Síntese de Take Five

Anexo A - Síntese do Baixo

Anexo B - Síntese da Bateria

Anexo C - Síntese do Piano

Anexo D - Síntese do Sax

Anexos - Rotinas em Matlab para síntese sonora de Take Five.

% Rotinas auxiliares                                                                 

close all;
clear
all;
clc;
format
long;

%–––––––––––––––––––––––-%
% Frequências das notas
%---------------------%
f_C1 = 65.40639133;
f_Db1 = 69.29565774;
f_D1 = 73.41619198;
f_Eb1 = 73.41619198;
f_E1 = 82.40688923;
f_F1 = 87.30705786;
f_Gb1 = 92.49860568;
f_G1 = 97.998859;
f_Ab1 = 103.8261744;
f_A1 = 110;
f_Bb1 = 116.5409404;
f_B1 = 123.4708253;
f_C2 = 130.8127827;
f_Db2 = 138.5913155;
f_D2 = 146.832384;
f_Eb2 = 155.5634919;
f_E2 = 164.8137785;
f_F2 = 174.6141157;
f_Gb2 = 184.9972114;
f_G2 = 195.997718;
f_Ab2 = 207.6523488;
f_A2 = 220;
f_Bb2 = 233.0818808;
f_B2 = 246.9416506;
f_C3 = 261.6255653;
f_Db3 = 277.182631;
f_D3 = 293.6647679;
f_Eb3 = 311.1269837;
f_E3 = 329.6275569;
f_F3 = 349.2282314;
f_Gb3 = 369.9944227;
f_G3 = 391.995436;
f_Ab3 = 415.3046976;
f_A3 = 440;
f_Bb3 = 466.1637615;
f_B3 = 493.8833013;
f_C4 = 523.2511306;
f_Db4 = 554.365262;
f_D4 = 587.3295358;
f_Eb4 = 622.2539674;
f_E4 = 659.2551138;
f_F4 = 698.4564629;

%––––––––––––––––––––––––––––––––––-%
% TAKE FIVE - Paul Desmand
% Tonalidade de Mi bemol menor
% fórmula de compasso: 5/4
% semínima = 172 BPM,
%––––––––––––––––––––––––––––––-––––%
% Andamento

BPM = 172;
% Beats por minuto
M = 60;
% 1 minuto
FS = 44100;
% Frequência de Amostragem (Hz)
TS = 1/FS;
% Intervalo
D = M/BPM;

%–––––––––––––––––––––––-%
% Valores
%––––––––––––––––––-–––––%
minima2 = 0:TS:(4*D);
% 2 minimas
minimap = 0:TS:(3*D);
% minima pontuada
minima = 0:TS:(2*D);
% minima
seminimap = 0:TS:(1.5*D);
% seminima pontuada
seminima = 0:TS:(D);
% seminima
colcheia = 0:TS:(D/2);
% colcheia
semicolcheia = 0:TS:(D/4);
% semicolcheia
%––––––––––––––––––––––––%
% Pausas
%––––––––––––––––––––––––%
pminima = 0.001*sin(2*pi*1*minima);
pminimap = 0.001*sin(2*pi*1*minimap);
pseminima = 0.001*sin(2*pi*1*seminima);
pcolcheia = 0.001*sin(2*pi*1*colcheia);
psemicolcheia = 0.001*sin(2*pi*1*semicolcheia);

%–––––––––––––––––––––––-%
% Fatores de Amortecimento
%––––––––––––––––––-–––––%
gminima2 = 2;
% 2 minimas
gminimap = 3;
% minima pontuada
gminima = 4;
% minima
gseminimap = 6;
% seminima pontuada
gseminima = 8;
% seminima
gcolcheia = 16;
% colcheia
gsemicolcheia = 32;
% semicolcheia

%–––––––––––––––––––––––––––––––––––––––––––––-%
% Amplitude (fator multiplicativo)
%––––––––––––––––––––––––––––––––––––––––-–––––%
pp = 0.3;
% pianíssimo
p = 0.75;
% piano
f = 1.5;
% forte
ff = 2;
% fortíssimo                                                                         


% cria envelope ADSR                                                             

 function y=envelope(Tamanho,Tatk,Trelax)

    n=Tamanho;
   
%Tatk=0.125;
   
%Trelax=0.25;

    nAtk = round(n*Tatk);
    nRelax = round(n*Trelax);
    nSustain = n - nAtk - nRelax;

   
if nSustain > 0
    y= [((-exp(-(linspace(0,1,nAtk))).^32)+1), (exp(-linspace(0,1.25,(nSustain)))), (exp(-linspace(1.25,5,nRelax)))];
   
else
        y= [((-exp(-(linspace(0,1,nAtk))).^32)+1), (exp(-linspace(0,1.25,(nSustain)))), (exp(-linspace(1.25,5,nRelax)))];
   
end
end                                                                                  

%------------------------%
% Notas musicais
%------------------------%
C1_minimap = sin(2*pi*f_C1*minimap).*envelope(length(minimap),0.125,0.2);
C1_minima = sin(2*pi*f_C1*minima).*envelope(length(minima),0.125,0.2);
C1_seminimap = sin(2*pi*f_C1*seminimap).*envelope(length(seminimap),0.125,0.2);
C1_seminima = sin(2*pi*f_C1*seminima).*envelope(length(seminima),0.125,0.2);
C1_colcheia = sin(2*pi*f_C1*colcheia).*envelope(length(colcheia),0.125,0.2);
C1_semicolcheia = sin(2*pi*f_C1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
C2_minimap = sin(2*pi*f_C2*minimap).*envelope(length(minimap),0.125,0.2);
C2_minima = sin(2*pi*f_C2*minima).*envelope(length(minima),0.125,0.2);
C2_seminimap = sin(2*pi*f_C2*seminimap).*envelope(length(seminimap),0.125,0.2);
C2_seminima = sin(2*pi*f_C2*seminima).*envelope(length(seminima),0.125,0.2);
C2_colcheia = sin(2*pi*f_C2*colcheia).*envelope(length(colcheia),0.125,0.2);
C2_semicolcheia = sin(2*pi*f_C2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
C3_minimap = sin(2*pi*f_C3*minimap).*envelope(length(minimap),0.125,0.2);
C3_minima = sin(2*pi*f_C3*minima).*envelope(length(minima),0.125,0.2);
C3_seminimap = sin(2*pi*f_C3*seminimap).*envelope(length(seminimap),0.125,0.2);
C3_seminima = sin(2*pi*f_C3*seminima).*envelope(length(seminima),0.125,0.2);
C3_colcheia = sin(2*pi*f_C3*colcheia).*envelope(length(colcheia),0.125,0.2);
C3_semicolcheia = sin(2*pi*f_C3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
C4_minimap = sin(2*pi*f_C4*minimap).*envelope(length(minimap),0.125,0.2);
C4_minima = sin(2*pi*f_C4*minima).*envelope(length(minima),0.125,0.2);
C4_seminimap = sin(2*pi*f_C4*seminimap).*envelope(length(seminimap),0.125,0.2);
C4_seminima = sin(2*pi*f_C4*seminima).*envelope(length(seminima),0.125,0.2);
C4_colcheia = sin(2*pi*f_C4*colcheia).*envelope(length(colcheia),0.125,0.2);
C4_semicolcheia = sin(2*pi*f_C4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Db1_minimap = sin(2*pi*f_Db1*minimap).*envelope(length(minimap),0.125,0.2);
Db1_minima = sin(2*pi*f_Db1*minima).*envelope(length(minima),0.125,0.2);
Db1_seminimap = sin(2*pi*f_Db1*seminimap).*envelope(length(seminimap),0.125,0.2);
Db1_seminima = sin(2*pi*f_Db1*seminima).*envelope(length(seminima),0.125,0.2);
Db1_colcheia = sin(2*pi*f_Db1*colcheia).*envelope(length(colcheia),0.125,0.2);
Db1_semicolcheia=sin(2*pi*f_Db1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Db2_minimap = sin(2*pi*f_Db2*minimap).*envelope(length(minimap),0.125,0.2);
Db2_minima = sin(2*pi*f_Db2*minima).*envelope(length(minima),0.125,0.2);
Db2_seminimap = sin(2*pi*f_Db2*seminimap).*envelope(length(seminimap),0.125,0.2);
Db2_seminima = sin(2*pi*f_Db2*seminima).*envelope(length(seminima),0.125,0.2);
Db2_colcheia = sin(2*pi*f_Db2*colcheia).*envelope(length(colcheia),0.125,0.2);
Db2_semicolcheia=sin(2*pi*f_Db2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Db3_minimap = sin(2*pi*f_Db3*minimap).*envelope(length(minimap),0.125,0.2);
Db3_minima = sin(2*pi*f_Db3*minima).*envelope(length(minima),0.125,0.2);
Db3_seminimap = sin(2*pi*f_Db3*seminimap).*envelope(length(seminimap),0.125,0.2);
Db3_seminima = sin(2*pi*f_Db3*seminima).*envelope(length(seminima),0.125,0.2);
Db3_colcheia = sin(2*pi*f_Db3*colcheia).*envelope(length(colcheia),0.125,0.2);
Db3_semicolcheia=sin(2*pi*f_Db3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Db4_minimap = sin(2*pi*f_Db4*minimap).*envelope(length(minimap),0.125,0.2);
Db4_minima = sin(2*pi*f_Db4*minima).*envelope(length(minima),0.125,0.2);
Db4_seminimap = sin(2*pi*f_Db4*seminimap).*envelope(length(seminimap),0.125,0.2);
Db4_seminima = sin(2*pi*f_Db4*seminima).*envelope(length(seminima),0.125,0.2);
Db4_colcheia = sin(2*pi*f_Db4*colcheia).*envelope(length(colcheia),0.125,0.2);
Db4_semicolcheia=sin(2*pi*f_Db4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Db5_minimap = sin(2*pi*f_Db5*minimap).*envelope(length(minimap),0.125,0.2);
Db5_minima = sin(2*pi*f_Db5*minima).*envelope(length(minima),0.125,0.2);
Db5_seminimap = sin(2*pi*f_Db5*seminimap).*envelope(length(seminimap),0.125,0.2);
Db5_seminima = sin(2*pi*f_Db5*seminima).*envelope(length(seminima),0.125,0.2);
Db5_colcheia = sin(2*pi*f_Db5*colcheia).*envelope(length(colcheia),0.125,0.2);
Db5_semicolcheia=sin(2*pi*f_Db5*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
D1_minimap = sin(2*pi*f_D1*minimap).*envelope(length(minimap),0.125,0.2);
D1_minima = sin(2*pi*f_D1*minima).*envelope(length(minima),0.125,0.2);
D1_seminimap = sin(2*pi*f_D1*seminimap).*envelope(length(seminimap),0.125,0.2);
D1_seminima = sin(2*pi*f_D1*seminima).*envelope(length(seminima),0.125,0.2);
D1_colcheia = sin(2*pi*f_D1*colcheia).*envelope(length(colcheia),0.125,0.2);
D1_semicolcheia = sin(2*pi*f_D1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
D2_minimap = sin(2*pi*f_D2*minimap).*envelope(length(minimap),0.125,0.2);
D2_minima = sin(2*pi*f_D2*minima).*envelope(length(minima),0.125,0.2);
D2_seminimap = sin(2*pi*f_D2*seminimap).*envelope(length(seminimap),0.125,0.2);
D2_seminima = sin(2*pi*f_D2*seminima).*envelope(length(seminima),0.125,0.2);
D2_colcheia = sin(2*pi*f_D2*colcheia).*envelope(length(colcheia),0.125,0.2);
D2_semicolcheia = sin(2*pi*f_D2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
D3_minimap = sin(2*pi*f_D3*minimap).*envelope(length(minimap),0.125,0.2);
D3_minima = sin(2*pi*f_D3*minima).*envelope(length(minima),0.125,0.2);
D3_seminimap = sin(2*pi*f_D3*seminimap).*envelope(length(seminimap),0.125,0.2);
D3_seminima = sin(2*pi*f_D3*seminima).*envelope(length(seminima),0.125,0.2);
D3_colcheia = sin(2*pi*f_D3*colcheia).*envelope(length(colcheia),0.125,0.2);
D3_semicolcheia = sin(2*pi*f_D3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
D4_minimap = sin(2*pi*f_D4*minimap).*envelope(length(minimap),0.125,0.2);
D4_minima = sin(2*pi*f_D4*minima).*envelope(length(minima),0.125,0.2);
D4_seminimap = sin(2*pi*f_D4*seminimap).*envelope(length(seminimap),0.125,0.2);
D4_seminima = sin(2*pi*f_D4*seminima).*envelope(length(seminima),0.125,0.2);
D4_colcheia = sin(2*pi*f_D4*colcheia).*envelope(length(colcheia),0.125,0.2);
D4_semicolcheia = sin(2*pi*f_D4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Eb1_minimap = sin(2*pi*f_Eb1*minimap).*envelope(length(minimap),0.125,0.2);
Eb1_minima = sin(2*pi*f_Eb1*minima).*envelope(length(minima),0.125,0.2);
Eb1_seminimap = sin(2*pi*f_Eb1*seminimap).*envelope(length(seminimap),0.125,0.2);
Eb1_seminima = sin(2*pi*f_Eb1*seminima).*envelope(length(seminima),0.125,0.2);
Eb1_colcheia = sin(2*pi*f_Eb1*colcheia).*envelope(length(colcheia),0.125,0.2);
Eb1_semicolcheia=sin(2*pi*f_Eb1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Eb2_minimap = sin(2*pi*f_Eb2*minimap).*envelope(length(minimap),0.125,0.2);
Eb2_minima = sin(2*pi*f_Eb2*minima).*envelope(length(minima),0.125,0.2);
Eb2_seminimap = sin(2*pi*f_Eb2*seminimap).*envelope(length(seminimap),0.125,0.2);
Eb2_seminima = sin(2*pi*f_Eb2*seminima).*envelope(length(seminima),0.125,0.2);
Eb2_colcheia = sin(2*pi*f_Eb2*colcheia).*envelope(length(colcheia),0.125,0.2);
Eb2_semicolcheia=sin(2*pi*f_Eb2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Eb3_minima2 = sin(2*pi*f_Eb3*minima2).*exp(-gminima2*minima2);
Eb3_minimap = sin(2*pi*f_Eb3*minimap).*envelope(length(minimap),0.125,0.2);
Eb3_minima = sin(2*pi*f_Eb3*minima).*envelope(length(minima),0.125,0.2);
Eb3_seminimap = sin(2*pi*f_Eb3*seminimap).*envelope(length(seminimap),0.125,0.2);
Eb3_seminima = sin(2*pi*f_Eb3*seminima).*envelope(length(seminima),0.125,0.2);
Eb3_colcheia = sin(2*pi*f_Eb3*colcheia).*envelope(length(colcheia),0.125,0.2);
Eb3_semicolcheia=sin(2*pi*f_Eb3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Eb4_minimap = sin(2*pi*f_Eb4*minimap).*envelope(length(minimap),0.125,0.2);
Eb4_minima = sin(2*pi*f_Eb4*minima).*envelope(length(minima),0.125,0.2);
Eb4_seminimap = sin(2*pi*f_Eb4*seminimap).*envelope(length(seminimap),0.125,0.2);
Eb4_seminima = sin(2*pi*f_Eb4*seminima).*envelope(length(seminima),0.125,0.2);
Eb4_colcheia = sin(2*pi*f_Eb4*colcheia).*envelope(length(colcheia),0.125,0.2);
Eb4_semicolcheia=sin(2*pi*f_Eb4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Eb5_minimap = sin(2*pi*f_Eb5*minimap).*envelope(length(minimap),0.125,0.2);
Eb5_minima = sin(2*pi*f_Eb5*minima).*envelope(length(minima),0.125,0.2);
Eb5_seminimap = sin(2*pi*f_Eb5*seminimap).*envelope(length(seminimap),0.125,0.2);
Eb5_seminima = sin(2*pi*f_Eb5*seminima).*envelope(length(seminima),0.125,0.2);
Eb5_colcheia = sin(2*pi*f_Eb5*colcheia).*envelope(length(colcheia),0.125,0.2);
Eb5_semicolcheia=sin(2*pi*f_Eb5*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
E1_minimap = sin(2*pi*f_E1*minimap).*envelope(length(minimap),0.125,0.2);
E1_minima = sin(2*pi*f_E1*minima).*envelope(length(minima),0.125,0.2);
E1_seminimap = sin(2*pi*f_E1*seminimap).*envelope(length(seminimap),0.125,0.2);
E1_seminima = sin(2*pi*f_E1*seminima).*envelope(length(seminima),0.125,0.2);
E1_colcheia = sin(2*pi*f_E1*colcheia).*envelope(length(colcheia),0.125,0.2);
E1_semicolcheia = sin(2*pi*f_E1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
E2_minimap = sin(2*pi*f_E2*minimap).*envelope(length(minimap),0.125,0.2);
E2_minima = sin(2*pi*f_E2*minima).*envelope(length(minima),0.125,0.2);
E2_seminimap = sin(2*pi*f_E2*seminimap).*envelope(length(seminimap),0.125,0.2);
E2_seminima = sin(2*pi*f_E2*seminima).*envelope(length(seminima),0.125,0.2);
E2_colcheia = sin(2*pi*f_E2*colcheia).*envelope(length(colcheia),0.125,0.2);
E2_semicolcheia = sin(2*pi*f_E2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
E3_minimap = sin(2*pi*f_E3*minimap).*envelope(length(minimap),0.125,0.2);
E3_minima = sin(2*pi*f_E3*minima).*envelope(length(minima),0.125,0.2);
E3_seminimap = sin(2*pi*f_E3*seminimap).*envelope(length(seminimap),0.125,0.2);
E3_seminima = sin(2*pi*f_E3*seminima).*envelope(length(seminima),0.125,0.2);
E3_colcheia = sin(2*pi*f_E3*colcheia).*envelope(length(colcheia),0.125,0.2);
E3_semicolcheia = sin(2*pi*f_E3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
E4_minimap = sin(2*pi*f_E4*minimap).*envelope(length(minimap),0.125,0.2);
E4_minima = sin(2*pi*f_E4*minima).*envelope(length(minima),0.125,0.2);
E4_seminimap = sin(2*pi*f_E4*seminimap).*envelope(length(seminimap),0.125,0.2);
E4_seminima = sin(2*pi*f_E4*seminima).*envelope(length(seminima),0.125,0.2);
E4_colcheia = sin(2*pi*f_E4*colcheia).*envelope(length(colcheia),0.125,0.2);
E4_semicolcheia = sin(2*pi*f_E4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
F1_minimap = sin(2*pi*f_F1*minimap).*envelope(length(minimap),0.125,0.2);
F1_minima = sin(2*pi*f_F1*minima).*envelope(length(minima),0.125,0.2);
F1_seminimap = sin(2*pi*f_F1*seminimap).*envelope(length(seminimap),0.125,0.2);
F1_seminima = sin(2*pi*f_F1*seminima).*envelope(length(seminima),0.125,0.2);
F1_colcheia = sin(2*pi*f_F1*colcheia).*envelope(length(colcheia),0.125,0.2);
F1_semicolcheia = sin(2*pi*f_F1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
F2_minimap = sin(2*pi*f_F2*minimap).*envelope(length(minimap),0.125,0.2);
F2_minima = sin(2*pi*f_F2*minima).*envelope(length(minima),0.125,0.2);
F2_seminimap = sin(2*pi*f_F2*seminimap).*envelope(length(seminimap),0.125,0.2);
F2_seminima = sin(2*pi*f_F2*seminima).*envelope(length(seminima),0.125,0.2);
F2_colcheia = sin(2*pi*f_F2*colcheia).*envelope(length(colcheia),0.125,0.2);
F2_semicolcheia = sin(2*pi*f_F2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
F3_minimap = sin(2*pi*f_F3*minimap).*envelope(length(minimap),0.125,0.2);
F3_minima = sin(2*pi*f_F3*minima).*envelope(length(minima),0.125,0.2);
F3_seminimap = sin(2*pi*f_F3*seminimap).*envelope(length(seminimap),0.125,0.2);
F3_seminima = sin(2*pi*f_F3*seminima).*envelope(length(seminima),0.125,0.2);
F3_colcheia = sin(2*pi*f_F3*colcheia).*envelope(length(colcheia),0.125,0.2);
F3_semicolcheia = sin(2*pi*f_F3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
F4_minimap = sin(2*pi*f_F4*minimap).*envelope(length(minimap),0.125,0.2);
F4_minima = sin(2*pi*f_F4*minima).*envelope(length(minima),0.125,0.2);
F4_seminimap = sin(2*pi*f_F4*seminimap).*envelope(length(seminimap),0.125,0.2);
F4_seminima = sin(2*pi*f_F4*seminima).*envelope(length(seminima),0.125,0.2);
F4_colcheia = sin(2*pi*f_F4*colcheia).*envelope(length(colcheia),0.125,0.2);
F4_semicolcheia = sin(2*pi*f_F4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Gb1_minimap = sin(2*pi*f_Gb1*minimap).*envelope(length(minimap),0.125,0.2);
Gb1_minima = sin(2*pi*f_Gb1*minima).*envelope(length(minima),0.125,0.2);
Gb1_seminimap = sin(2*pi*f_Gb1*seminimap).*envelope(length(seminimap),0.125,0.2);
Gb1_seminima = sin(2*pi*f_Gb1*seminima).*envelope(length(seminima),0.125,0.2);
Gb1_colcheia = sin(2*pi*f_Gb1*colcheia).*envelope(length(colcheia),0.125,0.2);
Gb1_semicolcheia=sin(2*pi*f_Gb1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Gb2_minimap = sin(2*pi*f_Gb2*minimap).*envelope(length(minimap),0.125,0.2);
Gb2_minima = sin(2*pi*f_Gb2*minima).*envelope(length(minima),0.125,0.2);
Gb2_seminimap = sin(2*pi*f_Gb2*seminimap).*envelope(length(seminimap),0.125,0.2);
Gb2_seminima = sin(2*pi*f_Gb2*seminima).*envelope(length(seminima),0.125,0.2);
Gb2_colcheia = sin(2*pi*f_Gb2*colcheia).*envelope(length(colcheia),0.125,0.2);
Gb2_semicolcheia=sin(2*pi*f_Gb2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Gb3_minimap = sin(2*pi*f_Gb3*minimap).*envelope(length(minimap),0.125,0.2);
Gb3_minima = sin(2*pi*f_Gb3*minima).*envelope(length(minima),0.125,0.2);
Gb3_seminimap = sin(2*pi*f_Gb3*seminimap).*envelope(length(seminimap),0.125,0.2);
Gb3_seminima = sin(2*pi*f_Gb3*seminima).*envelope(length(seminima),0.125,0.2);
Gb3_colcheia = sin(2*pi*f_Gb3*colcheia).*envelope(length(colcheia),0.125,0.2);
Gb3_semicolcheia=sin(2*pi*f_Gb3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Gb4_minimap = sin(2*pi*f_Gb4*minimap).*envelope(length(minimap),0.125,0.2);
Gb4_minima = sin(2*pi*f_Gb4*minima).*envelope(length(minima),0.125,0.2);
Gb4_seminimap = sin(2*pi*f_Gb4*seminimap).*envelope(length(seminimap),0.125,0.2);
Gb4_seminima = sin(2*pi*f_Gb4*seminima).*envelope(length(seminima),0.125,0.2);
Gb4_colcheia = sin(2*pi*f_Gb4*colcheia).*envelope(length(colcheia),0.125,0.2);
Gb4_semicolcheia=sin(2*pi*f_Gb4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
G1_minimap = sin(2*pi*f_G1*minimap).*envelope(length(minimap),0.125,0.2);
G1_minima = sin(2*pi*f_G1*minima).*envelope(length(minima),0.125,0.2);
G1_seminimap = sin(2*pi*f_G1*seminimap).*envelope(length(seminimap),0.125,0.2);
G1_seminima = sin(2*pi*f_G1*seminima).*envelope(length(seminima),0.125,0.2);
G1_colcheia = sin(2*pi*f_G1*colcheia).*envelope(length(colcheia),0.125,0.2);
G1_semicolcheia = sin(2*pi*f_G1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
G2_minimap = sin(2*pi*f_G2*minimap).*envelope(length(minimap),0.125,0.2);
G2_minima = sin(2*pi*f_G2*minima).*envelope(length(minima),0.125,0.2);
G2_seminimap = sin(2*pi*f_G2*seminimap).*envelope(length(seminimap),0.125,0.2);
G2_seminima = sin(2*pi*f_G2*seminima).*envelope(length(seminima),0.125,0.2);
G2_colcheia = sin(2*pi*f_G2*colcheia).*envelope(length(colcheia),0.125,0.2);
G2_semicolcheia = sin(2*pi*f_G2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
G3_minimap = sin(2*pi*f_G3*minimap).*envelope(length(minimap),0.125,0.2);
G3_minima = sin(2*pi*f_G3*minima).*envelope(length(minima),0.125,0.2);
G3_seminimap = sin(2*pi*f_G3*seminimap).*envelope(length(seminimap),0.125,0.2);
G3_seminima = sin(2*pi*f_G3*seminima).*envelope(length(seminima),0.125,0.2);
G3_colcheia = sin(2*pi*f_G3*colcheia).*envelope(length(colcheia),0.125,0.2);
G3_semicolcheia = sin(2*pi*f_G3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
G4_minimap = sin(2*pi*f_G4*minimap).*envelope(length(minimap),0.125,0.2);
G4_minima = sin(2*pi*f_G4*minima).*envelope(length(minima),0.125,0.2);
G4_seminimap = sin(2*pi*f_G4*seminimap).*envelope(length(seminimap),0.125,0.2);
G4_seminima = sin(2*pi*f_G4*seminima).*envelope(length(seminima),0.125,0.2);
G4_colcheia = sin(2*pi*f_G4*colcheia).*envelope(length(colcheia),0.125,0.2);
G4_semicolcheia = sin(2*pi*f_G4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Ab1_minimap = sin(2*pi*f_Ab1*minimap).*envelope(length(minimap),0.125,0.2);
Ab1_minima = sin(2*pi*f_Ab1*minima).*envelope(length(minima),0.125,0.2);
Ab1_seminimap = sin(2*pi*f_Ab1*seminimap).*envelope(length(seminimap),0.125,0.2);
Ab1_seminima = sin(2*pi*f_Ab1*seminima).*envelope(length(seminima),0.125,0.2);
Ab1_colcheia = sin(2*pi*f_Ab1*colcheia).*envelope(length(colcheia),0.125,0.2);
Ab1_semicolcheia=sin(2*pi*f_Ab1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Ab2_minimap = sin(2*pi*f_Ab2*minimap).*envelope(length(minimap),0.125,0.2);
Ab2_minima = sin(2*pi*f_Ab2*minima).*envelope(length(minima),0.125,0.2);
Ab2_seminimap = sin(2*pi*f_Ab2*seminimap).*envelope(length(seminimap),0.125,0.2);
Ab2_seminima = sin(2*pi*f_Ab2*seminima).*envelope(length(seminima),0.125,0.2);
Ab2_colcheia = sin(2*pi*f_Ab2*colcheia).*envelope(length(colcheia),0.125,0.2);
Ab2_semicolcheia=sin(2*pi*f_Ab2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Ab3_minimap = sin(2*pi*f_Ab3*minimap).*envelope(length(minimap),0.125,0.2);
Ab3_minima = sin(2*pi*f_Ab3*minima).*envelope(length(minima),0.125,0.2);
Ab3_seminimap = sin(2*pi*f_Ab3*seminimap).*envelope(length(seminimap),0.125,0.2);
Ab3_seminima = sin(2*pi*f_Ab3*seminima).*envelope(length(seminima),0.125,0.2);
Ab3_colcheia = sin(2*pi*f_Ab3*colcheia).*envelope(length(colcheia),0.125,0.2);
Ab3_semicolcheia=sin(2*pi*f_Ab3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Ab4_minimap = sin(2*pi*f_Ab4*minimap).*envelope(length(minimap),0.125,0.2);
Ab4_minima = sin(2*pi*f_Ab4*minima).*envelope(length(minima),0.125,0.2);
Ab4_seminimap = sin(2*pi*f_Ab4*seminimap).*envelope(length(seminimap),0.125,0.2);
Ab4_seminima = sin(2*pi*f_Ab4*seminima).*envelope(length(seminima),0.125,0.2);
Ab4_colcheia = sin(2*pi*f_Ab4*colcheia).*envelope(length(colcheia),0.125,0.2);
Ab4_semicolcheia=sin(2*pi*f_Ab4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Ab5_minimap = sin(2*pi*f_Ab5*minimap).*envelope(length(minimap),0.125,0.2);
Ab5_minima = sin(2*pi*f_Ab5*minima).*envelope(length(minima),0.125,0.2);
Ab5_seminimap = sin(2*pi*f_Ab5*seminimap).*envelope(length(seminimap),0.125,0.2);
Ab5_seminima = sin(2*pi*f_Ab5*seminima).*envelope(length(seminima),0.125,0.2);
Ab5_colcheia = sin(2*pi*f_Ab5*colcheia).*envelope(length(colcheia),0.125,0.2);
Ab5_semicolcheia=sin(2*pi*f_Ab5*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
A1_minimap = sin(2*pi*f_A1*minimap).*envelope(length(minimap),0.125,0.2);
A1_minima = sin(2*pi*f_A1*minima).*envelope(length(minima),0.125,0.2);
A1_seminimap = sin(2*pi*f_A1*seminimap).*envelope(length(seminimap),0.125,0.2);
A1_seminima = sin(2*pi*f_A1*seminima).*envelope(length(seminima),0.125,0.2);
A1_colcheia = sin(2*pi*f_A1*colcheia).*envelope(length(colcheia),0.125,0.2);
A1_semicolcheia = sin(2*pi*f_A1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
A2_minimap = sin(2*pi*f_A2*minimap).*envelope(length(minimap),0.125,0.2);
A2_minima = sin(2*pi*f_A2*minima).*envelope(length(minima),0.125,0.2);
A2_seminimap = sin(2*pi*f_A2*seminimap).*envelope(length(seminimap),0.125,0.2);
A2_seminima = sin(2*pi*f_A2*seminima).*envelope(length(seminima),0.125,0.2);
A2_colcheia = sin(2*pi*f_A2*colcheia).*envelope(length(colcheia),0.125,0.2);
A2_semicolcheia = sin(2*pi*f_A2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
A3_minimap = sin(2*pi*f_A3*minimap).*envelope(length(minimap),0.125,0.2);
A3_minima = sin(2*pi*f_A3*minima).*envelope(length(minima),0.125,0.2);
A3_seminimap = sin(2*pi*f_A3*seminimap).*envelope(length(seminimap),0.125,0.2);
A3_seminima = sin(2*pi*f_A3*seminima).*envelope(length(seminima),0.125,0.2);
A3_colcheia = sin(2*pi*f_A3*colcheia).*envelope(length(colcheia),0.125,0.2);
A3_semicolcheia = sin(2*pi*f_A3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
A4_minimap = sin(2*pi*f_A4*minimap).*envelope(length(minimap),0.125,0.2);
A4_minima = sin(2*pi*f_A4*minima).*envelope(length(minima),0.125,0.2);
A4_seminimap = sin(2*pi*f_A4*seminimap).*envelope(length(seminimap),0.125,0.2);
A4_seminima = sin(2*pi*f_A4*seminima).*envelope(length(seminima),0.125,0.2);
A4_colcheia = sin(2*pi*f_A4*colcheia).*envelope(length(colcheia),0.125,0.2);
A4_semicolcheia = sin(2*pi*f_A4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Bb1_minimap = sin(2*pi*f_Bb1*minimap).*envelope(length(minimap),0.125,0.2);
Bb1_minima = sin(2*pi*f_Bb1*minima).*envelope(length(minima),0.125,0.2);
Bb1_seminimap = sin(2*pi*f_Bb1*seminimap).*envelope(length(seminimap),0.125,0.2);
Bb1_seminima = sin(2*pi*f_Bb1*seminima).*envelope(length(seminima),0.125,0.2);
Bb1_colcheia = sin(2*pi*f_Bb1*colcheia).*envelope(length(colcheia),0.125,0.2);
Bb1_semicolcheia=sin(2*pi*f_Bb1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Bb2_minimap = sin(2*pi*f_Bb2*minimap).*envelope(length(minimap),0.125,0.2);
Bb2_minima = sin(2*pi*f_Bb2*minima).*envelope(length(minima),0.125,0.2);
Bb2_seminimap = sin(2*pi*f_Bb2*seminimap).*envelope(length(seminimap),0.125,0.2);
Bb2_seminima = sin(2*pi*f_Bb2*seminima).*envelope(length(seminima),0.125,0.2);
Bb2_colcheia = sin(2*pi*f_Bb2*colcheia).*envelope(length(colcheia),0.125,0.2);
Bb2_semicolcheia=sin(2*pi*f_Bb2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Bb3_minimap = sin(2*pi*f_Bb3*minimap).*envelope(length(minimap),0.125,0.2);
Bb3_minima = sin(2*pi*f_Bb3*minima).*envelope(length(minima),0.125,0.2);
Bb3_seminimap = sin(2*pi*f_Bb3*seminimap).*envelope(length(seminimap),0.125,0.2);
Bb3_seminima = sin(2*pi*f_Bb3*seminima).*envelope(length(seminima),0.125,0.2);
Bb3_colcheia = sin(2*pi*f_Bb3*colcheia).*envelope(length(colcheia),0.125,0.2);
Bb3_semicolcheia=sin(2*pi*f_Bb3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
Bb4_minimap = sin(2*pi*f_Bb4*minimap).*envelope(length(minimap),0.125,0.2);
Bb4_minima = sin(2*pi*f_Bb4*minima).*envelope(length(minima),0.125,0.2);
Bb4_seminimap = sin(2*pi*f_Bb4*seminimap).*envelope(length(seminimap),0.125,0.2);
Bb4_seminima = sin(2*pi*f_Bb4*seminima).*envelope(length(seminima),0.125,0.2);
Bb4_colcheia = sin(2*pi*f_Bb4*colcheia).*envelope(length(colcheia),0.125,0.2);
Bb4_semicolcheia=sin(2*pi*f_Bb4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
B1_minimap = sin(2*pi*f_B1*minimap).*envelope(length(minimap),0.125,0.2);
B1_minima = sin(2*pi*f_B1*minima).*envelope(length(minima),0.125,0.2);
B1_seminimap = sin(2*pi*f_B1*seminimap).*envelope(length(seminimap),0.125,0.2);
B1_seminima = sin(2*pi*f_B1*seminima).*envelope(length(seminima),0.125,0.2);
B1_colcheia = sin(2*pi*f_B1*colcheia).*envelope(length(colcheia),0.125,0.2);
B1_semicolcheia = sin(2*pi*f_B1*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
B2_minimap = sin(2*pi*f_B2*minimap).*envelope(length(minimap),0.125,0.2);
B2_minima = sin(2*pi*f_B2*minima).*envelope(length(minima),0.125,0.2);
B2_seminimap = sin(2*pi*f_B2*seminimap).*envelope(length(seminimap),0.125,0.2);
B2_seminima = sin(2*pi*f_B2*seminima).*envelope(length(seminima),0.125,0.2);
B2_colcheia = sin(2*pi*f_B2*colcheia).*envelope(length(colcheia),0.125,0.2);
B2_semicolcheia = sin(2*pi*f_B2*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
B3_minimap = sin(2*pi*f_B3*minimap).*envelope(length(minimap),0.125,0.2);
B3_minima = sin(2*pi*f_B3*minima).*envelope(length(minima),0.125,0.2);
B3_seminimap = sin(2*pi*f_B3*seminimap).*envelope(length(seminimap),0.125,0.2);
B3_seminima = sin(2*pi*f_B3*seminima).*envelope(length(seminima),0.125,0.2);
B3_colcheia = sin(2*pi*f_B3*colcheia).*envelope(length(colcheia),0.125,0.2);
B3_semicolcheia = sin(2*pi*f_B3*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);
B4_minimap = sin(2*pi*f_B4*minimap).*envelope(length(minimap),0.125,0.2);
B4_minima = sin(2*pi*f_B4*minima).*envelope(length(minima),0.125,0.2);
B4_seminimap = sin(2*pi*f_B4*seminimap).*envelope(length(seminimap),0.125,0.2);
B4_seminima = sin(2*pi*f_B4*seminima).*envelope(length(seminima),0.125,0.2);
B4_colcheia = sin(2*pi*f_B4*colcheia).*envelope(length(colcheia),0.125,0.2);
B4_semicolcheia = sin(2*pi*f_B4*semicolcheia).*envelope(length(semicolcheia),0.125,0.2);

.................................................................................     

 

  

 Anexo A - Síntese do Baixo


%––––––––––––––––––––––---–-%
% Baixo (completo)
%------------------------%
bx = [
...%1 Entrada Batera 4C
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
   
...%5 - Vamp Piano 4C
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
   
...%9 Entrada Baixo
    pminimap,Bb2_seminima,Bb1_seminima,
...
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
   
...%13 A
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
    Eb2_minimap,Bb1_seminima,Db2_seminima,
...
    Eb2_minimap,Bb1_seminima,Db2_seminima,
...
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
    Eb2_minimap,Bb1_seminima,Db2_seminima,
...
    Eb2_minimap,Bb1_seminima,Db2_seminima,
...
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
   
...%21 B
    C2_minimap,Ab1_seminima,A1_seminima,
...
    Bb1_minimap,Eb2_seminima,Gb1_seminima,
...
    Ab1_minimap,Db2_seminima,Ab1_seminima,
...
    Gb1_minimap,Gb2_seminima,Db2_seminima,
...
    B1_minimap,Ab1_seminima,A1_seminima,
...
    Bb1_minimap,Eb2_seminima,A1_seminima,
...
    Ab1_minimap,Db2_seminima,Eb2_seminima,
...
    F2_minimap,Bb1_seminima,F2_seminima,
...
   
...%29 A
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
    Eb2_minimap,Bb1_seminima,Db2_seminima,
...
    Eb2_minimap,Bb1_seminima,Db2_seminima,
...
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
    Eb2_minimap,Bb1_seminima,Db2_seminima,
...
    Eb2_minimap,Bb1_seminima,Db2_seminima,
...
    Eb2_minimap,Bb2_seminima,Bb1_seminima,
...
   
...%37 Fim
    Eb2_minimap];



Anexo B - Síntese da Bateria.

 

  function [ride,crash,hihat,bumbo,caixa]=batera(D,TS,Gain)

   
% Carregar samples de uma Bateria Ludwig
   
% Condução
    [ride1, Fs_r1] = audioread(
'Paiste602Ride 001.wav');

    C1_minima2 = sin(2*pi*f_C1*minima2).*exp(-gminima2*minima2);
    C1_minimap = sin(2*pi*f_C1*minimap).*exp(-gminimap*minimap);
    C1_minima = sin(2*pi*f_C1*minima).*exp(-gminima*minima);
    C1_seminima = sin(2*pi*f_C1*seminima).*exp(-gseminima*seminima);
    C1_colcheia = sin(2*pi*f_C1*colcheia).*exp(-gcolcheia*colcheia);
    C1_tercina = sin(2*pi*f_C1*tercina).*exp(-gtercina*tercina);
   
% Deixar os samples do mesmo tamanho das notas
    tamanho_minima2 = length(C1_minima2);
    tamanho_minimap = length(C1_minimap);
    tamanho_minima = length(C1_minima);
    tamanho_seminima = length(C1_seminima);
    tamanho_colcheia = length(C1_colcheia);
    tamanho_tercina = length(C1_tercina);

    ride1_minima = ride1(1:tamanho_minima);
    ride1_seminima = ride1(1:tamanho_seminima);
    ride1_colcheia = ride1(1:tamanho_colcheia);
    ride1_tercina = ride1(1:tamanho_tercina);

ride = [
...%1 Entrada bateria
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
           
...%5 - piano
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
           
...% 9 Entrada Baixo
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...                                        

ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
... % 13 - A

ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
           
...%21 - B
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
           
...%29 - A
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima, ride1_colcheia, ride1_colcheia, ride1_seminima
...
           
...%37 - FIM
            pminimap];
                                       


    %Crash
    [crash2, Fs_csh2] = audioread(
'Paiste602RideCrash 002.wav');

    crash2_minima2 = crash2(1:tamanho_minima2).*exp(-minima2);
    crash2_minimap = crash2(1:tamanho_minimap).*exp(-minimap);

    crash = [
... %1 - Entrada batera
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
            
... %Entrada Piano
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
            
... %Entrada Baixo
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
            
...%13 - A
             crash2_minimap, pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             crash2_minimap, pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             crash2_minimap, pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
            
...%21 - B
             crash2_minimap, pseminima,pseminima
...
             crash2_minimap, pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             crash2_minimap, pseminima,pseminima
...
             crash2_minimap, pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             crash2_minimap, pseminima,pseminima
...
            
...%29 - A
             crash2_minimap, pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             pseminima, pseminima,pseminima,pseminima,pseminima
...
             crash2_minimap, pseminima,pseminima
...
             crash2_minimap, pseminima,pseminima
...
             crash2_minimap, pseminima,pseminima
...
             crash2_minimap, pseminima,pseminima
...
            
...%37 - FIM
             pminimap];


% HiHat (nos tempos 2 e 4)

    [hihat1, Fs_h1] = audioread(
'Paiste602HiHatCL 005.wav');
   
    hihat1_seminima = hihat1(1:tamanho_seminima);
%.*exp(-seminima);

    hihat= 3*[
... %1 Entrada bateria
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
           
... %5 Entrada Piano
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
           
... %9 Entrada baixo
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
           
... %13 - A
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
           
... %21 - B
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
           
...%29 - A
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
            pseminima, hihat1_seminima, pseminima, hihat1_seminima, pseminima
...
           
...%37 - FIM
            pminimap];


    [bumbo1, Fs_b1] = audioread('Ludwig22RattleKick_08.wav');
   
    bumbo1_seminima = bumbo1(1:tamanho_seminima).*exp(-seminima);
    bumbo1_minimap = bumbo1(1:tamanho_minimap).*exp(-minimap);
   
    bumbo = [
...%1 Entrada Bateria
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
            
...%5 Entrada Piano
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
            
...%9 Entrada baixo
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
            
...%13 - A
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
            
...%21 - B
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
            
...%29 - A
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
             bumbo1_seminima, pseminima, pseminima, pseminima, pseminima
...
            
...%37 - Fim
             bumbo1_minimap];


    % Caixa

    [caixa1, Fs_c1] = audioread(
'SnareSupra 004.wav');
    [caixa2, Fs_c2] = audioread(
'SnareSupra 008.wav');

    caixa1_seminima = (1.0)*caixa1(1:tamanho_seminima).*exp(-seminima);
    caixa1_colcheia = (1.0)*caixa1(1:tamanho_colcheia).*exp(-colcheia);
    caixa1_tercina = (0.8)*caixa1(1:tamanho_tercina).*exp(-tercina);

    caixa2_colcheia = (0.6)*caixa2(1:tamanho_colcheia).*exp(-colcheia);
    caixa2_seminima = (0.6)*caixa2(1:tamanho_seminima).*exp(-seminima);

    caixa = [
...%1 Entrada bateria
             pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
            
...%5 Entrada piano
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
            
...%9 Entrada baixo
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
            
...%13 - A
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...

             ...%21 - B
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
            
...%29 - A
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa1_colcheia, pcolcheia, caixa1_colcheia,caixa1_colcheia, pcolcheia, ptercina, caixa1_tercina, caixa1_tercina
...
pseminima, pcolcheia, caixa2_seminima, caixa1_colcheia, caixa1_seminima, pseminima
...
            
...%37 - FIM
pminimap];
end                                                                                  

   % Chama a função que cria a bateria      [ride,crash,hihat,bumbo,caixa]=batera(D,TS,0.3);


Anexo C - Síntese do Piano.

 

%––––––––––––––––––––––---–-%
% Harmonia
%------------------------%
harm = [
...%Piano
   
...%Entrada Batera 4C
   
...%1
    pminimap,pseminima,pseminima,
...
   
...%2
    pminimap,pseminima,pseminima,
...
   
...%3
    pminimap,pseminima,pseminima,
...
   
...%4
    pminimap,pseminima,pseminima,
...
   
...%Vamp Piano 4C
   
...%5
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%6
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%7
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%8
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%Entrada Baixo
   
...%9
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%10
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%11
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%12
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%A
   
...%13
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%14


    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%15
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%16
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%17
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%18
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%19
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%20
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%B
   
...%21
    pp*(B3_minimap+Eb4_minimap+Gb4_minimap),pp*(Ab3_minima+B3_minima+Eb4_minima),
...
   
...%22
    pp*(Bb3_minimap+Db4_minimap+F4_minimap),pp*(Eb4_minima+Gb4_minima+Bb4_minima),
...
   
...%23
    pp*(Ab3_minimap+B3_minimap+Eb4_minimap),pp*(Db4_minima+F4_minima+Ab4_minima),
...
   
...%24
    pp*(Gb3_minimap+Bb3_minimap+Db4_minimap),pp*(Gb3_minima+Bb3_minima+Db4_minima),
...
   
...%25
    pp*(B3_minimap+Eb4_minimap+Gb4_minimap),pp*(Ab3_minima+B3_minima+Eb4_minima),
...
   
...%26
    pp*(Bb3_minimap+Db4_minimap+F4_minimap),pp*(Eb4_minima+Gb4_minima+Bb4_minima),
...
   
...%27
    pp*(Ab3_minimap+B3_minimap+Eb4_minimap),pp*(Db4_minima+F4_minima+Ab4_minima),
...
   
...%28
    pp*(F3_minimap+Ab3_minimap+C4_minimap),pp*(Bb3_minima+D4_minima+F4_minima),
...
   
...%A
   
...%29
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%30
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%31
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%32
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%33
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%34
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%35
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%36
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Eb3_colcheia+Eb4_colcheia),pp*(Gb4_seminima+Bb4_seminima),
...
    pp*(Bb3_seminima),pp*(F4_seminima+Ab4_seminima+Db4_seminima),
...
   
...%Fim
   
...%37
    pp*(Eb4_minimap+Gb4_minimap+Bb4_minimap)];


Anexo D - Síntese do Sax.


% O timbre do sax é escolhido pela função TimbreSax                                 

  function y=TimbreSax2(FS,Tamanho,FreqNota) % determina o timbre do sax.

    N = Tamanho;   
% Número de amostra
    t = [0:N-1]/FS;
% vetor de amostras

    At = besselj(1,t).*envelope(Tamanho,0.15,0.30);
%Amplitude do sinal

   
% Dados da frequencia portadora
    fc = FreqNota;
% frequência portadora
    alpha = 2.*pi.*fc.*t;
    fi_c = -pi/2;
% fase da modulação

    
%Dados da frequencia de modulacao
    fm = FreqNota./2;
%Frequência de modulação
    d = fc/1.8;
    h = fm/fc;
    beta = 2.*pi.*fm.*t;
    fi_m = -pi/2;
% fase da modulação
    I0 =(d./fm);
% Indice de modulação

        y = At.*cos(alpha + (I0.*cos(beta+fi_m)) + fi_c);
    y = y./max(y);

end % Fim da Funcao TimbreSax 

                                                                                

%––––––––––––––––––––––---–-%
% Melodia do sax

mel = [
...%1 Entrada Batera
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
   
...%5 Vamp Piano
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
   
...%9 Entrada Baixo
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
    pminimap,pseminima,pseminima,
...
    pminimap,Bb2_seminima,TimbreSax2(FS,length(colcheia),f_Bb2),        

   TimbreSax2(FS,length(colcheia),f_Eb3),...
   
...%13 A
    

TimbreSax2(FS,length(colcheia),f_Gb3),TimbreSax2(FS,length(colcheia),f_Ab3),TimbreSax2(FS, length(colcheia),f_A3),TimbreSax2(FS,length(colcheia),f_Bb3),TimbreSax2(FS,length(colcheia), f_A3),TimbreSax2(FS,length(colcheia),f_Ab3),TimbreSax2(FS,length(seminima),f_Gb3),TimbreSax2(FS,length(seminima),f_Bb2),...

TimbreSax2(FS,length(seminima),f_Db3),TimbreSax2(FS,length(minimap),f_Eb3),TimbreSax2(FS, length(semicolcheia),f_F3),TimbreSax2(FS,length(semicolcheia),f_Gb3),TimbreSax2(FS,length(semicolcheia), f_F3),TimbreSax2(FS,length(semicolcheia),f_Eb3),...

TimbreSax2(FS,length(seminima),f_Db3),TimbreSax2(FS,length(minimap),f_Eb3),TimbreSax2(FS, length(semicolcheia),f_Db3),TimbreSax2(FS,length(semicolcheia),f_Eb3),TimbreSax2(FS,length(semicolcheia),f_Db3), TimbreSax2(FS,length(semicolcheia),f_Bb2),...


TimbreSax2(FS,length(seminima),f_Ab2),TimbreSax2(FS,length(minimap),f_Bb2),TimbreSax2(FS, length(colcheia),f_Bb2),TimbreSax2(FS,length(colcheia),f_Eb3),...


TimbreSax2(FS,length(colcheia),f_Gb3),TimbreSax2(FS,length(colcheia),f_Ab3),TimbreSax2(FS, length(colcheia),f_A3),TimbreSax2(FS,length(colcheia),f_Bb3),TimbreSax2(FS,length(colcheia),f_A3), TimbreSax2(FS,length(colcheia),f_Ab3),TimbreSax2(FS,length(seminima),f_Gb3),TimbreSax2(FS,length(seminima),f_Bb2),...
   

TimbreSax2(FS,length(seminima),f_Db3),TimbreSax2(FS,length(minimap),f_Eb3),TimbreSax2(FS, length(semicolcheia),f_Db3),TimbreSax2(FS,length(semicolcheia),f_Eb3),TimbreSax2(FS,length(semicolcheia), f_Db3),TimbreSax2(FS,length(semicolcheia),f_Bb2),...


TimbreSax2(FS,length(seminima),f_Ab2),TimbreSax2(FS,length(minimap),f_Bb2),TimbreSax2(FS, length(semicolcheia),f_F3),TimbreSax2(FS,length(semicolcheia),f_Gb3),TimbreSax2(FS,length(semicolcheia), f_F3),TimbreSax2(FS,length(semicolcheia),f_Eb3),...
TimbreSax2(FS,length(seminima),f_Db3),TimbreSax2(FS,length(minima2),f_Eb3),
...
   
...%21 B 

pseminima,TimbreSax2(FS,length(colcheia),f_Eb4),TimbreSax2(FS,length(seminima),f_Gb4),TimbreSax2(FS,length(colcheia),f_Eb4), TimbreSax2(FS,length(seminima),f_B3),TimbreSax2(FS,length(colcheia),f_Ab3),TimbreSax2(FS,length(colcheia),f_Bb3),...

TimbreSax2(FS,length(colcheia),f_B3),TimbreSax2(FS,length(colcheia),f_C4), TimbreSax2(FS,length(colcheia),f_Db4),TimbreSax2(FS,length(seminima),f_F4),TimbreSax2(FS,length(colcheia), f_Db4),TimbreSax2(FS,length(seminima),f_Bb3),TimbreSax2(FS,length(colcheia),f_Gb3),TimbreSax2(FS,length(colcheia),f_Ab3),...

TimbreSax2(FS,length(colcheia),f_A3),TimbreSax2(FS,length(colcheia),f_Bb3),TimbreSax2(FS,length(colcheia),f_B3), TimbreSax2(FS,length(seminima),f_Eb4),TimbreSax2(FS,length(colcheia),f_B3),TimbreSax2(FS,length(seminima),f_Ab3), TimbreSax2(FS,length(colcheia),f_F3),TimbreSax2(FS,length(colcheia),f_Gb3),...
    

TimbreSax2(FS,length(colcheia),f_Ab3),TimbreSax2(FS,length(colcheia),f_A3),TimbreSax2(FS,length(colcheia), f_Bb3),TimbreSax2(FS,length(colcheia),f_A3),TimbreSax2(FS,length(colcheia),f_Bb3),TimbreSax2(FS,length(colcheia),f_B3), TimbreSax2(FS,length(seminima),f_Db4),TimbreSax2(FS,length(colcheia),f_Db4),TimbreSax2(FS,length(colcheia),f_C4),...


TimbreSax2(FS,length(colcheia),f_Db4),TimbreSax2(FS,length(colcheia),f_D4),TimbreSax2(FS,length(colcheia),f_Eb4), TimbreSax2(FS,length(seminima),f_Gb4),TimbreSax2(FS,length(colcheia),f_Eb4),TimbreSax2(FS,length(seminima),f_B3), TimbreSax2(FS,length(colcheia),f_Ab3),TimbreSax2(FS,length(colcheia),f_Bb3),...


TimbreSax2(FS,length(colcheia),f_B3),TimbreSax2(FS,length(colcheia),f_C4), TimbreSax2(FS,length(colcheia),f_Db4),TimbreSax2(FS,length(seminima),f_F4),TimbreSax2(FS,length(colcheia),f_Db4), TimbreSax2(FS,length(seminima),f_Bb3),TimbreSax2(FS,length(colcheia),f_Gb3),TimbreSax2(FS,length(colcheia),f_Ab3),...


TimbreSax2(FS,length(colcheia),f_A3),TimbreSax2(FS,length(colcheia),f_Bb3),TimbreSax2(FS,length(colcheia),f_B3), TimbreSax2(FS,length(seminima),f_Eb4),TimbreSax2(FS,length(colcheia),f_B3),TimbreSax2(FS,length(seminima),f_Ab3), TimbreSax2(FS,length(colcheia),f_F3),TimbreSax2(FS,length(colcheia),f_Ab3),...


TimbreSax2(FS,length(colcheia),f_Db4),TimbreSax2(FS,length(colcheia),f_B3),TimbreSax2(FS,length(minimap),f_Bb3), TimbreSax2(FS,length(colcheia),f_Bb2),TimbreSax2(FS,length(colcheia),f_Eb3),... %29 A


TimbreSax2(FS,length(colcheia),f_Gb3),TimbreSax2(FS,length(colcheia),f_Ab3),TimbreSax2(FS,length(colcheia),f_A3), TimbreSax2(FS,length(colcheia),f_Bb3),TimbreSax2(FS,length(colcheia),f_A3),TimbreSax2(FS,length(colcheia),f_Ab3), TimbreSax2(FS,length(seminima),f_Gb3),TimbreSax2(FS,length(seminima),f_Bb2),...


TimbreSax2(FS,length(seminima),f_Db3),TimbreSax2(FS,length(minimap),f_Eb3),TimbreSax2(FS,length(semicolcheia),f_F3), TimbreSax2(FS,length(semicolcheia),f_Gb3),TimbreSax2(FS,length(semicolcheia),f_F3),TimbreSax2(FS,length(semicolcheia),f_Eb3),...


TimbreSax2(FS,length(seminima),f_Db3),TimbreSax2(FS,length(minimap),f_Eb3),TimbreSax2(FS,length(semicolcheia),f_Db3), TimbreSax2(FS,length(semicolcheia),f_Eb3),TimbreSax2(FS,length(semicolcheia),f_Db3),TimbreSax2(FS,length(semicolcheia),f_Bb2),...


TimbreSax2(FS,length(seminima),f_Ab2),TimbreSax2(FS,length(minimap),f_Bb2),TimbreSax2(FS,length(colcheia),f_Bb2), TimbreSax2(FS,length(colcheia),f_Eb3),...


TimbreSax2(FS,length(colcheia),f_Gb3),TimbreSax2(FS,length(colcheia),f_Ab3),TimbreSax2(FS,length(colcheia),f_A3), TimbreSax2(FS,length(colcheia),f_Bb3),TimbreSax2(FS,length(colcheia),f_A3),TimbreSax2(FS,length(colcheia),f_Ab3), TimbreSax2(FS,length(seminima),f_Gb3),TimbreSax2(FS,length(seminima),f_Bb2),...
    

TimbreSax2(FS,length(seminima),f_Db3),TimbreSax2(FS,length(minimap),f_Eb3),TimbreSax2(FS,length(semicolcheia),f_Db3), TimbreSax2(FS,length(semicolcheia),f_Eb3),TimbreSax2(FS,length(semicolcheia),f_Db3),TimbreSax2(FS,length(semicolcheia),f_Bb2),...


TimbreSax2(FS,length(seminima),f_Ab2),TimbreSax2(FS,length(minimap),f_Bb2),TimbreSax2(FS,length(semicolcheia),f_F3), TimbreSax2(FS,length(semicolcheia),f_Gb3),TimbreSax2(FS,length(semicolcheia),f_F3),TimbreSax2(FS,length(semicolcheia),f_Eb3),...
    TimbreSax2(FS,length(seminima),f_Db3),TimbreSax2(FS,length(minima2),f_Eb3),
...
   
...%37 fim
    pminimap];

 

% Criar arquivo wav %
audiowrite('ride.wav',ride,FS);
audiowrite('hihat.wav',hihat,FS);
audiowrite('caixa.wav',caixa,FS);
audiowrite('bumbo.wav',bumbo,FS);
audiowrite('crash.wav',crash,FS);
audiowrite('melodia.wav',mel,FS);
audiowrite('baixo.wav',bx,FS);
audiowrite('harmonia.wav',harm,FS); 

Published with MATLAB® R2013a                            vinicius.oliveira@eac.ufsm.br    

Subpáginas (4): Anexo A Anexo B Anexo C Anexo D
Ć
TAKE_FIVE.mp3
(1016k)
Marco Pinheiro,
26 de mar de 2015 15:48
Comments