maialib 1.9.3__cp311-cp311-musllinux_1_2_x86_64.whl → 1.9.4__cp311-cp311-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.
- maialib/maiacore/maiacore.cpython-311-x86_64-linux-musl.so +0 -0
- maialib/maiacore/maiacore.pyi +1 -1
- maialib/maiapy/sethares_dissonance.py +52 -18
- maialib/maiapy/sethares_dissonance.pyi +3 -1
- {maialib-1.9.3.dist-info → maialib-1.9.4.dist-info}/METADATA +23 -15
- {maialib-1.9.3.dist-info → maialib-1.9.4.dist-info}/RECORD +17 -17
- {maialib-1.9.3.dist-info → maialib-1.9.4.dist-info}/WHEEL +0 -0
- {maialib-1.9.3.dist-info → maialib-1.9.4.dist-info}/licenses/LICENSE.txt +0 -0
- {maialib-1.9.3.dist-info → maialib-1.9.4.dist-info}/top_level.txt +0 -0
|
Binary file
|
maialib/maiacore/maiacore.pyi
CHANGED
|
@@ -282,7 +282,8 @@ def plotScoreSetharesDissonance(score: mc.Score, plotType='line', lineShape='lin
|
|
|
282
282
|
|
|
283
283
|
|
|
284
284
|
def plotChordDyadsSetharesDissonanceHeatmap(chord: mc.Chord, numPartialsPerNote: int = 6, useMinModel: bool = True, amplCallback: Optional[Callable[[
|
|
285
|
-
|
|
285
|
+
List[float]], List[float]]] = None, dissonanceThreshold: float = 0.1, dissonanceDecimalPoint: int = 2, showValues: bool = False,
|
|
286
|
+
valuesDecimalPlaces: int = 2) -> Tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]:
|
|
286
287
|
"""Plot chord dyads Sethares dissonance heatmap
|
|
287
288
|
|
|
288
289
|
Args:
|
|
@@ -295,6 +296,8 @@ def plotChordDyadsSetharesDissonanceHeatmap(chord: mc.Chord, numPartialsPerNote:
|
|
|
295
296
|
amplCallback: Custom user function callback to generate the amplitude of each spectrum partial
|
|
296
297
|
dissonanceThreshold (float): Dissonance threshold to skip small dissonance values
|
|
297
298
|
dissonanceDecimalPoint (int): Round chord dissonance value in the plot title
|
|
299
|
+
showValues (bool): If True, show numerical values inside heatmap cells
|
|
300
|
+
valuesDecimalPlaces (int): Number of decimal places to display in cell values
|
|
298
301
|
|
|
299
302
|
Returns:
|
|
300
303
|
A list: [Plotly Figure, The plot data as a Pandas Dataframe]
|
|
@@ -313,30 +316,61 @@ def plotChordDyadsSetharesDissonanceHeatmap(chord: mc.Chord, numPartialsPerNote:
|
|
|
313
316
|
numPartialsPerNote=numPartialsPerNote, useMinModel=useMinModel, amplCallback=amplCallback)
|
|
314
317
|
dfFiltered = df[df.dissonance > dissonanceThreshold]
|
|
315
318
|
|
|
316
|
-
# Pivot
|
|
319
|
+
# Pivot para matriz (targetFreq como linhas, baseFreq como colunas)
|
|
317
320
|
matrix_df = dfFiltered.pivot(
|
|
318
|
-
index='targetFreq', columns='baseFreq', values='dissonance'
|
|
321
|
+
index='targetFreq', columns='baseFreq', values='dissonance'
|
|
322
|
+
)
|
|
319
323
|
|
|
320
|
-
#
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
324
|
+
# Reordena linhas e colunas para consistência
|
|
325
|
+
matrix_df = matrix_df.reindex(
|
|
326
|
+
index=sorted(matrix_df.index),
|
|
327
|
+
columns=sorted(matrix_df.columns)
|
|
328
|
+
)
|
|
325
329
|
|
|
326
|
-
#
|
|
327
|
-
x_ticks =
|
|
328
|
-
y_ticks =
|
|
330
|
+
# Índices para o heatmap uniforme
|
|
331
|
+
x_ticks = list(range(len(matrix_df.columns)))
|
|
332
|
+
y_ticks = list(range(len(matrix_df.index)))
|
|
329
333
|
|
|
330
|
-
|
|
331
|
-
|
|
334
|
+
# Labels reais (frequências)
|
|
335
|
+
x_labels = [round(v, 0) for v in matrix_df.columns]
|
|
336
|
+
y_labels = [round(v, 0) for v in matrix_df.index]
|
|
332
337
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
338
|
+
# Formatação do texto (caso showValues=True)
|
|
339
|
+
if showValues:
|
|
340
|
+
text_format = f".{valuesDecimalPlaces}f"
|
|
341
|
+
else:
|
|
342
|
+
text_format = False
|
|
343
|
+
|
|
344
|
+
# Criar heatmap com quadrados iguais
|
|
345
|
+
fig = px.imshow(
|
|
346
|
+
matrix_df.values,
|
|
347
|
+
labels=dict(x="Base Frequency (Hz)",
|
|
348
|
+
y="Target Frequency (Hz)", color="Dissonance"),
|
|
349
|
+
color_continuous_scale="Inferno",
|
|
350
|
+
origin="lower", # força o eixo Y a começar por baixo
|
|
351
|
+
text_auto=text_format
|
|
352
|
+
)
|
|
337
353
|
|
|
354
|
+
# Ajusta ticks para mostrar frequências reais
|
|
355
|
+
fig.update_xaxes(
|
|
356
|
+
tickmode="array",
|
|
357
|
+
tickvals=x_ticks,
|
|
358
|
+
ticktext=x_labels
|
|
359
|
+
)
|
|
360
|
+
fig.update_yaxes(
|
|
361
|
+
tickmode="array",
|
|
362
|
+
tickvals=y_ticks,
|
|
363
|
+
ticktext=y_labels,
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
# Mantém os quadrados sempre iguais
|
|
367
|
+
fig.update_yaxes(scaleanchor="x", scaleratio=1)
|
|
368
|
+
|
|
369
|
+
# Título
|
|
338
370
|
roundedDissonanceValue = round(df.dissonance.sum(), dissonanceDecimalPoint)
|
|
339
371
|
fig.update_layout(
|
|
340
|
-
title=f'<b>Chord Dyads Sethares Dissonance Heatmap</b><br><i>Chord Dissonance={
|
|
372
|
+
title=f'<b>Chord Dyads Sethares Dissonance Heatmap</b><br><i>Chord Dissonance={roundedDissonanceValue}</i>',
|
|
373
|
+
title_x=0.5
|
|
374
|
+
)
|
|
341
375
|
|
|
342
376
|
return fig, dfFiltered
|
|
@@ -42,7 +42,7 @@ def plotScoreSetharesDissonance(score: mc.Score, plotType: str = 'line', lineSha
|
|
|
42
42
|
>>> ml.plotScoreSetharesDissonance(myScore, numPoints=15)
|
|
43
43
|
>>> ml.plotScoreSetharesDissonance(myScore, measureStart=10, measureEnd=20)
|
|
44
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]:
|
|
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, showValues: bool = False, valuesDecimalPlaces: int = 2) -> tuple[plotly.graph_objs._figure.Figure, pd.DataFrame]:
|
|
46
46
|
'''Plot chord dyads Sethares dissonance heatmap
|
|
47
47
|
|
|
48
48
|
Args:
|
|
@@ -55,6 +55,8 @@ def plotChordDyadsSetharesDissonanceHeatmap(chord: mc.Chord, numPartialsPerNote:
|
|
|
55
55
|
amplCallback: Custom user function callback to generate the amplitude of each spectrum partial
|
|
56
56
|
dissonanceThreshold (float): Dissonance threshold to skip small dissonance values
|
|
57
57
|
dissonanceDecimalPoint (int): Round chord dissonance value in the plot title
|
|
58
|
+
showValues (bool): If True, show numerical values inside heatmap cells
|
|
59
|
+
valuesDecimalPlaces (int): Number of decimal places to display in cell values
|
|
58
60
|
|
|
59
61
|
Returns:
|
|
60
62
|
A list: [Plotly Figure, The plot data as a Pandas Dataframe]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: maialib
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.4
|
|
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
|
|
@@ -41,12 +41,13 @@ Dynamic: summary
|
|
|
41
41
|
|
|
42
42
|

|
|
43
43
|
|
|
44
|
-
This library is a multiplatform set of musical tools that enable musical score
|
|
45
|
-
The project **
|
|
44
|
+
This library is a multiplatform set of musical tools that enable musical score analysis and composition in an easy and fast way. <br>
|
|
45
|
+
The project **maiacore** was written in `C++17`, but it also has a `Python` wrapper that allows a greater number of people (i.e. musicians not trained in IT) to also have in their hands the same power and musical tools available in `maialib`.<br><br>
|
|
46
|
+
**IMPORTANT: The maialib Python package includes all maiacore classes and functions and some additional other pure python functions. This website covers the maiacore-only classes and functions documentation, which are also present inside the maialib python package.<br>We hope to add documentation of functions written in Python to this site in the future, so that we can have complete documentation of maialib.**
|
|
46
47
|
|
|
47
48
|
## Advantages
|
|
48
49
|
|
|
49
|
-
- Easy to use to musicians and musical researchers
|
|
50
|
+
- Easy to use to by musicians and musical researchers
|
|
50
51
|
- High computer perfomance and fast calculations
|
|
51
52
|
- Read and write musical scores (MusicXML file format)
|
|
52
53
|
|
|
@@ -56,7 +57,7 @@ The project **core** was wrote in `C++17`, but it also has a `Python` wrapper th
|
|
|
56
57
|
pip install maialib
|
|
57
58
|
```
|
|
58
59
|
|
|
59
|
-
Or, if you have
|
|
60
|
+
Or, if you have an older `maialib` version installed on your system, please get the latest version running: `pip install maialib --upgrade`
|
|
60
61
|
|
|
61
62
|
## Get Started
|
|
62
63
|
|
|
@@ -87,16 +88,23 @@ You can easily export your music files to these file formats above from score ed
|
|
|
87
88
|
- Finale
|
|
88
89
|
- Others
|
|
89
90
|
|
|
90
|
-
Many `MusicXML` files are avaliable for free in the
|
|
91
|
+
Many `MusicXML` files are avaliable for free in the Internet for download.
|
|
91
92
|
|
|
92
93
|
### 2) What can I do if I don't have a `*.xml` file of my target music?
|
|
93
94
|
|
|
94
|
-
- First, make
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
-
|
|
95
|
+
- First, make sure, and look at different websites and online repositories trying to find the `*.xml` (or `*.musicxml` or `*.mxl`) file.
|
|
96
|
+
- After that, you can try these 4 options below:
|
|
97
|
+
- 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
|
|
98
|
+
- Scan the sheet music paper and get a PDF version of it, and after that, use a OMR software to try to convert the PDF file into a `*.xml` file:
|
|
99
|
+
- [MuseScore Import - Experimental](https://musescore.com/import)
|
|
100
|
+
- [ACE Studio PDF to MusicXML Converter](https://acestudio.ai/pdf-to-musicxml/)
|
|
101
|
+
- [Sibelius PhotoScore](https://www.avid.com/photoscore-and-notateme-lite)
|
|
102
|
+
- [ScanScore](https://scan-score.com/en/)
|
|
103
|
+
- [SmartScore 64 NE](https://www.musitek.com/)
|
|
104
|
+
- [Melogen AI](https://melogenai.com/)
|
|
105
|
+
- [PDFtoMusic](https://www.myriad-online.com/en/products/pdftomusic.htm)
|
|
106
|
+
- Pay for other people to type manually note-by-note the PDF into a musical software (link MuseScore, Sibelius, Finale, etc.)
|
|
107
|
+
- Type manually note-by-note the music paper into a musical software (link MuseScore, Sibelius, Finale, etc.)
|
|
100
108
|
|
|
101
109
|
## Documentation (in development)
|
|
102
110
|
|
|
@@ -109,7 +117,7 @@ This project have 2 documentation levels. One for each user type:
|
|
|
109
117
|
|
|
110
118
|
You can explore `maialib` features looking at `python-tutorial` folder ([link here](https://github.com/nyckmaia/maialib/tree/main/python-tutorial)). <br>
|
|
111
119
|
There you will learn how to use and mix `maialib` classes and functions to reach your musical goals
|
|
112
|
-
If you are starting, please check these 3 basic `maialib` Python tutorials:
|
|
120
|
+
If you are starting out, please check these 3 basic `maialib` Python tutorials:
|
|
113
121
|
|
|
114
122
|
- [Create Notes and Chords](https://github.com/nyckmaia/maialib/blob/main/python-tutorial/create_notes_chords.ipynb)
|
|
115
123
|
- [Create a Score](https://github.com/nyckmaia/maialib/blob/main/python-tutorial/create_score.ipynb)
|
|
@@ -122,7 +130,7 @@ If you are starting, please check these 3 basic `maialib` Python tutorials:
|
|
|
122
130
|
## VS Code Users
|
|
123
131
|
|
|
124
132
|
- You can write your Python scripts using `*.py` or `*.ipynb` file extensions.
|
|
125
|
-
- If you decide to use `*.ipynb` extension, make
|
|
133
|
+
- If you decide to use `*.ipynb` extension, make sure to install `nbformat` Python package to enable visualize maialib graphs on VS Code editor.
|
|
126
134
|
To do that: `pip install nbformat --upgrade`
|
|
127
135
|
|
|
128
136
|
---
|
|
@@ -195,7 +203,7 @@ Nycholas Maia - nyckmaia@gmail.com
|
|
|
195
203
|
## Contributing
|
|
196
204
|
|
|
197
205
|
- Fork this project
|
|
198
|
-
- Make your custumizations and
|
|
206
|
+
- Make your custumizations and improvements
|
|
199
207
|
- Please, send me a pull request
|
|
200
208
|
|
|
201
209
|
## License
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
maialib.
|
|
2
|
-
maialib
|
|
3
|
-
maialib-1.9.
|
|
4
|
-
maialib-1.9.
|
|
5
|
-
maialib-1.9.
|
|
6
|
-
maialib-1.9.3.dist-info/METADATA,sha256=ZpFURN3SsymOdfGxulYmfC0vfXzktlYSQV17P0rg9uc,7326
|
|
7
|
-
maialib-1.9.3.dist-info/licenses/LICENSE.txt,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
|
1
|
+
maialib-1.9.4.dist-info/RECORD,,
|
|
2
|
+
maialib-1.9.4.dist-info/METADATA,sha256=jjXyj5vzdpZ3R-ewGUGVVS87DFNWMK_sUr-piuLu3cc,8265
|
|
3
|
+
maialib-1.9.4.dist-info/top_level.txt,sha256=sZWQaa-Up2ba00WpAxBhOLKM6qQYTpUKJMXgSE0Nc48,17
|
|
4
|
+
maialib-1.9.4.dist-info/WHEEL,sha256=kA_iIvT-cxTFNl4I8QDfFHN1DAyqZDYakVXCaObxeLo,112
|
|
5
|
+
maialib-1.9.4.dist-info/licenses/LICENSE.txt,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
|
8
6
|
maialib/setup.py,sha256=1Cbv0DfEUNK1EQHb64-1B0rwbRrsTSnJBY8fVn8gtbU,2168
|
|
9
7
|
maialib/__init__.py,sha256=qiIEL1ZDvpDK0bkGUdZRib3bG973EtKQDFYPFfvJKQA,122
|
|
10
|
-
maialib/xml-scores-examples/Mahler_Symphony_8_Finale.mxl,sha256=F2-QBKNYjBv_sWT-z4LWi1rX84-P3msxtl-g6joA2FQ,229034
|
|
11
|
-
maialib/xml-scores-examples/Beethoven_Symphony_5_mov_1.xml,sha256=iZ2uqqHWMkDtmQVKovT-H_-zZp1SixASi1R7L3TmuOI,4775525
|
|
12
|
-
maialib/xml-scores-examples/Chopin_Fantasie_Impromptu.mxl,sha256=HkouQ_4bI6XDoGmzJITuU81CzQZE2lQjwl6WNlfZmJA,35727
|
|
13
8
|
maialib/xml-scores-examples/Strauss_Also_Sprach_Zarathustra.mxl,sha256=nOQra05RHHDe_dXFs5WBJG2l9R1KQk64urV7lWYC2vw,18863
|
|
14
9
|
maialib/xml-scores-examples/Bach_Cello_Suite_1.mxl,sha256=0XGNlcW8o0W7kkeG8j2V_M4eggdOnrxvvvCkpf6x_z4,29622
|
|
10
|
+
maialib/xml-scores-examples/Chopin_Fantasie_Impromptu.mxl,sha256=HkouQ_4bI6XDoGmzJITuU81CzQZE2lQjwl6WNlfZmJA,35727
|
|
11
|
+
maialib/xml-scores-examples/Mahler_Symphony_8_Finale.mxl,sha256=F2-QBKNYjBv_sWT-z4LWi1rX84-P3msxtl-g6joA2FQ,229034
|
|
15
12
|
maialib/xml-scores-examples/Mozart_Requiem_Introitus.mxl,sha256=_wc4hMaPhtgocUoL94uVzfVN3TGb08z8Xa2BL4SHfgA,91112
|
|
13
|
+
maialib/xml-scores-examples/Beethoven_Symphony_5_mov_1.xml,sha256=iZ2uqqHWMkDtmQVKovT-H_-zZp1SixASi1R7L3TmuOI,4775525
|
|
16
14
|
maialib/xml-scores-examples/Dvorak_Symphony_9_mov_4.mxl,sha256=s7FGUEmFmgcIdmkZ-bv4sOGGj5HYKc2nc760V79DMtM,261438
|
|
17
|
-
maialib/maiacore/maiacore.
|
|
18
|
-
maialib/maiacore/maiacore.
|
|
15
|
+
maialib/maiacore/maiacore.pyi,sha256=nQkrQ-uQjpoYY275mnJGtqP42rLvGLasBFPtylYN3tM,48416
|
|
16
|
+
maialib/maiacore/maiacore.cpython-311-x86_64-linux-musl.so,sha256=9mGN9A-U6eAgmX4zdzP3D01NNvvmKhQEK1lnhSQR5Cg,5181193
|
|
19
17
|
maialib/maiacore/__init__.pyi,sha256=cJfflEKHJ6BPUTlDQt95xZmi2N3zwHJkHEXy27fBd5c,1282
|
|
20
18
|
maialib/maiacore/__init__.py,sha256=IW7E0LuzAttsn0b37SEthCA0LKuzSgkepSpq8DWExYQ,77
|
|
19
|
+
maialib/maiapy/plots.py,sha256=sg6W2OjzZNl8vEVy91URn1nFhfrlRHzXoBkvd4hoZXo,23680
|
|
20
|
+
maialib/maiapy/sethares_dissonance.pyi,sha256=T9rHlpeIao3gEelFJGa8690Tsd1DPzGmToMF_YJ3cNg,3828
|
|
21
|
+
maialib/maiapy/sethares_dissonance.py,sha256=4PZEx_K5DLFOuDuq6ElKM0N97BjDT3XFX47lXeto-iU,13741
|
|
22
|
+
maialib/maiapy/other.pyi,sha256=jEmAc-MDc3iMA2-5hp41RLgNrfBQRMvq-sF2_pexhbo,2163
|
|
21
23
|
maialib/maiapy/__init__.pyi,sha256=L8YtZYJMw_9TrdejcKs2c5xTbu5WMRwlHhKz6Qzulf8,77
|
|
22
24
|
maialib/maiapy/other.py,sha256=4LjETHcpDpNRjSYIbMW_9CuRZTymuoAzog_L3CkYDA0,4345
|
|
23
|
-
maialib/maiapy/__init__.py,sha256=L8YtZYJMw_9TrdejcKs2c5xTbu5WMRwlHhKz6Qzulf8,77
|
|
24
|
-
maialib/maiapy/other.pyi,sha256=jEmAc-MDc3iMA2-5hp41RLgNrfBQRMvq-sF2_pexhbo,2163
|
|
25
25
|
maialib/maiapy/plots.pyi,sha256=nRNUQ9h9kjJHTdbQt4eXv933MOx7TIztIg-inThglB4,3620
|
|
26
|
-
maialib/maiapy/
|
|
27
|
-
maialib/
|
|
28
|
-
maialib/
|
|
26
|
+
maialib/maiapy/__init__.py,sha256=L8YtZYJMw_9TrdejcKs2c5xTbu5WMRwlHhKz6Qzulf8,77
|
|
27
|
+
maialib.libs/libgcc_s-a3a07607.so.1,sha256=5ptIUeAzZweNZrFehN0_Bb5B0FcJgux7NbAFoU8vwwo,148041
|
|
28
|
+
maialib.libs/libstdc++-496613c0.so.6.0.32,sha256=AwZhL5WFT99I2Q6vIxXOhW7qddfuOZ1xecxiP9QTVY4,3494361
|
|
File without changes
|
|
File without changes
|
|
File without changes
|