maialib 1.5.0__cp39-cp39-musllinux_1_2_x86_64.whl → 1.6.1__cp39-cp39-musllinux_1_2_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of maialib might be problematic. Click here for more details.

@@ -3,7 +3,6 @@ from maialib.maiacore.maiacore import Barline
3
3
  from maialib.maiacore.maiacore import Chord
4
4
  from maialib.maiacore.maiacore import Clef
5
5
  from maialib.maiacore.maiacore import ClefSign
6
- from maialib.maiacore.maiacore import Duration
7
6
  from maialib.maiacore.maiacore import HeapData
8
7
  from maialib.maiacore.maiacore import Helper
9
8
  from maialib.maiacore.maiacore import Interval
@@ -13,10 +12,12 @@ from maialib.maiacore.maiacore import Note
13
12
  from maialib.maiacore.maiacore import NoteData
14
13
  from maialib.maiacore.maiacore import NoteDataHeap
15
14
  from maialib.maiacore.maiacore import Part
15
+ from maialib.maiacore.maiacore import RhythmFigure
16
16
  from maialib.maiacore.maiacore import Score
17
17
  from maialib.maiacore.maiacore import ScoreCollection
18
+ from maialib.maiacore.maiacore import TimeSignature
18
19
  from . import maiacore
19
- __all__ = ['Barline', 'C', 'Chord', 'Clef', 'ClefSign', 'Duration', 'F', 'G', 'HeapData', 'Helper', 'Interval', 'Key', 'Measure', 'Note', 'NoteData', 'NoteDataHeap', 'P', 'Part', 'Score', 'ScoreCollection', 'maiacore']
20
+ __all__ = ['Barline', 'C', 'Chord', 'Clef', 'ClefSign', 'F', 'G', 'HeapData', 'Helper', 'Interval', 'Key', 'Measure', 'Note', 'NoteData', 'NoteDataHeap', 'P', 'Part', 'RhythmFigure', 'Score', 'ScoreCollection', 'TimeSignature', 'maiacore']
20
21
  C: maiacore.ClefSign # value = <ClefSign.C: 2>
21
22
  F: maiacore.ClefSign # value = <ClefSign.F: 1>
22
23
  G: maiacore.ClefSign # value = <ClefSign.G: 0>
@@ -1,9 +1,9 @@
1
1
  """
2
- Key class binding
2
+ TimeSignature class binding
3
3
  """
4
4
  from __future__ import annotations
5
5
  import typing
6
- __all__ = ['Barline', 'C', 'Chord', 'Clef', 'ClefSign', 'Duration', 'F', 'G', 'HeapData', 'Helper', 'Interval', 'Key', 'Measure', 'Note', 'NoteData', 'NoteDataHeap', 'P', 'Part', 'Score', 'ScoreCollection']
6
+ __all__ = ['Barline', 'C', 'Chord', 'Clef', 'ClefSign', 'F', 'G', 'HeapData', 'Helper', 'Interval', 'Key', 'Measure', 'Note', 'NoteData', 'NoteDataHeap', 'P', 'Part', 'RhythmFigure', 'Score', 'ScoreCollection', 'TimeSignature']
7
7
  class Barline:
8
8
  def __hash__(self) -> int:
9
9
  ...
@@ -303,7 +303,11 @@ class Chord:
303
303
  ...
304
304
  def removeTopNote(self) -> None:
305
305
  ...
306
- def setDurationTicks(self, durationTicks: int) -> None:
306
+ @typing.overload
307
+ def setDuration(self, duration: Duration) -> None:
308
+ ...
309
+ @typing.overload
310
+ def setDuration(self, quarterDuration: float, divisionsPerQuarterNote: int = 256) -> None:
307
311
  ...
308
312
  def size(self) -> int:
309
313
  ...
@@ -377,173 +381,10 @@ class ClefSign:
377
381
  @property
378
382
  def value(self) -> int:
379
383
  ...
380
- class Duration:
381
- """
382
- Members:
383
-
384
- MAXIMA_DOT_DOT
385
-
386
- MAXIMA_DOT
387
-
388
- MAXIMA
389
-
390
- LONG_DOT_DOT
391
-
392
- LONG_DOT
393
-
394
- LONG
395
-
396
- BREVE_DOT_DOT
397
-
398
- BREVE_DOT
399
-
400
- BREVE
401
-
402
- WHOLE_DOT_DOT
403
-
404
- WHOLE_DOT
405
-
406
- WHOLE
407
-
408
- HALF_DOT_DOT
409
-
410
- HALF_DOT
411
-
412
- HALF
413
-
414
- QUARTER_DOT_DOT
415
-
416
- QUARTER_DOT
417
-
418
- QUARTER
419
-
420
- EIGHTH_DOT_DOT
421
-
422
- EIGHTH_DOT
423
-
424
- EIGHTH
425
-
426
- N16TH_DOT_DOT
427
-
428
- N16TH_DOT
429
-
430
- N16TH
431
-
432
- N32ND_DOT_DOT
433
-
434
- N32ND_DOT
435
-
436
- N32ND
437
-
438
- N64TH_DOT_DOT
439
-
440
- N64TH_DOT
441
-
442
- N64TH
443
-
444
- N128TH_DOT_DOT
445
-
446
- N128TH_DOT
447
-
448
- N128TH
449
-
450
- N256TH_DOT_DOT
451
-
452
- N256TH_DOT
453
-
454
- N256TH
455
-
456
- N512TH_DOT_DOT
457
-
458
- N512TH_DOT
459
-
460
- N512TH
461
-
462
- N1024TH_DOT_DOT
463
-
464
- N1024TH_DOT
465
-
466
- N1024TH
467
- """
468
- BREVE: typing.ClassVar[Duration] # value = <Duration.BREVE: 34>
469
- BREVE_DOT: typing.ClassVar[Duration] # value = <Duration.BREVE_DOT: 35>
470
- BREVE_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.BREVE_DOT_DOT: 36>
471
- EIGHTH: typing.ClassVar[Duration] # value = <Duration.EIGHTH: 22>
472
- EIGHTH_DOT: typing.ClassVar[Duration] # value = <Duration.EIGHTH_DOT: 23>
473
- EIGHTH_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.EIGHTH_DOT_DOT: 24>
474
- HALF: typing.ClassVar[Duration] # value = <Duration.HALF: 28>
475
- HALF_DOT: typing.ClassVar[Duration] # value = <Duration.HALF_DOT: 29>
476
- HALF_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.HALF_DOT_DOT: 30>
477
- LONG: typing.ClassVar[Duration] # value = <Duration.LONG: 37>
478
- LONG_DOT: typing.ClassVar[Duration] # value = <Duration.LONG_DOT: 38>
479
- LONG_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.LONG_DOT_DOT: 39>
480
- MAXIMA: typing.ClassVar[Duration] # value = <Duration.MAXIMA: 40>
481
- MAXIMA_DOT: typing.ClassVar[Duration] # value = <Duration.MAXIMA_DOT: 41>
482
- MAXIMA_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.MAXIMA_DOT_DOT: 42>
483
- N1024TH: typing.ClassVar[Duration] # value = <Duration.N1024TH: 1>
484
- N1024TH_DOT: typing.ClassVar[Duration] # value = <Duration.N1024TH_DOT: 2>
485
- N1024TH_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.N1024TH_DOT_DOT: 3>
486
- N128TH: typing.ClassVar[Duration] # value = <Duration.N128TH: 10>
487
- N128TH_DOT: typing.ClassVar[Duration] # value = <Duration.N128TH_DOT: 11>
488
- N128TH_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.N128TH_DOT_DOT: 12>
489
- N16TH: typing.ClassVar[Duration] # value = <Duration.N16TH: 19>
490
- N16TH_DOT: typing.ClassVar[Duration] # value = <Duration.N16TH_DOT: 20>
491
- N16TH_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.N16TH_DOT_DOT: 21>
492
- N256TH: typing.ClassVar[Duration] # value = <Duration.N256TH: 7>
493
- N256TH_DOT: typing.ClassVar[Duration] # value = <Duration.N256TH_DOT: 8>
494
- N256TH_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.N256TH_DOT_DOT: 9>
495
- N32ND: typing.ClassVar[Duration] # value = <Duration.N32ND: 16>
496
- N32ND_DOT: typing.ClassVar[Duration] # value = <Duration.N32ND_DOT: 17>
497
- N32ND_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.N32ND_DOT_DOT: 18>
498
- N512TH: typing.ClassVar[Duration] # value = <Duration.N512TH: 4>
499
- N512TH_DOT: typing.ClassVar[Duration] # value = <Duration.N512TH_DOT: 5>
500
- N512TH_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.N512TH_DOT_DOT: 6>
501
- N64TH: typing.ClassVar[Duration] # value = <Duration.N64TH: 13>
502
- N64TH_DOT: typing.ClassVar[Duration] # value = <Duration.N64TH_DOT: 14>
503
- N64TH_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.N64TH_DOT_DOT: 15>
504
- QUARTER: typing.ClassVar[Duration] # value = <Duration.QUARTER: 25>
505
- QUARTER_DOT: typing.ClassVar[Duration] # value = <Duration.QUARTER_DOT: 26>
506
- QUARTER_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.QUARTER_DOT_DOT: 27>
507
- WHOLE: typing.ClassVar[Duration] # value = <Duration.WHOLE: 31>
508
- WHOLE_DOT: typing.ClassVar[Duration] # value = <Duration.WHOLE_DOT: 32>
509
- WHOLE_DOT_DOT: typing.ClassVar[Duration] # value = <Duration.WHOLE_DOT_DOT: 33>
510
- __members__: typing.ClassVar[dict[str, Duration]] # value = {'MAXIMA_DOT_DOT': <Duration.MAXIMA_DOT_DOT: 42>, 'MAXIMA_DOT': <Duration.MAXIMA_DOT: 41>, 'MAXIMA': <Duration.MAXIMA: 40>, 'LONG_DOT_DOT': <Duration.LONG_DOT_DOT: 39>, 'LONG_DOT': <Duration.LONG_DOT: 38>, 'LONG': <Duration.LONG: 37>, 'BREVE_DOT_DOT': <Duration.BREVE_DOT_DOT: 36>, 'BREVE_DOT': <Duration.BREVE_DOT: 35>, 'BREVE': <Duration.BREVE: 34>, 'WHOLE_DOT_DOT': <Duration.WHOLE_DOT_DOT: 33>, 'WHOLE_DOT': <Duration.WHOLE_DOT: 32>, 'WHOLE': <Duration.WHOLE: 31>, 'HALF_DOT_DOT': <Duration.HALF_DOT_DOT: 30>, 'HALF_DOT': <Duration.HALF_DOT: 29>, 'HALF': <Duration.HALF: 28>, 'QUARTER_DOT_DOT': <Duration.QUARTER_DOT_DOT: 27>, 'QUARTER_DOT': <Duration.QUARTER_DOT: 26>, 'QUARTER': <Duration.QUARTER: 25>, 'EIGHTH_DOT_DOT': <Duration.EIGHTH_DOT_DOT: 24>, 'EIGHTH_DOT': <Duration.EIGHTH_DOT: 23>, 'EIGHTH': <Duration.EIGHTH: 22>, 'N16TH_DOT_DOT': <Duration.N16TH_DOT_DOT: 21>, 'N16TH_DOT': <Duration.N16TH_DOT: 20>, 'N16TH': <Duration.N16TH: 19>, 'N32ND_DOT_DOT': <Duration.N32ND_DOT_DOT: 18>, 'N32ND_DOT': <Duration.N32ND_DOT: 17>, 'N32ND': <Duration.N32ND: 16>, 'N64TH_DOT_DOT': <Duration.N64TH_DOT_DOT: 15>, 'N64TH_DOT': <Duration.N64TH_DOT: 14>, 'N64TH': <Duration.N64TH: 13>, 'N128TH_DOT_DOT': <Duration.N128TH_DOT_DOT: 12>, 'N128TH_DOT': <Duration.N128TH_DOT: 11>, 'N128TH': <Duration.N128TH: 10>, 'N256TH_DOT_DOT': <Duration.N256TH_DOT_DOT: 9>, 'N256TH_DOT': <Duration.N256TH_DOT: 8>, 'N256TH': <Duration.N256TH: 7>, 'N512TH_DOT_DOT': <Duration.N512TH_DOT_DOT: 6>, 'N512TH_DOT': <Duration.N512TH_DOT: 5>, 'N512TH': <Duration.N512TH: 4>, 'N1024TH_DOT_DOT': <Duration.N1024TH_DOT_DOT: 3>, 'N1024TH_DOT': <Duration.N1024TH_DOT: 2>, 'N1024TH': <Duration.N1024TH: 1>}
511
- def __eq__(self, other: typing.Any) -> bool:
512
- ...
513
- def __getstate__(self) -> int:
514
- ...
515
- def __hash__(self) -> int:
516
- ...
517
- def __index__(self) -> int:
518
- ...
519
- def __init__(self, value: int) -> None:
520
- ...
521
- def __int__(self) -> int:
522
- ...
523
- def __ne__(self, other: typing.Any) -> bool:
524
- ...
525
- def __repr__(self) -> str:
526
- ...
527
- def __setstate__(self, state: int) -> None:
528
- ...
529
- def __str__(self) -> str:
530
- ...
531
- @property
532
- def name(self) -> str:
533
- ...
534
- @property
535
- def value(self) -> int:
536
- ...
537
384
  class HeapData:
538
385
  pass
539
386
  class Helper:
540
387
  @staticmethod
541
- def duration2Ticks(duration: Duration, divisionsPerQuarterNote: int = 265) -> int:
542
- ...
543
- @staticmethod
544
- def duration2noteType(duration: Duration) -> str:
545
- ...
546
- @staticmethod
547
388
  def durationRatio(duration_A: float, duration_B: float) -> float:
548
389
  ...
549
390
  @staticmethod
@@ -580,7 +421,7 @@ class Helper:
580
421
  def noteSimilarity(pitchClass_A: str, octave_A: int, duration_A: float, pitchClass_B: str, octave_B: int, duration_B: float, enableEnharmonic: bool = False) -> tuple[float, float, float]:
581
422
  ...
582
423
  @staticmethod
583
- def noteType2duration(noteType: str) -> Duration:
424
+ def noteType2RhythmFigure(noteType: str) -> RhythmFigure:
584
425
  ...
585
426
  @staticmethod
586
427
  def noteType2ticks(noteType: str, divisionsPerQuarterNote: int = 256) -> int:
@@ -589,9 +430,6 @@ class Helper:
589
430
  def notes2Intervals(notes: list[Note], firstNoteAsReference: bool = False) -> list[Interval]:
590
431
  ...
591
432
  @staticmethod
592
- def number2pitch(number: float, accType: str = '#') -> str:
593
- ...
594
- @staticmethod
595
433
  def pitch2freq(pitch: str) -> float:
596
434
  ...
597
435
  @staticmethod
@@ -609,7 +447,13 @@ class Helper:
609
447
  def pitchRatio(pitch_A: str, pitch_B: str) -> float:
610
448
  ...
611
449
  @staticmethod
612
- def ticks2noteType(ticks: int, divisionsPerQuarterNote: int = 256) -> tuple[str, int]:
450
+ def rhythmFigure2Ticks(rhythmFigure: RhythmFigure, divisionsPerQuarterNote: int = 265) -> int:
451
+ ...
452
+ @staticmethod
453
+ def rhythmFigure2noteType(rhythmFigure: RhythmFigure) -> str:
454
+ ...
455
+ @staticmethod
456
+ def ticks2noteType(durationTicks: int, divisionsPerQuarterNote: int = 256, actualNotes: int = 1, normalNotes: int = 1) -> tuple[str, int]:
613
457
  ...
614
458
  @staticmethod
615
459
  def transposePitch(pitch: str, semitones: int, accType: str = '#') -> str:
@@ -873,6 +717,8 @@ class Measure:
873
717
  ...
874
718
  def getFilledQuarterDuration(self, staveId: int = 0) -> float:
875
719
  ...
720
+ def getFractionDuration(self) -> Fraction:
721
+ ...
876
722
  def getFreeDurationTicks(self, staveId: int = 0) -> int:
877
723
  ...
878
724
  def getFreeQuarterDuration(self, staveId: int = 0) -> float:
@@ -927,7 +773,7 @@ class Measure:
927
773
  ...
928
774
  def getTimeMetronome(self) -> tuple[str, int]:
929
775
  ...
930
- def getTimeSignature(self) -> tuple[int, int]:
776
+ def getTimeSignature(self) -> TimeSignature:
931
777
  ...
932
778
  def info(self) -> None:
933
779
  ...
@@ -963,7 +809,7 @@ class Measure:
963
809
  ...
964
810
  def setKeySignature(self, fifthCircle: int, isMajorMode: bool = True) -> None:
965
811
  ...
966
- def setMetronome(self, bpm: int, duration: Duration = ...) -> None:
812
+ def setMetronome(self, bpm: int, rhythmFigure: RhythmFigure = ...) -> None:
967
813
  ...
968
814
  def setNumStaves(self, numStaves: int) -> None:
969
815
  ...
@@ -991,10 +837,10 @@ class Note:
991
837
  def __hash__(self) -> int:
992
838
  ...
993
839
  @typing.overload
994
- def __init__(self, pitch: str, duration: Duration = ..., isNoteOn: bool = True, inChord: bool = False, transposeDiatonic: int = 0, transposeChromatic: int = 0, divisionsPerQuarterNote: int = 256) -> None:
840
+ def __init__(self, pitch: str, rhythmFigure: RhythmFigure = ..., isNoteOn: bool = True, inChord: bool = False, transposeDiatonic: int = 0, transposeChromatic: int = 0, divisionsPerQuarterNote: int = 256) -> None:
995
841
  ...
996
842
  @typing.overload
997
- def __init__(self, midiNumber: int, accType: str = '', duration: Duration = ..., isNoteOn: bool = True, inChord: bool = False, transposeDiatonic: int = 0, transposeChromatic: int = 0, divisionsPerQuarterNote: int = 256) -> None:
843
+ def __init__(self, midiNumber: int, accType: str = '', rhythmFigure: RhythmFigure = ..., isNoteOn: bool = True, inChord: bool = False, transposeDiatonic: int = 0, transposeChromatic: int = 0, divisionsPerQuarterNote: int = 256) -> None:
998
844
  ...
999
845
  def __le__(self, arg0: Note) -> bool:
1000
846
  ...
@@ -1024,7 +870,7 @@ class Note:
1024
870
  ...
1025
871
  def getDivisionsPerQuarterNote(self) -> int:
1026
872
  ...
1027
- def getDuration(self) -> float:
873
+ def getDuration(self) -> Duration:
1028
874
  ...
1029
875
  def getDurationTicks(self) -> int:
1030
876
  ...
@@ -1120,19 +966,13 @@ class Note:
1120
966
  ...
1121
967
  def isTransposed(self) -> bool:
1122
968
  ...
1123
- def removeDots(self) -> None:
1124
- ...
1125
969
  def removeTies(self) -> None:
1126
970
  ...
1127
- def setDoubleDot(self) -> None:
1128
- ...
1129
971
  @typing.overload
1130
- def setDuration(self, duration: Duration, divisionsPerQuarterNote: int = 256) -> None:
972
+ def setDuration(self, duration: Duration) -> None:
1131
973
  ...
1132
974
  @typing.overload
1133
- def setDuration(self, durationValue: float, lowerTimeSignatureValue: int = 4, divisionsPerQuarterNote: int = 256) -> None:
1134
- ...
1135
- def setDurationTicks(self, durationTicks: int) -> None:
975
+ def setDuration(self, quarterDuration: float, divisionsPerQuarterNote: int = 256) -> None:
1136
976
  ...
1137
977
  def setIsGraceNote(self, isGraceNote: bool = False) -> None:
1138
978
  ...
@@ -1152,8 +992,6 @@ class Note:
1152
992
  """
1153
993
  Set the note pitch class
1154
994
  """
1155
- def setSingleDot(self) -> None:
1156
- ...
1157
995
  def setStaff(self, staff: int) -> None:
1158
996
  ...
1159
997
  def setStem(self, stem: str) -> None:
@@ -1256,6 +1094,79 @@ class Part:
1256
1094
  ...
1257
1095
  def toXML(self, instrumentId: int = 1, identSize: int = 2) -> str:
1258
1096
  ...
1097
+ class RhythmFigure:
1098
+ """
1099
+ Members:
1100
+
1101
+ MAXIMA
1102
+
1103
+ LONG
1104
+
1105
+ BREVE
1106
+
1107
+ WHOLE
1108
+
1109
+ HALF
1110
+
1111
+ QUARTER
1112
+
1113
+ EIGHTH
1114
+
1115
+ N16TH
1116
+
1117
+ N32ND
1118
+
1119
+ N64TH
1120
+
1121
+ N128TH
1122
+
1123
+ N256TH
1124
+
1125
+ N512TH
1126
+
1127
+ N1024TH
1128
+ """
1129
+ BREVE: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.BREVE: 2>
1130
+ EIGHTH: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.EIGHTH: 6>
1131
+ HALF: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.HALF: 4>
1132
+ LONG: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.LONG: 1>
1133
+ MAXIMA: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.MAXIMA: 0>
1134
+ N1024TH: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.N1024TH: 13>
1135
+ N128TH: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.N128TH: 10>
1136
+ N16TH: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.N16TH: 7>
1137
+ N256TH: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.N256TH: 11>
1138
+ N32ND: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.N32ND: 8>
1139
+ N512TH: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.N512TH: 12>
1140
+ N64TH: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.N64TH: 9>
1141
+ QUARTER: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.QUARTER: 5>
1142
+ WHOLE: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.WHOLE: 3>
1143
+ __members__: typing.ClassVar[dict[str, RhythmFigure]] # value = {'MAXIMA': <RhythmFigure.MAXIMA: 0>, 'LONG': <RhythmFigure.LONG: 1>, 'BREVE': <RhythmFigure.BREVE: 2>, 'WHOLE': <RhythmFigure.WHOLE: 3>, 'HALF': <RhythmFigure.HALF: 4>, 'QUARTER': <RhythmFigure.QUARTER: 5>, 'EIGHTH': <RhythmFigure.EIGHTH: 6>, 'N16TH': <RhythmFigure.N16TH: 7>, 'N32ND': <RhythmFigure.N32ND: 8>, 'N64TH': <RhythmFigure.N64TH: 9>, 'N128TH': <RhythmFigure.N128TH: 10>, 'N256TH': <RhythmFigure.N256TH: 11>, 'N512TH': <RhythmFigure.N512TH: 12>, 'N1024TH': <RhythmFigure.N1024TH: 13>}
1144
+ def __eq__(self, other: typing.Any) -> bool:
1145
+ ...
1146
+ def __getstate__(self) -> int:
1147
+ ...
1148
+ def __hash__(self) -> int:
1149
+ ...
1150
+ def __index__(self) -> int:
1151
+ ...
1152
+ def __init__(self, value: int) -> None:
1153
+ ...
1154
+ def __int__(self) -> int:
1155
+ ...
1156
+ def __ne__(self, other: typing.Any) -> bool:
1157
+ ...
1158
+ def __repr__(self) -> str:
1159
+ ...
1160
+ def __setstate__(self, state: int) -> None:
1161
+ ...
1162
+ def __str__(self) -> str:
1163
+ ...
1164
+ @property
1165
+ def name(self) -> str:
1166
+ ...
1167
+ @property
1168
+ def value(self) -> int:
1169
+ ...
1259
1170
  class Score:
1260
1171
  def __hash__(self) -> int:
1261
1172
  ...
@@ -1325,7 +1236,7 @@ class Score:
1325
1236
  @typing.overload
1326
1237
  def setKeySignature(self, key: str, measureId: int = 0) -> None:
1327
1238
  ...
1328
- def setMetronomeMark(self, bpm: int, duration: Duration = ..., measureStart: int = 0) -> None:
1239
+ def setMetronomeMark(self, bpm: int, rhythmFigure: RhythmFigure = ..., measureStart: int = 0) -> None:
1329
1240
  ...
1330
1241
  def setRepeat(self, measureStart: int, measureEnd: int = -1) -> None:
1331
1242
  ...
@@ -1389,8 +1300,21 @@ class ScoreCollection:
1389
1300
  ...
1390
1301
  def setDirectoriesPaths(self, directoriesPaths: list[str]) -> None:
1391
1302
  ...
1303
+ class TimeSignature:
1304
+ def __init__(self, timeUpper: int = 4, timeLower: int = 4) -> None:
1305
+ ...
1306
+ def getLowerValue(self) -> int:
1307
+ ...
1308
+ def getMetric(self) -> METRIC:
1309
+ ...
1310
+ def getUpperValue(self) -> int:
1311
+ ...
1312
+ def setLowerValue(self, timeLower: int) -> None:
1313
+ ...
1314
+ def setUpperValue(self, timeUpper: int) -> None:
1315
+ ...
1392
1316
  C: ClefSign # value = <ClefSign.C: 2>
1393
1317
  F: ClefSign # value = <ClefSign.F: 1>
1394
1318
  G: ClefSign # value = <ClefSign.G: 0>
1395
1319
  P: ClefSign # value = <ClefSign.P: 3>
1396
- __version__: str = '1.5.0'
1320
+ __version__: str = '"1.6.1"'
maialib/maiapy/other.py CHANGED
@@ -1,9 +1,8 @@
1
1
  import os
2
- import pkg_resources
3
2
  from enum import Enum
4
- import platform
5
3
  import subprocess
6
4
  import maialib.maiacore as mc
5
+ import importlib.resources as pkg_resources
7
6
 
8
7
  __all__ = ["getSampleScorePath", "SampleScore",
9
8
  "setScoreEditorApp", "getScoreEditorApp", "openScore", "getXmlSamplesDirPath"]
@@ -29,7 +28,7 @@ def setScoreEditorApp(executableFullPath: str) -> None:
29
28
  """
30
29
  global _scoreEditorApp
31
30
 
32
- if (os.path.isfile(executableFullPath)):
31
+ if os.path.isfile(executableFullPath):
33
32
  _scoreEditorApp = executableFullPath
34
33
  else:
35
34
  raise ValueError('Invalid executable full path')
@@ -103,9 +102,9 @@ def getSampleScorePath(sampleEnum: SampleScore) -> str:
103
102
  SampleScore.Strauss_Also_Sprach_Zarathustra: "Strauss_Also_Sprach_Zarathustra.mxl"
104
103
  }[sampleEnum]
105
104
 
106
- xmlDir = pkg_resources.resource_filename("maialib", "xml-scores-examples")
105
+ xmlDir = pkg_resources.files("maialib").joinpath("xml-scores-examples")
107
106
  fileFullPath = os.path.join(xmlDir, xmlFileName)
108
- return fileFullPath
107
+ return str(fileFullPath)
109
108
 
110
109
 
111
110
  def getXmlSamplesDirPath() -> str:
@@ -127,5 +126,5 @@ def getXmlSamplesDirPath() -> str:
127
126
  >>> score = ml.Score(xmlDir + "Bach/cello_suite_1_violin.xml")
128
127
  >>> score.info()
129
128
  """
130
- xmlDir = pkg_resources.resource_filename("maialib", "xml-scores-examples")
131
- return xmlDir
129
+ xmlDir = pkg_resources.files("maialib").joinpath("xml-scores-examples")
130
+ return str(xmlDir)
maialib/maiapy/other.pyi CHANGED
@@ -8,13 +8,13 @@ def getScoreEditorApp() -> str: ...
8
8
  def openScore(score: mc.Score) -> None: ...
9
9
 
10
10
  class SampleScore(Enum):
11
- Bach_Cello_Suite_1: str
12
- Beethoven_Symphony_5th: str
13
- Chopin_Fantasie_Impromptu: str
14
- Dvorak_Symphony_9_mov_4: str
15
- Mahler_Symphony_8_Finale: str
16
- Mozart_Requiem_Introitus: str
17
- Strauss_Also_Sprach_Zarathustra: str
11
+ Bach_Cello_Suite_1 = 'Bach_Cello_Suite_1'
12
+ Beethoven_Symphony_5th = 'Beethoven_Symphony_5th'
13
+ Chopin_Fantasie_Impromptu = 'Chopin_Fantasie_Impromptu'
14
+ Dvorak_Symphony_9_mov_4 = 'Dvorak_Symphony_9_mov_4'
15
+ Mahler_Symphony_8_Finale = 'Mahler_Symphony_8_Finale'
16
+ Mozart_Requiem_Introitus = 'Mozart_Requiem_Introitus'
17
+ Strauss_Also_Sprach_Zarathustra = 'Strauss_Also_Sprach_Zarathustra'
18
18
 
19
19
  def getSampleScorePath(sampleEnum: SampleScore) -> str: ...
20
20
  def getXmlSamplesDirPath() -> str: ...
maialib/setup.py CHANGED
@@ -1,4 +1,5 @@
1
1
  from setuptools import setup, find_packages
2
+ from pathlib import Path
2
3
 
3
4
  with open("README.md", "r", encoding="utf-8") as fh:
4
5
  long_description = fh.read()
@@ -6,9 +7,13 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
7
  with open("LICENSE.txt", "r", encoding="utf-8") as fh:
7
8
  license_txt = fh.read()
8
9
 
10
+ # Lê a versão do arquivo VERSION
11
+ version_path = Path(__file__).parent.parent / "VERSION"
12
+ version = version_path.read_text().strip()
13
+
9
14
  setup(
10
15
  name="maialib",
11
- version="1.5.0-dev",
16
+ version=version + "-dev",
12
17
  author="Nycholas Maia",
13
18
  author_email="nyckmaia@gmail.com",
14
19
  description="A C++/Python library to manipulate music data",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maialib
3
- Version: 1.5.0
3
+ Version: 1.6.1
4
4
  Summary: A C++/Python library to manipulate sheet music data
5
5
  Home-page: https://github.com/nyckmaia/maialib
6
6
  Author: Nycholas Maia
@@ -21,6 +21,8 @@ Description-Content-Type: text/markdown
21
21
  License-File: LICENSE.txt
22
22
  Requires-Dist: pandas
23
23
  Requires-Dist: plotly
24
+ Requires-Dist: kaleido
25
+ Requires-Dist: nbformat
24
26
 
25
27
  # Maialib - Music Analysis Library {#mainpage}
26
28
 
@@ -40,6 +42,7 @@ The project **core** was wrote in `C++17`, but it also has a `Python` wrapper th
40
42
  ```python
41
43
  pip install maialib
42
44
  ```
45
+
43
46
  Or, if you have a older `maialib` version installed on your system, please get the latest version running: `pip install maialib --upgrade`
44
47
 
45
48
  ## Get Started
@@ -74,6 +77,7 @@ You can easily export your music files to these file formats above from score ed
74
77
  Many `MusicXML` files are avaliable for free in the internet for download.
75
78
 
76
79
  ### 2) What can I do if I don't have a `*.xml` file of my target music?
80
+
77
81
  - First, make shure and look at different websites and online repositories trying to find the `*.xml` file
78
82
  - You can find on the internet the desired MIDI file and import it in a score editor (like MuseScore, Sibelius, Finale, etc.) and then export the `MusicXML` file from it
79
83
  - You can use scan the sheet music paper and get a PDF version of it, so:
@@ -93,6 +97,7 @@ This project have 2 documentation levels. One for each user type:
93
97
  You can explore `maialib` features looking at `python-tutorial` folder ([link here](https://github.com/nyckmaia/maialib/tree/main/python-tutorial)). <br>
94
98
  There you will learn how to use and mix `maialib` classes and functions to reach your musical goals
95
99
  If you are starting, please check these 3 basic `maialib` Python tutorials:
100
+
96
101
  - [Create Notes and Chords](https://github.com/nyckmaia/maialib/blob/main/python-tutorial/create_notes_chords.ipynb)
97
102
  - [Create a Score](https://github.com/nyckmaia/maialib/blob/main/python-tutorial/create_score.ipynb)
98
103
  - [Using Dataframes](https://github.com/nyckmaia/maialib/blob/main/python-tutorial/dataframe.ipynb)
@@ -101,10 +106,15 @@ If you are starting, please check these 3 basic `maialib` Python tutorials:
101
106
 
102
107
  [Maialib Documentation WebSite](https://maialib.com/)
103
108
 
104
- ----------------------------
109
+ ## VS Code Users
110
+
111
+ - You can write your Python scripts using `*.py` or `*.ipynb` file extensions.
112
+ - If you decide to use `*.ipynb` extension, make shure to install `nbformat` Python package to enable visualize maialib graphs on VS Code editor.
113
+ To do that: `pip install nbformat --upgrade`
114
+
115
+ ---
105
116
 
106
- Would you like to improve any maialib function?
107
- =============================================
117
+ # Would you like to improve any maialib function?
108
118
 
109
119
  ## Are you a C++ developer?
110
120
 
@@ -140,7 +150,7 @@ sudo apt install clang (pybind11_mkdoc dependency) - Linux/Mac Only
140
150
 
141
151
  | Operational System | Compilers |
142
152
  | ------------------ | ------------------------------- |
143
- | Windows 10 x64 | Clang 15.0 (MSYS2) |
153
+ | Windows 10 x64 | Clang 18.0 |
144
154
  | Linux Ubuntu 20.04 | GCC 9.3 |
145
155
  | Apple OSX 10.15 | XCode 11.5 (Command Line Tools) |
146
156
 
@@ -1,28 +1,28 @@
1
- maialib/setup.py,sha256=6Je6AH2kuRusn02fjJKIekGG8p6TjGH4uQNn-ZepGJM,2003
1
+ maialib.libs/libstdc++-496613c0.so.6.0.32,sha256=AwZhL5WFT99I2Q6vIxXOhW7qddfuOZ1xecxiP9QTVY4,3494361
2
+ maialib.libs/libgcc_s-a3a07607.so.1,sha256=5ptIUeAzZweNZrFehN0_Bb5B0FcJgux7NbAFoU8vwwo,148041
3
+ maialib-1.6.1.dist-info/RECORD,,
4
+ maialib-1.6.1.dist-info/WHEEL,sha256=VUPYRIckCSbTAwBGO0ITnfyNOEA0z5gTdi3OvWzjqSQ,110
5
+ maialib-1.6.1.dist-info/top_level.txt,sha256=sZWQaa-Up2ba00WpAxBhOLKM6qQYTpUKJMXgSE0Nc48,17
6
+ maialib-1.6.1.dist-info/LICENSE.txt,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
7
+ maialib-1.6.1.dist-info/METADATA,sha256=dnJv1NuCDKbjtn4NrsOrV78tXnuqADoSHmHknU8tUr4,6926
2
8
  maialib/__init__.py,sha256=qiIEL1ZDvpDK0bkGUdZRib3bG973EtKQDFYPFfvJKQA,122
9
+ maialib/setup.py,sha256=1Cbv0DfEUNK1EQHb64-1B0rwbRrsTSnJBY8fVn8gtbU,2168
10
+ maialib/xml-scores-examples/Mozart_Requiem_Introitus.mxl,sha256=_wc4hMaPhtgocUoL94uVzfVN3TGb08z8Xa2BL4SHfgA,91112
11
+ maialib/xml-scores-examples/Strauss_Also_Sprach_Zarathustra.mxl,sha256=nOQra05RHHDe_dXFs5WBJG2l9R1KQk64urV7lWYC2vw,18863
12
+ maialib/xml-scores-examples/Mahler_Symphony_8_Finale.mxl,sha256=F2-QBKNYjBv_sWT-z4LWi1rX84-P3msxtl-g6joA2FQ,229034
13
+ maialib/xml-scores-examples/Bach_Cello_Suite_1.mxl,sha256=0XGNlcW8o0W7kkeG8j2V_M4eggdOnrxvvvCkpf6x_z4,29622
14
+ maialib/xml-scores-examples/Chopin_Fantasie_Impromptu.mxl,sha256=HkouQ_4bI6XDoGmzJITuU81CzQZE2lQjwl6WNlfZmJA,35727
15
+ maialib/xml-scores-examples/Dvorak_Symphony_9_mov_4.mxl,sha256=s7FGUEmFmgcIdmkZ-bv4sOGGj5HYKc2nc760V79DMtM,261438
16
+ maialib/xml-scores-examples/Beethoven_Symphony_5_mov_1.xml,sha256=iZ2uqqHWMkDtmQVKovT-H_-zZp1SixASi1R7L3TmuOI,4775525
17
+ maialib/maiapy/other.pyi,sha256=KmvytsOd9WJpb7VPXJE76tIvTqb2C1MZtrGScy6RYTE,851
3
18
  maialib/maiapy/__init__.pyi,sha256=L8YtZYJMw_9TrdejcKs2c5xTbu5WMRwlHhKz6Qzulf8,77
4
19
  maialib/maiapy/sethares_dissonance.pyi,sha256=DMZtrHTGSAaJwcBWX_G-sHF15_eETp1OeRr2L5vwdF0,1171
20
+ maialib/maiapy/other.py,sha256=5o2zXcm1quM-9jfUhzzzuKrj2qTBaNheA6Z05Ux9H_g,4042
5
21
  maialib/maiapy/plots.py,sha256=laAt68-IiZ4vNLFPKcGCf4IcMDIIZ1uavJpROrS8tqs,23153
6
- maialib/maiapy/other.py,sha256=6IpzBGQIxCzcfqkFiuMp84GBF-YOmcrxYkevxEBpG6A,4033
7
- maialib/maiapy/sethares_dissonance.py,sha256=uRQLTQN55dk74hIFpzu9RlTWP0ZhRpVT3yTLI-su1ww,12830
8
- maialib/maiapy/other.pyi,sha256=5QOvpxb7l9TlDVCn0ACeFgjI14c_7CW0gUb7GoI3gn8,684
9
22
  maialib/maiapy/plots.pyi,sha256=7zchTew8-uvIvo0TmJXRd_SRlIX9w1AyOSplbL5YGNM,619
23
+ maialib/maiapy/sethares_dissonance.py,sha256=uRQLTQN55dk74hIFpzu9RlTWP0ZhRpVT3yTLI-su1ww,12830
10
24
  maialib/maiapy/__init__.py,sha256=L8YtZYJMw_9TrdejcKs2c5xTbu5WMRwlHhKz6Qzulf8,77
11
- maialib/xml-scores-examples/Mozart_Requiem_Introitus.mxl,sha256=_wc4hMaPhtgocUoL94uVzfVN3TGb08z8Xa2BL4SHfgA,91112
12
- maialib/xml-scores-examples/Bach_Cello_Suite_1.mxl,sha256=0XGNlcW8o0W7kkeG8j2V_M4eggdOnrxvvvCkpf6x_z4,29622
13
- maialib/xml-scores-examples/Mahler_Symphony_8_Finale.mxl,sha256=F2-QBKNYjBv_sWT-z4LWi1rX84-P3msxtl-g6joA2FQ,229034
14
- maialib/xml-scores-examples/Beethoven_Symphony_5_mov_1.xml,sha256=iZ2uqqHWMkDtmQVKovT-H_-zZp1SixASi1R7L3TmuOI,4775525
15
- maialib/xml-scores-examples/Chopin_Fantasie_Impromptu.mxl,sha256=HkouQ_4bI6XDoGmzJITuU81CzQZE2lQjwl6WNlfZmJA,35727
16
- maialib/xml-scores-examples/Dvorak_Symphony_9_mov_4.mxl,sha256=s7FGUEmFmgcIdmkZ-bv4sOGGj5HYKc2nc760V79DMtM,261438
17
- maialib/xml-scores-examples/Strauss_Also_Sprach_Zarathustra.mxl,sha256=nOQra05RHHDe_dXFs5WBJG2l9R1KQk64urV7lWYC2vw,18863
18
- maialib/maiacore/__init__.pyi,sha256=6ch7-K9458Bh_ReceKjaFGWROX9AbgKpJOI6t_4F3jk,1205
19
- maialib/maiacore/maiacore.pyi,sha256=SKUFFo8dVG8uFL-W7Dj7Qc1wmP6rbYlM_0Hl7om495I,47052
20
- maialib/maiacore/maiacore.cpython-39-x86_64-linux-gnu.so,sha256=QeRraPng8IlstfqPZv_bPDy1OzWHBCOPg4N_K68FNYM,3853393
25
+ maialib/maiacore/__init__.pyi,sha256=cJfflEKHJ6BPUTlDQt95xZmi2N3zwHJkHEXy27fBd5c,1282
26
+ maialib/maiacore/maiacore.cpython-39-x86_64-linux-gnu.so,sha256=jufFvb2pZNQNihana0CYMBepy17BdoOTyRyxC_ce8Q8,4872961
21
27
  maialib/maiacore/__init__.py,sha256=IW7E0LuzAttsn0b37SEthCA0LKuzSgkepSpq8DWExYQ,77
22
- maialib.libs/libstdc++-496613c0.so.6.0.32,sha256=AwZhL5WFT99I2Q6vIxXOhW7qddfuOZ1xecxiP9QTVY4,3494361
23
- maialib.libs/libgcc_s-a3a07607.so.1,sha256=5ptIUeAzZweNZrFehN0_Bb5B0FcJgux7NbAFoU8vwwo,148041
24
- maialib-1.5.0.dist-info/LICENSE.txt,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
25
- maialib-1.5.0.dist-info/WHEEL,sha256=orlqImS2NOH_5vZptZ1MSK33_8P1U_YSj_ie6ooPHjI,110
26
- maialib-1.5.0.dist-info/top_level.txt,sha256=sZWQaa-Up2ba00WpAxBhOLKM6qQYTpUKJMXgSE0Nc48,17
27
- maialib-1.5.0.dist-info/RECORD,,
28
- maialib-1.5.0.dist-info/METADATA,sha256=IsX5RcPKJOVpFdslsGFK8rTRzVg05fWMnqN_4p3uyog,6654
28
+ maialib/maiacore/maiacore.pyi,sha256=IoVUJYogP4VGrxvj3RcCe-AXMQ2MHWhP0x-bPVQsMrY,43395
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.0)
2
+ Generator: setuptools (72.2.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp39-cp39-musllinux_1_2_x86_64
5
5