Console Library 4.7.0
A header-only library that makes C++ simple
Loading...
Searching...
No Matches
console::Note Struct Reference

表示一个音符,包含音高、时值和力度。 More...

#include <melody.h>

Public Member Functions

 Note (signed char p=60, double b=1, signed char v=-1)
 构造一个音符。

Public Attributes

signed char pitch
 MIDI 音高编号(0-127),或 pitches::REST 表示休止符
double beats
 音符时值(以四分音符为单位,1 表示一拍)
signed char volume
 力度(0-127),-1 表示使用 MIDI 对象的默认音量

Detailed Description

表示一个音符,包含音高、时值和力度。

Constructor & Destructor Documentation

◆ Note()

console::Note::Note ( signed char p = 60,
double b = 1,
signed char v = -1 )
inline

构造一个音符。

Parameters
p音高,默认为 60(中央 C)。
b时值,默认为 1(一拍)。
v力度,默认为 -1(使用默认音量)。

Member Data Documentation

◆ beats

double console::Note::beats

音符时值(以四分音符为单位,1 表示一拍)

◆ pitch

signed char console::Note::pitch

MIDI 音高编号(0-127),或 pitches::REST 表示休止符

◆ volume

signed char console::Note::volume

力度(0-127),-1 表示使用 MIDI 对象的默认音量


The documentation for this struct was generated from the following file: