File: p1.qml

package info (click to toggle)
musescore2 2.3.2%2Bdfsg4-15
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 168,212 kB
  • sloc: cpp: 262,317; xml: 176,707; sh: 3,377; ansic: 1,384; python: 356; makefile: 227; perl: 82; pascal: 78
file content (82 lines) | stat: -rw-r--r-- 4,174 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import QtQuick 2.0
import MuseScore 1.0

MuseScore {
      menuPath: "Plugins.p1"
      onRun: {
            openLog("p1.log");
            logn("test script p1")

            var cursor = curScore.newCursor();
            cursor.voice = 0;
            cursor.staffIdx = 0;
            log2("filter:", cursor.filter);
            cursor.filter = -1;
            log2("filter:", cursor.filter);
            cursor.rewind(0);

            while (cursor.segment) {
                  if (cursor.element) {
                        var type = cursor.element.type;
                        var e    = cursor.element;
                        logn(e._name());
                        if (type == Element.CHORD) {
                            log2("  durationType:", e.durationType);
                            log2("  beamMode:", e.beamMode);
                            log2("  small:",    e.small);
                            logn("  duration:");
                            log2("    numerator:",   e.duration.numerator);
                            log2("    denominator:", e.duration.denominator);
                            log2("    ticks:",       e.duration.ticks);
                            var notes = e.notes;
                            for (var i = 0; i < notes.length; i++) {
                                var note = notes[i];
                                log2("  ", note._name());
                                log2("    subchannel:", note.subchannel);
                                log2("    line:", note.line);
                                log2("    fret:", note.fret);
                                log2("    string:", note.string);
                                log2("    tpc:", note.tpc);
                                log2("    tpc1:", note.tpc1);
                                log2("    tpc2:", note.tpc2);
                                log2("    pitch:", note.pitch);
                                log2("    ppitch:", note.ppitch);
                                log2("    ghost:", note.ghost);
                                log2("    hidden:", note.hidden);
                                log2("    mirror:", note.mirror);
                                log2("    small:", note.small);
                                log2("    play:", note.play);
                                log2("    tuning:", note.tuning);
                                log2("    veloType:", note.veloType);
                                log2("    veloOffset:", note.veloOffset);
                                log2("    userMirror:", note.userMirror);
                                log2("    userDotPosition:", note.userDotPosition);
                                log2("    headGroup:", note.headGroup);
                                log2("    headType:", note.headType);
                                log2("    accidentalType:", note.accidentalType);
                                log2("    dotsCount:", note.dotsCount);
                                if (note.accidental) {
                                      var acc = note.accidental;
                                      log2("      ", acc._name());
                                      log2("        hasBracket:", acc.hasBracket);
                                      log2("        small:", acc.small);
                                      log2("        accType:", acc.accType);
                                      log2("        role:", acc.role);
                                      }
                                }
                            }
                        if (type == Element.REST) {
                            logn("  duration:");
                            log2("    numerator:",   e.duration.numerator);
                            log2("    denominator:", e.duration.denominator);
                            log2("    ticks:",       e.duration.ticks);
                            log2("  beamMode:", e.beamMode);
                            log2("  small:", e.small);
                            }
                        }
                  cursor.next();
                  }
            closeLog();
            Qt.quit()
            }
      }