예제 #1
0
stereoMatrixControlDialog::stereoMatrixControlDialog(
	stereoMatrixControls * _controls ) :
	EffectControlDialog( _controls )
{

	setFixedSize( 160, 185 );

	setAutoFillBackground( true );
	QPalette pal;
	pal.setBrush( backgroundRole(),
				PLUGIN_NAME::getIconPixmap( "artwork" ) );
	setPalette( pal );


	Knob * llKnob = new Knob( knobBright_26, this );
	llKnob->setModel( &_controls->m_llModel );
	llKnob->setHintText( tr( "Left to Left Vol:" ) , "" );
	llKnob->move( 10, 79 );

	Knob * lrKnob = new Knob( knobBright_26, this );
	lrKnob->setModel( &_controls->m_lrModel );
	lrKnob->setHintText( tr( "Left to Right Vol:" ) , "" );
	lrKnob->move( 48, 79 );

	Knob * rlKnob = new Knob( knobBright_26, this );
	rlKnob->setModel( &_controls->m_rlModel );
	rlKnob->setHintText( tr( "Right to Left Vol:" ) , "" );
	rlKnob->move( 85, 79 );

	Knob * rrKnob = new Knob( knobBright_26, this );
	rrKnob->setModel( &_controls->m_rrModel );
	rrKnob->setHintText( tr( "Right to Right Vol:" ) , "" );
	rrKnob->move( 123, 79 );
}
예제 #2
0
파일: organic.cpp 프로젝트: fxiangyi/lmms
void organicInstrumentView::modelChanged()
{
	organicInstrument * oi = castModel<organicInstrument>();
	
	const float y=91.0f;
	const float rowHeight = 26.0f;
	const float x=53.0f;
	const float colWidth = 24.0f; 

	m_numOscillators = oi->m_numOscillators;
	
	m_fx1Knob->setModel( &oi->m_fx1Model );
	m_volKnob->setModel( &oi->m_volModel );

	if( m_oscKnobs != NULL ) 
	{
		delete[] m_oscKnobs;
	}
	
	m_oscKnobs = new OscillatorKnobs[ m_numOscillators ];

	// Create knobs, now that we know how many to make
	for( int i = 0; i < m_numOscillators; ++i )
	{
		// setup harmonic knob
		Knob * harmKnob = new organicKnob( this );
		harmKnob->move( x + i * colWidth, y - rowHeight );
		harmKnob->setObjectName( "harmKnob" );
		connect( &oi->m_osc[i]->m_harmModel, SIGNAL( dataChanged() ),
			this, SLOT( updateKnobHint() ) );
			
		// setup waveform-knob
		Knob * oscKnob = new organicKnob( this );
		oscKnob->move( x + i * colWidth, y );
		connect( &oi->m_osc[i]->m_oscModel, SIGNAL( dataChanged() ),
			this, SLOT( updateKnobHint() ) );

		oscKnob->setHintText( tr( "Osc %1 waveform:" ).arg( i + 1 ) + " ", QString() );
										
		// setup volume-knob
		Knob * volKnob = new Knob( knobStyled, this );
		volKnob->setVolumeKnob( true );
		volKnob->move( x + i * colWidth, y + rowHeight*1 );
		volKnob->setFixedSize( 21, 21 );
		volKnob->setHintText( tr( "Osc %1 volume:" ).arg(
							i + 1 ) + " ", "%" );
							
		// setup panning-knob
		Knob * panKnob = new organicKnob( this );
		panKnob->move( x + i  * colWidth, y + rowHeight*2 );
		panKnob->setHintText( tr("Osc %1 panning:").arg(
							i + 1 ) + " ", "" );
							
		// setup knob for fine-detuning
		Knob * detuneKnob = new organicKnob( this );
		detuneKnob->move( x + i * colWidth, y + rowHeight*3 );
		detuneKnob->setHintText( tr( "Osc %1 stereo detuning" ).arg( i + 1 )
							+ " ", " " +
							tr( "cents" ) );

		m_oscKnobs[i] = OscillatorKnobs( harmKnob, volKnob, oscKnob, panKnob, detuneKnob );

		// Attach to models
		m_oscKnobs[i].m_harmKnob->setModel( &oi->m_osc[i]->m_harmModel );
		m_oscKnobs[i].m_volKnob->setModel( &oi->m_osc[i]->m_volModel );
		m_oscKnobs[i].m_oscKnob->setModel( &oi->m_osc[i]->m_oscModel );
		m_oscKnobs[i].m_panKnob->setModel( &oi->m_osc[i]->m_panModel );
		m_oscKnobs[i].m_detuneKnob->setModel( &oi->m_osc[i]->m_detuneModel );
	}
	updateKnobHint();
}
예제 #3
0
TripleOscillatorView::TripleOscillatorView( Instrument * _instrument,
        QWidget * _parent ) :
    InstrumentView( _instrument, _parent )
{
    setAutoFillBackground( true );
    QPalette pal;
    pal.setBrush( backgroundRole(),
                  PLUGIN_NAME::getIconPixmap( "artwork" ) );
    setPalette( pal );

    const int mod_x = 66;
    const int mod1_y = 58;
    const int mod2_y = 75;
    const int osc_y = 109;
    const int osc_h = 52;

    // TODO: clean rewrite using layouts and all that...
    PixmapButton * pm_osc1_btn = new PixmapButton( this, NULL );
    pm_osc1_btn->move( mod_x, mod1_y );
    pm_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                       "pm_active" ) );
    pm_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                         "pm_inactive" ) );
    ToolTip::add( pm_osc1_btn, tr( "Use phase modulation for "
                                   "modulating oscillator 1 with "
                                   "oscillator 2" ) );

    PixmapButton * am_osc1_btn = new PixmapButton( this, NULL );
    am_osc1_btn->move( mod_x + 35, mod1_y );
    am_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                       "am_active" ) );
    am_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                         "am_inactive" ) );
    ToolTip::add( am_osc1_btn, tr( "Use amplitude modulation for "
                                   "modulating oscillator 1 with "
                                   "oscillator 2" ) );

    PixmapButton * mix_osc1_btn = new PixmapButton( this, NULL );
    mix_osc1_btn->move( mod_x + 70, mod1_y );
    mix_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                        "mix_active" ) );
    mix_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                          "mix_inactive" ) );
    ToolTip::add( mix_osc1_btn, tr( "Mix output of oscillator 1 & 2" ) );

    PixmapButton * sync_osc1_btn = new PixmapButton( this, NULL );
    sync_osc1_btn->move( mod_x + 105, mod1_y );
    sync_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                         "sync_active" ) );
    sync_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                           "sync_inactive" ) );
    ToolTip::add( sync_osc1_btn, tr( "Synchronize oscillator 1 with "
                                     "oscillator 2" ) );

    PixmapButton * fm_osc1_btn = new PixmapButton( this, NULL );
    fm_osc1_btn->move( mod_x + 140, mod1_y );
    fm_osc1_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                       "fm_active" ) );
    fm_osc1_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                         "fm_inactive" ) );
    ToolTip::add( fm_osc1_btn, tr( "Use frequency modulation for "
                                   "modulating oscillator 1 with "
                                   "oscillator 2" ) );

    m_mod1BtnGrp = new automatableButtonGroup( this );
    m_mod1BtnGrp->addButton( pm_osc1_btn );
    m_mod1BtnGrp->addButton( am_osc1_btn );
    m_mod1BtnGrp->addButton( mix_osc1_btn );
    m_mod1BtnGrp->addButton( sync_osc1_btn );
    m_mod1BtnGrp->addButton( fm_osc1_btn );



    PixmapButton * pm_osc2_btn = new PixmapButton( this, NULL );
    pm_osc2_btn->move( mod_x, mod2_y );
    pm_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                       "pm_active" ) );
    pm_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                         "pm_inactive" ) );
    ToolTip::add( pm_osc2_btn, tr( "Use phase modulation for "
                                   "modulating oscillator 2 with "
                                   "oscillator 3" ) );

    PixmapButton * am_osc2_btn = new PixmapButton( this, NULL );
    am_osc2_btn->move( mod_x + 35, mod2_y );
    am_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                       "am_active" ) );
    am_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                         "am_inactive" ) );
    ToolTip::add( am_osc2_btn, tr( "Use amplitude modulation for "
                                   "modulating oscillator 2 with "
                                   "oscillator 3" ) );

    PixmapButton * mix_osc2_btn = new PixmapButton( this, NULL );
    mix_osc2_btn->move( mod_x + 70, mod2_y );
    mix_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                        "mix_active" ) );
    mix_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                          "mix_inactive" ) );
    ToolTip::add( mix_osc2_btn, tr("Mix output of oscillator 2 & 3" ) );

    PixmapButton * sync_osc2_btn = new PixmapButton( this, NULL );
    sync_osc2_btn->move( mod_x + 105, mod2_y );
    sync_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                         "sync_active" ) );
    sync_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                           "sync_inactive" ) );
    ToolTip::add( sync_osc2_btn, tr( "Synchronize oscillator 2 with "
                                     "oscillator 3" ) );

    PixmapButton * fm_osc2_btn = new PixmapButton( this, NULL );
    fm_osc2_btn->move( mod_x + 140, mod2_y );
    fm_osc2_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                       "fm_active" ) );
    fm_osc2_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                         "fm_inactive" ) );
    ToolTip::add( fm_osc2_btn, tr( "Use frequency modulation for "
                                   "modulating oscillator 2 with "
                                   "oscillator 3" ) );

    m_mod2BtnGrp = new automatableButtonGroup( this );

    m_mod2BtnGrp->addButton( pm_osc2_btn );
    m_mod2BtnGrp->addButton( am_osc2_btn );
    m_mod2BtnGrp->addButton( mix_osc2_btn );
    m_mod2BtnGrp->addButton( sync_osc2_btn );
    m_mod2BtnGrp->addButton( fm_osc2_btn );


    for( int i = 0; i < NUM_OF_OSCILLATORS; ++i )
    {
        int knob_y = osc_y + i * osc_h;

        // setup volume-knob
        Knob * vk = new Knob( knobStyled, this );
        vk->setVolumeKnob( true );
        vk->setFixedSize( 28, 35 );
        vk->move( 6, knob_y );
        vk->setHintText( tr( "Osc %1 volume:" ).arg(
                             i+1 ), "%" );
        vk->setWhatsThis(
            tr( "With this knob you can set the volume of "
                "oscillator %1. When setting a value of 0 the "
                "oscillator is turned off. Otherwise you can "
                "hear the oscillator as loud as you set it "
                "here.").arg( i+1 ) );

        // setup panning-knob
        Knob * pk = new TripleOscKnob( this );
        pk->move( 35, knob_y );
        pk->setHintText( tr("Osc %1 panning:").arg( i + 1 ), "" );
        pk->setWhatsThis(
            tr( "With this knob you can set the panning of the "
                "oscillator %1. A value of -100 means 100% "
                "left and a value of 100 moves oscillator-"
                "output right.").arg( i+1 ) );

        // setup coarse-knob
        Knob * ck = new TripleOscKnob( this );
        ck->move( 82, knob_y );
        ck->setHintText( tr( "Osc %1 coarse detuning:" ).arg( i + 1 )
                         , " " + tr( "semitones" ) );
        ck->setWhatsThis(
            tr( "With this knob you can set the coarse detuning of "
                "oscillator %1. You can detune the oscillator "
                "24 semitones (2 octaves) up and down. This is "
                "useful for creating sounds with a chord." ).
            arg( i + 1 ) );


        // setup knob for left fine-detuning
        Knob * flk = new TripleOscKnob( this );
        flk->move( 111, knob_y );
        flk->setHintText( tr( "Osc %1 fine detuning left:" ).
                          arg( i + 1 ),
                          " " + tr( "cents" ) );
        flk->setWhatsThis(
            tr( "With this knob you can set the fine detuning of "
                "oscillator %1 for the left channel. The fine-"
                "detuning is ranged between -100 cents and "
                "+100 cents. This is useful for creating "
                "\"fat\" sounds." ).arg( i + 1 ) );

        // setup knob for right fine-detuning
        Knob * frk = new TripleOscKnob( this );
        frk->move( 140, knob_y );
        frk->setHintText( tr( "Osc %1 fine detuning right:" ).
                          arg( i + 1 ),
                          " " + tr( "cents" ) );
        frk->setWhatsThis(
            tr( "With this knob you can set the fine detuning of "
                "oscillator %1 for the right channel. The "
                "fine-detuning is ranged between -100 cents "
                "and +100 cents. This is useful for creating "
                "\"fat\" sounds." ).arg( i+1 ) );


        // setup phase-offset-knob
        Knob * pok = new TripleOscKnob( this );
        pok->move( 188, knob_y );
        pok->setHintText( tr( "Osc %1 phase-offset:" ).
                          arg( i + 1 ),
                          " " + tr( "degrees" ) );
        pok->setWhatsThis(
            tr( "With this knob you can set the phase-offset of "
                "oscillator %1. That means you can move the "
                "point within an oscillation where the "
                "oscillator begins to oscillate. For example "
                "if you have a sine-wave and have a phase-"
                "offset of 180 degrees the wave will first go "
                "down. It's the same with a square-wave."
              ).arg( i+1 ) );

        // setup stereo-phase-detuning-knob
        Knob * spdk = new TripleOscKnob( this );
        spdk->move( 217, knob_y );
        spdk->setHintText( tr("Osc %1 stereo phase-detuning:" ).
                           arg( i + 1 ),
                           " " + tr( "degrees" ) );
        spdk->setWhatsThis(
            tr( "With this knob you can set the stereo phase-"
                "detuning of oscillator %1. The stereo phase-"
                "detuning specifies the size of the difference "
                "between the phase-offset of left and right "
                "channel. This is very good for creating wide "
                "stereo sounds." ).arg( i+1 ) );

        int btn_y = 96 + i * osc_h;

        PixmapButton * sin_wave_btn = new PixmapButton( this, NULL );
        sin_wave_btn->move( 128, btn_y );
        sin_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                            "sin_shape_active" ) );
        sin_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                              "sin_shape_inactive" ) );
        ToolTip::add( sin_wave_btn,
                      tr( "Use a sine-wave for "
                          "current oscillator." ) );

        PixmapButton * triangle_wave_btn =
            new PixmapButton( this, NULL );
        triangle_wave_btn->move( 143, btn_y );
        triangle_wave_btn->setActiveGraphic(
            PLUGIN_NAME::getIconPixmap( "triangle_shape_active" ) );
        triangle_wave_btn->setInactiveGraphic(
            PLUGIN_NAME::getIconPixmap( "triangle_shape_inactive" ) );
        ToolTip::add( triangle_wave_btn,
                      tr( "Use a triangle-wave "
                          "for current oscillator." ) );

        PixmapButton * saw_wave_btn = new PixmapButton( this, NULL );
        saw_wave_btn->move( 158, btn_y );
        saw_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                            "saw_shape_active" ) );
        saw_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                              "saw_shape_inactive" ) );
        ToolTip::add( saw_wave_btn,
                      tr( "Use a saw-wave for "
                          "current oscillator." ) );

        PixmapButton * sqr_wave_btn = new PixmapButton( this, NULL );
        sqr_wave_btn->move( 173, btn_y );
        sqr_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                            "square_shape_active" ) );
        sqr_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                              "square_shape_inactive" ) );
        ToolTip::add( sqr_wave_btn,
                      tr( "Use a square-wave for "
                          "current oscillator." ) );

        PixmapButton * moog_saw_wave_btn =
            new PixmapButton( this, NULL );
        moog_saw_wave_btn->move( 188, btn_y );
        moog_saw_wave_btn->setActiveGraphic(
            PLUGIN_NAME::getIconPixmap( "moog_saw_shape_active" ) );
        moog_saw_wave_btn->setInactiveGraphic(
            PLUGIN_NAME::getIconPixmap( "moog_saw_shape_inactive" ) );
        ToolTip::add( moog_saw_wave_btn,
                      tr( "Use a moog-like saw-wave "
                          "for current oscillator." ) );

        PixmapButton * exp_wave_btn = new PixmapButton( this, NULL );
        exp_wave_btn->move( 203, btn_y );
        exp_wave_btn->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                            "exp_shape_active" ) );
        exp_wave_btn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                              "exp_shape_inactive" ) );
        ToolTip::add( exp_wave_btn,
                      tr( "Use an exponential "
                          "wave for current oscillator." ) );

        PixmapButton * white_noise_btn = new PixmapButton( this, NULL );
        white_noise_btn->move( 218, btn_y );
        white_noise_btn->setActiveGraphic(
            PLUGIN_NAME::getIconPixmap( "white_noise_shape_active" ) );
        white_noise_btn->setInactiveGraphic(
            PLUGIN_NAME::getIconPixmap( "white_noise_shape_inactive" ) );
        ToolTip::add( white_noise_btn,
                      tr( "Use white-noise for "
                          "current oscillator." ) );

        PixmapButton * uwb = new PixmapButton( this, NULL );
        uwb->move( 233, btn_y );
        uwb->setActiveGraphic( PLUGIN_NAME::getIconPixmap(
                                   "usr_shape_active" ) );
        uwb->setInactiveGraphic( PLUGIN_NAME::getIconPixmap(
                                     "usr_shape_inactive" ) );
        ToolTip::add( uwb, tr( "Use a user-defined "
                               "waveform for current oscillator." ) );

        automatableButtonGroup * wsbg =
            new automatableButtonGroup( this );

        wsbg->addButton( sin_wave_btn );
        wsbg->addButton( triangle_wave_btn );
        wsbg->addButton( saw_wave_btn );
        wsbg->addButton( sqr_wave_btn );
        wsbg->addButton( moog_saw_wave_btn );
        wsbg->addButton( exp_wave_btn );
        wsbg->addButton( white_noise_btn );
        wsbg->addButton( uwb );

        m_oscKnobs[i] = OscillatorKnobs( vk, pk, ck, flk, frk, pok,
                                         spdk, uwb, wsbg );
    }
}
BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
	EffectControlDialog( controls )
{
	setAutoFillBackground( true );
	QPalette pal;
	pal.setBrush( backgroundRole(),	PLUGIN_NAME::getIconPixmap( "artwork" ) );
	setPalette( pal );
	setFixedSize( 215, 120 );
	
	// labels
	QLabel * inLabel = new QLabel( tr( "IN" ), this );
	inLabel->move( 12, 10);
	
	QLabel * outLabel = new QLabel( tr( "OUT" ), this );
	outLabel->move( 176, 10 );
	
	// input knobs
	Knob * inGain = new Knob( knobBright_26, this );
	inGain->move( 12, 25 );
	inGain->setModel( & controls->m_inGain );
	inGain->setLabel( tr( "GAIN" ) );
	inGain->setHintText( tr( "Input Gain:" ) + " ", " dBV" );
	
	Knob * inNoise = new Knob( knobBright_26, this );
	inNoise->move( 12, 70 );
	inNoise->setModel( & controls->m_inNoise );
	inNoise->setLabel( tr( "NOIS" ) );
	inNoise->setHintText( tr( "Input Noise:" ) + " ", "%" );
	
	
	// output knobs
	Knob * outGain = new Knob( knobBright_26, this );
	outGain->move( 176, 25 );
	outGain->setModel( & controls->m_outGain );
	outGain->setLabel( tr( "GAIN" ) );
	outGain->setHintText( tr( "Output Gain:" ) + " ", " dBV" );
	
	Knob * outClip = new Knob( knobBright_26, this );
	outClip->move( 176, 70 );
	outClip->setModel( & controls->m_outClip );
	outClip->setLabel( tr( "CLIP" ) );
	outClip->setHintText( tr( "Output Clip:" ) + " ", "%" );
	
	
	// leds
	LedCheckBox * rateEnabled = new LedCheckBox( tr( "Rate" ), this, tr( "Rate Enabled" ), LedCheckBox::Green );
	rateEnabled->move( 50, 30 );
	rateEnabled->setModel( & controls->m_rateEnabled );
	ToolTip::add( rateEnabled, tr( "Enable samplerate-crushing" ) );
	
	LedCheckBox * depthEnabled = new LedCheckBox( tr( "Depth" ), this, tr( "Depth Enabled" ), LedCheckBox::Green );
	depthEnabled->move( 50, 80 );
	depthEnabled->setModel( & controls->m_depthEnabled );
	ToolTip::add( depthEnabled, tr( "Enable bitdepth-crushing" ) );
	
	
	// rate crushing knobs
	Knob * rate = new Knob( knobBright_26, this );
	rate->move( 100, 20 );
	rate->setModel( & controls->m_rate );
	rate->setLabel( tr( "Rate" ) );
	rate->setHintText( tr( "Sample rate:" ) + " ", " Hz" );
	
	Knob * stereoDiff = new Knob( knobBright_26, this );
	stereoDiff->move( 140, 20 );
	stereoDiff->setModel( & controls->m_stereoDiff );
	stereoDiff->setLabel( tr( "STD" ) );
	stereoDiff->setHintText( tr( "Stereo difference:" ) + " ", "%" );
	
	
	// depth crushing knob
	Knob * levels = new Knob( knobBright_26, this );
	levels->move( 140, 70 );
	levels->setModel( & controls->m_levels );
	levels->setLabel( tr( "Levels" ) );
	levels->setHintText( tr( "Levels:" ) + " ", "" );
}
예제 #5
0
MultitapEchoControlDialog::MultitapEchoControlDialog( MultitapEchoControls * controls ) :
	EffectControlDialog( controls )
{
	setAutoFillBackground( true );
	QPalette pal;
	pal.setBrush( backgroundRole(),	PLUGIN_NAME::getIconPixmap( "artwork" ) );
	setPalette( pal );
	setFixedSize( 245, 300 );
	
	// graph widgets
	
	Graph * ampGraph = new Graph( this, Graph::BarStyle, 204, 105 );
	Graph * lpGraph = new Graph( this, Graph::BarStyle, 204, 105 );
	
	ampGraph->move( 30, 10 );
	lpGraph->move( 30, 125 );
	
	ampGraph->setModel( & controls->m_ampGraph );
	lpGraph->setModel( & controls->m_lpGraph );
	
	pal = QPalette();
	pal.setBrush( backgroundRole(),	PLUGIN_NAME::getIconPixmap("graph_bg") );
	
	ampGraph->setAutoFillBackground( true );
	ampGraph->setPalette( pal );
	ampGraph->setGraphColor( QColor( 11, 213, 86) );
	ampGraph -> setMaximumSize( 204, 105 );
	
	lpGraph->setAutoFillBackground( true );
	lpGraph->setPalette( pal );
	lpGraph->setGraphColor( QColor( 0, 200, 187) );
	lpGraph -> setMaximumSize( 204, 105 );
	
	// steps spinbox
	
	LcdSpinBox * steps = new LcdSpinBox( 2, this, "Steps" );
	steps->move( 20, 245 );
	steps->setModel( & controls->m_steps );
	
	// knobs

	TempoSyncKnob * stepLength = new TempoSyncKnob( knobBright_26, this );
	stepLength->move( 100, 245 );
	stepLength->setModel( & controls->m_stepLength );
	stepLength->setLabel( tr( "Length" ) );
	stepLength->setHintText( tr( "Step length:" ) , " ms" );
	
	Knob * dryGain = new Knob( knobBright_26, this );
	dryGain->move( 150, 245 );
	dryGain->setModel( & controls->m_dryGain );
	dryGain->setLabel( tr( "Dry" ) );
	dryGain->setHintText( tr( "Dry Gain:" ) , " dBFS" );

	Knob * stages = new Knob( knobBright_26, this );
	stages->move( 200, 245 );
	stages->setModel( & controls->m_stages );
	stages->setLabel( tr( "Stages" ) );
	stages->setHintText( tr( "Lowpass stages:" ) , "x" );
	// switch led
	
	LedCheckBox * swapInputs = new LedCheckBox( "Swap inputs", this, tr( "Swap inputs" ), LedCheckBox::Green );
	swapInputs->move( 20, 275 );
	swapInputs->setModel( & controls->m_swapInputs );
	ToolTip::add( swapInputs, tr( "Swap left and right input channel for reflections" ) );
}
예제 #6
0
BitcrushControlDialog::BitcrushControlDialog( BitcrushControls * controls ) :
	EffectControlDialog( controls )
{
	setAutoFillBackground( true );
	QPalette pal;
	pal.setBrush( backgroundRole(),	PLUGIN_NAME::getIconPixmap( "artwork" ) );
	setPalette( pal );
	setFixedSize( 181, 128 );
	
	// labels
	QLabel * inLabel = new QLabel( tr( "IN" ), this );
	inLabel->move( 24, 15 );
	
	QLabel * outLabel = new QLabel( tr( "OUT" ), this );
	outLabel->move( 139, 15 );
	
	// input knobs
	Knob * inGain = new Knob( knobBright_26, this );
	inGain->move( 16, 32 );
	inGain->setModel( & controls->m_inGain );
	inGain->setLabel( tr( "GAIN" ) );
	inGain->setHintText( tr( "Input gain:" ) , " dBFS" );
	
	Knob * inNoise = new Knob( knobBright_26, this );
	inNoise->move( 14, 76 );
	inNoise->setModel( & controls->m_inNoise );
	inNoise->setLabel( tr( "NOISE" ) );
	inNoise->setHintText( tr( "Input noise:" ) , "%" );
	
	
	// output knobs
	Knob * outGain = new Knob( knobBright_26, this );
	outGain->move( 138, 32 );
	outGain->setModel( & controls->m_outGain );
	outGain->setLabel( tr( "GAIN" ) );
	outGain->setHintText( tr( "Output gain:" ) , " dBFS" );
	
	Knob * outClip = new Knob( knobBright_26, this );
	outClip->move( 138, 76 );
	outClip->setModel( & controls->m_outClip );
	outClip->setLabel( tr( "CLIP" ) );
	outClip->setHintText( tr( "Output clip:" ) , "%" );
	
	
	// leds
	LedCheckBox * rateEnabled = new LedCheckBox( "", this, tr( "Rate enabled" ), LedCheckBox::Green );
	rateEnabled->move( 64, 14 );
	rateEnabled->setModel( & controls->m_rateEnabled );
	ToolTip::add( rateEnabled, tr( "Enable sample-rate crushing" ) );
	
	LedCheckBox * depthEnabled = new LedCheckBox( "", this, tr( "Depth enabled" ), LedCheckBox::Green );
	depthEnabled->move( 101, 14 );
	depthEnabled->setModel( & controls->m_depthEnabled );
	ToolTip::add( depthEnabled, tr( "Enable bit-depth crushing" ) );
	
	
	// rate crushing knobs
	Knob * rate = new Knob( knobBright_26, this );
	rate->move( 59, 32 );
	rate->setModel( & controls->m_rate );
	rate->setLabel( tr( "FREQ" ) );
	rate->setHintText( tr( "Sample rate:" ) , " Hz" );
	
	Knob * stereoDiff = new Knob( knobBright_26, this );
	stereoDiff->move( 72, 76 );
	stereoDiff->setModel( & controls->m_stereoDiff );
	stereoDiff->setLabel( tr( "STEREO" ) );
	stereoDiff->setHintText( tr( "Stereo difference:" ) , "%" );
	
	
	// depth crushing knob
	Knob * levels = new Knob( knobBright_26, this );
	levels->move( 92, 32 );
	levels->setModel( & controls->m_levels );
	levels->setLabel( tr( "QUANT" ) );
	levels->setHintText( tr( "Levels:" ) , "" );
}