bitInvaderView::bitInvaderView( Instrument * _instrument, QWidget * _parent ) : InstrumentView( _instrument, _parent ) { setAutoFillBackground( true ); QPalette pal; pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); setPalette( pal ); m_sampleLengthKnob = new Knob( knobDark_28, this ); m_sampleLengthKnob->move( 6, 201 ); m_sampleLengthKnob->setHintText( tr( "Sample Length" ), "" ); m_graph = new Graph( this, Graph::NearestStyle, 204, 134 ); m_graph->move(23,59); // 55,120 - 2px border m_graph->setAutoFillBackground( true ); m_graph->setGraphColor( QColor( 255, 255, 255 ) ); ToolTip::add( m_graph, tr ( "Draw your own waveform here " "by dragging your mouse on this graph." )); pal = QPalette(); pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap("wavegraph") ); m_graph->setPalette( pal ); m_sinWaveBtn = new PixmapButton( this, tr( "Sine wave" ) ); m_sinWaveBtn->move( 131, 205 ); m_sinWaveBtn->setActiveGraphic( embed::getIconPixmap( "sin_wave_active" ) ); m_sinWaveBtn->setInactiveGraphic( embed::getIconPixmap( "sin_wave_inactive" ) ); ToolTip::add( m_sinWaveBtn, tr( "Click for a sine-wave." ) ); m_triangleWaveBtn = new PixmapButton( this, tr( "Triangle wave" ) ); m_triangleWaveBtn->move( 131 + 14, 205 ); m_triangleWaveBtn->setActiveGraphic( embed::getIconPixmap( "triangle_wave_active" ) ); m_triangleWaveBtn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); ToolTip::add( m_triangleWaveBtn, tr( "Click here for a triangle-wave." ) ); m_sawWaveBtn = new PixmapButton( this, tr( "Saw wave" ) ); m_sawWaveBtn->move( 131 + 14*2, 205 ); m_sawWaveBtn->setActiveGraphic( embed::getIconPixmap( "saw_wave_active" ) ); m_sawWaveBtn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); ToolTip::add( m_sawWaveBtn, tr( "Click here for a saw-wave." ) ); m_sqrWaveBtn = new PixmapButton( this, tr( "Square wave" ) ); m_sqrWaveBtn->move( 131 + 14*3, 205 ); m_sqrWaveBtn->setActiveGraphic( embed::getIconPixmap( "square_wave_active" ) ); m_sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); ToolTip::add( m_sqrWaveBtn, tr( "Click here for a square-wave." ) ); m_whiteNoiseWaveBtn = new PixmapButton( this, tr( "White noise wave" ) ); m_whiteNoiseWaveBtn->move( 131 + 14*4, 205 ); m_whiteNoiseWaveBtn->setActiveGraphic( embed::getIconPixmap( "white_noise_wave_active" ) ); m_whiteNoiseWaveBtn->setInactiveGraphic( embed::getIconPixmap( "white_noise_wave_inactive" ) ); ToolTip::add( m_whiteNoiseWaveBtn, tr( "Click here for white-noise." ) ); m_usrWaveBtn = new PixmapButton( this, tr( "User defined wave" ) ); m_usrWaveBtn->move( 131 + 14*5, 205 ); m_usrWaveBtn->setActiveGraphic( embed::getIconPixmap( "usr_wave_active" ) ); m_usrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "usr_wave_inactive" ) ); ToolTip::add( m_usrWaveBtn, tr( "Click here for a user-defined shape." ) ); m_smoothBtn = new PixmapButton( this, tr( "Smooth" ) ); m_smoothBtn->move( 131 + 14*6, 205 ); m_smoothBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); m_smoothBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); ToolTip::add( m_smoothBtn, tr( "Click here to smooth waveform." ) ); m_interpolationToggle = new LedCheckBox( "Interpolation", this, tr( "Interpolation" ), LedCheckBox::Yellow ); m_interpolationToggle->move( 131, 221 ); m_normalizeToggle = new LedCheckBox( "Normalize", this, tr( "Normalize" ), LedCheckBox::Green ); m_normalizeToggle->move( 131, 236 ); connect( m_sinWaveBtn, SIGNAL (clicked () ), this, SLOT ( sinWaveClicked() ) ); connect( m_triangleWaveBtn, SIGNAL ( clicked () ), this, SLOT ( triangleWaveClicked() ) ); connect( m_sawWaveBtn, SIGNAL (clicked () ), this, SLOT ( sawWaveClicked() ) ); connect( m_sqrWaveBtn, SIGNAL ( clicked () ), this, SLOT ( sqrWaveClicked() ) ); connect( m_whiteNoiseWaveBtn, SIGNAL ( clicked () ), this, SLOT ( noiseWaveClicked() ) ); connect( m_usrWaveBtn, SIGNAL ( clicked () ), this, SLOT ( usrWaveClicked() ) ); connect( m_smoothBtn, SIGNAL ( clicked () ), this, SLOT ( smoothClicked() ) ); connect( m_interpolationToggle, SIGNAL( toggled( bool ) ), this, SLOT ( interpolationToggled( bool ) ) ); connect( m_normalizeToggle, SIGNAL( toggled( bool ) ), this, SLOT ( normalizeToggled( bool ) ) ); }
vibedView::vibedView( Instrument * _instrument, QWidget * _parent ) : InstrumentView( _instrument, _parent ) { setAutoFillBackground( true ); QPalette pal; pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) ); setPalette( pal ); m_volumeKnob = new Knob( knobBright_26, this ); m_volumeKnob->setVolumeKnob( true ); m_volumeKnob->move( 103, 142 ); m_volumeKnob->setHintText( tr( "Volume:" ) + " ", "" ); m_volumeKnob->setWhatsThis( tr( "The 'V' knob sets the volume " "of the selected string." ) ); m_stiffnessKnob = new Knob( knobBright_26, this ); m_stiffnessKnob->move( 129, 142 ); m_stiffnessKnob->setHintText( tr( "String stiffness:" ) + " ", "" ); m_stiffnessKnob->setWhatsThis( tr( "The 'S' knob sets the stiffness of the selected string. The stiffness " "of the string affects how long the string will ring out. The lower " "the setting, the longer the string will ring." ) ); m_pickKnob = new Knob( knobBright_26, this ); m_pickKnob->move( 153, 142 ); m_pickKnob->setHintText( tr( "Pick position:" ) + " ", "" ); m_pickKnob->setWhatsThis( tr( "The 'P' knob sets the position where the selected string will be 'picked'. " "The lower the setting the closer the pick is to the bridge." ) ); m_pickupKnob = new Knob( knobBright_26, this ); m_pickupKnob->move( 177, 142 ); m_pickupKnob->setHintText( tr( "Pickup position:" ) + " ", "" ); m_pickupKnob->setWhatsThis( tr( "The 'PU' knob sets the position where the vibrations will be monitored " "for the selected string. The lower the setting, the closer the " "pickup is to the bridge." ) ); m_panKnob = new Knob( knobBright_26, this ); m_panKnob->move( 105, 187 ); m_panKnob->setHintText( tr( "Pan:" ) + " ", "" ); m_panKnob->setWhatsThis( tr( "The Pan knob determines the location of the selected string in the stereo " "field." ) ); m_detuneKnob = new Knob( knobBright_26, this ); m_detuneKnob->move( 150, 187 ); m_detuneKnob->setHintText( tr( "Detune:" ) + " ", "" ); m_detuneKnob->setWhatsThis( tr( "The Detune knob modifies the pitch of the selected string. Settings less " "than zero will cause the string to sound flat. Settings greater than zero " "will cause the string to sound sharp." ) ); m_randomKnob = new Knob( knobBright_26, this ); m_randomKnob->move( 194, 187 ); m_randomKnob->setHintText( tr( "Fuzziness:" ) + " ", "" ); m_randomKnob->setWhatsThis( tr( "The Slap knob adds a bit of fuzz to the selected string which is most " "apparent during the attack, though it can also be used to make the string " "sound more 'metallic'.") ); m_lengthKnob = new Knob( knobBright_26, this ); m_lengthKnob->move( 23, 193 ); m_lengthKnob->setHintText( tr( "Length:" ) + " ", "" ); m_lengthKnob->setWhatsThis( tr( "The Length knob sets the length of the selected string. Longer strings " "will both ring longer and sound brighter, however, they will also eat up " "more CPU cycles." ) ); m_impulse = new LedCheckBox( "", this ); m_impulse->move( 23, 94 ); ToolTip::add( m_impulse, tr( "Impulse or initial state" ) ); m_impulse->setWhatsThis( tr( "The 'Imp' selector determines whether the waveform in the graph is to be " "treated as an impulse imparted to the string by the pick or the initial " "state of the string." ) ); m_harmonic = new nineButtonSelector( PLUGIN_NAME::getIconPixmap( "button_-2_on" ), PLUGIN_NAME::getIconPixmap( "button_-2_off" ), PLUGIN_NAME::getIconPixmap( "button_-1_on" ), PLUGIN_NAME::getIconPixmap( "button_-1_off" ), PLUGIN_NAME::getIconPixmap( "button_f_on" ), PLUGIN_NAME::getIconPixmap( "button_f_off" ), PLUGIN_NAME::getIconPixmap( "button_2_on" ), PLUGIN_NAME::getIconPixmap( "button_2_off" ), PLUGIN_NAME::getIconPixmap( "button_3_on" ), PLUGIN_NAME::getIconPixmap( "button_3_off" ), PLUGIN_NAME::getIconPixmap( "button_4_on" ), PLUGIN_NAME::getIconPixmap( "button_4_off" ), PLUGIN_NAME::getIconPixmap( "button_5_on" ), PLUGIN_NAME::getIconPixmap( "button_5_off" ), PLUGIN_NAME::getIconPixmap( "button_6_on" ), PLUGIN_NAME::getIconPixmap( "button_6_off" ), PLUGIN_NAME::getIconPixmap( "button_7_on" ), PLUGIN_NAME::getIconPixmap( "button_7_off" ), 2, 21, 127, this ); m_harmonic->setWindowTitle( tr( "Octave" ) ); m_harmonic->setWhatsThis( tr( "The Octave selector is used to choose which harmonic of the note the " "string will ring at. For example, '-2' means the string will ring two " "octaves below the fundamental, 'F' means the string will ring at the " "fundamental, and '6' means the string will ring six octaves above the " "fundamental." ) ); m_stringSelector = new nineButtonSelector( PLUGIN_NAME::getIconPixmap( "button_1_on" ), PLUGIN_NAME::getIconPixmap( "button_1_off" ), PLUGIN_NAME::getIconPixmap( "button_2_on" ), PLUGIN_NAME::getIconPixmap( "button_2_off" ), PLUGIN_NAME::getIconPixmap( "button_3_on" ), PLUGIN_NAME::getIconPixmap( "button_3_off" ), PLUGIN_NAME::getIconPixmap( "button_4_on" ), PLUGIN_NAME::getIconPixmap( "button_4_off" ), PLUGIN_NAME::getIconPixmap( "button_5_on" ), PLUGIN_NAME::getIconPixmap( "button_5_off" ), PLUGIN_NAME::getIconPixmap( "button_6_on" ), PLUGIN_NAME::getIconPixmap( "button_6_off" ), PLUGIN_NAME::getIconPixmap( "button_7_on" ), PLUGIN_NAME::getIconPixmap( "button_7_off" ), PLUGIN_NAME::getIconPixmap( "button_8_on" ), PLUGIN_NAME::getIconPixmap( "button_8_off" ), PLUGIN_NAME::getIconPixmap( "button_9_on" ), PLUGIN_NAME::getIconPixmap( "button_9_off" ), 0, 21, 39, this); m_graph = new Graph( this ); m_graph->setWindowTitle( tr( "Impulse Editor" ) ); m_graph->setForeground( PLUGIN_NAME::getIconPixmap( "wavegraph4" ) ); m_graph->move( 76, 21 ); m_graph->resize(132, 104); m_graph->setWhatsThis( tr( "The waveform editor provides control over the initial state or impulse " "that is used to start the string vibrating. The buttons to the right of " "the graph will initialize the waveform to the selected type. The '?' " "button will load a waveform from a file--only the first 128 samples " "will be loaded.\n\n" "The waveform can also be drawn in the graph.\n\n" "The 'S' button will smooth the waveform.\n\n" "The 'N' button will normalize the waveform.") ); setWhatsThis( tr( "Vibed models up to nine independently vibrating strings. The 'String' " "selector allows you to choose which string is being edited. The 'Imp' " "selector chooses whether the graph represents an impulse or the initial " "state of the string. The 'Octave' selector chooses which harmonic the " "string should vibrate at.\n\n" "The graph allows you to control the initial state or impulse used to set the " "string in motion.\n\n" "The 'V' knob controls the volume. The 'S' knob controls the string's " "stiffness. The 'P' knob controls the pick position. The 'PU' knob " "controls the pickup position.\n\n" "'Pan' and 'Detune' hopefully don't need explanation. The 'Slap' knob " "adds a bit of fuzz to the sound of the string.\n\n" "The 'Length' knob controls the length of the string.\n\n" "The LED in the lower right corner of the waveform editor determines " "whether the string is active in the current instrument." ) ); m_power = new LedCheckBox( "", this, tr( "Enable waveform" ) ); m_power->move( 212, 130 ); ToolTip::add( m_power, tr( "Click here to enable/disable waveform." ) ); // String selector is not a part of the model m_stringSelector->setWindowTitle( tr( "String" ) ); m_stringSelector->setWhatsThis( tr( "The String selector is used to choose which string the controls are " "editing. A Vibed instrument can contain up to nine independently " "vibrating strings. The LED in the lower right corner of the " "waveform editor indicates whether the selected string is active." ) ); connect( m_stringSelector, SIGNAL( nineButtonSelection( int ) ), this, SLOT( showString( int ) ) ); showString( 0 ); m_sinWaveBtn = new PixmapButton( this, tr( "Sine wave" ) ); m_sinWaveBtn->move( 212, 24 ); m_sinWaveBtn->setActiveGraphic( embed::getIconPixmap( "sin_wave_active" ) ); m_sinWaveBtn->setInactiveGraphic( embed::getIconPixmap( "sin_wave_inactive" ) ); ToolTip::add( m_sinWaveBtn, tr( "Use a sine-wave for " "current oscillator." ) ); connect( m_sinWaveBtn, SIGNAL (clicked () ), this, SLOT ( sinWaveClicked() ) ); m_triangleWaveBtn = new PixmapButton( this, tr( "Triangle wave" ) ); m_triangleWaveBtn->move( 212, 41 ); m_triangleWaveBtn->setActiveGraphic( embed::getIconPixmap( "triangle_wave_active" ) ); m_triangleWaveBtn->setInactiveGraphic( embed::getIconPixmap( "triangle_wave_inactive" ) ); ToolTip::add( m_triangleWaveBtn, tr( "Use a triangle-wave " "for current oscillator." ) ); connect( m_triangleWaveBtn, SIGNAL ( clicked () ), this, SLOT ( triangleWaveClicked( ) ) ); m_sawWaveBtn = new PixmapButton( this, tr( "Saw wave" ) ); m_sawWaveBtn->move( 212, 58 ); m_sawWaveBtn->setActiveGraphic( embed::getIconPixmap( "saw_wave_active" ) ); m_sawWaveBtn->setInactiveGraphic( embed::getIconPixmap( "saw_wave_inactive" ) ); ToolTip::add( m_sawWaveBtn, tr( "Use a saw-wave for " "current oscillator." ) ); connect( m_sawWaveBtn, SIGNAL (clicked () ), this, SLOT ( sawWaveClicked() ) ); m_sqrWaveBtn = new PixmapButton( this, tr( "Square wave" ) ); m_sqrWaveBtn->move( 212, 75 ); m_sqrWaveBtn->setActiveGraphic( embed::getIconPixmap( "square_wave_active" ) ); m_sqrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "square_wave_inactive" ) ); ToolTip::add( m_sqrWaveBtn, tr( "Use a square-wave for " "current oscillator." ) ); connect( m_sqrWaveBtn, SIGNAL ( clicked () ), this, SLOT ( sqrWaveClicked() ) ); m_whiteNoiseWaveBtn = new PixmapButton( this, tr( "White noise wave" ) ); m_whiteNoiseWaveBtn->move( 212, 92 ); m_whiteNoiseWaveBtn->setActiveGraphic( embed::getIconPixmap( "white_noise_wave_active" ) ); m_whiteNoiseWaveBtn->setInactiveGraphic( embed::getIconPixmap( "white_noise_wave_inactive" ) ); ToolTip::add( m_whiteNoiseWaveBtn, tr( "Use white-noise for " "current oscillator." ) ); connect( m_whiteNoiseWaveBtn, SIGNAL ( clicked () ), this, SLOT ( noiseWaveClicked() ) ); m_usrWaveBtn = new PixmapButton( this, tr( "User defined wave" ) ); m_usrWaveBtn->move( 212, 109 ); m_usrWaveBtn->setActiveGraphic( embed::getIconPixmap( "usr_wave_active" ) ); m_usrWaveBtn->setInactiveGraphic( embed::getIconPixmap( "usr_wave_inactive" ) ); ToolTip::add( m_usrWaveBtn, tr( "Use a user-defined " "waveform for current oscillator." ) ); connect( m_usrWaveBtn, SIGNAL ( clicked () ), this, SLOT ( usrWaveClicked() ) ); m_smoothBtn = new PixmapButton( this, tr( "Smooth" ) ); m_smoothBtn->move( 79, 129 ); m_smoothBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_active" ) ); m_smoothBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "smooth_inactive" ) ); m_smoothBtn->setChecked( false ); ToolTip::add( m_smoothBtn, tr( "Click here to smooth waveform." ) ); connect( m_smoothBtn, SIGNAL ( clicked () ), this, SLOT ( smoothClicked() ) ); m_normalizeBtn = new PixmapButton( this, tr( "Normalize" ) ); m_normalizeBtn->move( 96, 129 ); m_normalizeBtn->setActiveGraphic( PLUGIN_NAME::getIconPixmap( "normalize_active" ) ); m_normalizeBtn->setInactiveGraphic( PLUGIN_NAME::getIconPixmap( "normalize_inactive" ) ); m_normalizeBtn->setChecked( false ); ToolTip::add( m_normalizeBtn, tr( "Click here to normalize waveform." ) ); connect( m_normalizeBtn, SIGNAL ( clicked () ), this, SLOT ( normalizeClicked() ) ); }