Commit graph

78 commits

Author SHA1 Message Date
DangWang
4372e7d667 color label, setColor emits colorChanged 2020-04-29 00:06:57 +03:00
Igor Korsukov
68b3415c47 fixed some issues from PVS-Studio report (step1) 2020-03-20 12:18:07 +02:00
luz.paz
f31624d746 fix various typos
* Found via `codespell -q 3 -S ./share/locale,./thirdparty -L ba,cann,clas,dur,foto,iff,nd,ois,ot,pres,possibile,snaped,strack,tage,te,uint,thru,valu`  
* Some revisions made per feedback given during review.
* Follow-up typos for review  
* Add revisions per feedback
2019-12-19 06:13:30 -05:00
Dmitri Ovodok
a71839a071
Merge pull request #5213 from Obliquely/obq-playpanel-double-click
Fix #291901 & Fix #291453 Double-click resets Master Volume
2019-11-22 15:04:09 +02:00
anatoly-os
578d4a9659 fix #295121: crazy behaviour of the colorLabel
Rewrite ColorLabel to be a child of QPushButton instead of QFrame. The reason is that QFrame doesn't implement MouseClickEvent. That led to the issues when opening the colour picker widget on mousePressEvent.

I have to move `Awl::ColorLabel` `else if` statement checks above the `QPushButton` ones, because the latter set incorrect connects for the `ColorLabel` which inherits `QPushButton` now.
2019-10-02 14:56:54 +02:00
Matthew Elton
8bac1fddde Fix #291901 & Fix #291453 Double-click resets Master Volume
- put all the decibel conversion work into MasterSynthesizer
- make a default gain value available from MasterSynthesizer
- add double click for default value support to StyledSlider
- amend PlayPanel, Mixer and SynthControl to interact with MasterSynthesizer only using decibels and making use of the provided default gain for double click
- Fix #291453 is addressed as the Mixer now uses the default decibel range
2019-07-10 13:20:01 +01:00
Joachim Schmitz
2b06440176 Enclose keys in tours with double quotes
and fix two forgotten sharps...
2019-02-18 11:41:58 +01:00
Joachim Schmitz
751d551033 ♭ and ♯ vs. b and #
and fixing a typo
2019-02-17 19:35:39 +01:00
Dmitri Ovodok
1624f155e4 fix #278968: improve mixer sliders mouse dragging 2018-12-03 18:23:48 +02:00
Dmitri Ovodok
4cfdd9549a fix #278897: fix high CPU load in Mixer 2018-11-28 13:19:45 +02:00
mirabilos
22d7960aa5
remove new $Id$ that sneaked in after the PR removing them was merged 2018-11-27 23:12:42 +01:00
anatoly-os
2411b56940 fix #278346: show/hide channels drops scroll position
Manually keep scroll position and restore on scroll range changing. The range changing always happens when we show/hide channels.
Remove redundant QScrollArea variable
Adjust volume slider processing to work correctly when dragging mouse (when dragging mouse fast up and down around one point slider went down instead of keeping slider "attached" to mouse cursor)
2018-11-26 02:22:45 +02:00
anatoly-os
7cfa84a8d4 fix #278377: Mixer sliders are incorrectly processed
Clicking at the Knob center now sets Pan correctly to 64
2018-11-25 18:18:37 +02:00
Mark McKay
ac5bcd58c5 fix #278194 Fix crash opening play panel
No longer emitting event if value unchanged.
2018-11-19 19:44:13 -05:00
Joachim Schmitz
70c0b7371b fix compiler warnings, seen in MSVC and MinGW
most introduced with PR #3982, some with PR #4124
2018-11-14 22:28:55 +01:00
Mark McKay
fdeb795e34 fix #275313: rework mixer ui 2
Moving PartEditBase into separate file.  Creating new files for
building mixer.

Creating art assets/UI design for new components.

Styling the track control.

Adding track area.

Separating out score from update.

Creating instances of mixer UI.

Creating part per voice now.

Can click on tracks to select them now.

Can now switch bwtewwn tracks.

Setting patch channel now.

Setting enabled off when no track selected.

Improving slider ui.

Turning Channel into a class and adding listener to it.

Somewhat stabalized sharing track objects between interfaces.

Can now apply volume changes to both expanded and collapsed tracks.

Pan knob is now working.

Encapsulating the rest of the fields in Channel.

Mute and solo now working.

Reverb and chorus now working.

Drumkit checkbox now working.  Port and channel somewhat working.

Adding support for colors per track.

Part name change now working.

Separating out MixerTrackItem

Finishing moving MixerTrackItem to new file.

Cleaning up code.

Moving PartEditBase into separate file.  Creating new files for
building mixer.

Creating art assets/UI design for new components.

Styling the track control.

Adding track area.

Separating out score from update.

Creating instances of mixer UI.

Creating part per voice now.

Can click on tracks to select them now.

Can now switch bwtewwn tracks.

Setting patch channel now.

Setting enabled off when no track selected.

Improving slider ui.

Turning Channel into a class and adding listener to it.

Somewhat stabalized sharing track objects between interfaces.

Can now apply volume changes to both expanded and collapsed tracks.

Pan knob is now working.

Encapsulating the rest of the fields in Channel.

Mute and solo now working.

Reverb and chorus now working.

Drumkit checkbox now working.  Port and channel somewhat working.

Adding support for colors per track.

Part name change now working.

Separating out MixerTrackItem

Finishing moving MixerTrackItem to new file.

Cleaning up code.

Setting color in collapsed mode now affects all channels.

Using shared_ptr to track MixerTrackItem.  Part changes now affect
all instruments.

Creating new track UI object to handle parts.

Using shard_ptr to track MixerTrackItem objects.

setting port and channel data now.

Changing to horizontal layout.

Fixing knob display.  Chaning track control appearance.

Setting init slider window size.

Switchong back to vertical orientation.  Fixing a few UI bugs in
the slider.

Tracks now left aligned.

Moving details panel above mixer.  Now changing track selection when
user clicks on sliders.

Pan and volume controls now reflect track color.

Showing volume and pan values in tooltips.

Creating a new slider control for mixer.

Switching Channel's volume, pan, reverb and chorus and chaning them
to doubles with a decimal range.

No longer writing out vol, pan, chor, reverb when at default values.

Nolonger writing vol, pan, chorus, reverb as controler values in
output file.

Now testing against default values on write.

More export fixes.

Manually editing test files to reflect new channel parameters.

Manually editing more test files to reflect new channel parameters.

Manually editing more test files to reflect new channel parameters.

More test changes to make Travis happy.

More test changes to make Travis happy.

Importing MusicXML now matches new volume, pan ranges.

Changing range of pan.  Fixing a few bugs with calculating MIDI.
Altering test files for Travis.

fix #275313: rework-mixer-ui-2

Moving PartEditBase into separate file. Creating new files for
building mixer.

Creating art assets/UI design for new components.

Styling the track control.

Adding track area.

Separating out score from update.

Creating instances of mixer UI.

Creating part per voice now.

Can click on tracks to select them now.

Can now switch bwtewwn tracks.

Setting patch channel now.

Setting enabled off when no track selected.

Improving slider ui.

Turning Channel into a class and adding listener to it.

Somewhat stabalized sharing track objects between interfaces.

Can now apply volume changes to both expanded and collapsed tracks.

Pan knob is now working.

Encapsulating the rest of the fields in Channel.

Mute and solo now working.

Reverb and chorus now working.

Drumkit checkbox now working.  Port and channel somewhat working.

Adding support for colors per track.

Part name change now working.

Separating out MixerTrackItem

Finishing moving MixerTrackItem to new file.

Cleaning up code.

Moving PartEditBase into separate file.  Creating new files for
building mixer.

Creating art assets/UI design for new components.

Styling the track control.

Adding track area.

Separating out score from update.

Creating instances of mixer UI.

Creating part per voice now.

Can click on tracks to select them now.

Can now switch bwtewwn tracks.

Setting patch channel now.

Setting enabled off when no track selected.

Improving slider ui.

Turning Channel into a class and adding listener to it.

Somewhat stabalized sharing track objects between interfaces.

Can now apply volume changes to both expanded and collapsed tracks.

Pan knob is now working.

Encapsulating the rest of the fields in Channel.

Mute and solo now working.

Reverb and chorus now working.

Drumkit checkbox now working.  Port and channel somewhat working.

Adding support for colors per track.

Part name change now working.

Separating out MixerTrackItem

Finishing moving MixerTrackItem to new file.

Cleaning up code.

Setting color in collapsed mode now affects all channels.

Using shared_ptr to track MixerTrackItem.  Part changes now affect
all instruments.

Creating new track UI object to handle parts.

Using shard_ptr to track MixerTrackItem objects.

setting port and channel data now.

Changing to horizontal layout.

Fixing knob display.  Chaning track control appearance.

Setting init slider window size.

Switchong back to vertical orientation.  Fixing a few UI bugs in
the slider.

Tracks now left aligned.

Moving details panel above mixer.  Now changing track selection when
user clicks on sliders.

Pan and volume controls now reflect track color.

Showing volume and pan values in tooltips.

Creating a new slider control for mixer.

Switching Channel's volume, pan, reverb and chorus and chaning them
to doubles with a decimal range.

No longer writing out vol, pan, chor, reverb when at default values.

Nolonger writing vol, pan, chorus, reverb as controler values in
output file.

Now testing against default values on write.

More export fixes.

Manually editing test files to reflect new channel parameters.

Manually editing more test files to reflect new channel parameters.

Manually editing more test files to reflect new channel parameters.

More test changes to make Travis happy.

More test changes to make Travis happy.

Importing MusicXML now matches new volume, pan ranges.

Changing range of pan.  Fixing a few bugs with calculating MIDI.
Altering test files for Travis.

Restoring the volume, pan, chorus, reverb to original char data type
& range.  UI now shows different 'user friendly' ranges.

Overwriting tests with versions from master.

mtest/libmscore/compat114/clef_missing_first-ref.mscx
mtest/libmscore/compat114/hor_frame_and_mmrest-ref.mscx
mtest/musicxml/io/testInstrumentChangeMIDIportExport_ref.xml
mtest/musicxml/io/testUninitializedDivisions_ref.xml

Restoring test files to original state.

Restoring test files to original state.

Restoring old values for importing files.

Restoring part methods.

mtest/importmidi/simplify_8th_dotted_no_staccato.mscx
mtest/libmscore/compat114/clef_missing_first-ref.mscx
mtest/libmscore/compat114/hor_frame_and_mmrest-ref.mscx
mtest/musicxml/io/testInstrumentChangeMIDIportExport_ref.xml
mtest/musicxml/io/testUninitializedDivisions_ref.xml

Rearranging UI components for better feel.

Improving UI.  Fixed crash when changing part name.

Adding support for two lighting modes.  Showing part name over
channel expansion.

Adding master gain control to mixer.

Changing color of gain slider.

Adapting to latest source in main.

Changing master gain slider to use decibel calculation.

CSS now set on tracks whenever a Paint event received.

Restoring mixer slider values to refect MIDI ranges.  Fixing crash when drumkit checked.

Fixing crash when closing score.

Fixing alignment in mixer details.

Tweaking UI for better appearance.
2018-11-13 12:43:19 -05:00
mirabilos
65cd276439
remove RCS IDs from (almost) all files
they do not make any sense, nor do they get updated, if the
source code is kept in git
2018-11-02 23:53:21 +01:00
Joachim Schmitz
fe50c85097 fix #275218: fix MSVC C4458 warnings
reg. a declaration shadowing a class member,
"Warning C4458: declaration of 'XXX' hides class member"
2018-09-27 17:38:20 +02:00
ws
4db3af42cb fix #274894 Crash if changing 'vertical frame bottom margin' leads to different number of pages 2018-08-06 10:38:28 +02:00
alexandr
df114f189c Compile under MSVC: this commit caontais all changes to run MSVC build
1) fix some bugs which appear in runtime:  replace QString::tostdstring() to Foo.toUtf8().constData().

2) Enable start center online community. To use it you need download webengine in your QT lib. see instruction https://musescore.org/en/handbook/developers-handbook/compilation/compile-instructions-windows-visual-studio-2017-wip

3) update install steps. Add additional dlls for webEngine. Add copying dlls and musescore.exe to /msvc.install/bin folder. Run project will work with the "$(ProjectDir)\..\..\msvc.install\bin\MuseScore.exe" specified in Debugging field in mscore project

4) Moving AppVeyor from MinGW to MSVC. Exclude ALL MSVC project from INSTALL project. Exclude ALL from PACKAGE. Remove migw-cmake in script build, add .bat instead. Remove xcopy from 7z archive step

5) Fix warning : Warning C4703 potentially uninitialized local pointer variable '' used; Warning C4456 declaration of '' hides previous local declaration; Warning C4458 declaration of '' hides class member

6) Change path to 11 version wix toolset which created .msi installer package
2018-08-04 12:17:31 +02:00
Andres Fernandez de Prado
33dff96a20 This commit contains changes required for MuseScore to compile under MSVC with no warnings.
This commit contains changes required for MuseScore to compile under MSVC with no warnings.

MuseScore is being compiled with the /W4 setting (warning level 4), which is similar to -wall -wextra on clang. This generates lots of warnings on MSVC, mainly for non-standard constructs and for constructs which might be bugs or might lead to bugs.

Most warnings are in the following categories:
- Name hiding: a variable hides a variable with the same name on a larger scope (or a field, or a function parameter). This can easily lead to bugs, and it is a best practice to avoid hiding variable names (see recommendation ES.12 in the C++ Core Guidelines by Stroustrop & Sutter (http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-reuse : ES.12: Do not reuse names in nested scopes)
- Narrowing conversion: a numeric conversion results in loss of significant digits (for example, double -> float). The general recommendation is to use a cast to indicate this is designed behaviour.
- Unreachable code: in several instances, there is unreachable code. The unreachable code is commented out.
- (Potentially) uninitialized local variable. Just initialized the vars.
- foreach(,) -> for(:): this does not generate a warning per-se (only a few of these generate warnings due to name hiding), but changed in keeping with "MuseScore Coding Rules" (https://musescore.org/en/handbook/musescore-coding-rules#Loops), which tells explicitly "Use C++11's "for" instead of Qt's "foreach":" ... "If you happen to be fixing some code and see a "foreach", please change that loop into a "for"."

Most changes are in the categories indicated above. The next listing shows detailed changes for files which are *not* of the aforementioned types.

- all.h: Disable warning C4127 (conditional expression is constant - generated in Qt header file qvector.h)
- awl/aslider.h: unreachable code.
- awl/knob.cpp: name hiding
- awl/mslider.cpp: name hiding
- awl/slider.cpp: name hiding
- bww2mxml/parser.cpp: name hiding
- effects/compressor/compressor.cpp: narrowing conversion
- effects/zita1/zitagui.cpp: name hiding
- fluid/fluid.cpp: foreach replacement. Name hiding.
- fluid/mod.cpp: name hiding.
- fluid/sfont.cpp: foreach replacement. Name hiding. Initialize vars.
- fluid/voice.cpp: Name hiding.
- libmscore/accidental.cpp: Name hiding.
- libmscore/ambitus.cpp: Initialize vars.
- libmscore/barline.cpp: Name hiding. Unreachable code.
- libmscore/beam.cpp: Name hiding.
- libmscore/chordrest.cpp: Unreachable code.
- libmscore/scorefile.cpp: Name hiding.
- manual/genManual.cpp: Name hiding. foreach replacement.
- midi/midifile.cpp: Name hiding. Unreachable code.
- omr/importpdf.cpp: Name hiding. foreach replacement.
- omr/omr.cpp: Name hiding. foreach replacement.
- omr/omrpage.cpp: Name hiding. foreach replacement.
- omr/omrview.cpp: Name hiding. foreach replacement.
- synthesizer/event.cpp: Unreachable code.
- zerberus\channel.cpp: Narrowing conversion.
- zerberus\instrument.cpp: Name hiding.
- zerberus\sfz.cpp: Name hiding.
- zerberus\voice.h: Suppress warning C4201: "nonstandard extension used: nameless struct/union"
- zerberus\zerberus.cpp: Name hiding. Unreferenced parameter.
- zerberus\zerberusgui.cpp: Name hiding.
2018-08-03 09:15:42 +02:00
Andres Fernandez de Prado
188386ba2e This commit contains all the changes to the CMake build system required to generate a valid Visual Studio 2017 solution and projects for MuseScore.
In detail, changes are as follows:
- Changed .gitignore to ignore VS-specific files and directories.
- VS uses a global settings file for the CMake build process: CMakeSettings.json. This is a text file, which is conceptually equivalent to the Makefile used to invoke CMake through Make. This file might need to be changed on an individual user basis, if dependencies are not installed in default paths.
- New cmake macros to copy files in build\CopyFilesMacros.cmake. The code is from https://cmake.org/pipermail/cmake/2009-March/027892.html
- Pre-compiled headers: Visual Studio requires to create pre-compiled headers per-project (a general per-solution PCH file, although possible, is extremely problematic and not recommended). Therefore, the  new macro vstudio_pch in CreatePrecompiledHeader.cmake was created to add the pre-compiled header creation step to an existing target (similar to what is done for XCode). The existing macro precompiled_header was modified to set the values for a group of variables. As part of this, the empty file all.cpp was added to the root of the source tree, as VS requires a source file to create pre-compiled headers (the header file alone can not be compiled).
- all.h is not copied to binary dir for MSVC, as I could determine no need to do this. Because of this, and the differences in PCH handling, the pseudo-targets mops1 and mops2 are not created for MSVC.
- Revised all steps conditional on toolchain, and added MSVC paths as needed. In many instances, the MSVC path is the same as the MINGW path, but not always.
- The manual (genManual) target used the getopt() functionality defined in POSIX libraries, which is not available on Windows. An LGPL'd port of getopt() for Windows was added in manual\getopt. The original source is in GitHub: nanoporetech/getopt-win32, based on a CodeProject article: https://www.codeproject.com/KB/cpp/getopt4win.aspx?msg=3987371. The corresponding CMakeLists.txt file was modified to include this files when compiling with MSVC.
- Changes in CMakeLists.txt files to create valid MSVC targets. The changes, always conditional on the MSVC toolchain, consist of:
     x Setting target properties for MSVC
     x Using all.h in source dir
     x Adding pre-compiled headers to target
     x Removing dependency from mops1 and mops2

Notes:
- The INSTALL target has NOT BEEN UPDATED for MSVC.
2018-08-03 09:15:42 +02:00
luz.paz
443be63167 Misc. typos
Found via `codespell -i 3 -w --skip="./thirdparty,./share/locale,./fonts" -I ../musescore-whitelist.txt`
Whitelist:
```
clas
nd
ot
pres
strack
tage
te
```
2018-02-13 12:06:05 -05:00
Finley Lau
470095f0d2 Fix #125121: Formula determining octave number affecting split staff point 2018-02-09 14:32:58 +01:00
Joachim Schmitz
5e116fe595 Fixing issues found in static code analysis by PVS-Studion
See https://musescore.org/en/node/255156
2017-12-20 16:26:23 +01:00
nasehim7
17d33b67bd Fix #109066 : Tempo Slider and Volume slider Left Double click wrong default values 2017-04-11 23:11:09 +05:30
IsaacWeiss
a715fb24c8 Fix #184381: Unnecessary "MuseScore: " prepended to most window titles and wrong title of Split Staff dialog
Also remove spacer at top of Section Break Properties
2017-03-28 12:54:49 -04:00
Eric Fontaine
8c824e26f2 fix #182171 correct update rect to cover entire meter rect
Increased the QRect to cover entire meter are which is updated, to prevent a visual glitch whereby leftmost two columns of pixels weren't updated.  But since since the notches aren't redrawn when synth updates level, notches have been shifted a bit and end right before the mixer redraw area so they'll no longer overlap, which prevents a visual glitch whereby the notches would flicker off when mixer was redrawn.
2017-03-21 07:49:34 -04:00
Eric Fontaine
735d766b72 cosmetic cleanup 2017-03-21 07:01:38 -04:00
nasehim7
3197abacb9 Fix #181966 Volume Slider Notches according to range 2017-03-21 02:24:56 +05:30
Joachim Schmitz
2ef157283e Fix spelling in CMakeLists.txt files 2016-06-10 10:38:13 +02:00
ws
8f5fa69542 add compressor effect 2015-09-08 15:39:30 +02:00
Andrei Tuicu
ae1b46b2a7 Scale values for screen reader to be from 0 to 100 for sliders in awl. 2015-02-06 23:00:36 +02:00
Andrei Tuicu
ddaf8b363e Accessibility for play panel, mixer and synthesizer. 2015-02-06 23:00:36 +02:00
ws
5c589e4367 fix build regression 2015-01-27 15:23:20 +01:00
ws
b3c8465eed more cmake cleanups 2015-01-27 15:23:20 +01:00
ws
1960bbbff7 use AUTOMOC in cmake files 2015-01-27 15:23:20 +01:00
Marc Sabatella
a115337608 fix #45141: double click or backspace to reset mixer knobs 2015-01-23 09:15:02 -07:00
ws
f471d31178 add metronome volume control to synthesizer gui 2015-01-02 14:12:05 +01:00
ws
4ba880a2b3 change synthesizer volume defaults 2014-12-12 14:56:18 +01:00
ws
5730db9c06 NewWizard: remove explicit template/from scratch choice 2014-12-11 12:01:51 +01:00
ws
2342ee5ea9 allow 10db more gain in volume slider 2014-12-11 12:01:50 +01:00
Joachim Schmitz
dca725c608 fix translation of pitch2string, for drum- and pianoroll 2014-08-17 13:31:39 +02:00
Joachim Schmitz
7a07810549 fix warning reg. unused parameter
introduced in 5a9b6395
2014-06-17 15:33:00 +02:00
Joachim Schmitz
5a9b6395de avoid warnings reg. unused variables 2014-06-17 14:35:16 +02:00
Joachim Schmitz
1a744fc836 fix overloading 2014-06-10 09:27:53 +02:00
Joachim Schmitz
843356beb7 disable unused local variables 2014-06-10 09:27:51 +02:00
Joachim Schmitz
6f3a7d1957 whitespace cleanup 2014-05-30 13:37:44 +02:00
Joachim Schmitz
7c3d869ddd many (f)printf to qDebug 2014-03-22 10:40:59 +01:00
Joachim Schmitz
6d0266145b revert back to plain # and b in CPP files
but also make these strings translatable
2014-02-11 13:30:18 +01:00