Borrar filtros
Borrar filtros

Need help for modification in code

1 visualización (últimos 30 días)
moonman
moonman el 22 de Sept. de 2011
Hi i have made a piano code and i am using soundsc(tone,fs) to listen 30 seconds music. Now i want to implement ADSR envolop on it. I have got ADSR Envolop from internet but it is only for one key where as my tone is combination of 100 keys of piano
The code of net is
A = linspace(0, 0.6, (length(tone)*0.2)); %rise 20% of signal
D = linspace(0.6, 0.5,(length(tone)*0.05)); %drop of 5% of signal
S = linspace(0.5, 0.5,(length(tone)*0.4)); %delay of 40% of signal
R = linspace(0.5, 0,(length(tone)*0.35)); %drop of 35% of signal
ADSR = [A D S R] ; %make a matrix
*
dif = length(tone) - length(ADSR); % How i have to change it as my %tone is row vector of thousands of elements*
x = cat(2, ADSR, zeros(1,dif));
xx = tone .* x; %times them together
**************************************
I want to apply ADSR on each key of piano. how to go for that
  1 comentario
Walter Roberson
Walter Roberson el 22 de Sept. de 2011
Does this mean that your previous question http://www.mathworks.com/matlabcentral/answers/16459-how-to-implement-adsr-envelop-on-matlab-piano-song is no longer required?

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by