Skip to content

Commit

Permalink
initial (partial) implementation musescore#20581
Browse files Browse the repository at this point in the history
  • Loading branch information
lvinken committed Apr 12, 2013
1 parent 958449d commit 1a10896
Show file tree
Hide file tree
Showing 14 changed files with 987 additions and 139 deletions.
4 changes: 2 additions & 2 deletions mscore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Linux Music Score Editor
# $Id:$
#
# Copyright (C) 2002-2010 by Werner Schweer and others
# Copyright (C) 2002-2013 by Werner Schweer and others
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2.
Expand Down Expand Up @@ -176,7 +176,7 @@ add_executable ( ${ExecutableName}
editdrumset.cpp editstaff.cpp voltaproperties.cpp
timesigproperties.cpp newwizard.cpp transposedialog.cpp
chordedit.cpp excerptsdialog.cpp metaedit.cpp magbox.cpp
voiceselector.cpp capella.cpp exportaudio.cpp palettebox.cpp
voiceselector.cpp capella.cpp capxml.cpp exportaudio.cpp palettebox.cpp
textproperties.cpp slurproperties.cpp
synthcontrol.cpp drumroll.cpp pianoroll.cpp piano.cpp
pianoview.cpp drumview.cpp scoretab.cpp keyedit.cpp harmonyedit.cpp
Expand Down
285 changes: 152 additions & 133 deletions mscore/capella.cpp

Large diffs are not rendered by default.

23 changes: 22 additions & 1 deletion mscore/capella.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Linux Music Score Editor
// $Id: capella.h 3833 2011-01-04 13:55:40Z wschweer $
//
// Copyright (C) 2009 Werner Schweer and others
// Copyright (C) 2009-2013 Werner Schweer and others
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2.
Expand All @@ -22,6 +22,7 @@
#define __CAPELLA_H__

#include "globals.h"
#include "libmscore/xml.h"

enum TIMESTEP { D1, D2, D4, D8, D16, D32, D64, D128, D256, D_BREVE };

Expand Down Expand Up @@ -86,6 +87,7 @@ class CapClef : public NoteObj, public CapellaObj {
public:
CapClef(Capella* c) : NoteObj(T_CLEF), CapellaObj(c) {}
void read();
void readCapx(XmlReader& e);
const char* name() {
static const char* formName[] = { "G", "C", "F", "=", " ", "*" };
return formName[form];
Expand All @@ -106,6 +108,7 @@ class CapKey : public NoteObj, public CapellaObj {
public:
CapKey(Capella* c) : NoteObj(T_KEY), CapellaObj(c) {}
void read();
void readCapx(XmlReader& e);
int signature; // -7 - +7
};

Expand All @@ -121,6 +124,7 @@ class CapMeter : public NoteObj, public CapellaObj {

CapMeter(Capella* c) : NoteObj(T_METER), CapellaObj(c) {}
void read();
void readCapx(XmlReader& e);
};

//---------------------------------------------------------
Expand All @@ -134,6 +138,7 @@ class CapExplicitBarline : public NoteObj, public CapellaObj {
public:
CapExplicitBarline(Capella* c) : NoteObj(T_EXPL_BARLINE), CapellaObj(c) {}
void read();
void readCapx(XmlReader& e);
int type() const { return _type; }
int barMode() const { return _barMode; }

Expand Down Expand Up @@ -512,6 +517,7 @@ class BasicDurationalObj : public CapellaObj {
public:
BasicDurationalObj(Capella* c) : CapellaObj(c) {}
void read();
void readCapx(XmlReader& e, unsigned int& fullm);
int ticks() const;
bool invisible;
QList<BasicDrawObj*> objects;
Expand Down Expand Up @@ -557,6 +563,8 @@ class ChordObj : public BasicDurationalObj, public NoteObj {
public:
ChordObj(Capella*);
void read();
void readCapx(XmlReader& e);
void readCapxNotes(XmlReader& e);
QList<Verse> verse;
QList<CNote> notes;
char stemDir; // -1 down, 0 auto, 1 up, 3 no stem
Expand All @@ -573,6 +581,7 @@ class RestObj : public BasicDurationalObj, public NoteObj {
public:
RestObj(Capella*);
void read();
void readCapx(XmlReader& e);
unsigned fullMeasures; // >0, multi measure rest (counting measures)
};

Expand Down Expand Up @@ -683,6 +692,18 @@ class Capella {
double smallLineDist; // spatium unit in metric mm
double normalLineDist;
int topDist;
// capx support
private:
void readCapxVoice(XmlReader& e, CapStaff*, int);
void readCapxStaff(XmlReader& e, CapSystem*, int);
void readCapxSystem(XmlReader& e);
void capxSystems(XmlReader& e);
void readCapxStaveLayout(XmlReader& e, CapStaffLayout*, int);
void capxLayoutStaves(XmlReader& e);
void capxLayout(XmlReader& e);
void initCapxLayout();
public:
void readCapx(XmlReader& e);
};

#endif
Expand Down
Loading

0 comments on commit 1a10896

Please sign in to comment.