summary
乐句是一段时间内 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);
}
}
返回每一秒所有声音对象总体采样率数值。It is often 44100, or twice the range of human hearing.
在识别音级的这个练习中
在给定曲调的下方的音符,音程为 (8+1-间隔音程)