¼öÇÐ :: segmentedenvelope.

»ý¼º / °ü¸® / Æò°¡ ºÐÇÒ (°î¼±) ºÀÅõ
Áö±Ý ´Ù¿î·Îµå

¼öÇÐ :: segmentedenvelope. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Egor Korablev
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~egor/

¼öÇÐ :: segmentedenvelope. ű×


¼öÇÐ :: segmentedenvelope. ¼³¸í

¼öÇÐ :: SegmentedEnVelope´Â SegMeneted EnvelopeÀÇ Ãß»óÈ­¸¦ Á¦°øÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. Calling.synopsis ³» $ e = math :: SegmentedEnVelope-> New;¸¦ Äݷζó°í ÇÒ ¶§ ¿ÀºêÁ§Æ® ¸Þ¼Òµåº¸´Ù ºü¸£´Â Á¤Àû Æò°¡ÀÚ¸¦ »ý¼º, ¼öÁ¤ ¹× ¸¸µé ¼ö ÀÖ½À´Ï´Ù. # ÃÑ Áö¼Ó ½Ã°£ = 1 $ e-> ¼¼±×¸ÕÆ®°¡ÀÖ´Â ÀÓÀÇÀÇ ºÀÅõ¸¦ ¸¸µì´Ï´Ù. # ¼¼±×¸ÕÆ® ¼ö $ E-> ·¹º§ (Áöµµ $ _ * 3, $ e-> ·¹º§); # º¯°æ ·¹º§ $ E-> DUNS (Map $ _ * (rand (rand (0.5) + 0.5), $ e-> durs); # ALTER SEGMENTS DUITATIONS $ E-> °î¼± (MAP $ _ + 1, $ e-> °î¼±); # °î¼± $ e-> ·¹º§ (# ù ¹ø° ¼¼±×¸ÕÆ®ÀÇ ½ÃÀÛ ·¹º§À» º¯°æÇÏ°í ¸¶Áö¸· ¼¼±×¸ÕÆ®ÀÇ Á¾·á ¼öÁØÀ¸·Î °ªÀ» ¼³Á¤ÇÏ°í $ e-> ·¹º§ (0, $ self-> level (0) - 1 ))); $ e-> °î¼± (0, 3); # ù ¹ø° ¼¼±×¸ÕÆ® $ E-> DUR (0, 0.2)¿¡ ´ëÇÑ °î·ü ¼³Á¤; # ù ¹ø° ¼¼±×¸ÕÆ®ÀÇ Áö¼Ó ½Ã°£À» ¼³Á¤ÇϹǷΠÀüü Áö¼Ó ½Ã°£ÀÌ $ E-> ±â°£À» º¯°æÇÕ´Ï´Ù. # $ e-> normalize_duration °¡Á® ¿À±â. # ½ºÄÉÀÏ ¼¼±×¸ÕÆ® DURS´Â ºÀÅõ ±â°£ÀÌ 1 or ³» $ e = ¼öÇÐ :: SegmentedEnVelope-> »õ (# »ç¿ëÀÚ Á¤ÀÇ ADSR ºÀÅõ # def => , # ·¹º§ , # ¼¼±×¸ÕÆ® Áö¼Ó ±â°£ # ¼¼±×¸ÕÆ® °î·ü, 0 ¿ë 1, ¼±Çü ¹× ±âŸ °î¼± ¿ë 1, °î¼± ¿ë], ±âº»°ªÀº 0À̸ç, ±âº»°ªÀº 0, ºÎµå·¯¿î ºÀÅõ segment # morpher => sub {...} # 0¿¡¼­ 1ÀÇ °ªÀ»¹ÞÀ» ¼öÀÖ´Â »ç¿ëÀÚ Á¤ÀÇ ¸ð¸£ÆÛ¸¦ Á¦°øÇϸç, ºñ ħÀÔ ºÀÅõ is_hold => 0ÀÇ °æ¿ì 0¿¡¼­ 1±îÁö °ªÀ» ¹ÝȯÇؾßÇÕ´Ï´Ù. ±âº»°ªÀº 0ÀÔ´Ï´Ù. Envelope unvelope is_fold_over => 1, # default´Â 0ÀÌ°í, ºÀÅõ°¡ 0À¸·Î ³ª¿À´Â À§Ä¡¿¡ ´ëÇØ Æ÷ÀåÇÏ´Â ´ë½Å 0ÀÌ ¾Æ´Ñ ºÀÅõ°¡ 0À̸ç # default´Â 0À̸ç, # default´Â 0ÀÌ°í, # default´Â 0ÀÌ°í, # default´Â 0ÀÔ´Ï´Ù À§Ä¡); $ e-> at (rand); # ÀÓÀÇÀÇ À§Ä¡¿¡¼­ °ªÀ» Ãâ·ÂÇÕ´Ï´Ù $ E-> Ç¥ (1024); # ÁöÁ¤µÈ Å©±âÀÇ ÇöÀç ºÀÅõÀÇ °ª ¸ñ·Ï (Á¶È¸ Å×À̺í)À» ¹ÝȯÇÕ´Ï´Ù. ³» $ s = $ e-> static; # ÇöÀç ºÀÅõ ¸Å°³ º¯¼ö (CODEREF) $ S -> (RAND)°¡ÀÖ´Â Á¤Àû Æò°¡ÀÚ¸¦ ¸¸µì´Ï´Ù. # ÀÓÀÇÀÇ À§Ä¡¿¡¼­ °ªÀ» Ãâ·ÂÇÏÁö¸¸ ~ 50 % ºü¸¥ Á¦Ç°ÀÇ È¨ÆäÀÌÁö


¼öÇÐ :: segmentedenvelope. °ü·Ã ¼ÒÇÁÆ®¿þ¾î