EngravingRules.js 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524
  1. "use strict";
  2. var GraphicalMusicPage_1 = require("./GraphicalMusicPage");
  3. //import {MusicSymbol} from "./MusicSymbol";
  4. var logging_1 = require("../../Common/logging");
  5. var EngravingRules = (function () {
  6. function EngravingRules() {
  7. this.noteDistances = [1.0, 1.0, 1.3, 1.6, 2.0, 2.5, 3.0, 4.0];
  8. this.noteDistancesScalingFactors = [1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0];
  9. this.durationDistanceDict = {};
  10. this.durationScalingDistanceDict = {};
  11. this.samplingUnit = EngravingRules.unit * 3;
  12. this.sheetTitleHeight = 4.0;
  13. this.sheetSubtitleHeight = 2.0;
  14. this.sheetMinimumDistanceBetweenTitleAndSubtitle = 1.0;
  15. this.sheetComposerHeight = 2.0;
  16. this.sheetAuthorHeight = 2.0;
  17. this.pagePlacementEnum = GraphicalMusicPage_1.PagePlacementEnum.Down;
  18. this.pageHeight = 100001.0;
  19. this.pageTopMargin = 5.0;
  20. this.pageBottomMargin = 5.0;
  21. this.pageLeftMargin = 5.0;
  22. this.pageRightMargin = 5.0;
  23. this.titleTopDistance = 9.0;
  24. this.titleBottomDistance = 1.0;
  25. this.staffDistance = 7.0;
  26. this.betweenStaffDistance = 5.0;
  27. this.staffHeight = 4.0;
  28. this.betweenStaffLinesDistance = EngravingRules.unit;
  29. this.systemDistance = 10.0;
  30. this.systemLeftMargin = 0.0;
  31. this.systemRightMargin = 0.0;
  32. this.firstSystemMargin = 15.0;
  33. this.systemLabelsRightMargin = 2.0;
  34. this.systemComposerDistance = 2.0;
  35. this.instrumentLabelTextHeight = 2;
  36. this.minimumAllowedDistanceBetweenSystems = 3.0;
  37. this.lastSystemMaxScalingFactor = 1.4;
  38. this.beamWidth = EngravingRules.unit / 2.0;
  39. this.beamSpaceWidth = EngravingRules.unit / 3.0;
  40. this.beamForwardLength = 1.25 * EngravingRules.unit;
  41. this.clefLeftMargin = 0.5;
  42. this.clefRightMargin = 0.75;
  43. this.betweenKeySymbolsDistance = 0.2;
  44. this.keyRightMargin = 0.75;
  45. this.rhythmRightMargin = 1.25;
  46. this.inStaffClefScalingFactor = 0.8;
  47. this.distanceBetweenNaturalAndSymbolWhenCancelling = 0.4;
  48. this.noteHelperLinesOffset = 0.25;
  49. this.measureLeftMargin = 0.7;
  50. this.measureRightMargin = 0.0;
  51. this.distanceBetweenLastInstructionAndRepetitionBarline = 1.0;
  52. this.arpeggioDistance = 0.6;
  53. this.staccatoShorteningFactor = 2;
  54. this.idealStemLength = 3.0;
  55. this.stemNoteHeadBorderYOffset = 0.2;
  56. this.stemWidth = 0.13;
  57. this.stemMargin = 0.2;
  58. this.stemMinLength = 2.5;
  59. this.stemMaxLength = 4.5;
  60. this.beamSlopeMaxAngle = 10.0;
  61. this.stemMinAllowedDistanceBetweenNoteHeadAndBeamLine = 1.0;
  62. this.graceNoteScalingFactor = 0.6;
  63. this.graceNoteXOffset = 0.2;
  64. this.wedgeOpeningLength = 1.2;
  65. this.wedgeMeasureEndOpeningLength = 0.75;
  66. this.wedgeMeasureBeginOpeningLength = 0.75;
  67. this.wedgePlacementAboveY = -1.5;
  68. this.wedgePlacementBelowY = 1.5;
  69. this.wedgeHorizontalMargin = 0.6;
  70. this.wedgeVerticalMargin = 0.5;
  71. this.distanceOffsetBetweenTwoHorizontallyCrossedWedges = 0.3;
  72. this.wedgeMinLength = 2.0;
  73. this.distanceBetweenAdjacentDynamics = 0.75;
  74. this.tempoChangeMeasureValitidy = 4;
  75. this.tempoContinousFactor = 0.7;
  76. this.staccatoScalingFactor = 0.8;
  77. this.betweenDotsDistance = 0.8;
  78. this.ornamentAccidentalScalingFactor = 0.65;
  79. this.chordSymbolTextHeight = 2.0;
  80. this.fingeringLabelFontHeight = 1.7;
  81. this.measureNumberLabelHeight = 1.5 * EngravingRules.unit;
  82. this.measureNumberLabelOffset = 2;
  83. this.tupletNumberLabelHeight = 1.5 * EngravingRules.unit;
  84. this.tupletNumberYOffset = 0.5;
  85. this.labelMarginBorderFactor = 0.1;
  86. this.tupletVerticalLineLength = 0.5;
  87. this.bezierCurveStepSize = 1000;
  88. this.calculateCurveParametersArrays();
  89. this.tieGhostObjectWidth = 0.75;
  90. this.tieYPositionOffsetFactor = 0.3;
  91. this.minimumNeededXspaceForTieGhostObject = 1.0;
  92. this.tieHeightMinimum = 0.28;
  93. this.tieHeightMaximum = 1.2;
  94. this.tieHeightInterpolationK = 0.0288;
  95. this.tieHeightInterpolationD = 0.136;
  96. this.slurNoteHeadYOffset = 0.5;
  97. this.slurStemXOffset = 0.3;
  98. this.slurSlopeMaxAngle = 15.0;
  99. this.slurTangentMinAngle = 30.0;
  100. this.slurTangentMaxAngle = 80.0;
  101. this.slursStartingAtSameStaffEntryYOffset = 0.8;
  102. this.repetitionEndingLabelHeight = 2.0;
  103. this.repetitionEndingLabelXOffset = 0.5;
  104. this.repetitionEndingLabelYOffset = 0.3;
  105. this.repetitionEndingLineYLowerOffset = 0.5;
  106. this.repetitionEndingLineYUpperOffset = 0.3;
  107. this.lyricsHeight = 2.0;
  108. this.verticalBetweenLyricsDistance = 0.5;
  109. this.betweenSyllabelMaximumDistance = 10.0;
  110. this.minimumDistanceBetweenDashes = 5.0;
  111. this.instantaniousTempoTextHeight = 2.3;
  112. this.continuousDynamicTextHeight = 2.3;
  113. this.moodTextHeight = 2.3;
  114. this.unknownTextHeight = 2.0;
  115. this.continuousTempoTextHeight = 2.3;
  116. this.staffLineWidth = 0.12;
  117. this.ledgerLineWidth = 0.12;
  118. this.wedgeLineWidth = 0.12;
  119. this.tupletLineWidth = 0.12;
  120. this.lyricUnderscoreLineWidth = 0.12;
  121. this.systemThinLineWidth = 0.12;
  122. this.systemBoldLineWidth = EngravingRules.unit / 2.0;
  123. this.systemRepetitionEndingLineWidth = 0.12;
  124. this.systemDotWidth = EngravingRules.unit / 5.0;
  125. this.distanceBetweenVerticalSystemLines = 0.35;
  126. this.distanceBetweenDotAndLine = 0.7;
  127. this.octaveShiftLineWidth = 0.12;
  128. this.octaveShiftVerticalLineLength = EngravingRules.unit;
  129. this.graceLineWidth = this.staffLineWidth * this.GraceNoteScalingFactor;
  130. this.minimumStaffLineDistance = 1.0;
  131. this.minimumCrossedBeamDifferenceMargin = 0.0001;
  132. this.displacedNoteMargin = 0.1;
  133. this.minNoteDistance = 2.0;
  134. this.subMeasureXSpacingThreshold = 35;
  135. this.measureDynamicsMaxScalingFactor = 2.5;
  136. this.populateDictionaries();
  137. try {
  138. this.maxInstructionsConstValue = this.ClefLeftMargin + this.ClefRightMargin + this.KeyRightMargin + this.RhythmRightMargin + 11;
  139. }
  140. catch (ex) {
  141. logging_1.Logging.log("EngravingRules()", ex);
  142. }
  143. }
  144. Object.defineProperty(EngravingRules, "Rules", {
  145. get: function () {
  146. return EngravingRules.rules !== undefined ? EngravingRules.rules : (EngravingRules.rules = new EngravingRules());
  147. },
  148. enumerable: true,
  149. configurable: true
  150. });
  151. Object.defineProperty(EngravingRules.prototype, "SamplingUnit", {
  152. get: function () {
  153. return this.samplingUnit;
  154. },
  155. enumerable: true,
  156. configurable: true
  157. });
  158. Object.defineProperty(EngravingRules.prototype, "SheetTitleHeight", {
  159. get: function () {
  160. return this.sheetTitleHeight;
  161. },
  162. set: function (value) {
  163. this.sheetTitleHeight = value;
  164. },
  165. enumerable: true,
  166. configurable: true
  167. });
  168. Object.defineProperty(EngravingRules.prototype, "SheetSubtitleHeight", {
  169. get: function () {
  170. return this.sheetSubtitleHeight;
  171. },
  172. set: function (value) {
  173. this.sheetSubtitleHeight = value;
  174. },
  175. enumerable: true,
  176. configurable: true
  177. });
  178. Object.defineProperty(EngravingRules.prototype, "SheetMinimumDistanceBetweenTitleAndSubtitle", {
  179. get: function () {
  180. return this.sheetMinimumDistanceBetweenTitleAndSubtitle;
  181. },
  182. set: function (value) {
  183. this.sheetMinimumDistanceBetweenTitleAndSubtitle = value;
  184. },
  185. enumerable: true,
  186. configurable: true
  187. });
  188. Object.defineProperty(EngravingRules.prototype, "SheetComposerHeight", {
  189. get: function () {
  190. return this.sheetComposerHeight;
  191. },
  192. set: function (value) {
  193. this.sheetComposerHeight = value;
  194. },
  195. enumerable: true,
  196. configurable: true
  197. });
  198. Object.defineProperty(EngravingRules.prototype, "SheetAuthorHeight", {
  199. get: function () {
  200. return this.sheetAuthorHeight;
  201. },
  202. set: function (value) {
  203. this.sheetAuthorHeight = value;
  204. },
  205. enumerable: true,
  206. configurable: true
  207. });
  208. Object.defineProperty(EngravingRules.prototype, "PagePlacement", {
  209. get: function () {
  210. return this.pagePlacementEnum;
  211. },
  212. set: function (value) {
  213. this.pagePlacementEnum = value;
  214. },
  215. enumerable: true,
  216. configurable: true
  217. });
  218. Object.defineProperty(EngravingRules.prototype, "PageHeight", {
  219. get: function () {
  220. return this.pageHeight;
  221. },
  222. set: function (value) {
  223. this.pageHeight = value;
  224. },
  225. enumerable: true,
  226. configurable: true
  227. });
  228. Object.defineProperty(EngravingRules.prototype, "PageTopMargin", {
  229. get: function () {
  230. return this.pageTopMargin;
  231. },
  232. set: function (value) {
  233. this.pageTopMargin = value;
  234. },
  235. enumerable: true,
  236. configurable: true
  237. });
  238. Object.defineProperty(EngravingRules.prototype, "PageBottomMargin", {
  239. get: function () {
  240. return this.pageBottomMargin;
  241. },
  242. set: function (value) {
  243. this.pageBottomMargin = value;
  244. },
  245. enumerable: true,
  246. configurable: true
  247. });
  248. Object.defineProperty(EngravingRules.prototype, "PageLeftMargin", {
  249. get: function () {
  250. return this.pageLeftMargin;
  251. },
  252. set: function (value) {
  253. this.pageLeftMargin = value;
  254. },
  255. enumerable: true,
  256. configurable: true
  257. });
  258. Object.defineProperty(EngravingRules.prototype, "PageRightMargin", {
  259. get: function () {
  260. return this.pageRightMargin;
  261. },
  262. set: function (value) {
  263. this.pageRightMargin = value;
  264. },
  265. enumerable: true,
  266. configurable: true
  267. });
  268. Object.defineProperty(EngravingRules.prototype, "TitleTopDistance", {
  269. get: function () {
  270. return this.titleTopDistance;
  271. },
  272. set: function (value) {
  273. this.titleTopDistance = value;
  274. },
  275. enumerable: true,
  276. configurable: true
  277. });
  278. Object.defineProperty(EngravingRules.prototype, "TitleBottomDistance", {
  279. get: function () {
  280. return this.titleBottomDistance;
  281. },
  282. set: function (value) {
  283. this.titleBottomDistance = value;
  284. },
  285. enumerable: true,
  286. configurable: true
  287. });
  288. Object.defineProperty(EngravingRules.prototype, "SystemComposerDistance", {
  289. get: function () {
  290. return this.systemComposerDistance;
  291. },
  292. set: function (value) {
  293. this.systemComposerDistance = value;
  294. },
  295. enumerable: true,
  296. configurable: true
  297. });
  298. Object.defineProperty(EngravingRules.prototype, "InstrumentLabelTextHeight", {
  299. get: function () {
  300. return this.instrumentLabelTextHeight;
  301. },
  302. set: function (value) {
  303. this.instrumentLabelTextHeight = value;
  304. },
  305. enumerable: true,
  306. configurable: true
  307. });
  308. Object.defineProperty(EngravingRules.prototype, "SystemDistance", {
  309. get: function () {
  310. return this.systemDistance;
  311. },
  312. set: function (value) {
  313. this.systemDistance = value;
  314. },
  315. enumerable: true,
  316. configurable: true
  317. });
  318. Object.defineProperty(EngravingRules.prototype, "SystemLeftMargin", {
  319. get: function () {
  320. return this.systemLeftMargin;
  321. },
  322. set: function (value) {
  323. this.systemLeftMargin = value;
  324. },
  325. enumerable: true,
  326. configurable: true
  327. });
  328. Object.defineProperty(EngravingRules.prototype, "SystemRightMargin", {
  329. get: function () {
  330. return this.systemRightMargin;
  331. },
  332. set: function (value) {
  333. this.systemRightMargin = value;
  334. },
  335. enumerable: true,
  336. configurable: true
  337. });
  338. Object.defineProperty(EngravingRules.prototype, "FirstSystemMargin", {
  339. get: function () {
  340. return this.firstSystemMargin;
  341. },
  342. set: function (value) {
  343. this.firstSystemMargin = value;
  344. },
  345. enumerable: true,
  346. configurable: true
  347. });
  348. Object.defineProperty(EngravingRules.prototype, "SystemLabelsRightMargin", {
  349. get: function () {
  350. return this.systemLabelsRightMargin;
  351. },
  352. enumerable: true,
  353. configurable: true
  354. });
  355. Object.defineProperty(EngravingRules.prototype, "MinimumAllowedDistanceBetweenSystems", {
  356. get: function () {
  357. return this.minimumAllowedDistanceBetweenSystems;
  358. },
  359. set: function (value) {
  360. this.minimumAllowedDistanceBetweenSystems = value;
  361. },
  362. enumerable: true,
  363. configurable: true
  364. });
  365. Object.defineProperty(EngravingRules.prototype, "LastSystemMaxScalingFactor", {
  366. get: function () {
  367. return this.lastSystemMaxScalingFactor;
  368. },
  369. set: function (value) {
  370. this.lastSystemMaxScalingFactor = value;
  371. },
  372. enumerable: true,
  373. configurable: true
  374. });
  375. Object.defineProperty(EngravingRules.prototype, "StaffDistance", {
  376. get: function () {
  377. return this.staffDistance;
  378. },
  379. set: function (value) {
  380. this.staffDistance = value;
  381. },
  382. enumerable: true,
  383. configurable: true
  384. });
  385. Object.defineProperty(EngravingRules.prototype, "BetweenStaffDistance", {
  386. get: function () {
  387. return this.betweenStaffDistance;
  388. },
  389. set: function (value) {
  390. this.betweenStaffDistance = value;
  391. },
  392. enumerable: true,
  393. configurable: true
  394. });
  395. Object.defineProperty(EngravingRules.prototype, "StaffHeight", {
  396. get: function () {
  397. return this.staffHeight;
  398. },
  399. set: function (value) {
  400. this.staffHeight = value;
  401. },
  402. enumerable: true,
  403. configurable: true
  404. });
  405. Object.defineProperty(EngravingRules.prototype, "BetweenStaffLinesDistance", {
  406. get: function () {
  407. return this.betweenStaffLinesDistance;
  408. },
  409. set: function (value) {
  410. this.betweenStaffLinesDistance = value;
  411. },
  412. enumerable: true,
  413. configurable: true
  414. });
  415. Object.defineProperty(EngravingRules.prototype, "BeamWidth", {
  416. get: function () {
  417. return this.beamWidth;
  418. },
  419. set: function (value) {
  420. this.beamWidth = value;
  421. },
  422. enumerable: true,
  423. configurable: true
  424. });
  425. Object.defineProperty(EngravingRules.prototype, "BeamSpaceWidth", {
  426. get: function () {
  427. return this.beamSpaceWidth;
  428. },
  429. set: function (value) {
  430. this.beamSpaceWidth = value;
  431. },
  432. enumerable: true,
  433. configurable: true
  434. });
  435. Object.defineProperty(EngravingRules.prototype, "BeamForwardLength", {
  436. get: function () {
  437. return this.beamForwardLength;
  438. },
  439. set: function (value) {
  440. this.beamForwardLength = value;
  441. },
  442. enumerable: true,
  443. configurable: true
  444. });
  445. Object.defineProperty(EngravingRules.prototype, "BetweenKeySymbolsDistance", {
  446. get: function () {
  447. return this.betweenKeySymbolsDistance;
  448. },
  449. set: function (value) {
  450. this.betweenKeySymbolsDistance = value;
  451. },
  452. enumerable: true,
  453. configurable: true
  454. });
  455. Object.defineProperty(EngravingRules.prototype, "ClefLeftMargin", {
  456. get: function () {
  457. return this.clefLeftMargin;
  458. },
  459. set: function (value) {
  460. this.clefLeftMargin = value;
  461. },
  462. enumerable: true,
  463. configurable: true
  464. });
  465. Object.defineProperty(EngravingRules.prototype, "ClefRightMargin", {
  466. get: function () {
  467. return this.clefRightMargin;
  468. },
  469. set: function (value) {
  470. this.clefRightMargin = value;
  471. },
  472. enumerable: true,
  473. configurable: true
  474. });
  475. Object.defineProperty(EngravingRules.prototype, "KeyRightMargin", {
  476. get: function () {
  477. return this.keyRightMargin;
  478. },
  479. set: function (value) {
  480. this.keyRightMargin = value;
  481. },
  482. enumerable: true,
  483. configurable: true
  484. });
  485. Object.defineProperty(EngravingRules.prototype, "RhythmRightMargin", {
  486. get: function () {
  487. return this.rhythmRightMargin;
  488. },
  489. set: function (value) {
  490. this.rhythmRightMargin = value;
  491. },
  492. enumerable: true,
  493. configurable: true
  494. });
  495. Object.defineProperty(EngravingRules.prototype, "InStaffClefScalingFactor", {
  496. get: function () {
  497. return this.inStaffClefScalingFactor;
  498. },
  499. set: function (value) {
  500. this.inStaffClefScalingFactor = value;
  501. },
  502. enumerable: true,
  503. configurable: true
  504. });
  505. Object.defineProperty(EngravingRules.prototype, "DistanceBetweenNaturalAndSymbolWhenCancelling", {
  506. get: function () {
  507. return this.distanceBetweenNaturalAndSymbolWhenCancelling;
  508. },
  509. set: function (value) {
  510. this.distanceBetweenNaturalAndSymbolWhenCancelling = value;
  511. },
  512. enumerable: true,
  513. configurable: true
  514. });
  515. Object.defineProperty(EngravingRules.prototype, "NoteHelperLinesOffset", {
  516. get: function () {
  517. return this.noteHelperLinesOffset;
  518. },
  519. set: function (value) {
  520. this.noteHelperLinesOffset = value;
  521. },
  522. enumerable: true,
  523. configurable: true
  524. });
  525. Object.defineProperty(EngravingRules.prototype, "MeasureLeftMargin", {
  526. get: function () {
  527. return this.measureLeftMargin;
  528. },
  529. set: function (value) {
  530. this.measureLeftMargin = value;
  531. },
  532. enumerable: true,
  533. configurable: true
  534. });
  535. Object.defineProperty(EngravingRules.prototype, "MeasureRightMargin", {
  536. get: function () {
  537. return this.measureRightMargin;
  538. },
  539. set: function (value) {
  540. this.measureRightMargin = value;
  541. },
  542. enumerable: true,
  543. configurable: true
  544. });
  545. Object.defineProperty(EngravingRules.prototype, "DistanceBetweenLastInstructionAndRepetitionBarline", {
  546. get: function () {
  547. return this.distanceBetweenLastInstructionAndRepetitionBarline;
  548. },
  549. set: function (value) {
  550. this.distanceBetweenLastInstructionAndRepetitionBarline = value;
  551. },
  552. enumerable: true,
  553. configurable: true
  554. });
  555. Object.defineProperty(EngravingRules.prototype, "ArpeggioDistance", {
  556. get: function () {
  557. return this.arpeggioDistance;
  558. },
  559. set: function (value) {
  560. this.arpeggioDistance = value;
  561. },
  562. enumerable: true,
  563. configurable: true
  564. });
  565. Object.defineProperty(EngravingRules.prototype, "StaccatoShorteningFactor", {
  566. get: function () {
  567. return this.staccatoShorteningFactor;
  568. },
  569. set: function (value) {
  570. this.staccatoShorteningFactor = value;
  571. },
  572. enumerable: true,
  573. configurable: true
  574. });
  575. Object.defineProperty(EngravingRules.prototype, "IdealStemLength", {
  576. get: function () {
  577. return this.idealStemLength;
  578. },
  579. set: function (value) {
  580. this.idealStemLength = value;
  581. },
  582. enumerable: true,
  583. configurable: true
  584. });
  585. Object.defineProperty(EngravingRules.prototype, "StemNoteHeadBorderYOffset", {
  586. get: function () {
  587. return this.stemNoteHeadBorderYOffset;
  588. },
  589. set: function (value) {
  590. this.stemNoteHeadBorderYOffset = value;
  591. },
  592. enumerable: true,
  593. configurable: true
  594. });
  595. Object.defineProperty(EngravingRules.prototype, "StemWidth", {
  596. get: function () {
  597. return this.stemWidth;
  598. },
  599. set: function (value) {
  600. this.stemWidth = value;
  601. },
  602. enumerable: true,
  603. configurable: true
  604. });
  605. Object.defineProperty(EngravingRules.prototype, "StemMargin", {
  606. get: function () {
  607. return this.stemMargin;
  608. },
  609. set: function (value) {
  610. this.stemMargin = value;
  611. },
  612. enumerable: true,
  613. configurable: true
  614. });
  615. Object.defineProperty(EngravingRules.prototype, "StemMinLength", {
  616. get: function () {
  617. return this.stemMinLength;
  618. },
  619. set: function (value) {
  620. this.stemMinLength = value;
  621. },
  622. enumerable: true,
  623. configurable: true
  624. });
  625. Object.defineProperty(EngravingRules.prototype, "StemMaxLength", {
  626. get: function () {
  627. return this.stemMaxLength;
  628. },
  629. set: function (value) {
  630. this.stemMaxLength = value;
  631. },
  632. enumerable: true,
  633. configurable: true
  634. });
  635. Object.defineProperty(EngravingRules.prototype, "BeamSlopeMaxAngle", {
  636. get: function () {
  637. return this.beamSlopeMaxAngle;
  638. },
  639. set: function (value) {
  640. this.beamSlopeMaxAngle = value;
  641. },
  642. enumerable: true,
  643. configurable: true
  644. });
  645. Object.defineProperty(EngravingRules.prototype, "StemMinAllowedDistanceBetweenNoteHeadAndBeamLine", {
  646. get: function () {
  647. return this.stemMinAllowedDistanceBetweenNoteHeadAndBeamLine;
  648. },
  649. set: function (value) {
  650. this.stemMinAllowedDistanceBetweenNoteHeadAndBeamLine = value;
  651. },
  652. enumerable: true,
  653. configurable: true
  654. });
  655. Object.defineProperty(EngravingRules.prototype, "GraceNoteScalingFactor", {
  656. get: function () {
  657. return this.graceNoteScalingFactor;
  658. },
  659. set: function (value) {
  660. this.graceNoteScalingFactor = value;
  661. },
  662. enumerable: true,
  663. configurable: true
  664. });
  665. Object.defineProperty(EngravingRules.prototype, "GraceNoteXOffset", {
  666. get: function () {
  667. return this.graceNoteXOffset;
  668. },
  669. set: function (value) {
  670. this.graceNoteXOffset = value;
  671. },
  672. enumerable: true,
  673. configurable: true
  674. });
  675. Object.defineProperty(EngravingRules.prototype, "WedgeOpeningLength", {
  676. get: function () {
  677. return this.wedgeOpeningLength;
  678. },
  679. set: function (value) {
  680. this.wedgeOpeningLength = value;
  681. },
  682. enumerable: true,
  683. configurable: true
  684. });
  685. Object.defineProperty(EngravingRules.prototype, "WedgeMeasureEndOpeningLength", {
  686. get: function () {
  687. return this.wedgeMeasureEndOpeningLength;
  688. },
  689. set: function (value) {
  690. this.wedgeMeasureEndOpeningLength = value;
  691. },
  692. enumerable: true,
  693. configurable: true
  694. });
  695. Object.defineProperty(EngravingRules.prototype, "WedgeMeasureBeginOpeningLength", {
  696. get: function () {
  697. return this.wedgeMeasureBeginOpeningLength;
  698. },
  699. set: function (value) {
  700. this.wedgeMeasureBeginOpeningLength = value;
  701. },
  702. enumerable: true,
  703. configurable: true
  704. });
  705. Object.defineProperty(EngravingRules.prototype, "WedgePlacementAboveY", {
  706. get: function () {
  707. return this.wedgePlacementAboveY;
  708. },
  709. set: function (value) {
  710. this.wedgePlacementAboveY = value;
  711. },
  712. enumerable: true,
  713. configurable: true
  714. });
  715. Object.defineProperty(EngravingRules.prototype, "WedgePlacementBelowY", {
  716. get: function () {
  717. return this.wedgePlacementBelowY;
  718. },
  719. set: function (value) {
  720. this.wedgePlacementBelowY = value;
  721. },
  722. enumerable: true,
  723. configurable: true
  724. });
  725. Object.defineProperty(EngravingRules.prototype, "WedgeHorizontalMargin", {
  726. get: function () {
  727. return this.wedgeHorizontalMargin;
  728. },
  729. set: function (value) {
  730. this.wedgeHorizontalMargin = value;
  731. },
  732. enumerable: true,
  733. configurable: true
  734. });
  735. Object.defineProperty(EngravingRules.prototype, "WedgeVerticalMargin", {
  736. get: function () {
  737. return this.wedgeVerticalMargin;
  738. },
  739. set: function (value) {
  740. this.wedgeVerticalMargin = value;
  741. },
  742. enumerable: true,
  743. configurable: true
  744. });
  745. Object.defineProperty(EngravingRules.prototype, "DistanceOffsetBetweenTwoHorizontallyCrossedWedges", {
  746. get: function () {
  747. return this.distanceOffsetBetweenTwoHorizontallyCrossedWedges;
  748. },
  749. set: function (value) {
  750. this.distanceOffsetBetweenTwoHorizontallyCrossedWedges = value;
  751. },
  752. enumerable: true,
  753. configurable: true
  754. });
  755. Object.defineProperty(EngravingRules.prototype, "WedgeMinLength", {
  756. get: function () {
  757. return this.wedgeMinLength;
  758. },
  759. set: function (value) {
  760. this.wedgeMinLength = value;
  761. },
  762. enumerable: true,
  763. configurable: true
  764. });
  765. Object.defineProperty(EngravingRules.prototype, "DistanceBetweenAdjacentDynamics", {
  766. get: function () {
  767. return this.distanceBetweenAdjacentDynamics;
  768. },
  769. set: function (value) {
  770. this.distanceBetweenAdjacentDynamics = value;
  771. },
  772. enumerable: true,
  773. configurable: true
  774. });
  775. Object.defineProperty(EngravingRules.prototype, "TempoChangeMeasureValitidy", {
  776. get: function () {
  777. return this.tempoChangeMeasureValitidy;
  778. },
  779. set: function (value) {
  780. this.tempoChangeMeasureValitidy = value;
  781. },
  782. enumerable: true,
  783. configurable: true
  784. });
  785. Object.defineProperty(EngravingRules.prototype, "TempoContinousFactor", {
  786. get: function () {
  787. return this.tempoContinousFactor;
  788. },
  789. set: function (value) {
  790. this.tempoContinousFactor = value;
  791. },
  792. enumerable: true,
  793. configurable: true
  794. });
  795. Object.defineProperty(EngravingRules.prototype, "StaccatoScalingFactor", {
  796. get: function () {
  797. return this.staccatoScalingFactor;
  798. },
  799. set: function (value) {
  800. this.staccatoScalingFactor = value;
  801. },
  802. enumerable: true,
  803. configurable: true
  804. });
  805. Object.defineProperty(EngravingRules.prototype, "BetweenDotsDistance", {
  806. get: function () {
  807. return this.betweenDotsDistance;
  808. },
  809. set: function (value) {
  810. this.betweenDotsDistance = value;
  811. },
  812. enumerable: true,
  813. configurable: true
  814. });
  815. Object.defineProperty(EngravingRules.prototype, "OrnamentAccidentalScalingFactor", {
  816. get: function () {
  817. return this.ornamentAccidentalScalingFactor;
  818. },
  819. set: function (value) {
  820. this.ornamentAccidentalScalingFactor = value;
  821. },
  822. enumerable: true,
  823. configurable: true
  824. });
  825. Object.defineProperty(EngravingRules.prototype, "ChordSymbolTextHeight", {
  826. get: function () {
  827. return this.chordSymbolTextHeight;
  828. },
  829. set: function (value) {
  830. this.chordSymbolTextHeight = value;
  831. },
  832. enumerable: true,
  833. configurable: true
  834. });
  835. Object.defineProperty(EngravingRules.prototype, "FingeringLabelFontHeight", {
  836. get: function () {
  837. return this.fingeringLabelFontHeight;
  838. },
  839. set: function (value) {
  840. this.fingeringLabelFontHeight = value;
  841. },
  842. enumerable: true,
  843. configurable: true
  844. });
  845. Object.defineProperty(EngravingRules.prototype, "MeasureNumberLabelHeight", {
  846. get: function () {
  847. return this.measureNumberLabelHeight;
  848. },
  849. set: function (value) {
  850. this.measureNumberLabelHeight = value;
  851. },
  852. enumerable: true,
  853. configurable: true
  854. });
  855. Object.defineProperty(EngravingRules.prototype, "MeasureNumberLabelOffset", {
  856. get: function () {
  857. return this.measureNumberLabelOffset;
  858. },
  859. set: function (value) {
  860. this.measureNumberLabelOffset = value;
  861. },
  862. enumerable: true,
  863. configurable: true
  864. });
  865. Object.defineProperty(EngravingRules.prototype, "TupletNumberLabelHeight", {
  866. get: function () {
  867. return this.tupletNumberLabelHeight;
  868. },
  869. set: function (value) {
  870. this.tupletNumberLabelHeight = value;
  871. },
  872. enumerable: true,
  873. configurable: true
  874. });
  875. Object.defineProperty(EngravingRules.prototype, "TupletNumberYOffset", {
  876. get: function () {
  877. return this.tupletNumberYOffset;
  878. },
  879. set: function (value) {
  880. this.tupletNumberYOffset = value;
  881. },
  882. enumerable: true,
  883. configurable: true
  884. });
  885. Object.defineProperty(EngravingRules.prototype, "LabelMarginBorderFactor", {
  886. get: function () {
  887. return this.labelMarginBorderFactor;
  888. },
  889. set: function (value) {
  890. this.labelMarginBorderFactor = value;
  891. },
  892. enumerable: true,
  893. configurable: true
  894. });
  895. Object.defineProperty(EngravingRules.prototype, "TupletVerticalLineLength", {
  896. get: function () {
  897. return this.tupletVerticalLineLength;
  898. },
  899. set: function (value) {
  900. this.tupletVerticalLineLength = value;
  901. },
  902. enumerable: true,
  903. configurable: true
  904. });
  905. Object.defineProperty(EngravingRules.prototype, "RepetitionEndingLabelHeight", {
  906. get: function () {
  907. return this.repetitionEndingLabelHeight;
  908. },
  909. set: function (value) {
  910. this.repetitionEndingLabelHeight = value;
  911. },
  912. enumerable: true,
  913. configurable: true
  914. });
  915. Object.defineProperty(EngravingRules.prototype, "RepetitionEndingLabelXOffset", {
  916. get: function () {
  917. return this.repetitionEndingLabelXOffset;
  918. },
  919. set: function (value) {
  920. this.repetitionEndingLabelXOffset = value;
  921. },
  922. enumerable: true,
  923. configurable: true
  924. });
  925. Object.defineProperty(EngravingRules.prototype, "RepetitionEndingLabelYOffset", {
  926. get: function () {
  927. return this.repetitionEndingLabelYOffset;
  928. },
  929. set: function (value) {
  930. this.repetitionEndingLabelYOffset = value;
  931. },
  932. enumerable: true,
  933. configurable: true
  934. });
  935. Object.defineProperty(EngravingRules.prototype, "RepetitionEndingLineYLowerOffset", {
  936. get: function () {
  937. return this.repetitionEndingLineYLowerOffset;
  938. },
  939. set: function (value) {
  940. this.repetitionEndingLineYLowerOffset = value;
  941. },
  942. enumerable: true,
  943. configurable: true
  944. });
  945. Object.defineProperty(EngravingRules.prototype, "RepetitionEndingLineYUpperOffset", {
  946. get: function () {
  947. return this.repetitionEndingLineYUpperOffset;
  948. },
  949. set: function (value) {
  950. this.repetitionEndingLineYUpperOffset = value;
  951. },
  952. enumerable: true,
  953. configurable: true
  954. });
  955. Object.defineProperty(EngravingRules.prototype, "LyricsHeight", {
  956. get: function () {
  957. return this.lyricsHeight;
  958. },
  959. set: function (value) {
  960. this.lyricsHeight = value;
  961. },
  962. enumerable: true,
  963. configurable: true
  964. });
  965. Object.defineProperty(EngravingRules.prototype, "VerticalBetweenLyricsDistance", {
  966. get: function () {
  967. return this.verticalBetweenLyricsDistance;
  968. },
  969. set: function (value) {
  970. this.verticalBetweenLyricsDistance = value;
  971. },
  972. enumerable: true,
  973. configurable: true
  974. });
  975. Object.defineProperty(EngravingRules.prototype, "BetweenSyllabelMaximumDistance", {
  976. get: function () {
  977. return this.betweenSyllabelMaximumDistance;
  978. },
  979. set: function (value) {
  980. this.betweenSyllabelMaximumDistance = value;
  981. },
  982. enumerable: true,
  983. configurable: true
  984. });
  985. Object.defineProperty(EngravingRules.prototype, "MinimumDistanceBetweenDashes", {
  986. get: function () {
  987. return this.minimumDistanceBetweenDashes;
  988. },
  989. set: function (value) {
  990. this.minimumDistanceBetweenDashes = value;
  991. },
  992. enumerable: true,
  993. configurable: true
  994. });
  995. Object.defineProperty(EngravingRules.prototype, "BezierCurveStepSize", {
  996. get: function () {
  997. return this.bezierCurveStepSize;
  998. },
  999. set: function (value) {
  1000. this.bezierCurveStepSize = value;
  1001. },
  1002. enumerable: true,
  1003. configurable: true
  1004. });
  1005. Object.defineProperty(EngravingRules.prototype, "TPow3", {
  1006. get: function () {
  1007. return this.tPower3;
  1008. },
  1009. set: function (value) {
  1010. this.tPower3 = value;
  1011. },
  1012. enumerable: true,
  1013. configurable: true
  1014. });
  1015. Object.defineProperty(EngravingRules.prototype, "OneMinusTPow3", {
  1016. get: function () {
  1017. return this.oneMinusTPower3;
  1018. },
  1019. set: function (value) {
  1020. this.oneMinusTPower3 = value;
  1021. },
  1022. enumerable: true,
  1023. configurable: true
  1024. });
  1025. Object.defineProperty(EngravingRules.prototype, "BezierFactorOne", {
  1026. get: function () {
  1027. return this.factorOne;
  1028. },
  1029. set: function (value) {
  1030. this.factorOne = value;
  1031. },
  1032. enumerable: true,
  1033. configurable: true
  1034. });
  1035. Object.defineProperty(EngravingRules.prototype, "BezierFactorTwo", {
  1036. get: function () {
  1037. return this.factorTwo;
  1038. },
  1039. set: function (value) {
  1040. this.factorTwo = value;
  1041. },
  1042. enumerable: true,
  1043. configurable: true
  1044. });
  1045. Object.defineProperty(EngravingRules.prototype, "TieGhostObjectWidth", {
  1046. get: function () {
  1047. return this.tieGhostObjectWidth;
  1048. },
  1049. set: function (value) {
  1050. this.tieGhostObjectWidth = value;
  1051. },
  1052. enumerable: true,
  1053. configurable: true
  1054. });
  1055. Object.defineProperty(EngravingRules.prototype, "TieYPositionOffsetFactor", {
  1056. get: function () {
  1057. return this.tieYPositionOffsetFactor;
  1058. },
  1059. set: function (value) {
  1060. this.tieYPositionOffsetFactor = value;
  1061. },
  1062. enumerable: true,
  1063. configurable: true
  1064. });
  1065. Object.defineProperty(EngravingRules.prototype, "MinimumNeededXspaceForTieGhostObject", {
  1066. get: function () {
  1067. return this.minimumNeededXspaceForTieGhostObject;
  1068. },
  1069. set: function (value) {
  1070. this.minimumNeededXspaceForTieGhostObject = value;
  1071. },
  1072. enumerable: true,
  1073. configurable: true
  1074. });
  1075. Object.defineProperty(EngravingRules.prototype, "TieHeightMinimum", {
  1076. get: function () {
  1077. return this.tieHeightMinimum;
  1078. },
  1079. set: function (value) {
  1080. this.tieHeightMinimum = value;
  1081. },
  1082. enumerable: true,
  1083. configurable: true
  1084. });
  1085. Object.defineProperty(EngravingRules.prototype, "TieHeightMaximum", {
  1086. get: function () {
  1087. return this.tieHeightMaximum;
  1088. },
  1089. set: function (value) {
  1090. this.tieHeightMaximum = value;
  1091. },
  1092. enumerable: true,
  1093. configurable: true
  1094. });
  1095. Object.defineProperty(EngravingRules.prototype, "TieHeightInterpolationK", {
  1096. get: function () {
  1097. return this.tieHeightInterpolationK;
  1098. },
  1099. set: function (value) {
  1100. this.tieHeightInterpolationK = value;
  1101. },
  1102. enumerable: true,
  1103. configurable: true
  1104. });
  1105. Object.defineProperty(EngravingRules.prototype, "TieHeightInterpolationD", {
  1106. get: function () {
  1107. return this.tieHeightInterpolationD;
  1108. },
  1109. set: function (value) {
  1110. this.tieHeightInterpolationD = value;
  1111. },
  1112. enumerable: true,
  1113. configurable: true
  1114. });
  1115. Object.defineProperty(EngravingRules.prototype, "SlurNoteHeadYOffset", {
  1116. get: function () {
  1117. return this.slurNoteHeadYOffset;
  1118. },
  1119. set: function (value) {
  1120. this.slurNoteHeadYOffset = value;
  1121. },
  1122. enumerable: true,
  1123. configurable: true
  1124. });
  1125. Object.defineProperty(EngravingRules.prototype, "SlurStemXOffset", {
  1126. get: function () {
  1127. return this.slurStemXOffset;
  1128. },
  1129. set: function (value) {
  1130. this.slurStemXOffset = value;
  1131. },
  1132. enumerable: true,
  1133. configurable: true
  1134. });
  1135. Object.defineProperty(EngravingRules.prototype, "SlurSlopeMaxAngle", {
  1136. get: function () {
  1137. return this.slurSlopeMaxAngle;
  1138. },
  1139. set: function (value) {
  1140. this.slurSlopeMaxAngle = value;
  1141. },
  1142. enumerable: true,
  1143. configurable: true
  1144. });
  1145. Object.defineProperty(EngravingRules.prototype, "SlurTangentMinAngle", {
  1146. get: function () {
  1147. return this.slurTangentMinAngle;
  1148. },
  1149. set: function (value) {
  1150. this.slurTangentMinAngle = value;
  1151. },
  1152. enumerable: true,
  1153. configurable: true
  1154. });
  1155. Object.defineProperty(EngravingRules.prototype, "SlurTangentMaxAngle", {
  1156. get: function () {
  1157. return this.slurTangentMaxAngle;
  1158. },
  1159. set: function (value) {
  1160. this.slurTangentMaxAngle = value;
  1161. },
  1162. enumerable: true,
  1163. configurable: true
  1164. });
  1165. Object.defineProperty(EngravingRules.prototype, "SlursStartingAtSameStaffEntryYOffset", {
  1166. get: function () {
  1167. return this.slursStartingAtSameStaffEntryYOffset;
  1168. },
  1169. set: function (value) {
  1170. this.slursStartingAtSameStaffEntryYOffset = value;
  1171. },
  1172. enumerable: true,
  1173. configurable: true
  1174. });
  1175. Object.defineProperty(EngravingRules.prototype, "InstantaniousTempoTextHeight", {
  1176. get: function () {
  1177. return this.instantaniousTempoTextHeight;
  1178. },
  1179. set: function (value) {
  1180. this.instantaniousTempoTextHeight = value;
  1181. },
  1182. enumerable: true,
  1183. configurable: true
  1184. });
  1185. Object.defineProperty(EngravingRules.prototype, "ContinuousDynamicTextHeight", {
  1186. get: function () {
  1187. return this.continuousDynamicTextHeight;
  1188. },
  1189. set: function (value) {
  1190. this.continuousDynamicTextHeight = value;
  1191. },
  1192. enumerable: true,
  1193. configurable: true
  1194. });
  1195. Object.defineProperty(EngravingRules.prototype, "MoodTextHeight", {
  1196. get: function () {
  1197. return this.moodTextHeight;
  1198. },
  1199. set: function (value) {
  1200. this.moodTextHeight = value;
  1201. },
  1202. enumerable: true,
  1203. configurable: true
  1204. });
  1205. Object.defineProperty(EngravingRules.prototype, "ContinuousTempoTextHeight", {
  1206. get: function () {
  1207. return this.continuousTempoTextHeight;
  1208. },
  1209. set: function (value) {
  1210. this.continuousTempoTextHeight = value;
  1211. },
  1212. enumerable: true,
  1213. configurable: true
  1214. });
  1215. Object.defineProperty(EngravingRules.prototype, "UnknownTextHeight", {
  1216. get: function () {
  1217. return this.unknownTextHeight;
  1218. },
  1219. set: function (value) {
  1220. this.unknownTextHeight = value;
  1221. },
  1222. enumerable: true,
  1223. configurable: true
  1224. });
  1225. Object.defineProperty(EngravingRules.prototype, "StaffLineWidth", {
  1226. get: function () {
  1227. return this.staffLineWidth;
  1228. },
  1229. set: function (value) {
  1230. this.staffLineWidth = value;
  1231. },
  1232. enumerable: true,
  1233. configurable: true
  1234. });
  1235. Object.defineProperty(EngravingRules.prototype, "LedgerLineWidth", {
  1236. get: function () {
  1237. return this.ledgerLineWidth;
  1238. },
  1239. set: function (value) {
  1240. this.ledgerLineWidth = value;
  1241. },
  1242. enumerable: true,
  1243. configurable: true
  1244. });
  1245. Object.defineProperty(EngravingRules.prototype, "WedgeLineWidth", {
  1246. get: function () {
  1247. return this.wedgeLineWidth;
  1248. },
  1249. set: function (value) {
  1250. this.wedgeLineWidth = value;
  1251. },
  1252. enumerable: true,
  1253. configurable: true
  1254. });
  1255. Object.defineProperty(EngravingRules.prototype, "TupletLineWidth", {
  1256. get: function () {
  1257. return this.tupletLineWidth;
  1258. },
  1259. set: function (value) {
  1260. this.tupletLineWidth = value;
  1261. },
  1262. enumerable: true,
  1263. configurable: true
  1264. });
  1265. Object.defineProperty(EngravingRules.prototype, "LyricUnderscoreLineWidth", {
  1266. get: function () {
  1267. return this.lyricUnderscoreLineWidth;
  1268. },
  1269. set: function (value) {
  1270. this.lyricUnderscoreLineWidth = value;
  1271. },
  1272. enumerable: true,
  1273. configurable: true
  1274. });
  1275. Object.defineProperty(EngravingRules.prototype, "SystemThinLineWidth", {
  1276. get: function () {
  1277. return this.systemThinLineWidth;
  1278. },
  1279. set: function (value) {
  1280. this.systemThinLineWidth = value;
  1281. },
  1282. enumerable: true,
  1283. configurable: true
  1284. });
  1285. Object.defineProperty(EngravingRules.prototype, "SystemBoldLineWidth", {
  1286. get: function () {
  1287. return this.systemBoldLineWidth;
  1288. },
  1289. set: function (value) {
  1290. this.systemBoldLineWidth = value;
  1291. },
  1292. enumerable: true,
  1293. configurable: true
  1294. });
  1295. Object.defineProperty(EngravingRules.prototype, "SystemRepetitionEndingLineWidth", {
  1296. get: function () {
  1297. return this.systemRepetitionEndingLineWidth;
  1298. },
  1299. set: function (value) {
  1300. this.systemRepetitionEndingLineWidth = value;
  1301. },
  1302. enumerable: true,
  1303. configurable: true
  1304. });
  1305. Object.defineProperty(EngravingRules.prototype, "SystemDotWidth", {
  1306. get: function () {
  1307. return this.systemDotWidth;
  1308. },
  1309. set: function (value) {
  1310. this.systemDotWidth = value;
  1311. },
  1312. enumerable: true,
  1313. configurable: true
  1314. });
  1315. Object.defineProperty(EngravingRules.prototype, "DistanceBetweenVerticalSystemLines", {
  1316. get: function () {
  1317. return this.distanceBetweenVerticalSystemLines;
  1318. },
  1319. set: function (value) {
  1320. this.distanceBetweenVerticalSystemLines = value;
  1321. },
  1322. enumerable: true,
  1323. configurable: true
  1324. });
  1325. Object.defineProperty(EngravingRules.prototype, "DistanceBetweenDotAndLine", {
  1326. get: function () {
  1327. return this.distanceBetweenDotAndLine;
  1328. },
  1329. set: function (value) {
  1330. this.distanceBetweenDotAndLine = value;
  1331. },
  1332. enumerable: true,
  1333. configurable: true
  1334. });
  1335. Object.defineProperty(EngravingRules.prototype, "OctaveShiftLineWidth", {
  1336. get: function () {
  1337. return this.octaveShiftLineWidth;
  1338. },
  1339. set: function (value) {
  1340. this.octaveShiftLineWidth = value;
  1341. },
  1342. enumerable: true,
  1343. configurable: true
  1344. });
  1345. Object.defineProperty(EngravingRules.prototype, "OctaveShiftVerticalLineLength", {
  1346. get: function () {
  1347. return this.octaveShiftVerticalLineLength;
  1348. },
  1349. set: function (value) {
  1350. this.octaveShiftVerticalLineLength = value;
  1351. },
  1352. enumerable: true,
  1353. configurable: true
  1354. });
  1355. Object.defineProperty(EngravingRules.prototype, "GraceLineWidth", {
  1356. get: function () {
  1357. return this.graceLineWidth;
  1358. },
  1359. set: function (value) {
  1360. this.graceLineWidth = value;
  1361. },
  1362. enumerable: true,
  1363. configurable: true
  1364. });
  1365. Object.defineProperty(EngravingRules.prototype, "MinimumStaffLineDistance", {
  1366. get: function () {
  1367. return this.minimumStaffLineDistance;
  1368. },
  1369. set: function (value) {
  1370. this.minimumStaffLineDistance = value;
  1371. },
  1372. enumerable: true,
  1373. configurable: true
  1374. });
  1375. Object.defineProperty(EngravingRules.prototype, "MinimumCrossedBeamDifferenceMargin", {
  1376. get: function () {
  1377. return this.minimumCrossedBeamDifferenceMargin;
  1378. },
  1379. set: function (value) {
  1380. this.minimumCrossedBeamDifferenceMargin = value;
  1381. },
  1382. enumerable: true,
  1383. configurable: true
  1384. });
  1385. Object.defineProperty(EngravingRules.prototype, "DisplacedNoteMargin", {
  1386. get: function () {
  1387. return this.displacedNoteMargin;
  1388. },
  1389. set: function (value) {
  1390. this.displacedNoteMargin = value;
  1391. },
  1392. enumerable: true,
  1393. configurable: true
  1394. });
  1395. Object.defineProperty(EngravingRules.prototype, "MinNoteDistance", {
  1396. get: function () {
  1397. return this.minNoteDistance;
  1398. },
  1399. set: function (value) {
  1400. this.minNoteDistance = value;
  1401. },
  1402. enumerable: true,
  1403. configurable: true
  1404. });
  1405. Object.defineProperty(EngravingRules.prototype, "SubMeasureXSpacingThreshold", {
  1406. get: function () {
  1407. return this.subMeasureXSpacingThreshold;
  1408. },
  1409. set: function (value) {
  1410. this.subMeasureXSpacingThreshold = value;
  1411. },
  1412. enumerable: true,
  1413. configurable: true
  1414. });
  1415. Object.defineProperty(EngravingRules.prototype, "MeasureDynamicsMaxScalingFactor", {
  1416. get: function () {
  1417. return this.measureDynamicsMaxScalingFactor;
  1418. },
  1419. set: function (value) {
  1420. this.measureDynamicsMaxScalingFactor = value;
  1421. },
  1422. enumerable: true,
  1423. configurable: true
  1424. });
  1425. Object.defineProperty(EngravingRules.prototype, "MaxInstructionsConstValue", {
  1426. get: function () {
  1427. return this.maxInstructionsConstValue;
  1428. },
  1429. set: function (value) {
  1430. this.maxInstructionsConstValue = value;
  1431. },
  1432. enumerable: true,
  1433. configurable: true
  1434. });
  1435. Object.defineProperty(EngravingRules.prototype, "NoteDistances", {
  1436. get: function () {
  1437. return this.noteDistances;
  1438. },
  1439. set: function (value) {
  1440. this.noteDistances = value;
  1441. },
  1442. enumerable: true,
  1443. configurable: true
  1444. });
  1445. Object.defineProperty(EngravingRules.prototype, "NoteDistancesScalingFactors", {
  1446. get: function () {
  1447. return this.noteDistancesScalingFactors;
  1448. },
  1449. set: function (value) {
  1450. this.noteDistancesScalingFactors = value;
  1451. },
  1452. enumerable: true,
  1453. configurable: true
  1454. });
  1455. Object.defineProperty(EngravingRules.prototype, "DurationDistanceDict", {
  1456. get: function () {
  1457. return this.durationDistanceDict;
  1458. },
  1459. enumerable: true,
  1460. configurable: true
  1461. });
  1462. Object.defineProperty(EngravingRules.prototype, "DurationScalingDistanceDict", {
  1463. get: function () {
  1464. return this.durationScalingDistanceDict;
  1465. },
  1466. enumerable: true,
  1467. configurable: true
  1468. });
  1469. EngravingRules.prototype.populateDictionaries = function () {
  1470. for (var i = 0; i < this.noteDistances.length; i++) {
  1471. switch (i) {
  1472. case 0:
  1473. this.durationDistanceDict[0.015625] = this.noteDistances[i];
  1474. this.durationScalingDistanceDict[0.015625] = this.noteDistancesScalingFactors[i];
  1475. break;
  1476. case 1:
  1477. this.durationDistanceDict[0.03125] = this.noteDistances[i];
  1478. this.durationScalingDistanceDict[0.03125] = this.noteDistancesScalingFactors[i];
  1479. break;
  1480. case 2:
  1481. this.durationDistanceDict[0.0625] = this.noteDistances[i];
  1482. this.durationScalingDistanceDict[0.0625] = this.noteDistancesScalingFactors[i];
  1483. break;
  1484. case 3:
  1485. this.durationDistanceDict[0.125] = this.noteDistances[i];
  1486. this.durationScalingDistanceDict[0.125] = this.noteDistancesScalingFactors[i];
  1487. break;
  1488. case 4:
  1489. this.durationDistanceDict[0.25] = this.noteDistances[i];
  1490. this.durationScalingDistanceDict[0.25] = this.noteDistancesScalingFactors[i];
  1491. break;
  1492. case 5:
  1493. this.durationDistanceDict[0.5] = this.noteDistances[i];
  1494. this.durationScalingDistanceDict[0.5] = this.noteDistancesScalingFactors[i];
  1495. break;
  1496. case 6:
  1497. this.durationDistanceDict[1.0] = this.noteDistances[i];
  1498. this.durationScalingDistanceDict[1.0] = this.noteDistancesScalingFactors[i];
  1499. break;
  1500. case 7:
  1501. this.durationDistanceDict[2.0] = this.noteDistances[i];
  1502. this.durationScalingDistanceDict[2.0] = this.noteDistancesScalingFactors[i];
  1503. break;
  1504. default:
  1505. }
  1506. }
  1507. };
  1508. EngravingRules.prototype.calculateCurveParametersArrays = function () {
  1509. this.tPower3 = new Array(this.bezierCurveStepSize);
  1510. this.oneMinusTPower3 = new Array(this.bezierCurveStepSize);
  1511. this.factorOne = new Array(this.bezierCurveStepSize);
  1512. this.factorTwo = new Array(this.bezierCurveStepSize);
  1513. for (var i = 0; i < this.bezierCurveStepSize; i++) {
  1514. var t = i / this.bezierCurveStepSize;
  1515. this.tPower3[i] = Math.pow(t, 3);
  1516. this.oneMinusTPower3[i] = Math.pow((1 - t), 3);
  1517. this.factorOne[i] = 3 * Math.pow((1 - t), 2) * t;
  1518. this.factorTwo[i] = 3 * (1 - t) * Math.pow(t, 2);
  1519. }
  1520. };
  1521. EngravingRules.unit = 1.0;
  1522. return EngravingRules;
  1523. }());
  1524. exports.EngravingRules = EngravingRules;