本文整理汇总了C++中Hydrogen::sequencer_setNextPatternCategory方法的典型用法代码示例。如果您正苦于以下问题:C++ Hydrogen::sequencer_setNextPatternCategory方法的具体用法?C++ Hydrogen::sequencer_setNextPatternCategory怎么用?C++ Hydrogen::sequencer_setNextPatternCategory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hydrogen
的用法示例。
在下文中一共展示了Hydrogen::sequencer_setNextPatternCategory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleAction
//.........这里部分代码省略.........
return true;
}
if( sActionString == "TAP_TEMPO" ){
pEngine->onTapTempoAccelEvent();
return true;
}
if( sActionString == "SELECT_NEXT_PATTERN" ){
bool ok;
int row = pAction->getParameter1().toInt(&ok,10);
if( row> pEngine->getSong()->get_pattern_list()->size() -1 )
return false;
if(Preferences::get_instance()->patternModePlaysSelected())
pEngine->setSelectedPatternNumber( row );
else
pEngine->sequencer_setNextPattern( row, false, true );
return true;
}
if( sActionString == "SELECT_NEXT_PATTERN_CATEGORY" ){
bool ok;
int par = pAction->getParameter1().toInt(&ok,10);
QString cat = pAction->getParameter3();
INFOLOG( QString( "midaction SELECT_NEXT_PATTERN_CATEGORY with par1=%1 and par2=%2" )
.arg( par ).arg( cat ) );
if( par > pEngine->getSong()->get_pattern_list()->size() -1 )
return false;
if(Preferences::get_instance()->patternModePlaysSelected()) {
// TODO: improve warninglog
WARNINGLOG("triggered midiaction SELECT_NEXT_PATTERN_CATEGORY with patternModePlaysSelected")
pEngine->setSelectedPatternNumber( par );
} else
pEngine->sequencer_setNextPatternCategory(par, cat );
return true;
}
if( sActionString == "SELECT_NEXT_PATTERN_RELATIVE" ){
bool ok;
if(!Preferences::get_instance()->patternModePlaysSelected())
return true;
int row = pEngine->getSelectedPatternNumber() + pAction->getParameter1().toInt(&ok,10);
if( row> pEngine->getSong()->get_pattern_list()->size() -1 )
return false;
pEngine->setSelectedPatternNumber( row );
return true;
}
if( sActionString == "SELECT_NEXT_PATTERN_CC_ABSOLUT" ){
bool ok;
int row = pAction->getParameter2().toInt(&ok,10);
if( row> pEngine->getSong()->get_pattern_list()->size() -1 )
return false;
if(Preferences::get_instance()->patternModePlaysSelected())
pEngine->setSelectedPatternNumber( row );
else
return true;// only usefully in normal pattern mode
return true;
}
if( sActionString == "SELECT_NEXT_PATTERN_PROMPTLY" ){// obsolete, use SELECT_NEXT_PATTERN_CC_ABSOLUT instead
bool ok;
int row = pAction->getParameter2().toInt(&ok,10);
pEngine->setSelectedPatternNumberWithoutGuiEvent( row );
return true;