180223 Learning Log | 00 的学习记录

in #cn6 years ago

summary

p5.sound

phrase

乐句是一段时间内 musical events 的模式,比如一系列的音符和休止。Phrases 必需添加到 p5.Part 播放。

new p5.Phrase(name,callback,sequence)

.
p5.Part 播放一个或多个 p5.Phrases. 用 steps and tatums(Divisions of a beat) 初始化. 每个 step 默认为 1/16 音符。

new p5.Part([steps],[tatums])

例子中用函数控制声音播放/暂停时的显示,可以参考

function updateDescription() {
  if (!soundFile.isPlaying()) {
    description = 'Paused...';
    p.html(description);
  }
  else if (soundFile.isPlaying()){
    description = 'Playing!';
    p.html(description);
  }
  else {
    for (var i = 0; i < frameCount%3; i++ ) {
      // add periods to loading to create a fun loading bar effect
      if (frameCount%4 == 0){
        description += '.';
      }
      if (frameCount%25 == 0) {
        description = 'loading';
      }
    }
    p.html(description);
  }
}

sampleRate

返回每一秒所有声音对象总体采样率数值。It is often 44100, or twice the range of human hearing.

Music Theory 101 Model 4 练习

在识别音级的这个练习中

Screen Shot 2018-02-23 at 5.34.34 PM.png

在给定曲调的下方的音符,音程为 (8+1-间隔音程)

Sort:  

哈哈 不错 谢谢分享啊!

过年好!cn区点赞机器人 @cnbuddy 很开心你能成为cn区的一员。倘若你不喜欢我的留言,请回复“取消”。

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 65137.70
ETH 3198.14
USDT 1.00
SBD 3.87