フィルターのクリア

Need help for modification in code

1 回表示 (過去 30 日間)
moonman
moonman 2011 年 9 月 22 日
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 件のコメント
Walter Roberson
Walter Roberson 2011 年 9 月 22 日
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?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeJust for fun についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by