Skip to content

Commit

Permalink
Adding new feature for autobeam from commandline
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Ferraro committed Sep 18, 2015
1 parent b376184 commit 7f0aa7f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions mscore/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ extern double converterDpi;
extern double guiScaling;
extern int trimMargin;
extern bool noWebView;
extern bool autobeam;

//---------------------------------------------------------
// MsWidget
Expand Down
5 changes: 4 additions & 1 deletion mscore/importxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5428,7 +5428,10 @@ Note* MusicXml::xmlNote(Measure* measure, int staff, const QString& partId, Beam

bool rest = false;
int relStaff = 0;
Beam::Mode bm = Beam::Mode::NONE;
Beam::Mode bm = Beam::Mode::AUTO;
if (!autobeam){
bm = Beam::Mode::NONE;
}
MScore::Direction sd = MScore::Direction::AUTO;
bool grace = false;
QString graceSlash;
Expand Down
4 changes: 4 additions & 0 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ int trimMargin = -1;
bool noWebView = false;
bool exportScoreParts = false;

bool autobeam = false;

QString mscoreGlobalShare;

static QString outFileName;
Expand Down Expand Up @@ -4659,6 +4661,7 @@ int main(int argc, char* av[])
parser.addOption(QCommandLineOption({"t", "test-mode"}, "Set testMode flag for all files"));
parser.addOption(QCommandLineOption({"M", "midi-operations"}, "Specify MIDI import operations file", "file"));
parser.addOption(QCommandLineOption({"w", "no-webview"}, "No web view in start center"));
parser.addOption(QCommandLineOption({"b", "auto-beam"}, "Enable Auto beaming for command line operations"));
parser.addOption(QCommandLineOption({"P", "export-score-parts"}, "used with -o <file>.pdf, export score + parts"));

parser.addPositionalArgument("scorefiles", "The files to open", "[scorefile...]");
Expand Down Expand Up @@ -4740,6 +4743,7 @@ int main(int argc, char* av[])
parser.showHelp(EXIT_FAILURE);
preferences.midiImportOperations.setOperationsFile(temp);
}
autobeam = parser.isSet("a");
noWebView = parser.isSet("w");
exportScoreParts = parser.isSet("export-score-parts");
if (exportScoreParts && !converterMode)
Expand Down
2 changes: 1 addition & 1 deletion mscore/revision.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3543170
b376184

1 comment on commit 7f0aa7f

@kjav
Copy link

@kjav kjav commented on 7f0aa7f Mar 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I totally support this being merged into the main branch. Any way we could make this happen?

Edit: I have fixed my problem for now using a plugin I wrote: https://github.com/kjav/AutoBeam

Please sign in to comment.