Conflicts:
	plugins/opl2/opl2instrument.cpp
This commit is contained in:
Raine M. Ekman
2014-01-24 17:48:26 +02:00
115 changed files with 363 additions and 276 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
/build
.*.sw?
*~
/CMakeLists.txt.user

View File

@@ -1,6 +1,6 @@
language: cpp
compiler: gcc
before_install: sudo apt-get update
install: (sudo apt-get install libqt4-dev libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev libfluidsynth-dev portaudio19-dev) && (sudo apt-get install wine-dev libc6-dev-amd64 || true)
install: sudo apt-get install libqt4-dev libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev libfluidsynth-dev portaudio19-dev wine-dev g++-multilib
before_script: mkdir build && cd build
script: cmake .. && make -j8

View File

@@ -613,7 +613,7 @@ MESSAGE(
"\n\n")
INCLUDE(InstallRequiredSystemLibraries)
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Linux MultiMedia Studio - easy music production for everyone!")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LMMS - easy music production for everyone!")
SET(CPACK_PACKAGE_VENDOR "LMMS Developers")
IF(LMMS_BUILD_APPLE)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/README ${CMAKE_BINARY_DIR}/README.txt COPYONLY)
@@ -640,8 +640,8 @@ SET(CPACK_NSIS_DISPLAY_NAME "LMMS ${VERSION}")
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lmms.sourceforge.net")
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lmms.sourceforge.net")
SET(CPACK_NSIS_CONTACT "lmms-devel@lists.sourceforge.net")
SET(CPACK_PACKAGE_EXECUTABLES "lmms.exe;Linux MultiMedia Studio")
SET(CPACK_NSIS_MENU_LINKS "lmms.exe;Linux MultiMedia Studio")
SET(CPACK_PACKAGE_EXECUTABLES "lmms.exe;LMMS")
SET(CPACK_NSIS_MENU_LINKS "lmms.exe;LMMS")
SET(CPACK_NSIS_DEFINES "!include ${CMAKE_SOURCE_DIR}/cmake/nsis/FileAssociation.nsh")
SET(CPACK_PACKAGE_FILE_NAME "lmms-${VERSION}-win32")
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
@@ -666,7 +666,7 @@ ENDIF(WIN64)
SET(MACOSX_BUNDLE_ICON_FILE "${CMAKE_SOURCE_DIR}/data/themes/default/icon.png")
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "LMMS")
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}")
SET(MACOSX_BUNDLE_BUNDLE_NAME "Linux MultiMedia Studio")
SET(MACOSX_BUNDLE_BUNDLE_NAME "LMMS")
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}")
SET(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}")
SET(MACOSX_BUNDLE_COPYRIGHT "Tobias Doerffel, 2008-2010")

37
README.md Normal file
View File

@@ -0,0 +1,37 @@
Linux MultiMedia Studio
=======================
[![Build Status](https://travis-ci.org/LMMS/lmms.png)](https://travis-ci.org/LMMS/lmms)
What is LMMS?
--------------
LMMS is a free cross-platform alternative to commercial programs like FL Studio (R), which allow you to produce music with your computer. This includes the creation of melodies and beats, the synthesis and mixing of sounds, and arranging of samples. You can have fun with your MIDI-keyboard and much more; all in a user-friendly and modern interface.
Features
---------
* Song-Editor for composing songs
* A Beat+Bassline-Editor for creating beats and basslines
* An easy-to-use Piano-Roll for editing patterns and melodies
* An FX mixer with 64 FX channels and arbitrary number of effects allow unlimited mixing possibilities
* Many powerful instrument and effect-plugins out of the box
* Full user-defined track-based automation and computer-controlled automation sources
* Compatible with many standards such as SoundFont2, VST(i), LADSPA, GUS Patches, and full MIDI support
* Import of MIDI and FLP (Fruityloops(R) Project) files
Building
---------
See [Compiling LMMS](https://github.com/LMMS/lmms/wiki/Compiling-lmms) on our wiki for information on how to build LMMS.
Join LMMS-development
----------------------
If you are interested in LMMS, it's programming, artwork, testing, writing demo-songs, (and improving this readme…) or something like that, you're welcome to participate on the development of LMMS!
Information about what you can do and how can be found in the [wiki](https://github.com/LMMS/lmms/wiki).
Before coding a new big feature, please _always_ [file an issue](https://github.com/LMMS/lmms/issues/new) for your idea and suggestions about your feature and about the intended implementation on GitHub or post to the LMMS-devel-mailinglist (lmms-devel@lists.sourceforge.net) and wait for replies! Maybe there're different ideas, improvements, hints or maybe your feature is not welcome/needed at the moment.

BIN
data/backgrounds/newbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 588 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 443 B

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 769 B

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 865 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 493 B

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 519 B

View File

@@ -89,9 +89,126 @@ pianoRoll {
background-color: rgb(0, 0, 0);
}
/*TrackContainerView QWidget{
background-color: #5b6571;
}*/
/* scrollbar: trough */
QScrollBar:horizontal {
border: 1px solid #131313;
background: rgb( 50,50,50 );
height: 14px;
margin: 0px 13px;
}
QScrollBar:vertical {
border: 1px solid #131313;
background: rgb( 50,50,50 );
width: 14px;
margin: 13px 0px;
}
/* scrollbar: trough clicky things */
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal,
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}
QScrollBar::add-page:horizontal:pressed, QScrollBar::sub-page:horizontal:pressed,
QScrollBar::add-page:vertical:pressed, QScrollBar::sub-page:vertical:pressed {
background: rgba(0,0,0,50);
}
/* scrollbar: handles (sliders) */
QScrollBar::handle:horizontal {
background: qlineargradient(spread:reflect,
x1:0.5, y1:0, x2:0.5, y2:1,
stop:0 #747474, stop:0.5 #c9c9c9, stop:1 #808080);
border: 1px outset #888;
border-radius: 2px;
min-width: 24px;
}
QScrollBar::handle:horizontal:hover {
background: qlineargradient(spread:reflect,
x1:0.5, y1:0, x2:0.5, y2:1,
stop:0 #747474, stop:0.5 #f0f0f0, stop:1 #808080);
}
QScrollBar::handle:horizontal:pressed {
background: qlineargradient(spread:reflect,
x1:0.5, y1:0, x2:0.5, y2:1,
stop:0 #747474, stop:1 #c9c9c9);
}
QScrollBar::handle:vertical {
background: qlineargradient(spread:reflect,
x1:0, y1:0.5, x2:1, y2:0.5,
stop:0 #747474, stop:0.5 #c9c9c9, stop:1 #808080);
border: 1px outset #888;
border-radius: 2px;
min-height: 24px;
}
QScrollBar::handle:vertical:hover {
background: qlineargradient(spread:reflect,
x1:0, y1:0.5, x2:1, y2:0.5,
stop:0 #747474, stop:0.5 #f0f0f0, stop:1 #808080);
}
QScrollBar::handle:vertical:pressed {
background: qlineargradient(spread:reflect,
x1:0, y1:0.5, x2:1, y2:0.5,
stop:0 #747474, stop:1 #c9c9c9);
}
QScrollBar::handle:horizontal:disabled, QScrollBar::handle:vertical:disabled {
background: #747474;
border-radius: 1px;
border: 1px solid rgba(0,0,0,32);
}
/* arrow buttons */
QScrollBar::add-line, QScrollBar::sub-line {
background: qradialgradient(cx:0.3, cy:0.3, radius:0.8, fx:0.3, fy:0.3, stop:0 #c9c9c9, stop:1 #969696 );
border-radius: 1px;
border: 1px solid #131313;
subcontrol-origin: margin;
}
QScrollBar::add-line:horizontal { subcontrol-position: right; width: 12px;}
QScrollBar::sub-line:horizontal { subcontrol-position: left; width: 12px;}
QScrollBar::add-line:vertical { subcontrol-position: bottom; height: 12px;}
QScrollBar::sub-line:vertical { subcontrol-position: top; height: 12px;}
QScrollBar::add-line:hover, QScrollBar::sub-line:hover {
background: qradialgradient(cx:0.3, cy:0.3, radius:0.8, fx:0.3, fy:0.3, stop:0 #e0e0e0, stop:0.5 #c9c9c9, stop:1 #969696 );
}
QScrollBar::add-line:pressed, QScrollBar::sub-line:pressed {
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #969696, stop:0.5 #c9c9c9, stop:1 #969696 );
}
QScrollBar::add-line:disabled, QScrollBar::sub-line:disabled {
background: #747474;
}
QScrollBar::left-arrow:horizontal, QScrollBar::right-arrow:horizontal,
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
border: none;
background-color: none;
width: 5px;
height: 5px;
}
QScrollBar::left-arrow:horizontal { background-image: url(resources:sbarrow_left.png);}
QScrollBar::right-arrow:horizontal { background-image: url(resources:sbarrow_right.png);}
QScrollBar::up-arrow:vertical { background-image: url(resources:sbarrow_up.png);}
QScrollBar::down-arrow:vertical { background-image: url(resources:sbarrow_down.png);}
QScrollBar::left-arrow:horizontal:disabled { background-image: url(resources:sbarrow_left_d.png);}
QScrollBar::right-arrow:horizontal:disabled { background-image: url(resources:sbarrow_right_d.png);}
QScrollBar::up-arrow:vertical:disabled { background-image: url(resources:sbarrow_up_d.png);}
QScrollBar::down-arrow:vertical:disabled { background-image: url(resources:sbarrow_down_d.png);}
TrackContainerView QFrame{
background-color: #49515b;
@@ -105,25 +222,6 @@ trackOperationsWidget > QPushButton {
background: none;
border:none;
}
/*
trackOperationsWidget > QPushButton:hover {
background: qlineargradient(spread:reflect, x1:0.5, y1:0.5, x2:0.5, y2:0, stop:0 rgba(224, 224, 224, 255), stop:1 rgba(201, 201, 201, 255));
border: 1px solid rgba(0,0,0,255);
color: black;
}
trackOperationsWidget > QPushButton:pressed {
background: qlineargradient(spread:reflect, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 #747474, stop:0.5 #c9c9c9, stop:1 #c0c0c0 );
border: 1px solid rgba(0,0,0,255);
color: black;
}
trackOperationsWidget > QPushButton:flat {
background-color: #c9c9c9;
border-radius: 2px;
border: none;
}
*/
trackOperationsWidget > QPushButton::menu-indicator {
image: url(resources:trackop.png);
@@ -237,7 +335,7 @@ QToolButton:checked, toolButton:checked {
trackLabelButton {
background-color: #5b6571;
color: #c9c9c9;
font-size: 10px;
font-size: 11px;
font-weight: normal;
border-radius: 1px;
border: none;
@@ -300,12 +398,12 @@ QTreeView {
/* Plugins */
TripleOscillatorView knob {
color: rgb(1, 114, 216);
color: rgb(1, 32, 64);
qproperty-outerColor: rgb(0, 0, 0);
qproperty-innerRadius: 1;
qproperty-outerRadius: 6.5;
qproperty-centerPointX: 13.5;
qproperty-centerPointY: 13.5;
qproperty-innerRadius: 2;
qproperty-outerRadius: 7;
qproperty-centerPointX: 13.0;
qproperty-centerPointY: 14.0;
qproperty-lineWidth: 2;
}

View File

@@ -2,7 +2,7 @@
* Instrument.h - declaration of class Instrument, which provides a
* standard interface for all instrument plugins
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -117,8 +117,6 @@ public:
virtual bool isFromTrack( const track * _track ) const;
bool isMuted() const;
protected:
inline InstrumentTrack * instrumentTrack() const

View File

@@ -1,7 +1,7 @@
/*
* InstrumentPlayHandle.h - play-handle for driving an instrument
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -45,10 +45,7 @@ public:
virtual void play( sampleFrame * _working_buffer )
{
if( !m_instrument->isMuted() )
{
m_instrument->play( _working_buffer );
}
m_instrument->play( _working_buffer );
}
virtual bool done() const

View File

@@ -68,7 +68,7 @@ public:
virtual QPalette standardPalette( void ) const;
virtual void drawControl( ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget ) const;
// virtual void drawControl( ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget ) const;
virtual void drawComplexControl(
ComplexControl control,
@@ -84,8 +84,8 @@ public:
const QStyleOption * option = 0,
const QWidget * widget = 0 ) const;
QSize sizeFromContents( ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget ) const;
QRect subControlRect( ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget ) const;
// QSize sizeFromContents( ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget ) const;
// QRect subControlRect( ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget ) const;
private:
QImage colorizeXpm( const char * const * xpm, const QBrush& fill ) const;

View File

@@ -49,6 +49,11 @@ public:
return m_led;
}
int titleBarHeight() const
{
return m_titleBarHeight;
}
protected:
virtual void mousePressEvent( QMouseEvent * _me );
@@ -60,6 +65,7 @@ private:
pixmapButton * m_led;
QString m_caption;
const int m_titleBarHeight;
} ;

View File

@@ -148,12 +148,11 @@ private:
QPixmap * m_knobPixmap;
BoolModel m_volumeKnob;
float m_mouseOffset;
QPoint m_mouseOffset;
QPoint m_origMousePos;
float m_origValue;
bool m_buttonPressed;
int m_magneticDecay;
float m_totalAngle;
int m_angle;
QImage m_cache;

View File

@@ -244,21 +244,19 @@ bool opl2instrument::handleMidiEvent( const midiEvent & _me,
static int lastvoice=0;
switch(_me.m_type) {
case MidiNoteOn:
if( !isMuted() ) {
// to get us in line with MIDI(?)
key = _me.key() +12;
vel = _me.velocity();
for(int i=lastvoice+1; i!=lastvoice; ++i,i%=9) {
if( voiceNote[i] == OPL2_VOICE_FREE ) {
theEmulator->write(0xA0+i, fnums[key] & 0xff);
theEmulator->write(0xB0+i, 32 + ((fnums[key] & 0x1f00) >> 8) );
voiceNote[i] = key;
velocities[key] = vel;
lastvoice=i;
break;
}
}
}
// to get us in line with MIDI(?)
key = _me.key() +12;
vel = _me.velocity();
for(int i=lastvoice+1; i!=lastvoice; ++i,i%=9) {
if( voiceNote[i] == OPL2_VOICE_FREE ) {
theEmulator->write(0xA0+i, fnums[key] & 0xff);
theEmulator->write(0xB0+i, 32 + ((fnums[key] & 0x1f00) >> 8) );
voiceNote[i] = key;
velocities[key] = vel;
lastvoice=i;
break;
}
}
break;
case MidiNoteOff:
key = _me.key() +12;

View File

@@ -389,7 +389,7 @@ organicInstrumentView::organicInstrumentView( Instrument * _instrument,
m_fx1Knob = new organicKnob( this );
m_fx1Knob->move( 15, 201 );
m_fx1Knob->setFixedSize( 37, 47 );
m_fx1Knob->setHintText( tr( "Distortion:" ) + " ", "%" );
m_fx1Knob->setHintText( tr( "Distortion:" ) + " ", QString() );
m_fx1Knob->setObjectName( "fx1Knob" );
// setup volume-knob
@@ -450,8 +450,7 @@ void organicInstrumentView::modelChanged()
// setup waveform-knob
knob * oscKnob = new organicKnob( this );
oscKnob->move( x + i * colWidth, y );
oscKnob->setHintText( tr( "Osc %1 waveform:" ).arg(
i + 1 ) + " ", "%" );
oscKnob->setHintText( tr( "Osc %1 waveform:" ).arg( i + 1 ) + " ", QString() );
// setup volume-knob
knob * volKnob = new knob( knobStyled, this );

View File

@@ -84,12 +84,17 @@ PeakControllerEffect::~PeakControllerEffect()
}
}
//! returns 1.0f if val > 0.0f, -1.0 else
inline float my_sign(float val) { return -1.0f + 2.0f * (val > 0.0f); }
namespace helpers
{
//! returns 1.0f if val > 0.0f, -1.0 else
inline float sign(float val) { return -1.0f + 2.0f * (val > 0.0f); }
//! if val >= 0.0f, returns sqrtf(val), else: -sqrtf(-val)
inline float sqrt_neg(float val) {
return sqrtf(fabs(val)) * helpers::sign(val);
}
//! if val >= 0.0f, returns sqrtf(val), else: -sqrtf(-val)
inline float sqrt_neg(float val) {
return sqrtf(fabs(val)) * my_sign(val);
}
bool PeakControllerEffect::processAudioBuffer( sampleFrame * _buf,
@@ -106,16 +111,28 @@ bool PeakControllerEffect::processAudioBuffer( sampleFrame * _buf,
// RMS:
double sum = 0;
for( int i = 0; i < _frames; ++i )
if(c.m_absModel.value())
{
float sign_0 = (c.m_absModel.value())
? 1.0f : my_sign(_buf[i][0]);
float sign_1 = (c.m_absModel.value())
? 1.0f : my_sign(_buf[i][1]);
sum += _buf[i][0]*_buf[i][0]*sign_0
+ _buf[i][1]*_buf[i][1]*sign_1;
for( int i = 0; i < _frames; ++i )
{
// absolute value is achieved because the squares are > 0
sum += _buf[i][0]*_buf[i][0] + _buf[i][1]*_buf[i][1];
}
}
else
{
for( int i = 0; i < _frames; ++i )
{
// the value is absolute because of squaring,
// so we need to correct it
sum += _buf[i][0]*_buf[i][0]*helpers::sign(_buf[i][0])
+ _buf[i][1]*_buf[i][1]*helpers::sign(_buf[i][1]);
}
}
// TODO: flipping this might cause clipping
// this will mute the output after the values were measured
if( c.m_muteModel.value() )
{
for( int i = 0; i < _frames; ++i )
@@ -124,7 +141,7 @@ bool PeakControllerEffect::processAudioBuffer( sampleFrame * _buf,
}
}
float curRMS = sqrt_neg( sum / _frames );
float curRMS = helpers::sqrt_neg( sum / _frames );
const float origRMS = curRMS;
if( !m_lastRMSavail )
@@ -135,7 +152,7 @@ bool PeakControllerEffect::processAudioBuffer( sampleFrame * _buf,
const float v = ( curRMS >= m_lastRMS ) ?
c.m_attackModel.value() :
c.m_decayModel.value();
const float a = sqrt_neg( sqrt_neg( v ) );
const float a = helpers::sqrt_neg( helpers::sqrt_neg( v ) );
curRMS = (1-a)*curRMS + a*m_lastRMS;
const float amount = c.m_amountModel.value() * c.m_amountMultModel.value();
@@ -153,16 +170,6 @@ bool PeakControllerEffect::processAudioBuffer( sampleFrame * _buf,
//checkGate( out_sum / _frames );
// finally, mute the output if wanted
// TODO: avoid clips?
if( c.m_muteOutputModel.value() )
{
for( int i = 0; i < _frames; ++i )
{
_buf[i][0] = _buf[i][1] = 0.0f;
}
}
return isRunning();
}

View File

@@ -56,7 +56,7 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
m_baseKnob->setHintText( tr( "Base amount:" ) + " ", "" );
m_amountKnob = new knob( knobBright_26, this );
m_amountKnob->setLabel( tr( "AMT" ) );
m_amountKnob->setLabel( tr( "AMNT" ) );
m_amountKnob->setModel( &_controls->m_amountModel );
m_amountKnob->setHintText( tr( "Modulation amount:" ) + " ", "" );
@@ -66,12 +66,12 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
m_amountMultKnob->setHintText( tr( "Amount Multiplicator:" ) + " ", "" );
m_attackKnob = new knob( knobBright_26, this );
m_attackKnob->setLabel( tr( "ATTCK" ) );
m_attackKnob->setLabel( tr( "ATCK" ) );
m_attackKnob->setModel( &_controls->m_attackModel );
m_attackKnob->setHintText( tr( "Attack:" ) + " ", "" );
m_decayKnob = new knob( knobBright_26, this );
m_decayKnob->setLabel( tr( "DECAY" ) );
m_decayKnob->setLabel( tr( "DCAY" ) );
m_decayKnob->setModel( &_controls->m_decayModel );
m_decayKnob->setHintText( tr( "Release:" ) + " ", "" );
@@ -88,15 +88,11 @@ PeakControllerEffectControlDialog::PeakControllerEffectControlDialog(
m_muteLed = new ledCheckBox( "Mute Effect", this );
m_muteLed->setModel( &_controls->m_muteModel );
m_absLed = new ledCheckBox( "Abs Value", this );
m_absLed = new ledCheckBox( "Absolute Value", this );
m_absLed->setModel( &_controls->m_absModel );
m_muteOutputLed = new ledCheckBox( "Mute Output", this );
m_muteOutputLed->setModel( &_controls->m_muteOutputModel );
l2->addWidget( m_muteLed );
l2->addWidget( m_absLed );
l2->addWidget( m_muteOutputLed );
l2->addStretch(); // expand, so other widgets have minimum height
tl->addLayout( l2 );

View File

@@ -52,7 +52,6 @@ protected:
ledCheckBox * m_absLed;
knob * m_amountMultKnob;
ledCheckBox * m_muteOutputLed;
} ;

View File

@@ -41,8 +41,7 @@ PeakControllerEffectControls( PeakControllerEffect * _eff ) :
m_decayModel( 0, 0, 0.999, 0.001, this, tr( "Release" ) ),
m_muteModel( false, this, tr( "Mute output" ) ),
m_absModel( true, this, tr("Abs Value") ),
m_amountMultModel( 1.0, 0, 32, 0.2, this, tr("Amount Multiplicator") ),
m_muteOutputModel( false, this, tr("Mute Output") )
m_amountMultModel( 1.0, 0, 32, 0.2, this, tr("Amount Multiplicator") )
{
}
@@ -59,7 +58,6 @@ void PeakControllerEffectControls::loadSettings( const QDomElement & _this )
m_absModel.loadSettings( _this, "abs" );
m_amountMultModel.loadSettings( _this, "amountmult" );
m_muteOutputModel.loadSettings( _this, "muteout" );
int effectId = _this.attribute( "effectId" ).toInt();
if( effectId > PeakController::s_lastEffectId )
@@ -92,7 +90,6 @@ void PeakControllerEffectControls::saveSettings( QDomDocument & _doc,
m_absModel.saveSettings( _doc, _this, "abs" );
m_amountMultModel.saveSettings( _doc, _this, "amountmult" );
m_muteOutputModel.saveSettings( _doc, _this, "muteout" );
}

View File

@@ -68,7 +68,6 @@ private:
BoolModel m_muteModel;
BoolModel m_absModel;
FloatModel m_amountMultModel;
BoolModel m_muteOutputModel;
friend class PeakControllerEffectControlDialog;
friend class PeakControllerEffect;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 880 B

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 849 B

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 B

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 908 B

After

Width:  |  Height:  |  Size: 524 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 607 B

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 881 B

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 B

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 972 B

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 606 B

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

After

Width:  |  Height:  |  Size: 312 B

View File

@@ -313,15 +313,13 @@ void vestigeInstrument::play( sampleFrame * _buf )
bool vestigeInstrument::handleMidiEvent( const midiEvent & _me,
const midiTime & _time )
{
if( !isMuted() )
m_pluginMutex.lock();
if( m_plugin != NULL )
{
m_pluginMutex.lock();
if( m_plugin != NULL )
{
m_plugin->processMidiEvent( _me, _time );
}
m_pluginMutex.unlock();
m_plugin->processMidiEvent( _me, _time );
}
m_pluginMutex.unlock();
return true;
}

View File

@@ -1,7 +1,7 @@
/*
* ZynAddSubFx.cpp - ZynAddSubxFX-embedding plugin
*
* Copyright (c) 2008-2013 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -343,14 +343,9 @@ void ZynAddSubFxInstrument::play( sampleFrame * _buf )
bool ZynAddSubFxInstrument::handleMidiEvent( const midiEvent & _me,
const midiTime & _time )
{
// do not send NoteOn events if muted
if( _me.type() == MidiNoteOn && isMuted() )
{
return true;
}
// do not forward external MIDI Control Change events if the according
// LED is not checked
else if( _me.type() == MidiControlChange &&
if( _me.type() == MidiControlChange &&
_me.sourcePort() != this &&
m_forwardMidiCcModel.value() == false )
{

View File

@@ -1076,7 +1076,7 @@ void Part::setPpanning(char Ppanning_)
*/
void Part::setkititemstatus(int kititem, int Penabled_)
{
if((kititem == 0) && (kititem >= NUM_KIT_ITEMS))
if((kititem == 0) || (kititem >= NUM_KIT_ITEMS))
return; //nonexistent kit item and the first kit item is always enabled
kit[kititem].Penabled = Penabled_;

View File

@@ -96,14 +96,6 @@ bool Instrument::isFromTrack( const track * _track ) const
bool Instrument::isMuted() const
{
return m_instrumentTrack->isMuted();
}
void Instrument::applyRelease( sampleFrame * buf, const notePlayHandle * _n )
{
const fpp_t frames = _n->framesLeftForCurrentPeriod();

View File

@@ -499,7 +499,7 @@ AudioAlsa::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );

View File

@@ -1,7 +1,7 @@
/*
* AudioJack.cpp - support for JACK-transport
* AudioJack.cpp - support for JACK transport
*
* Copyright (c) 2005-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -344,8 +344,7 @@ int AudioJack::processCallback( jack_nframes_t _nframes, void * _udata )
}
#ifdef AUDIO_PORT_SUPPORT
const Uint32 frames = qMin<Uint32>( _nframes,
mixer()->framesPerPeriod() );
const int frames = qMin<int>( _nframes, mixer()->framesPerPeriod() );
for( jackPortMap::iterator it = m_portMap.begin();
it != m_portMap.end(); ++it )
{
@@ -359,7 +358,7 @@ int AudioJack::processCallback( jack_nframes_t _nframes, void * _udata )
(jack_default_audio_sample_t *) jack_port_get_buffer(
it.data().ports[ch],
_nframes );
for( Uint32 frame = 0; frame < frames; ++frame )
for( int frame = 0; frame < frames; ++frame )
{
buf[frame] = it.key()->firstBuffer()[frame][ch];
}
@@ -444,7 +443,7 @@ AudioJack::setupWidget::setupWidget( QWidget * _parent ) :
m_clientName->setGeometry( 10, 20, 160, 20 );
QLabel * cn_lbl = new QLabel( tr( "CLIENT-NAME" ), this );
cn_lbl->setFont( pointSize<6>( cn_lbl->font() ) );
cn_lbl->setFont( pointSize<7>( cn_lbl->font() ) );
cn_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );

View File

@@ -335,7 +335,7 @@ AudioOss::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );

View File

@@ -395,14 +395,14 @@ AudioPortAudio::setupWidget::setupWidget( QWidget * _parent ) :
m_backend->setGeometry( 64, 15, 260, 20 );
QLabel * backend_lbl = new QLabel( tr( "BACKEND" ), this );
backend_lbl->setFont( pointSize<6>( backend_lbl->font() ) );
backend_lbl->setFont( pointSize<7>( backend_lbl->font() ) );
backend_lbl->move( 8, 18 );
m_device = new comboBox( this, "DEVICE" );
m_device->setGeometry( 64, 35, 260, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->move( 8, 38 );
/* lcdSpinBoxModel * m = new lcdSpinBoxModel( );

View File

@@ -286,7 +286,7 @@ AudioPulseAudio::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
lcdSpinBoxModel * m = new lcdSpinBoxModel( /* this */ );

View File

@@ -210,7 +210,7 @@ AudioSdl::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
}

View File

@@ -183,7 +183,7 @@ MidiAlsaRaw::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
}

View File

@@ -716,7 +716,7 @@ MidiAlsaSeq::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
}

View File

@@ -121,7 +121,7 @@ MidiOss::setupWidget::setupWidget( QWidget * _parent ) :
m_device->setGeometry( 10, 20, 160, 20 );
QLabel * dev_lbl = new QLabel( tr( "DEVICE" ), this );
dev_lbl->setFont( pointSize<6>( dev_lbl->font() ) );
dev_lbl->setFont( pointSize<7>( dev_lbl->font() ) );
dev_lbl->setGeometry( 10, 40, 160, 10 );
}

View File

@@ -265,55 +265,59 @@ void timeLine::paintEvent( QPaintEvent * )
void timeLine::mousePressEvent( QMouseEvent * _me )
void timeLine::mousePressEvent( QMouseEvent* event )
{
if( _me->x() < m_xOffset )
if( event->x() < m_xOffset )
{
return;
}
if( _me->button() == Qt::LeftButton )
if( event->button() == Qt::LeftButton )
{
m_action = MovePositionMarker;
if( _me->x() - m_xOffset < s_posMarkerPixmap->width() )
if( event->x() - m_xOffset < s_posMarkerPixmap->width() )
{
m_moveXOff = _me->x() - m_xOffset;
m_moveXOff = event->x() - m_xOffset;
}
else
{
m_moveXOff = s_posMarkerPixmap->width() / 2;
}
}
else
else if( event->button() == Qt::RightButton )
{
const midiTime t = m_begin + static_cast<int>( _me->x() * midiTime::ticksPerTact() / m_ppt );
m_action = MoveLoopBegin;
const midiTime t = m_begin + static_cast<int>( event->x() * midiTime::ticksPerTact() / m_ppt );
if( m_loopPos[0] > m_loopPos[1] )
{
qSwap( m_loopPos[0], m_loopPos[1] );
}
if( _me->button() == Qt::RightButton )
if( event->modifiers() & Qt::ShiftModifier )
{
m_action = MoveLoopBegin;
}
else
{
m_action = MoveLoopEnd;
}
m_loopPos[( m_action == MoveLoopBegin ) ? 0 : 1] = t;
}
if( m_action == MoveLoopBegin || m_action == MoveLoopEnd )
{
delete m_hint;
m_hint = textFloat::displayMessage( tr( "Hint" ),
tr( "Press <Ctrl> to disable magnetic "
"loop-points." ),
tr( "Press <Ctrl> to disable magnetic loop points." ),
embed::getIconPixmap( "hint" ), 0 );
}
mouseMoveEvent( _me );
mouseMoveEvent( event );
}
void timeLine::mouseMoveEvent( QMouseEvent * _me )
void timeLine::mouseMoveEvent( QMouseEvent* event )
{
const midiTime t = m_begin + static_cast<int>( qMax( _me->x() - m_xOffset - m_moveXOff, 0 ) * midiTime::ticksPerTact() / m_ppt );
const midiTime t = m_begin + static_cast<int>( qMax( event->x() - m_xOffset - m_moveXOff, 0 ) * midiTime::ticksPerTact() / m_ppt );
switch( m_action )
{
@@ -328,7 +332,7 @@ void timeLine::mouseMoveEvent( QMouseEvent * _me )
case MoveLoopEnd:
{
const int i = m_action - MoveLoopBegin;
if( _me->modifiers() & Qt::ControlModifier )
if( event->modifiers() & Qt::ControlModifier )
{
// no ctrl-press-hint when having ctrl pressed
delete m_hint;
@@ -361,7 +365,7 @@ void timeLine::mouseMoveEvent( QMouseEvent * _me )
void timeLine::mouseReleaseEvent( QMouseEvent * _me )
void timeLine::mouseReleaseEvent( QMouseEvent* event )
{
delete m_hint;
m_hint = NULL;

View File

@@ -273,14 +273,14 @@ void AutomationPatternView::paintEvent( QPaintEvent * )
}
p.resetMatrix();
p.setFont( pointSize<7>( p.font() ) );
p.setFont( pointSize<8>( p.font() ) );
if( m_pat->isMuted() || m_pat->getTrack()->isMuted() )
{
p.setPen( QColor( 192, 192, 192 ) );
}
else
{
p.setPen( QColor( 0, 64, 255 ) );
p.setPen( QColor( 0, 180, 60 ) );
}
p.drawText( 2, p.fontMetrics().height() - 1, m_pat->name() );

View File

@@ -232,7 +232,7 @@ QPalette LmmsStyle::standardPalette( void ) const
{
QPalette pal = QPlastiqueStyle::standardPalette();
/* sane defaults in case fetching from stylesheet fails*/
pal.setColor( QPalette::Background, QColor( 91, 101, 113 ) );
@@ -245,17 +245,17 @@ QPalette LmmsStyle::standardPalette( void ) const
pal.setColor( QPalette::BrightText, QColor( 74, 253, 133 ) );
pal.setColor( QPalette::Highlight, QColor( 100, 100, 100 ) );
pal.setColor( QPalette::HighlightedText, QColor( 255, 255, 255 ) );
/* fetch from stylesheet using regexp */
QStringList paletteData = qApp->styleSheet().split( '\n' ).filter( QRegExp( "^palette:*" ) );
foreach( QString s, paletteData )
{
if (s.contains(":background")) { pal.setColor( QPalette::Background, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
if (s.contains(":background")) { pal.setColor( QPalette::Background, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
else if (s.contains(":windowtext")) { pal.setColor( QPalette::WindowText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
else if (s.contains(":base")) { pal.setColor( QPalette::Base, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
else if (s.contains(":buttontext")) { pal.setColor( QPalette::ButtonText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
else if (s.contains(":brighttext")) { pal.setColor( QPalette::BrightText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
else if (s.contains(":buttontext")) { pal.setColor( QPalette::ButtonText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
else if (s.contains(":brighttext")) { pal.setColor( QPalette::BrightText, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
else if (s.contains(":text")) { pal.setColor( QPalette::Text, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
else if (s.contains(":button")) { pal.setColor( QPalette::Button, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
else if (s.contains(":shadow")) { pal.setColor( QPalette::Shadow, QColor( s.mid( s.indexOf("#"), 7 ) ) ); }
@@ -268,7 +268,7 @@ QPalette LmmsStyle::standardPalette( void ) const
/*
void LmmsStyle::drawControl( ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget ) const
{
@@ -294,7 +294,7 @@ void LmmsStyle::drawControl( ControlElement element, const QStyleOption* option,
cache.fill( QColor( 48, 48, 48 ) );
QColor sliderColor;
QColor blurColor;
hoverColors(sunken, hover,
hoverColors(sunken, hover,
scrollBar->activeSubControls & SC_ScrollBarAddLine && isEnabled,
sliderColor, blurColor);
@@ -455,7 +455,7 @@ void LmmsStyle::drawControl( ControlElement element, const QStyleOption* option,
}
}
*/
void LmmsStyle::drawComplexControl( ComplexControl control,
const QStyleOptionComplex * option,
@@ -482,12 +482,12 @@ void LmmsStyle::drawComplexControl( ComplexControl control,
return;
}
}
else if( control == CC_ScrollBar )
/* else if( control == CC_ScrollBar )
{
QColor background = QColor( 48, 48, 48 );
painter->fillRect( option->rect, background );
painter->fillRect( option->rect, QApplication::palette().color( QPalette::Active,
QPalette::Background ) );
}
}*/
QPlastiqueStyle::drawComplexControl( control, option, painter, widget );
}
@@ -633,7 +633,7 @@ int LmmsStyle::pixelMetric( PixelMetric _metric, const QStyleOption * _option,
}
// QStyle::SH_TitleBar_NoBorder
/*
QSize LmmsStyle::sizeFromContents( ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget ) const
{
if( type == CT_ScrollBar )
@@ -655,8 +655,8 @@ QSize LmmsStyle::sizeFromContents( ContentsType type, const QStyleOption* option
return QPlastiqueStyle::sizeFromContents( type, option, size, widget );
}
*/
/*
QRect LmmsStyle::subControlRect( ComplexControl control, const QStyleOptionComplex* option, SubControl subControl, const QWidget* widget ) const
{
QRect rect = QPlastiqueStyle::subControlRect( control, option, subControl, widget );
@@ -797,7 +797,7 @@ QRect LmmsStyle::subControlRect( ComplexControl control, const QStyleOptionCompl
return rect;
}
*/

View File

@@ -106,7 +106,7 @@ const int RESIZE_AREA_WIDTH = 4;
const int NE_LINE_WIDTH = 3;
// key where to start
const int INITIAL_START_KEY = Key_C + Octave_3 * KeysPerOctave;
const int INITIAL_START_KEY = Key_C + Octave_4 * KeysPerOctave;
// number of each note to provide in quantization and note lengths
const int NUM_EVEN_LENGTHS = 6;
@@ -844,7 +844,7 @@ inline void pianoRoll::drawNoteRect( QPainter & _p, int _x, int _y,
( (float)( PanningRight - _n->getPanning() ) ) /
( (float)( PanningRight - PanningLeft ) ) * 2.0f );
const QColor defaultNoteColor( 0x4A, 0xFD, 0x85 );
const QColor defaultNoteColor( 0x77, 0xC7, 0xD8 );
QColor col = defaultNoteColor;
if( _n->length() < 0 )
@@ -2680,7 +2680,7 @@ static void printNoteHeights(QPainter& p, int bottom, int width, int startKey)
};
p.setFont( pointSize<KEY_LINE_HEIGHT-4>( p.font() ) );
p.setPen( QColor( 255, 255, 0 ) );
p.setPen( QColor( 255, 255, 255 ) );
for( int y = bottom, key = startKey; y > PR_TOP_MARGIN;
y -= KEY_LINE_HEIGHT, key++)
{
@@ -2924,7 +2924,7 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
QFont f = p.font();
f.setBold( false );
p.setFont( pointSize<10>( f ) );
p.setPen( QColor( 255, 255, 0 ) );
p.setPen( QColor( 255, 255, 255) );
p.drawText( QRect( 0, keyAreaBottom(),
WHITE_KEY_WIDTH, noteEditBottom() - keyAreaBottom() ),
Qt::AlignCenter | Qt::TextWordWrap,
@@ -3072,7 +3072,7 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
int editHandleTop = 0;
if( m_noteEditMode == NoteEditVolume )
{
QColor color = QColor::fromHsv( 120, 221,
QColor color = QColor::fromHsv( 140, 221,
qMin(255, 60 + ( *it )->getVolume() ) );
if( ( *it )->selected() )
{
@@ -3091,7 +3091,7 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
}
else if( m_noteEditMode == NoteEditPanning )
{
QColor color( 0xFF, 0xB0, 0x00 );
QColor color( 0x99, 0xAF, 0xFF );
if( ( *it )->selected() )
{
color.setRgb( 0x00, 0x40, 0xC0 );
@@ -3119,7 +3119,7 @@ void pianoRoll::paintEvent( QPaintEvent * _pe )
}
}
p.setPen( QPen( QColor( 0xEA, 0xA1, 0x00 ),
p.setPen( QPen( QColor( 0x99, 0xAF, 0xFF ),
NE_LINE_WIDTH+2 ) );
p.drawPoints( editHandles );

View File

@@ -140,7 +140,7 @@ void pluginDescWidget::paintEvent( QPaintEvent * )
if( height() > 24 || m_mouseOver )
{
f.setBold( false );
p.setFont( pointSize<7>( f ) );
p.setFont( pointSize<8>( f ) );
QRect br;
p.drawText( 10 + logo_size.width(), 20, width() - 58 - 5, 999,
Qt::TextWordWrap,

View File

@@ -56,7 +56,7 @@ ControllerView::ControllerView( Controller * _model, QWidget * _parent ) :
QPushButton * ctls_btn = new QPushButton( tr( "Controls" ), this );
QFont f = ctls_btn->font();
ctls_btn->setFont( pointSize<7>( f ) );
ctls_btn->setFont( pointSize<8>( f ) );
ctls_btn->setGeometry( 140, 2, 50, 14 );
connect( ctls_btn, SIGNAL( clicked() ),
this, SLOT( editControls() ) );

Some files were not shown because too many files have changed in this diff Show More