maialib 1.6.1__cp310-cp310-musllinux_1_2_i686.whl → 1.7.1__cp310-cp310-musllinux_1_2_i686.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.

@@ -5,6 +5,9 @@ from __future__ import annotations
5
5
  import typing
6
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
+ @staticmethod
9
+ def _pybind11_conduit_v1_(*args, **kwargs):
10
+ ...
8
11
  def __hash__(self) -> int:
9
12
  ...
10
13
  def __init__(self) -> None:
@@ -32,6 +35,9 @@ class Barline:
32
35
  def toXML(self, identSize: int = 2) -> str:
33
36
  ...
34
37
  class Chord:
38
+ @staticmethod
39
+ def _pybind11_conduit_v1_(*args, **kwargs):
40
+ ...
35
41
  def __add__(self, arg0: Chord) -> Chord:
36
42
  ...
37
43
  def __eq__(self, arg0: Chord) -> bool:
@@ -322,6 +328,9 @@ class Chord:
322
328
  def transposeStackOnly(self, semiTonesNumber: int) -> None:
323
329
  ...
324
330
  class Clef:
331
+ @staticmethod
332
+ def _pybind11_conduit_v1_(*args, **kwargs):
333
+ ...
325
334
  def __hash__(self) -> int:
326
335
  ...
327
336
  def __init__(self, sign: ClefSign = ..., line: int = -1) -> None:
@@ -355,6 +364,9 @@ class ClefSign:
355
364
  G: typing.ClassVar[ClefSign] # value = <ClefSign.G: 0>
356
365
  P: typing.ClassVar[ClefSign] # value = <ClefSign.P: 3>
357
366
  __members__: typing.ClassVar[dict[str, ClefSign]] # value = {'G': <ClefSign.G: 0>, 'F': <ClefSign.F: 1>, 'C': <ClefSign.C: 2>, 'P': <ClefSign.P: 3>}
367
+ @staticmethod
368
+ def _pybind11_conduit_v1_(*args, **kwargs):
369
+ ...
358
370
  def __eq__(self, other: typing.Any) -> bool:
359
371
  ...
360
372
  def __getstate__(self) -> int:
@@ -382,9 +394,30 @@ class ClefSign:
382
394
  def value(self) -> int:
383
395
  ...
384
396
  class HeapData:
385
- pass
397
+ @staticmethod
398
+ def _pybind11_conduit_v1_(*args, **kwargs):
399
+ ...
386
400
  class Helper:
387
401
  @staticmethod
402
+ def _pybind11_conduit_v1_(*args, **kwargs):
403
+ ...
404
+ @staticmethod
405
+ @typing.overload
406
+ def calculateMelodyEuclideanSimilarity(melodyPattern: list[Note], otherMelody: list[Note]) -> float:
407
+ ...
408
+ @staticmethod
409
+ @typing.overload
410
+ def calculateMelodyEuclideanSimilarity(semitonesDifference: list[float]) -> float:
411
+ ...
412
+ @staticmethod
413
+ @typing.overload
414
+ def calculateRhythmicEuclideanSimilarity(rhythmPattern: list[Note], otherRhythm: list[Note]) -> float:
415
+ ...
416
+ @staticmethod
417
+ @typing.overload
418
+ def calculateRhythmicEuclideanSimilarity(durationDifferences: list[float]) -> float:
419
+ ...
420
+ @staticmethod
388
421
  def durationRatio(duration_A: float, duration_B: float) -> float:
389
422
  ...
390
423
  @staticmethod
@@ -400,9 +433,15 @@ class Helper:
400
433
  def frequencies2cents(freq_A: float, freq_B: float) -> int:
401
434
  ...
402
435
  @staticmethod
436
+ def getDurationDifferenceBetweenRhythms(referenceRhythm: list[Note], otherRhythm: list[Note]) -> list[float]:
437
+ ...
438
+ @staticmethod
403
439
  def getPercentiles(arg0: typing.Any, arg1: list[float]) -> typing.Any:
404
440
  ...
405
441
  @staticmethod
442
+ def getSemitonesDifferenceBetweenMelodies(referenceMelody: list[Note], otherMelody: list[Note]) -> list[float]:
443
+ ...
444
+ @staticmethod
406
445
  def isEnharmonic(arg0: str, arg1: str) -> bool:
407
446
  ...
408
447
  @staticmethod
@@ -459,6 +498,9 @@ class Helper:
459
498
  def transposePitch(pitch: str, semitones: int, accType: str = '#') -> str:
460
499
  ...
461
500
  class Interval:
501
+ @staticmethod
502
+ def _pybind11_conduit_v1_(*args, **kwargs):
503
+ ...
462
504
  def __hash__(self) -> int:
463
505
  ...
464
506
  @typing.overload
@@ -475,6 +517,8 @@ class Interval:
475
517
  ...
476
518
  def getDiatonicSteps(self, useSingleOctave: bool = True, absoluteValue: bool = False) -> int:
477
519
  ...
520
+ def getDirection(self) -> str:
521
+ ...
478
522
  def getName(self) -> str:
479
523
  ...
480
524
  def getNotes(self) -> list[Note]:
@@ -634,6 +678,9 @@ class Interval:
634
678
  def toCents(self) -> int:
635
679
  ...
636
680
  class Key:
681
+ @staticmethod
682
+ def _pybind11_conduit_v1_(*args, **kwargs):
683
+ ...
637
684
  def __hash__(self) -> int:
638
685
  ...
639
686
  @typing.overload
@@ -657,6 +704,9 @@ class Key:
657
704
  def setIsMajorMode(self, isMajorMode: bool) -> None:
658
705
  ...
659
706
  class Measure:
707
+ @staticmethod
708
+ def _pybind11_conduit_v1_(*args, **kwargs):
709
+ ...
660
710
  def __hash__(self) -> int:
661
711
  ...
662
712
  def __init__(self, numStaves: int = 1, divisionsPerQuarterNote: int = 256) -> None:
@@ -828,6 +878,9 @@ class Measure:
828
878
  def toXML(self, instrumentId: int = 1, identSize: int = 2) -> str:
829
879
  ...
830
880
  class Note:
881
+ @staticmethod
882
+ def _pybind11_conduit_v1_(*args, **kwargs):
883
+ ...
831
884
  def __eq__(self, arg0: Note) -> bool:
832
885
  ...
833
886
  def __ge__(self, arg0: Note) -> bool:
@@ -1017,6 +1070,9 @@ class Note:
1017
1070
  def transpose(self, semitones: int, accType: str = '') -> None:
1018
1071
  ...
1019
1072
  class NoteData:
1073
+ @staticmethod
1074
+ def _pybind11_conduit_v1_(*args, **kwargs):
1075
+ ...
1020
1076
  @typing.overload
1021
1077
  def __init__(self) -> None:
1022
1078
  ...
@@ -1024,8 +1080,13 @@ class NoteData:
1024
1080
  def __init__(self, note: Note, wasEnharmonized: bool, enharmonicDiatonicDistance: int) -> None:
1025
1081
  ...
1026
1082
  class NoteDataHeap:
1027
- pass
1083
+ @staticmethod
1084
+ def _pybind11_conduit_v1_(*args, **kwargs):
1085
+ ...
1028
1086
  class Part:
1087
+ @staticmethod
1088
+ def _pybind11_conduit_v1_(*args, **kwargs):
1089
+ ...
1029
1090
  def __hash__(self) -> int:
1030
1091
  ...
1031
1092
  def __init__(self, partName: str, numStaves: int = 1, isPitched: bool = True, divisionsPerQuarterNote: int = 256) -> None:
@@ -1052,6 +1113,8 @@ class Part:
1052
1113
  @typing.overload
1053
1114
  def getMeasure(self, measureId: int) -> Measure:
1054
1115
  ...
1116
+ def getMeasures(self) -> list[Measure]:
1117
+ ...
1055
1118
  def getMidiUnpitched(self) -> list[int]:
1056
1119
  ...
1057
1120
  def getName(self) -> str:
@@ -1141,6 +1204,9 @@ class RhythmFigure:
1141
1204
  QUARTER: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.QUARTER: 5>
1142
1205
  WHOLE: typing.ClassVar[RhythmFigure] # value = <RhythmFigure.WHOLE: 3>
1143
1206
  __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>}
1207
+ @staticmethod
1208
+ def _pybind11_conduit_v1_(*args, **kwargs):
1209
+ ...
1144
1210
  def __eq__(self, other: typing.Any) -> bool:
1145
1211
  ...
1146
1212
  def __getstate__(self) -> int:
@@ -1168,6 +1234,9 @@ class RhythmFigure:
1168
1234
  def value(self) -> int:
1169
1235
  ...
1170
1236
  class Score:
1237
+ @staticmethod
1238
+ def _pybind11_conduit_v1_(*args, **kwargs):
1239
+ ...
1171
1240
  def __hash__(self) -> int:
1172
1241
  ...
1173
1242
  @typing.overload
@@ -1184,6 +1253,12 @@ class Score:
1184
1253
  ...
1185
1254
  def clear(self) -> None:
1186
1255
  ...
1256
+ @typing.overload
1257
+ def findMelodyPatternDataFrame(self, melodyPattern: list[Note], totalIntervalsSimilarityThreshold: float = 0.5, totalRhythmSimilarityThreshold: float = 0.5, intervalsSimilarityCallback: typing.Callable[[list[Note], list[Note]], list[float]] = None, rhythmSimilarityCallback: typing.Callable[[list[Note], list[Note]], list[float]] = None, totalIntervalSimilarityCallback: typing.Callable[[list[float]], float] = None, totalRhythmSimilarityCallback: typing.Callable[[list[float]], float] = None, totalSimilarityCallback: typing.Callable[[float, float], float] = None) -> typing.Any:
1258
+ ...
1259
+ @typing.overload
1260
+ def findMelodyPatternDataFrame(self, melodyPatterns: list[list[Note]], intervalSimilarityThreshold: float = 0.5, rhythmSimilarityThreshold: float = 0.5, intervalsSimilarityCallback: typing.Callable[[list[Note], list[Note]], list[float]] = None, rhythmSimilarityCallback: typing.Callable[[list[Note], list[Note]], list[float]] = None, totalIntervalSimilarityCallback: typing.Callable[[list[float]], float] = None, totalRhythmSimilarityCallback: typing.Callable[[list[float]], float] = None, totalSimilarityCallback: typing.Callable[[float, float], float] = None) -> typing.Any:
1261
+ ...
1187
1262
  def forEachNote(self, callback: typing.Callable[[Part, Measure, int, Note], None], measureStart: int = 0, measureEnd: int = -1, partNames: list[str] = []) -> None:
1188
1263
  ...
1189
1264
  def getChords(self, config: json = None) -> list[tuple[int, float, Key, Chord, bool]]:
@@ -1255,6 +1330,9 @@ class Score:
1255
1330
  def xPathCountNodes(self, xPath: str) -> int:
1256
1331
  ...
1257
1332
  class ScoreCollection:
1333
+ @staticmethod
1334
+ def _pybind11_conduit_v1_(*args, **kwargs):
1335
+ ...
1258
1336
  def __add__(self, arg0: ScoreCollection) -> ScoreCollection:
1259
1337
  ...
1260
1338
  def __hash__(self) -> int:
@@ -1301,6 +1379,9 @@ class ScoreCollection:
1301
1379
  def setDirectoriesPaths(self, directoriesPaths: list[str]) -> None:
1302
1380
  ...
1303
1381
  class TimeSignature:
1382
+ @staticmethod
1383
+ def _pybind11_conduit_v1_(*args, **kwargs):
1384
+ ...
1304
1385
  def __init__(self, timeUpper: int = 4, timeLower: int = 4) -> None:
1305
1386
  ...
1306
1387
  def getLowerValue(self) -> int:
@@ -1317,4 +1398,4 @@ C: ClefSign # value = <ClefSign.C: 2>
1317
1398
  F: ClefSign # value = <ClefSign.F: 1>
1318
1399
  G: ClefSign # value = <ClefSign.G: 0>
1319
1400
  P: ClefSign # value = <ClefSign.P: 3>
1320
- __version__: str = '"1.6.1"'
1401
+ __version__: str = '"1.7.1"'
maialib/maiapy/other.py CHANGED
@@ -1,4 +1,5 @@
1
1
  import os
2
+ import sys
2
3
  from enum import Enum
3
4
  import subprocess
4
5
  import maialib.maiacore as mc
@@ -102,7 +103,15 @@ def getSampleScorePath(sampleEnum: SampleScore) -> str:
102
103
  SampleScore.Strauss_Also_Sprach_Zarathustra: "Strauss_Also_Sprach_Zarathustra.mxl"
103
104
  }[sampleEnum]
104
105
 
105
- xmlDir = pkg_resources.files("maialib").joinpath("xml-scores-examples")
106
+ # xmlDir = pkg_resources.files("maialib").joinpath("xml-scores-examples")
107
+ xmlDir = ""
108
+ if sys.version_info >= (3, 9):
109
+ from importlib import resources
110
+ xmlDir = resources.files("maialib").joinpath("xml-scores-examples")
111
+ else:
112
+ from importlib_resources import files
113
+ xmlDir = files("maialib").joinpath("xml-scores-examples")
114
+
106
115
  fileFullPath = os.path.join(xmlDir, xmlFileName)
107
116
  return str(fileFullPath)
108
117
 
maialib/maiapy/other.pyi CHANGED
@@ -1,20 +1,79 @@
1
1
  import maialib.maiacore as mc
2
2
  from enum import Enum
3
3
 
4
- __all__ = ['getSampleScorePath', 'SampleScore', 'setScoreEditorApp', 'getScoreEditorApp', 'openScore', 'getXmlSamplesDirPath']
4
+ def setScoreEditorApp(executableFullPath: str) -> None:
5
+ '''Set the full path to the installed score editor app
5
6
 
6
- def setScoreEditorApp(executableFullPath: str) -> None: ...
7
+ Args:
8
+ executableFullPath (str): Score editor full path
9
+ Example 01: "C:/path/to/MuseScore"
10
+ Example 02: "/Applications/MuseScore 4.app/Contents/MacOS/mscore"
11
+
12
+ Examples of use:
13
+
14
+ >>> import maialib as ml
15
+ >>> # Example for Windows:
16
+ >>> ml.setScoreEditorApp("C:/path/to/MuseScore.exe")
17
+ >>> # Example for Mac OSX:
18
+ >>> ml.setScoreEditorApp("/Applications/MuseScore 4.app/Contents/MacOS/mscore")
19
+ '''
7
20
  def getScoreEditorApp() -> str: ...
8
21
  def openScore(score: mc.Score) -> None: ...
9
22
 
10
23
  class SampleScore(Enum):
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
-
19
- def getSampleScorePath(sampleEnum: SampleScore) -> str: ...
20
- def getXmlSamplesDirPath() -> str: ...
24
+ Bach_Cello_Suite_1: str
25
+ Beethoven_Symphony_5th: str
26
+ Chopin_Fantasie_Impromptu: str
27
+ Dvorak_Symphony_9_mov_4: str
28
+ Mahler_Symphony_8_Finale: str
29
+ Mozart_Requiem_Introitus: str
30
+ Strauss_Also_Sprach_Zarathustra: str
31
+
32
+ def getSampleScorePath(sampleEnum: SampleScore) -> str:
33
+ """Get a maialib internal XML sample file
34
+
35
+ Args:
36
+ sampleEnum (SampleScore): Maialib SampleScore enum value
37
+ - Bach_Cello_Suite_1
38
+ - Beethoven_Symphony_5th
39
+ - Chopin_Fantasie_Impromptu
40
+ - Dvorak_Symphony_9_mov_4
41
+ - Mahler_Symphony_8_Finale
42
+ - Mozart_Requiem_Introitus
43
+ - Strauss_Also_Sprach_Zarathustra
44
+
45
+ Kwargs:
46
+ None
47
+
48
+ Returns:
49
+ A full file path (str) to the XML maialib internal sample score
50
+
51
+ Raises:
52
+ RuntimeError
53
+
54
+ Examples of use:
55
+
56
+ >>> import maialib as ml
57
+ >>> filePath = ml.getSampleScorePath(ml.SampleScore.Bach_Cello_Suite_1)
58
+ >>> score = ml.Score(filePath)
59
+ >>> score.info()
60
+ """
61
+ def getXmlSamplesDirPath() -> str:
62
+ '''Get the maialib XML samples directory path
63
+
64
+ Kwargs:
65
+ None
66
+
67
+ Returns:
68
+ A full dir path (str) to the XML maialib internal samples score directory
69
+
70
+ Raises:
71
+ RuntimeError
72
+
73
+ Examples of use:
74
+
75
+ >>> import maialib as ml
76
+ >>> xmlDir = ml.getXmlSamplesDirPath()
77
+ >>> score = ml.Score(xmlDir + "Bach/cello_suite_1_violin.xml")
78
+ >>> score.info()
79
+ '''
maialib/maiapy/plots.pyi CHANGED
@@ -2,9 +2,102 @@ import maialib.maiacore as mc
2
2
  import pandas as pd
3
3
  import plotly
4
4
 
5
- __all__ = ['plotPartsActivity', 'plotPianoRoll', 'plotScorePitchEnvelope', 'plotChordsNumberOfNotes']
5
+ def plotPartsActivity(score: mc.Score, **kwargs) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]:
6
+ '''Plots a timeline graph showing the musical activity of each score instrument
6
7
 
7
- def plotPartsActivity(score: mc.Score, **kwargs) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]: ...
8
- def plotPianoRoll(score: mc.Score, **kwargs) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]: ...
9
- def plotScorePitchEnvelope(score: mc.Score, **kwargs) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]: ...
10
- def plotChordsNumberOfNotes(score: mc.Score, **kwargs) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]: ...
8
+ Args:
9
+ score (maialib.Score): A maialib Score object loaded with a valid MusicXML file
10
+
11
+ Kwargs:
12
+ measureStart (int): Start measure to plot
13
+ measureEnd (int): End measure to plot
14
+ partNames (list): A str list that contains the filtered desired score parts to plot
15
+
16
+ Returns:
17
+ A list: [Plotly Figure, The plot data as a Pandas Dataframe]
18
+
19
+ Raises:
20
+ RuntimeError, KeyError
21
+
22
+ Examples of use:
23
+
24
+ >>> plotPartsActivity(myScore)
25
+ >>> plotPartsActivity(myScore, measureStart=50)
26
+ >>> plotPartsActivity(myScore, measureStart=50, measureEnd=100)
27
+ >>> plotPartsActivity(myScore, measureStart=50, measureEnd=100, partNames=["Violin 1", "Cello"])
28
+ '''
29
+ def plotPianoRoll(score: mc.Score, **kwargs) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]:
30
+ '''Plots a piano roll graph showing the musical activity of each score instrument
31
+
32
+ Args:
33
+ score (maialib.Score): A maialib Score object loaded with a valid MusicXML file
34
+
35
+ Kwargs:
36
+ measureStart (int): Start measure to plot
37
+ measureEnd (int): End measure to plot
38
+ partNames (list): A str list that contains the filtered desired score parts to plot
39
+
40
+ Returns:
41
+ A list: [Plotly Figure, The plot data as a Pandas Dataframe]
42
+
43
+ Raises:
44
+ RuntimeError, KeyError
45
+
46
+ Examples of use:
47
+
48
+ >>> plotPianoRoll(myScore)
49
+ >>> plotPianoRoll(myScore, measureStart=50)
50
+ >>> plotPianoRoll(myScore, measureStart=50, measureEnd=100)
51
+ >>> plotPianoRoll(myScore, measureStart=50, measureEnd=100, partNames=["Violin 1", "Cello"])
52
+ '''
53
+ def plotScorePitchEnvelope(score: mc.Score, **kwargs) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]:
54
+ '''Plot a score pitch envelope
55
+
56
+ Args:
57
+ score (maialib.Score): A maialib Score object loaded with a valid MusicXML file
58
+
59
+ Kwargs:
60
+ numPoints: (int): Number of interpolated points
61
+ showHigher (bool): Plot the envelop upper limit
62
+ showLower (bool): Plot the envelop lower limit
63
+ showMean (bool): Plot the envelop mean curve
64
+ showMeanOfExtremes (bool): Plot the envelop mean of extremes curve
65
+
66
+ Returns:
67
+ A list: [Plotly Figure, The plot data as a Pandas Dataframe]
68
+
69
+ Raises:
70
+ RuntimeError, KeyError
71
+
72
+ Examples of use:
73
+
74
+ >>> myScore = ml.Score("/path/to/score.xml")
75
+ >>> plotScorePitchEnvelope(myScore)
76
+ >>> plotScorePitchEnvelope(myScore, numPoints=10)
77
+ >>> plotScorePitchEnvelope(myScore, showLower=False)
78
+ >>> plotScorePitchEnvelope(myScore, showMean=False, showMean=True)
79
+ '''
80
+ def plotChordsNumberOfNotes(score: mc.Score, **kwargs) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]:
81
+ '''Plot chord number of notes varying in time
82
+
83
+ Args:
84
+ score (maialib.Score): A maialib Score object loaded with a valid MusicXML file
85
+
86
+ Kwargs:
87
+ measureStart (int): Start measure to plot
88
+ measureEnd (int): End measure to plot
89
+ numPoints (int): Number of interpolated points
90
+
91
+ Returns:
92
+ A list: [Plotly Figure, The plot data as a Pandas Dataframe]
93
+
94
+ Raises:
95
+ RuntimeError, KeyError
96
+
97
+ Examples of use:
98
+
99
+ >>> myScore = ml.Score("/path/to/score.xml")
100
+ >>> plotChordsNumberOfNotes(myScore)
101
+ >>> plotChordsNumberOfNotes(myScore, numPoints=15)
102
+ >>> plotChordsNumberOfNotes(myScore, measureStart=10, measureEnd=20)
103
+ '''
@@ -4,8 +4,68 @@ import plotly.graph_objects as go
4
4
  from maialib import maiacore as mc
5
5
  from typing import Callable
6
6
 
7
- __all__ = ['plotSetharesDissonanceCurve', 'plotScoreSetharesDissonance', 'plotChordDyadsSetharesDissonanceHeatmap']
7
+ def plotSetharesDissonanceCurve(fundamentalFreq: float = 440, numPartials: int = 6, ratioLowLimit: float = 1.0, ratioHighLimit: float = 2.3, ratioStepIncrement: float = 0.001, amplCallback: Callable[[list[float]], list[float]] | None = None) -> tuple[go.Figure, pd.DataFrame]:
8
+ """
9
+ Compute the Sethares Dissonance Curve of a given base frequency
8
10
 
9
- def plotSetharesDissonanceCurve(fundamentalFreq: float = 440, numPartials: int = 6, ratioLowLimit: float = 1.0, ratioHighLimit: float = 2.3, ratioStepIncrement: float = 0.001, amplCallback: Callable[[list[float]], list[float]] | None = None) -> tuple[go.Figure, pd.DataFrame]: ...
10
- def plotScoreSetharesDissonance(score: mc.Score, plotType: str = 'line', lineShape: str = 'linear', numPartialsPerNote: int = 6, useMinModel: bool = True, amplCallback: Callable[[list[float]], list[float]] | None = None, dissCallback: Callable[[list[float]], float] | None = None, **kwargs) -> tuple[go.Figure, pd.DataFrame]: ...
11
- def plotChordDyadsSetharesDissonanceHeatmap(chord: mc.Chord, numPartialsPerNote: int = 6, useMinModel: bool = True, amplCallback: Callable[[list[float]], list[float]] | None = None, dissonanceThreshold: float = 0.1, dissonanceDecimalPoint: int = 2) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]: ...
11
+ Return
12
+ A tuple that contains a Plotly figure, and the pair 'ratios' and 'dissonance' lists
13
+ """
14
+ def plotScoreSetharesDissonance(score: mc.Score, plotType: str = 'line', lineShape: str = 'linear', numPartialsPerNote: int = 6, useMinModel: bool = True, amplCallback: Callable[[list[float]], list[float]] | None = None, dissCallback: Callable[[list[float]], float] | None = None, **kwargs) -> tuple[go.Figure, pd.DataFrame]:
15
+ '''Plot 2D line graph of the Sethares Dissonance over time
16
+
17
+ Args:
18
+ score (maialib.Score): A maialib Score object loaded with a valid MusicXML file
19
+ plotType (str): Can be \'line\' or \'scatter\'
20
+ lineShape (str): Can be \'linear\' or \'spline\'
21
+ numPartialsPerNote (int): Amount of spectral partials for each note
22
+ useMinModel (bool): Sethares dissonance values can be computed using the \'minimal amplitude\' model
23
+ or the \'product amplitudes\' model. The \'min\' model is a more recent approach
24
+ amplCallback: Custom user function callback to generate the amplitude of each spectrum partial
25
+ dissCallback: Custom user function callback to receive all paired partial dissonances and computes
26
+ a single total dissonance value output
27
+ Kwargs:
28
+ measureStart (int): Start measure to plot
29
+ measureEnd (int): End measure to plot
30
+ numPoints (int): Number of interpolated points
31
+
32
+ Returns:
33
+ A list: [Plotly Figure, The plot data as a Pandas Dataframe]
34
+
35
+ Raises:
36
+ RuntimeError, KeyError
37
+
38
+ Examples of use:
39
+
40
+ >>> myScore = ml.Score("/path/to/score.xml")
41
+ >>> ml.plotScoreSetharesDissonance(myScore)
42
+ >>> ml.plotScoreSetharesDissonance(myScore, numPoints=15)
43
+ >>> ml.plotScoreSetharesDissonance(myScore, measureStart=10, measureEnd=20)
44
+ '''
45
+ def plotChordDyadsSetharesDissonanceHeatmap(chord: mc.Chord, numPartialsPerNote: int = 6, useMinModel: bool = True, amplCallback: Callable[[list[float]], list[float]] | None = None, dissonanceThreshold: float = 0.1, dissonanceDecimalPoint: int = 2) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]:
46
+ '''Plot chord dyads Sethares dissonance heatmap
47
+
48
+ Args:
49
+ chord (maialib.Chord): A maialib Chord
50
+
51
+ Kwargs:
52
+ numPartialsPerNote (int): Amount of spectral partials for each note
53
+ useMinModel (bool): Sethares dissonance values can be computed using the \'minimal amplitude\' model
54
+ or the \'product amplitudes\' model. The \'min\' model is a more recent approach
55
+ amplCallback: Custom user function callback to generate the amplitude of each spectrum partial
56
+ dissonanceThreshold (float): Dissonance threshold to skip small dissonance values
57
+ dissonanceDecimalPoint (int): Round chord dissonance value in the plot title
58
+
59
+ Returns:
60
+ A list: [Plotly Figure, The plot data as a Pandas Dataframe]
61
+
62
+ Raises:
63
+ RuntimeError, KeyError
64
+
65
+ Examples of use:
66
+
67
+ >>> import maialib as ml
68
+ >>> myChord = ml.Chord(["C3", "E3", "G3"])
69
+ >>> fig, df = plotChordDyadsSetharesDissonanceHeatmap(myChord)
70
+ >>> fig.show()
71
+ '''
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maialib
3
- Version: 1.6.1
3
+ Version: 1.7.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
@@ -1,28 +1,28 @@
1
- maialib.libs/libstdc++-d2a021ba.so.6.0.32,sha256=1zr_iwGwEBe95gyKdgiw7C4Y1RR9ijV40j66rk4elzg,3537349
2
- maialib.libs/libgcc_s-f3fb5a36.so.1,sha256=SrjjCCuY7RHj-T9JLrY9XFMgCCpYD9Qmezr4uoJGVEQ,168321
3
- maialib-1.6.1.dist-info/RECORD,,
4
- maialib-1.6.1.dist-info/WHEEL,sha256=65TL7weo8kkgwEa4wF9uXAGMNyj2mu46h4HGOyuAzms,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
8
- maialib/__init__.py,sha256=qiIEL1ZDvpDK0bkGUdZRib3bG973EtKQDFYPFfvJKQA,122
1
+ maialib-1.7.1.dist-info/top_level.txt,sha256=sZWQaa-Up2ba00WpAxBhOLKM6qQYTpUKJMXgSE0Nc48,17
2
+ maialib-1.7.1.dist-info/RECORD,,
3
+ maialib-1.7.1.dist-info/LICENSE.txt,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
4
+ maialib-1.7.1.dist-info/METADATA,sha256=YMcaVW1wyLigMx1hVgrONs_PhIOF8_ItN1J9Vt5hJYU,6926
5
+ maialib-1.7.1.dist-info/WHEEL,sha256=z9pRu9iuo6pg7rkRiXSjLaWIdpFOYscQWpXbJJogsTM,110
9
6
  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
7
+ maialib/__init__.py,sha256=qiIEL1ZDvpDK0bkGUdZRib3bG973EtKQDFYPFfvJKQA,122
8
+ maialib/maiacore/maiacore.pyi,sha256=VP-QsvidFYf4nRU_WTLSVGtwhhSOmYhqUZQv5Yer0tQ,46920
9
+ maialib/maiacore/maiacore.cpython-310-i386-linux-gnu.so,sha256=bL0DJpvZ7UEykvDfamvGqZ3Lrvifv_qjM1TpD0Eidcw,5381497
10
+ maialib/maiacore/__init__.py,sha256=IW7E0LuzAttsn0b37SEthCA0LKuzSgkepSpq8DWExYQ,77
11
+ maialib/maiacore/__init__.pyi,sha256=cJfflEKHJ6BPUTlDQt95xZmi2N3zwHJkHEXy27fBd5c,1282
12
+ maialib/maiapy/sethares_dissonance.pyi,sha256=O8D_cYRPCE1K5Zw54ckg3I5frULcBGgs_di_bTOpuBU,3609
13
+ maialib/maiapy/plots.py,sha256=laAt68-IiZ4vNLFPKcGCf4IcMDIIZ1uavJpROrS8tqs,23153
14
+ maialib/maiapy/__init__.py,sha256=L8YtZYJMw_9TrdejcKs2c5xTbu5WMRwlHhKz6Qzulf8,77
15
+ maialib/maiapy/sethares_dissonance.py,sha256=uRQLTQN55dk74hIFpzu9RlTWP0ZhRpVT3yTLI-su1ww,12830
16
+ maialib/maiapy/other.py,sha256=4LjETHcpDpNRjSYIbMW_9CuRZTymuoAzog_L3CkYDA0,4345
17
+ maialib/maiapy/other.pyi,sha256=jEmAc-MDc3iMA2-5hp41RLgNrfBQRMvq-sF2_pexhbo,2163
18
+ maialib/maiapy/__init__.pyi,sha256=L8YtZYJMw_9TrdejcKs2c5xTbu5WMRwlHhKz6Qzulf8,77
19
+ maialib/maiapy/plots.pyi,sha256=nRNUQ9h9kjJHTdbQt4eXv933MOx7TIztIg-inThglB4,3620
14
20
  maialib/xml-scores-examples/Chopin_Fantasie_Impromptu.mxl,sha256=HkouQ_4bI6XDoGmzJITuU81CzQZE2lQjwl6WNlfZmJA,35727
21
+ maialib/xml-scores-examples/Bach_Cello_Suite_1.mxl,sha256=0XGNlcW8o0W7kkeG8j2V_M4eggdOnrxvvvCkpf6x_z4,29622
15
22
  maialib/xml-scores-examples/Dvorak_Symphony_9_mov_4.mxl,sha256=s7FGUEmFmgcIdmkZ-bv4sOGGj5HYKc2nc760V79DMtM,261438
23
+ maialib/xml-scores-examples/Mahler_Symphony_8_Finale.mxl,sha256=F2-QBKNYjBv_sWT-z4LWi1rX84-P3msxtl-g6joA2FQ,229034
24
+ maialib/xml-scores-examples/Mozart_Requiem_Introitus.mxl,sha256=_wc4hMaPhtgocUoL94uVzfVN3TGb08z8Xa2BL4SHfgA,91112
25
+ maialib/xml-scores-examples/Strauss_Also_Sprach_Zarathustra.mxl,sha256=nOQra05RHHDe_dXFs5WBJG2l9R1KQk64urV7lWYC2vw,18863
16
26
  maialib/xml-scores-examples/Beethoven_Symphony_5_mov_1.xml,sha256=iZ2uqqHWMkDtmQVKovT-H_-zZp1SixASi1R7L3TmuOI,4775525
17
- maialib/maiapy/other.pyi,sha256=KmvytsOd9WJpb7VPXJE76tIvTqb2C1MZtrGScy6RYTE,851
18
- maialib/maiapy/__init__.pyi,sha256=L8YtZYJMw_9TrdejcKs2c5xTbu5WMRwlHhKz6Qzulf8,77
19
- maialib/maiapy/sethares_dissonance.pyi,sha256=DMZtrHTGSAaJwcBWX_G-sHF15_eETp1OeRr2L5vwdF0,1171
20
- maialib/maiapy/other.py,sha256=5o2zXcm1quM-9jfUhzzzuKrj2qTBaNheA6Z05Ux9H_g,4042
21
- maialib/maiapy/plots.py,sha256=laAt68-IiZ4vNLFPKcGCf4IcMDIIZ1uavJpROrS8tqs,23153
22
- maialib/maiapy/plots.pyi,sha256=7zchTew8-uvIvo0TmJXRd_SRlIX9w1AyOSplbL5YGNM,619
23
- maialib/maiapy/sethares_dissonance.py,sha256=uRQLTQN55dk74hIFpzu9RlTWP0ZhRpVT3yTLI-su1ww,12830
24
- maialib/maiapy/__init__.py,sha256=L8YtZYJMw_9TrdejcKs2c5xTbu5WMRwlHhKz6Qzulf8,77
25
- maialib/maiacore/__init__.pyi,sha256=cJfflEKHJ6BPUTlDQt95xZmi2N3zwHJkHEXy27fBd5c,1282
26
- maialib/maiacore/__init__.py,sha256=IW7E0LuzAttsn0b37SEthCA0LKuzSgkepSpq8DWExYQ,77
27
- maialib/maiacore/maiacore.pyi,sha256=IoVUJYogP4VGrxvj3RcCe-AXMQ2MHWhP0x-bPVQsMrY,43395
28
- maialib/maiacore/maiacore.cpython-310-i386-linux-gnu.so,sha256=LpsL8T_O98giuN-S10zcdRtHQHJZTxBVbTY6tTywjlA,5282253
27
+ maialib.libs/libstdc++-d2a021ba.so.6.0.32,sha256=1zr_iwGwEBe95gyKdgiw7C4Y1RR9ijV40j66rk4elzg,3537349
28
+ maialib.libs/libgcc_s-f3fb5a36.so.1,sha256=SrjjCCuY7RHj-T9JLrY9XFMgCCpYD9Qmezr4uoJGVEQ,168321
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.2.0)
2
+ Generator: setuptools (75.3.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-cp310-musllinux_1_2_i686
5
5