本文整理汇总了C++中MIDITimedBigMessage::SetNoteOff方法的典型用法代码示例。如果您正苦于以下问题:C++ MIDITimedBigMessage::SetNoteOff方法的具体用法?C++ MIDITimedBigMessage::SetNoteOff怎么用?C++ MIDITimedBigMessage::SetNoteOff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MIDITimedBigMessage
的用法示例。
在下文中一共展示了MIDITimedBigMessage::SetNoteOff方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
GenePool::MIDIEventList *GenePool::getEvents(void)
{
list<MIDITimedBigMessage*> *events = new list<MIDITimedBigMessage*>;
for (EventPool::iterator i = pool_.begin(); i != pool_.end(); ++i)
{
for (BreadNoteCluster::iterator j = (*i)->begin(); j != (*i)->end(); ++j)
{
BreadNote *e = (*j);
u_int8_t pitch = e->pitch();
u_int32_t ontime = e->ontime();
u_int32_t duration = e->duration();
u_int8_t channel = e->channel();
u_int8_t dynamic = e->dynamic();
MIDITimedBigMessage *m = new MIDITimedBigMessage;
m->SetTime(ontime);
m->SetNoteOn(channel, pitch, dynamic);
events->push_back(m);
m = new MIDITimedBigMessage;
m->SetTime(ontime+duration);
m->SetNoteOff(channel, pitch, dynamic);
events->push_back(m);
// printf("(%d %d %d %d %d) ", ontime, pitch, duration, channel,
// dynamic);
}
}
return events;
}