Example #1
0
void OperatorWidget::on_volumeSlide_valueChanged(int value)
{
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_VOLUME), value);
    QString volume;
    volume.setNum(value, 10);
    ui->volumeLine->setText(volume);
}
Example #2
0
void OperatorWidget::on_fineDial_valueChanged(int value)
{
    QString fine;
    fine.setNum(value, 10);
    ui->fineLine->setText(fine);
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_FINE), value);
}
Example #3
0
void OperatorWidget::on_coarseDial_valueChanged(int value)
{
    QString text;
    if (ui->absoluteButton->isChecked()) {
        QString semi;
        semi.setNum(value - 128, 10);
        text = semi + " semi";
        ui->coarseLine->setText(text);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_COARSE), value - 128);
    }else{
        QString mul;
        float v = opaRatios[value >> 3];
        mul.setNum(v, 'f', 2);
        text = "x" + mul;
        ui->coarseLine->setText(text);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_COARSE), value);
    }
}
Example #4
0
//------------------------------------------------------------
// copy the sprite data into VRAM and keep track of the
// gfx index
//------------------------------------------------------------
bool FrameStrip::addFrame(char * cbTemp)
{
	int nParam = getParamIndex(m_nWidth, m_nHeight);

	if(nParam >= 0)
	{
		waitUntilDMAFree(3);
		u16 gfx0 = PA_CreateGfx(m_nScreen, cbTemp, ValidSpriteParams[nParam].nParams[0], ValidSpriteParams[nParam].nParams[1], m_nMode);
		waitUntilDMAFree(3);
		//assert( gfx0 != 0xFFFF );
		m_gfxs[ m_nFrames ] = gfx0;
		++m_nFrames;
		return true;
	}
	return false;
}
Example #5
0
void OperatorWidget::setContent(const OpaOperatorParams * params, bool send)
{
    QString text;
    opa.setEnable(false);

    setFlags(params->flags);
    ui->volumeSlide->setValue(params->volume);
    on_volumeSlide_valueChanged(params->volume);

    int coarse = (params->flags & OPA_OP_ABSOLUTE) ?
        ((int8_t) params->coarse) + 128 : params->coarse;

    ui->coarseDial->setValue(coarse);
    on_coarseDial_valueChanged(coarse);

    ui->fineDial->setValue(params->fine);
    on_fineDial_valueChanged(params->fine);

    ui->LFOSpeedDial->setValue(params->LFOSpeed);
    ui->LFOAmountDial->setValue(params->LFOAmount);
    ui->feedbackDial->setValue(params->feedback);

    ui->attackDial->setValue(params->envAttack);
    ui->decayDial->setValue(params->envDecay);
    ui->sustainDial->setValue(params->envSusLevel);
    ui->initDial ->setValue(params->envIniLevel);
    ui->releaseDial->setValue(params->envRelease);

    updateEnvelope();

    opa.setEnable(true);

    if (send) {
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_VOLUME), params->volume);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_COARSE), params->coarse);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_FINE), params->fine);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_LFOSPEED), params->LFOSpeed);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_LFOAMOUNT), params->LFOAmount);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_FEEDBACK), params->feedback);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_ENVATTACK), params->envAttack);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_ENVDECAY), params->envDecay);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_ENVSUSTAIN_LEVEL), params->envSusLevel);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_ENVINIT_LEVEL), params->envIniLevel);
        opa.programParamWrite(programIndex, getParamIndex(OPA_OP_ENVRELEASE), params->envRelease);
        writeFlags();
   }
}
Example #6
0
void OperatorWidget::writeFlags()
{
    int flags = getFlags();
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_FLAGS), flags);
}
Example #7
0
void OperatorWidget::on_feedbackDial_valueChanged(int value)
{
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_FEEDBACK), value);
}
Example #8
0
void OperatorWidget::on_LFOAmountDial_valueChanged(int value)
{
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_LFOAMOUNT), value);
}
Example #9
0
void OperatorWidget::on_LFOSpeedDial_valueChanged(int value)
{
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_LFOSPEED), value);
}
Example #10
0
void OperatorWidget::on_releaseDial_valueChanged(int value)
{
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_ENVRELEASE), value);
    updateEnvelope();
}
Example #11
0
void OperatorWidget::on_initDial_valueChanged(int value)
{
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_ENVINIT_LEVEL), value);
    updateEnvelope();
}
Example #12
0
void OperatorWidget::on_sustainDial_valueChanged(int value)
{
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_ENVSUSTAIN_LEVEL), value);
    updateEnvelope();
}
Example #13
0
void OperatorWidget::on_decayDial_valueChanged(int value)
{
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_ENVDECAY), value);
    updateEnvelope();
}
Example #14
0
void OperatorWidget::on_attackDial_valueChanged(int value)
{
    opa.programParamWrite(programIndex, getParamIndex(OPA_OP_ENVATTACK), value);
    updateEnvelope();
}
Example #15
0
StringRef ParamCommandComment::getParamName(const FullComment *FC) const {
  assert(isParamIndexValid());
  return FC->getThisDeclInfo()->ParamVars[getParamIndex()]->getName();
}
Example #16
0
File: main.c Project: clbr/SGDK
static s16 getCurrentParamIndex()
{
    return getParamIndex(getParam(driver, cmd));
}