本文整理汇总了C++中MidiTrack::activity方法的典型用法代码示例。如果您正苦于以下问题:C++ MidiTrack::activity方法的具体用法?C++ MidiTrack::activity怎么用?C++ MidiTrack::activity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MidiTrack
的用法示例。
在下文中一共展示了MidiTrack::activity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processMidi
//.........这里部分代码省略.........
//unsigned time = extsync ? curTickPos : (event.time() + segmentSize*(segmentCount-1));
//event.setTime(time);
// p3.3.35
// If ext sync, events are now time-stamped with last tick in MidiDevice::recordEvent().
// TODO: Tested, but record resolution not so good. Switch to wall clock based separate list in MidiDevice.
// p3.3.36
//if(!extsync)
// event.setTime(event.time() + segmentSize*(segmentCount-1));
// dont't echo controller changes back to software
// synthesizer:
if (!dev->isSynti())
{
//printf("444444444444444444444444444444444444444444444444444444\n");
//Check if we're outputting to another port than default:
if (devport == defaultPort)
{
//printf("5555555555555555555555555555555555555555555\n");
event.setPort(port);
if (md && track->recEcho())
playEvents->add(event);
}
else
{
//printf("66666666666666666666666666666666666666\n");
// Hmm, this appears to work, but... Will this induce trouble with md->setNextPlayEvent??
MidiDevice* mdAlt = midiPorts[devport].device();
if (mdAlt && track->recEcho())
mdAlt->playEvents()->add(event);
}
// Shall we activate meters even while rec echo is off? Sure, why not...
if (event.isNote() && event.dataB() > track->activity())
track->setActivity(event.dataB());
}
// p3.3.25
// If syncing externally the event time is already in units of ticks, set above.
if (!extsync)
{
//printf("7777777777777777777777777777777777777777777\n");
// p3.3.35
//time = tempomap.frame2tick(event.time());
//event.setTime(time); // set tick time
event.setTime(tempomap.frame2tick(event.time())); // set tick time
}
// Special handling of events stored in rec-lists. a bit hACKish. TODO: Clean up (after 0.7)! :-/ (ml)
if (recording)
{
//printf("888888888888888888888888888888888888888888888888\n");
// In these next steps, it is essential to set the recorded event's port
// to the track port so buildMidiEventList will accept it. Even though
// the port may have no device "<none>".
//
if (track->type() == Track::DRUM)
{
//printf("99999999999999999999999999999999999999999999999999\n");
// Is it a drum controller event?
if (mc)
{
//printf("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n");
MidiPlayEvent drumRecEvent = event;
drumRecEvent.setA(ctl | drumRecPitch);
// In this case, preVelo is simply the controller value.