Commit graph

232 commits

Author SHA1 Message Date
pereverzev_v
ae794d14e2 Added dragging ability for the beams 2020-01-16 11:09:42 +02:00
pereverzev_v
e71f45e0d2 Added middle grip for beams for moving whole beam horizontally 2019-12-27 10:09:59 +02:00
pereverzev_v
a8509dc3e1 Allowed the user to adjust the left angle of a beam 2019-12-24 14:20:35 +02:00
Dmitri Ovodok
5c3b407dae Move setting up grips out of Element::startEdit() 2019-12-24 14:16:06 +02:00
Matt McClinch
4c5e7459ce fix #289254: Beam in edit mode always switches to right grab handle 2019-11-18 08:54:23 -05:00
Dmitri Ovodok
99c7b0d746 Add more information to setLayout() 2019-10-25 16:18:41 +02:00
anatoly-os
e2f3431e03 fix clang warnings
But the ones related to deprecations in third-party libs

* Remove unused variables
* Prevent calling non-virtual destructors
* Prevent the warning "Moving a temporary object prevents copy elision" by removing std::move call
* disable "`register` is deprecated" warning related to the 3rd party code
2019-10-14 19:01:59 +02:00
Dmitri Ovodok
d1f1233aaf Highlight active beam properties cell 2019-09-17 14:21:27 +02:00
Dmitri Ovodok
333ca7dc97 Implement tremolo placement at stem center
The following changes are included:
 - Corrected bounding box for buzzroll tremolo.
 - Added a possibility to place tremolo at stem center.
 - Reworked one-note tremolo layout to make it possible
   to know its dimensions before performing its layout
   on a stem.
 - Implemented padding around one-note tremolo to make it
   clearly separated from beams and noteheads.
2019-06-10 14:19:44 +02:00
Marc Sabatella
f2073afc57 fix #289498: bad layout of beam with cross-staff beam in another voice 2019-05-22 07:42:54 -06:00
Marc Sabatella
6b7f33ec64 fix #278999, fix #288474: autoplace customization 2019-05-01 07:52:11 -06:00
Marc Sabatella
d788c38b92 fix #282021: scale beam thickness 2019-04-11 06:36:32 -06:00
Marc Sabatella
2d600594e2 fix #285802: cross-staff tuplets 2019-03-25 14:31:32 -06:00
Marc Sabatella
e0bd254d48 fix #280531: stem direction wrong on flipped cross-staff beam 2019-03-25 14:31:32 -06:00
Marc Sabatella
8dd7a02da0 fix #280969: cross-staff notes lose beam if all moved up 2019-03-25 14:31:32 -06:00
anatoly-os
18fb31a20e
Merge pull request #4777 from dmitrio95/beam-layout2-chord-conversion
Fix assertion failure due to ChordRest conversion in Beam::layout2
2019-03-07 14:09:58 +02:00
Dmitri Ovodok
6665be67c5 Fix assertion failure due to ChordRest conversion in Beam::layout2 2019-03-07 11:35:58 +02:00
Marc Sabatella
2fcdea8939 fix 285370: wrong stem direction in skyline for beamed notes on drum staves 2019-03-06 14:24:40 -07:00
ws
ec3be9a99a Replacd integer midi tick values by fractions.
- tick names a position on the time axis
- tick is always a Fraction()
- only Measure() and Segment() (and Tuplet?) have a tick value
- tick() for an generic element return only a sensible value if isMeasure() or isSegment() or isSegment(parent())

- "ticks" names a duration stored in a Fraction()
- the tick value for an Segment is relative to its measure

- rename "duration" to "ticks"
- rename afrac() to tick()
- rename rfrac() to rtick()
- rename some variables, changing "fraction" into "tick"
  (example: actualFraction() into actualTicks())

- Lyrics ticks are written as Fraction, on read if xmlreader sees a "/" it reads a fraction
  else midi ticks for backwards compatibility
2019-02-18 11:46:05 +01:00
Marc Sabatella
bbbe1f68e8 fix #280677, fix #279643: semantics of disable autoplace on stems et al 2019-01-11 18:26:22 -07:00
Matt McClinch
004a31af62 fix #281130: Crash of MuseScore 3 on opening a certain 2.x score 2019-01-03 11:50:23 -05:00
anatoly-os
26d15105ab fix #118636: Tablature beam not drawing correctly in Full or Common Tablature staff
Fix stem positions for TAB notation
2018-12-20 11:37:42 +02:00
anatoly-os
f66b4a1d2a
Merge pull request #4377 from dmitrio95/279080-beam-over-rest
fix #279080: update beam info for rests, tweak rest beams parameters
2018-12-13 14:32:57 +02:00
Dmitri Ovodok
4eb78bab62 fix #279080: update beam info for rests, tweak rest beams parameters 2018-12-13 09:32:48 +02:00
Dmitri Ovodok
69ba5de735 fix #279172, part 2: Detach beams from system on relayout 2018-12-07 15:19:59 +02:00
Matt McClinch
95846dee39 fix #278677: Shortening notes breaks beam vertical positioning 2018-11-22 11:21:25 -05:00
ws
d2e452040b fix #278099 Crash when inserting a symbol from master palette 2018-11-13 13:32:33 +01:00
ws
1edd676aa7 fix #277699 Staff properties corrupted on MusicXML import after Master Palette opened
The problem is deep in the initialization of staff types in Staff.
This commit also tries to make handling of StaffType more "const correct" and adds some
assertions which may lead to crashes (and helps detecting bad code).
2018-11-08 15:50:00 +01:00
Dmitri Ovodok
c95dfd5a40 Make it possible to record elements written to MSCX 2018-10-29 16:30:19 +02:00
ws
6dbff17ca7 fix compat114 issues 2018-10-26 10:41:30 +02:00
Dmitri Ovodok
1907b4ec63 Fix not accurate conversion of ChordRest in Beam::layout2 2018-10-11 13:02:26 +03:00
Dmitri Ovodok
c354eb24c3 Remove read300 functions 2018-09-19 01:57:37 +03:00
Joachim Schmitz
b27817fe19 fix more MSVC warnings
* The one C4100
* The one C4189
* The two C4457
* The two C4701
* The 475 C4267, changing to size_t were easily possible, casting to
int elsewhere
* Fix GCC warnings reg. wrong printf format for a size_t, reg. unused
variables and reg. ambigous else branch, seen on Travis CI
2018-09-11 16:56:50 +02:00
ws
b232149321 remove measure staff shapes, replace with skyline 2018-09-11 16:30:47 +02:00
Dmitri Ovodok
d0a24894d2 Read/write beams without using IDs 2018-08-16 19:10:28 +03:00
Dmitri Ovodok
8fa920b7df Backup old MSC read functions, add a test for fileformats compatibility
Use old read functions for reading 1.x and 2.x fileformats

Assign version number 3.01 to the new MSCX format flavor
2018-08-16 19:08:45 +03: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
3acc363498 Solved all compilation errors on MSVC
This commit contains changes required for MuseScore to compile under MSVC with no errors.

There are several general categories of problems that resulted in errors with the compilation. Main issues:
- Variable Length Arrays (VLA). This is a non-standard extension to C++, supported by clang toolchains, but not by MSVC. The initial workaround is to use std::vector<> instead of VLAs, eventually (if needed) with the original variable pointing to the beginning of the allocated array. More efficient alternatives are possible if profiling shows any code using VLAs to be timing-critical.
- Floating-point constants not suffixed with "f" are doubles by default; in some instances, this leads to narrowing conversion errors (in other instances, just warnings).
- MSVC does not support "or"/"and"/"not" in lieu of "||"/"&&"/"!". Changed unconditionally to use standard C++ symbols.
- MSVC does not support the "__builtin_unreachable()" compiler hint. A similar, albeit not exactly equal, alternative is "__assume(0)", which is MSVC-specific.
- MSVC does not support ranges in case statements. Replaced with list of cases instead of range (non-conditionally)

Detailed changes, with per-file comments:

- all.h: opt-in to deprecated features, include <io.h> and <process.h> instead of POSIX <unistd.h>, undefine "STRING_NONE" and "small", which Microsoft defines as macros, which result in compilation errors.
- effects/compressor/zita.cpp: eliminated narrowing conversion error by appending "f" to float constants.
- fluid/voice.cpp: appended "f" to float constants to eliminate narrowing conversion errors/warnings
- libmscore/beam.cpp: conditionally replaced VLA
- libmscore/edit.cpp: conditionally replaced VLA
- libmscore/element.cpp: appended "f" to float constant
- libmscore/fret.cpp: changed or -> ||
- libmscore/layout.cpp: conditionally replaced VLA
- libmscore/mscore.cpp: conditionally replaced "__builtin_unreachable()" with "__assume(0)" for MSVC
- libmscore/scorefile.coo: use correct char representation conversion for MSVC
- libmscore/stringdata.cpp: conditionally replaced VLA
- libmscore/system.cpp: conditionally replaced VLA
- libmscroe/text.cpp: replaced range in case statement.
- manual/genManual.cpp: use getopt() replacement.
- midi/midifile.cpp: conditionally replaced VLA. This does not use the default replacement.
- mscore/bb.cpp: replaced range in case statement.
- mscore/capella.cpp: conditionally replaced VLA. Changed and -> &&
- mscore/driver:cpp: preclude errors due to macro redefinitions.
- mscore/editstyle.cpp: conditionally replaced "__builtin_unreachable()" with "__assume(0)" for MSVC
- mscore/importgtp-gp6.cpp: conditionally replaced VLA.
- mscore/instrwidget.cpp: conditionally replaced VLA.
- mscore/jackaudio.cpp: conditionally replaced VLA. Preclude errors due to macro redefinitions.
- mscore/jackweakapi.cpp: Preclude errors due to macro redefinitions. Replacement for __atribute__((constructor)) through static object construction for MSVC. Force use of LoadLibraryA instead of LoadLibrary.
- mscore/mididriver.h: Changed not -> !
- mscore/musescore.cpp: Changed not -> !. Conditionally replaced VLA.
- mscore/resourceManager.cpp: conditionally replaced VLA.
- mscore/timeline.cpp: conditionally replaced VLA.
- omr/omrpage.cpp: conditionally replaced VLA.
- synthesizer/msynthesizer.cpp: replaced UNIX sleep(1) method with MSVC Sleep(1000) (equivalent, but in ms instead of seconds)
- synthesizer/msynthsizer.h: appended "f" to float constant
- thirdparty/poppler/config.h: set defines for MSVC to preclude the use of inexistent libraries.
- thirdparty/poppler/poppler/poppler-config.h: set defines for MSVC to preclude the use of inexistent libraries. Eliminated #defines for fmin and fmax which where causing problems.
- thirdparty/poppler/poppler/PSOutputDev.cc: added #include <algorithm> for  std::min() and std::max(). Note this is required per-C++ standard.
- thirdparty/portmidi/pm_win/pmwinmm.c: undefined UNICODE to use char-based library functions.
- thirdparty/qzip/qzip.cpp: changed or -> ||
- thirdparty/rtf2html/rtf_keyword.h: file format changed from Apple to UNIX, as MSVC does not supported the former.

(NOT error related, just improvement on previous commit; manual/getopt/README.md: added link to source article)
2018-08-03 09:15:42 +02:00
ws
10ebbb9080 update text style implementation 2018-08-01 11:46:35 +02:00
ws
175d5aadb3 cleanup ElementFlags interface, use more Placement properties on mxml import/export 2018-07-04 12:41:14 +02:00
anatoly-os
4facafc468 fix #271529: incorrect stem position for some noteheads in layout
Implemented correct notehead bbox width and origin calculations. Fixed
note and chord stems, ledger lines, beams, dots, articulation, slur and chord positions.
2018-05-05 10:34:45 +02:00
ws
33d1cd7fb4 rename StyleIdx -> Sid and P_ID -> Pid 2018-03-27 15:36:00 +02:00
ws
e8ec15109c substyle update 2018-03-22 10:09:52 +01:00
ws
17bc1678a0 update styles/properties for Box 2018-03-21 14:05:43 +01:00
ws
216727ad80 update styles/properties for Beam 2018-03-21 14:05:43 +01:00
Werner Schweer
1943bd1ff1 replace most static_cast in libmscore 2017-12-20 16:49:58 +01:00
Werner Schweer
d92ef8b9d4 update properties/styles, update glissando 2017-12-13 15:50:04 +01:00
Werner Schweer
9e66e4fc4b enable collision detection for beams 2017-08-09 16:01:12 +02:00
Werner Schweer
1a92bd7fc1 fixes for drum staff layout 2017-08-08 14:01:11 +02:00