本文整理汇总了C++中Note::getPitch方法的典型用法代码示例。如果您正苦于以下问题:C++ Note::getPitch方法的具体用法?C++ Note::getPitch怎么用?C++ Note::getPitch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note::getPitch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: noteAdded
void DebugObserver::noteAdded(const Note ¬e)
{
LOG("Note " << std::hex << (unsigned int)note.getPitch() << " added with "
"velocity " << std::hex << (unsigned int)note.getVelocity());
}
示例2: noteRemoved
void DebugObserver::noteRemoved(const Note ¬e)
{
LOG("Note " << std::hex << (unsigned int)note.getPitch() << " removed");
}
示例3: process
void PlayBack::process()
{
for(unsigned int i=0; i<staff.getNumOfNotes(); i++){
Note note = staff.getNoteByNum(i+1);
switch (staff.getNoteByNum(i+1).getPitch()) {
case -24:
if(accents.at(i)->getAccent() == Accent::flat){
note--;
}
break;
case -20:
if(accents.at(i)->getAccent() == Accent::sharp){
note++;
}
break;
case -19:
if(accents.at(i)->getAccent() == Accent::flat){
note--;
}
break;
case -13:
if(accents.at(i)->getAccent() == Accent::sharp){
note++;
}
break;
case -12:
if(accents.at(i)->getAccent() == Accent::flat){
note--;
}
break;
case -8:
if(accents.at(i)->getAccent() == Accent::sharp){
note++;
}
break;
case -7:
if(accents.at(i)->getAccent() == Accent::flat){
note--;
}
break;
case -1:
if(accents.at(i)->getAccent() == Accent::sharp){
note++;
}
break;
case 0:
if(accents.at(i)->getAccent() == Accent::flat){
note--;
}
break;
case 4:
if(accents.at(i)->getAccent() == Accent::sharp){
note++;
}
break;
case 5:
if(accents.at(i)->getAccent() == Accent::flat){
note--;
}
break;
case 11:
if(accents.at(i)->getAccent() == Accent::sharp){
note++;
}
break;
case 12:
if(accents.at(i)->getAccent() == Accent::flat){
note--;
}
break;
case 16:
if(accents.at(i)->getAccent() == Accent::sharp){
note++;
}
break;
case 17:
if(accents.at(i)->getAccent() == Accent::flat){
note--;
}
break;
case 23:
if(accents.at(i)->getAccent() == Accent::sharp){
note++;
}
break;
case 24:
if(accents.at(i)->getAccent() == Accent::flat){
note--;
}
break;
default:
break;
}
if(!midi->isConnected()){
emit finished();
return;
//.........这里部分代码省略.........