Ejemplo n.º 1
0
 QWidget* createPhaser(QGroupBox* parent) {
     parent->setObjectName("phaser");
     parent->setCheckable(true);
     connectBox(p_phaser_on, parent);
     QGridLayout* grid = new QGridLayout(parent);
     // row 1
     grid->addWidget(createDial(p_phaser_min_freq), 0, 0);
     grid->addWidget(createDial(p_phaser_max_freq), 0, 1);
     grid->addWidget(createDial(p_phaser_rate), 0, 2);
     grid->addWidget(createDial(p_phaser_depth), 0, 3);
     grid->addWidget(createDial(p_phaser_feedback), 0, 4);
     // row 2
     grid->addWidget(new QLabel("Min Fr"), 1, 0);
     grid->addWidget(new QLabel("Max Fr"), 1, 1);
     grid->addWidget(new QLabel("Mod frq"), 1, 2);
     grid->addWidget(new QLabel("Depth"), 1, 3);
     grid->addWidget(new QLabel("Feedb"), 1, 4);
     // row 3
     grid->addWidget(createLabel(p_phaser_min_freq), 2, 0);
     grid->addWidget(createLabel(p_phaser_max_freq), 2, 1);
     grid->addWidget(createLabel(p_phaser_rate), 2, 2);
     grid->addWidget(createLabel(p_phaser_depth), 2, 3);
     grid->addWidget(createLabel(p_phaser_feedback), 2, 4);
     grid->setHorizontalSpacing(2);
     grid->setVerticalSpacing(0);
     grid->setColumnStretch(5, 1);
     return parent;
 }
Ejemplo n.º 2
0
 QWidget* createLfo(QGroupBox* parent, uint i) {
     uint off = i * LFO_OFF;
     parent->setCheckable(true);
     connectBox(p_lfo1_on + off, parent);
     QGridLayout* grid = new QGridLayout(parent);
     // row 1
     QComboBox* typeBox = createSelect(p_lfo1_type + off, lfo_types, 6);
     lfoMapper.setMapping(typeBox, i);
     connect(typeBox, SIGNAL(currentIndexChanged(int)), &lfoMapper, SLOT(map()));
     grid->addWidget(typeBox, 0, 0, 1, 2);
     grid->addWidget(createSelect(p_lfo1_reset_type + off, lfo_reset_types, 3), 0, 2, 1, 2);
     grid->addWidget(connectToLfo(createToggle(p_lfo1_inv + off, "Inv"), i), 0, 4);
     // row 2-4
     grid->addWidget(lfo_wd[i] = new WaveDisplay(LFO_WIDTH, WAVE_HEIGHT), 1, 0, 3, 3);
     // row 5
     grid->addWidget(createDial(p_lfo1_freq + off), 4, 0);
     grid->addWidget(connectToLfo(createDial(p_lfo1_start + off), i), 4, 1);
     grid->addWidget(connectToLfo(createDial(p_lfo1_width + off), i), 4, 2);
     grid->addWidget(createDial(p_lfo1_humanize + off), 4, 3);
     // row 6
     grid->addWidget(new QLabel("Freq"), 5, 0);
     grid->addWidget(new QLabel("Start"), 5, 1);
     grid->addWidget(new QLabel("Width"), 5, 2);
     grid->addWidget(new QLabel("Rand"), 5, 3);
     // row 7
     grid->addWidget(createLabel(p_lfo1_freq + off), 6, 0);
     grid->addWidget(createLabel(p_lfo1_start + off), 6, 1);
     grid->addWidget(createLabel(p_lfo1_width + off), 6, 2);
     grid->addWidget(createLabel(p_lfo1_humanize + off), 6, 3);
     grid->setHorizontalSpacing(2);
     grid->setVerticalSpacing(0);
     grid->setColumnStretch(5, 1);
     grid->setRowStretch(7, 1);
     return parent;
 }
Ejemplo n.º 3
0
 QWidget* createReverb(QGroupBox* parent) {
     parent->setObjectName("reverb");
     parent->setCheckable(true);
     connectBox(p_reverb_on, parent);
     QGridLayout* grid = new QGridLayout(parent);
     // row 1
     grid->addWidget(createDial(p_reverb_predelay), 0, 0);
     grid->addWidget(createDial(p_reverb_decay), 0, 1);
     grid->addWidget(createDial(p_reverb_lowcut), 0, 2);
     grid->addWidget(createDial(p_reverb_highcut), 0, 3);
     grid->addWidget(createDial(p_reverb_depth), 0, 4);
     // row 2
     grid->addWidget(new QLabel("Predelay"), 1, 0);
     grid->addWidget(new QLabel("Decay"), 1, 1);
     grid->addWidget(new QLabel("Lowcut"), 1, 2);
     grid->addWidget(new QLabel("Highcut"), 1, 3);
     grid->addWidget(new QLabel("Depth"), 1, 4);
     // row 4
     grid->addWidget(createLabel(p_reverb_predelay), 2, 0);
     grid->addWidget(createLabel(p_reverb_decay), 2, 1);
     grid->addWidget(createLabel(p_reverb_lowcut), 2, 2);
     grid->addWidget(createLabel(p_reverb_highcut), 2, 3);
     grid->addWidget(createLabel(p_reverb_depth), 2, 4);
     grid->setHorizontalSpacing(2);
     grid->setVerticalSpacing(0);
     grid->setColumnStretch(5, 1);
     return parent;
 }
Ejemplo n.º 4
0
 QWidget* createChorus(QGroupBox* parent) {
     parent->setObjectName("chorus");
     parent->setCheckable(true);
     connectBox(p_chorus_on, parent);
     QGridLayout* grid = new QGridLayout(parent);
     // row 1
     grid->addWidget(createDial(p_chorus_delay), 0, 0);
     grid->addWidget(createDial(p_chorus_amount), 0, 1);
     grid->addWidget(createDial(p_chorus_rate), 0, 2);
     grid->addWidget(createDial(p_chorus_depth), 0, 3);
     grid->addWidget(createDial(p_chorus_feedback), 0, 4);
     // row 2
     grid->addWidget(new QLabel("Delay"), 1, 0);
     grid->addWidget(new QLabel("Mod amt"), 1, 1);
     grid->addWidget(new QLabel("Mod frq"), 1, 2);
     grid->addWidget(new QLabel("Depth"), 1, 3);
     grid->addWidget(new QLabel("Feedb"), 1, 4);
     // row 3
     grid->addWidget(createLabel(p_chorus_delay), 2, 0);
     grid->addWidget(createLabel(p_chorus_amount), 2, 1);
     grid->addWidget(createLabel(p_chorus_rate), 2, 2);
     grid->addWidget(createLabel(p_chorus_depth), 2,3);
     grid->addWidget(createLabel(p_chorus_feedback), 2, 4);
     grid->setHorizontalSpacing(2);
     grid->setVerticalSpacing(0);
     grid->setColumnStretch(5, 1);
     return parent;
 }
Ejemplo n.º 5
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QSizePolicy qsp(QSizePolicy::Preferred, QSizePolicy::Preferred);
    qsp.setHeightForWidth(true);
    this->setSizePolicy(qsp);
    setCentralWidget(ui->widget);
    this->setFixedSize(1152,720);

    playerID = 0;
    socket = new QTcpSocket(this);
    connect(socket,SIGNAL(readyRead()),this,SLOT(infoReceived()));
    connectBox();

    keyUp = keyDown = keyLeft = keyRight = keyE = keyQ = keySpace = false;

    timerInterval = 15;

    timer.setSingleShot(false);
    timer.setInterval(timerInterval);
    connect(&timer,SIGNAL(timeout()),this,SLOT(onTimer()));
    timer.start();
    mt = 0;
    mtON = false;
    roundTimerEnabled = false;
}
void CCALCViewWinDoc::OnOnlineConnect()
{
	// TODO: Add your command handler code here
	CConnectBox connectBox(NULL,&_machine,this);

	int nRetCode = connectBox.DoModal();

	// Check for OK
	if (nRetCode == IDOK) {

	}
}
void CCALCViewWinDoc::OnEditParameters()
{
	// TODO: Add your command handler code here
	CParametersBox connectBox(NULL,&_machine, this);

	int nRetCode = connectBox.DoModal();

	_steps_table_model.Compile_Steps();
	
	UpdateAllViews(NULL, UPDATE_STEPS_TABLE_SIZE);
	UpdateAllViews(NULL, UPDATE_REGISTER_TABLE_SIZE);
	UpdateAllViews(NULL, UPDATE_ALL_TABLE_CONTENTS);
}
Ejemplo n.º 8
0
    QWidget* createFilter(QGroupBox* parent, uint i) {
        uint off = i * DCF_OFF;
        parent->setCheckable(true);
        connectBox(p_filter1_on + off, parent);
        QGridLayout* grid = new QGridLayout(parent);
        // row 1
        QComboBox* typeBox = createSelect(p_filter1_type + off, filter_types, 12);
        filterMapper.setMapping(typeBox, i);
        connect(typeBox, SIGNAL(currentIndexChanged(int)), &filterMapper, SLOT(map()));
        grid->addWidget(typeBox, 0, 0, 1, 2);
        grid->addWidget(createSelect(p_filter1_source + off, filter_sources, 2 + i), 0, 2, 1, 2);
        // row 2
        grid->addWidget(filter_wd[i] = new WaveDisplay(DCF_WIDTH, WAVE_HEIGHT), 1, 0, 3, 3);
        grid->addWidget(createDial(p_filter1_distortion + off), 1, 3);
        grid->addWidget(createDial(p_filter1_key_to_f + off), 1, 4);
        grid->addWidget(createDial(p_filter1_vel_to_f + off), 1, 5);
        // row 3
        grid->addWidget(new QLabel("Dist"), 2, 3);
        grid->addWidget(new QLabel("K > F"), 2, 4);
        grid->addWidget(new QLabel("V > F"), 2, 5);
        // row 4
        grid->addWidget(createLabel(p_filter1_distortion + off), 3, 3);
        grid->addWidget(createLabel(p_filter1_key_to_f + off), 3, 4);
        grid->addWidget(createLabel(p_filter1_vel_to_f + off), 3, 5);

        // row 5
        grid->addWidget(connectToFilter(createDial(p_filter1_freq + off), i), 4, 0);
        grid->addWidget(connectToFilter(createDial(p_filter1_q + off), i), 4, 1);
        //grid->addWidget(createDial(p_filter1_level + off), 4, 2);
        //grid->addWidget(createDial(p_filter1_pan + off), 4, 3);
        // row 6
        grid->addWidget(new QLabel("Freq"), 5, 0);
        grid->addWidget(new QLabel("Res"), 5, 1);
        //grid->addWidget(new QLabel("Vol"), 5, 2);
        //grid->addWidget(new QLabel("Pan"), 5, 3);
        // row 7
        grid->addWidget(createLabel(p_filter1_freq + off), 6, 0);
        grid->addWidget(createLabel(p_filter1_q + off), 6, 1);
        //grid->addWidget(createLabel(p_filter1_level + off), 6, 2);
        //grid->addWidget(createLabel(p_filter1_pan + off), 6, 3);
        grid->setHorizontalSpacing(2);
        grid->setVerticalSpacing(0);
        grid->setRowStretch(7, 1);
        return parent;
    }
Ejemplo n.º 9
0
    QWidget* createEnv(QGroupBox* parent, uint i) {
        uint off = i * ENV_OFF;
        parent->setCheckable(true);
        connectBox(p_env1_on + off, parent);
        QGridLayout* grid = new QGridLayout(parent);
        // row 1
        grid->addWidget(createToggle(p_env1_retrigger + off, "Retr"), 0, 0);
        // row 2
        grid->addWidget(env_wd[i] = new WaveDisplay(ENV_WIDTH, WAVE_HEIGHT), 1, 0, 3, 3);
        grid->addWidget(connectToEnv(createDial(p_env1_pre_delay + off), i), 1, 3);
        grid->addWidget(connectToEnv(createDial(p_env1_curve + off), i), 1, 4);
        // row 3
        grid->addWidget(new QLabel("Pre"), 2, 3);
        grid->addWidget(new QLabel("Curve"), 2, 4);
        // row 4
        grid->addWidget(createLabel(p_env1_pre_delay + off), 3, 3);
        grid->addWidget(createLabel(p_env1_curve + off), 3, 4);

        // row 5
        grid->addWidget(connectToEnv(createDial(p_env1_attack + off), i), 4, 0);
        grid->addWidget(connectToEnv(createDial(p_env1_hold + off), i), 4, 1);
        grid->addWidget(connectToEnv(createDial(p_env1_decay + off), i), 4, 2);
        grid->addWidget(connectToEnv(createDial(p_env1_sustain + off), i), 4, 3);
        grid->addWidget(connectToEnv(createDial(p_env1_release + off), i), 4, 4);
        // row 6
        grid->addWidget(new QLabel("A"), 5, 0);
        grid->addWidget(new QLabel("H"), 5, 1);
        grid->addWidget(new QLabel("D"), 5, 2);
        grid->addWidget(new QLabel("S"), 5, 3);
        grid->addWidget(new QLabel("R"), 5, 4);
        // row 7
        grid->addWidget(createLabel(p_env1_attack + off), 6, 0);
        grid->addWidget(createLabel(p_env1_hold + off), 6, 1);
        grid->addWidget(createLabel(p_env1_decay + off), 6, 2);
        grid->addWidget(createLabel(p_env1_sustain + off), 6, 3);
        grid->addWidget(createLabel(p_env1_release + off), 6, 4);
        grid->setHorizontalSpacing(2);
        grid->setVerticalSpacing(0);
        grid->setColumnStretch(7, 1);
        grid->setRowStretch(7, 1);
        return parent;
    }
Ejemplo n.º 10
0
 QWidget* createDelay(QGroupBox* parent) {
     parent->setObjectName("delay");
     parent->setCheckable(true);
     connectBox(p_delay_on, parent);
     QGridLayout* grid = new QGridLayout(parent);
     // row 1
     grid->addWidget(createDial(p_delay_bpm), 0, 0);
     grid->addWidget(createDial(p_delay_divider_l), 0, 1);
     grid->addWidget(createDial(p_delay_divider_r), 0, 2);
     grid->addWidget(createDial(p_delay_depth), 0, 3);
     grid->addWidget(createDial(p_delay_feedback), 0, 4);
     grid->addWidget(createDial(p_delay_pingpong), 0, 5);
     grid->addWidget(createDial(p_delay_lowcut), 0, 6);
     grid->addWidget(createDial(p_delay_highcut), 0, 7);
     // row 2
     grid->addWidget(new QLabel("BPM"), 1, 0);
     grid->addWidget(new QLabel("Divider L"), 1, 1);
     grid->addWidget(new QLabel("Divider R"), 1, 2);
     grid->addWidget(new QLabel("Depth"), 1, 3);
     grid->addWidget(new QLabel("Feedb"), 1, 4);
     grid->addWidget(new QLabel("Pingpong"), 1, 5);
     grid->addWidget(new QLabel("Lowcut"), 1, 6);
     grid->addWidget(new QLabel("Highcut"), 1, 7);
     // row 3
     grid->addWidget(createLabel(p_delay_bpm), 2, 0);
     grid->addWidget(createLabel(p_delay_divider_l), 2, 1);
     grid->addWidget(createLabel(p_delay_divider_r), 2, 2);
     grid->addWidget(createLabel(p_delay_depth), 2, 3);
     grid->addWidget(createLabel(p_delay_feedback), 2, 4);
     grid->addWidget(createLabel(p_delay_pingpong), 2, 5);
     grid->addWidget(createLabel(p_delay_lowcut), 2, 6);
     grid->addWidget(createLabel(p_delay_highcut), 2, 7);
     grid->setHorizontalSpacing(2);
     grid->setVerticalSpacing(0);
     grid->setColumnStretch(8, 1);
     return parent;
 }
Ejemplo n.º 11
0
    QWidget* createOscillator(QGroupBox* parent, uint i) {
        uint off = i * OSC_OFF;
        parent->setCheckable(true);
        connectBox(p_osc1_on + off, parent);
        QGridLayout* grid = new QGridLayout(parent);
        // row 1
        QComboBox* typeBox = createSelect(p_osc1_type + off, osc_types, 29 + 3 + 4 + 4);
        oscMapper.setMapping(typeBox, i);
        connect(typeBox, SIGNAL(currentIndexChanged(int)), &oscMapper, SLOT(map()));
        grid->addWidget(typeBox, 0, 0, 1, 2);
        grid->addWidget(connectToOsc(createToggle(p_osc1_inv + off, "Inv"), i), 0, 2);
        grid->addWidget(createToggle(p_osc1_tracking + off, "Track"), 0, 3);
        if (i > 0) {
            grid->addWidget(createToggle(p_osc1_free + off, "Free"), 0, 4);
            grid->addWidget(createToggle(p_osc1_sync + off, "Sync"), 0, 5);
        } else {
            grid->addWidget(createToggle(p_osc1_free + off, "Free"), 0, 4);
        }
        // row 2
        grid->addWidget(osc_wd[i] = new WaveDisplay(OSC_WIDTH, WAVE_HEIGHT), 1, 0, 3, 3);
        grid->addWidget(createDial(p_osc1_coarse + off), 1, 3);
        grid->addWidget(createDial(p_osc1_fine + off), 1, 4);
        grid->addWidget(createDial(p_osc1_ratio + off), 1, 5);
        grid->addWidget(createDial(p_osc1_level + off), 1, 6);
        // row 3
        grid->addWidget(new QLabel("Coarse"), 2, 3);
        grid->addWidget(new QLabel("Fine"), 2, 4);
        grid->addWidget(new QLabel("Ratio"), 2, 5);
        grid->addWidget(new QLabel("Level"), 2, 6);
        // row 4
        grid->addWidget(createLabel(p_osc1_coarse + off), 3, 3);
        grid->addWidget(createLabel(p_osc1_fine + off), 3, 4);
        grid->addWidget(createLabel(p_osc1_ratio + off), 3, 5);
        grid->addWidget(createLabel(p_osc1_level + off), 3, 6);

        // row 5
        grid->addWidget(connectToOsc(createDial(p_osc1_start + off), i), 4, 0);
        grid->addWidget(connectToOsc(createDial(p_osc1_width + off), i), 4, 1);
        if (i > 0) {
            grid->addWidget(createSelect(p_osc1_input + off, nums, i), 4, 3);
            grid->addWidget(createDial(p_osc1_pm + off), 4, 4);
            grid->addWidget(createSelect(p_osc1_input2 + off, nums, i), 4, 5);
            grid->addWidget(createSelect(p_osc1_out_mod + off, out_mod, 4), 4, 6);
        }
        // row 6
        grid->addWidget(new QLabel("Start"), 5, 0);
        grid->addWidget(new QLabel("Width"), 5, 1);
        if (i > 0) {
            grid->addWidget(new QLabel("Input"), 5, 3);
            grid->addWidget(new QLabel("PM"), 5, 4);
            grid->addWidget(new QLabel("Input 2"), 5, 5);
            grid->addWidget(new QLabel("Mod"), 5, 6);
        }
        // row 7
        grid->addWidget(createLabel(p_osc1_start + off), 6, 0);
        grid->addWidget(createLabel(p_osc1_width + off), 6, 1);
        if (i > 0) {
            grid->addWidget(createLabel(p_osc1_pm + off), 6, 4);
        }
        grid->setHorizontalSpacing(2);
        grid->setVerticalSpacing(0);
        grid->setColumnStretch(7, 1);
        grid->setRowStretch(7, 1);
        return parent;
    }