You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The **Harte Library** is an extension of the [music21 library](http://web.mit.edu/music21/) tailored for working with music chords encoded according to the [Harte Notation](https://ismir2005.ismir.net/proceedings/1080.pdf).
8
9
9
-
Extension of the [music21 library](http://web.mit.edu/music21/) for working with music chords encoded according to the [Harte Notation](https://ismir2005.ismir.net/proceedings/1080.pdf).
10
-
11
-
This project is part of [ChoCo](https://github.com/smashub/choco), a dataset of 20K+ timed chord annotations of integrated and standardised scores and tracks.
12
-
13
-
The Harte Library mainly extends the *Chord module* of muisc21. In addition, the *Interval module* is also extended to support intervals as represented in the chords encoded in Harte.
10
+
This project is a component of [ChoCo](https://github.com/smashub/choco), a comprehensive dataset containing over 20,000 timed chord annotations sourced from integrated and standardized scores and tracks.
14
11
15
12
The library has the following dependencies:
13
+
16
14
-[music21](http://web.mit.edu/music21/): as an extension of the library itself;
17
15
-[Lark](https://github.com/lark-parser/lark): for parsing the chords in Harte.
18
16
19
17
## Installation
20
18
21
-
The library has been uploaded to PyPi, therefore for installation simply launch:
19
+
The library is available on PyPi. To install, simply execute the following command:
22
20
23
21
```bash
24
-
pip install harte-library
22
+
pip install harte-library --upgrade
25
23
```
26
24
27
-
## Main Functionalities
25
+
## 🔑 Key Features
28
26
29
-
The main functionalities of the Harte Library are:
27
+
The Harte Library offers several core functionalities:
30
28
31
-
* to make musical chords notated according to Harte Notation interoperable with the music21 library;
32
-
* to make chords notated in Harte interpretable, e.g. by unrolling the shorthand;
33
-
* to simplify and homogenise chords in Harte, via the *prettify_harte* functionality.
29
+
-**Interoperability**: Seamlessly integrate musical chords notated in Harte Notation with the music21 library.
30
+
-**Interpretability**: Easily interpret chords notated in Harte format, including the unrolling of shorthand representations.
31
+
-**Simplification**: Streamline and standardize chords in Harte notation using the prettify_harte functionality.
34
32
35
33
## Usage
36
34
37
-
### Interval Module Extension
35
+
### Interval Module
38
36
39
-
The Harte Library extends the *Interval Module* of music21 to ensure interoperability between intervals expressed according to Harte notation and the interval class of music21.
37
+
The Harte Library extends the Interval Module of music21 to ensure interoperability between intervals expressed according to Harte notation and the interval class of music21.
40
38
41
-
The __HarteInterval__ class accepts an interval expressed in Harte Notation as input and allows all the properties and methods of the music21 Interval module to be used:
39
+
The **HarteInterval** class accepts an interval expressed in Harte Notation as input and allows all the properties and methods of the music21 Interval module to be used:
42
40
43
41
```python
44
42
from harte.interval import HarteInterval
@@ -49,11 +47,11 @@ int_name = interval.name
49
47
int_is_consonant = interval.isConsonant()
50
48
```
51
49
52
-
### Chord Module Extension
50
+
### Chord Module
53
51
54
-
The main functionality of the Harte Library is an extension of the *Chord Module* of music21.
52
+
The primary functionality of the Harte Library extends the Chord Module of music21.
55
53
56
-
This is possible by means of the class __Harte__, which accepts as input a chord expressed in Harte Notation and allows all properties and methods of the Chord module of music21 to be used:
54
+
This is achieved through the **Harte** class, which accepts a chord expressed in Harte Notation as input, enabling the utilization of all properties and methods available in the Chord module of music21:
name = chord.fullName # Chord {G-sharp | A | E | B-sharp | C-sharp | E-sharp} Quarter
63
+
name = chord.fullName # Chord {C-sharp in octave 4 | E in octave 3 | E-sharp in octave 4 | G-sharp in octave 4 | A in octave 4 | B-sharp in octave 4} Quarter
66
64
```
67
65
68
-
In addition, the library implements new methods specific to Harte notation, including:
69
-
*__get_degrees__: returns the intervals of the chord, disregarding those expressed by the shorthand
70
-
*__get_root__: returns the root of the chord expressed as a string
71
-
*__get_bass__: returns the interval between the root note and the bass note
72
-
*__contains_shorthand__: returns `True` if the chord contains a shorthand, `False` otherwise
73
-
*__get_shorthand__: returns the chord's shorthand, if present
74
-
*__unwrap_shorthand__: returns a list containing all the intervals in the chord, including those wrapped by the shorthand
75
-
*__prettify__: breaks the chord into its components and recomposes it by choosing the most summarised shorthand, if possible.
66
+
Additionally, the library introduces new methods tailored specifically for Harte notation, including:
67
+
68
+
-**get_degrees()**: Retrieves the intervals of the chord, excluding those represented by shorthand.
69
+
-**get_midi_pitches()**: Obtains the MIDI pitches of the chord as an ordered list.
70
+
-**get_root()**: Retrieves the root of the chord as a string.
71
+
-**get_bass()**: Calculates the interval between the root note and the bass note.
72
+
-**contains_shorthand()**: Determines whether the chord contains a shorthand representation, returning `True` if present, `False` otherwise.
73
+
-**get_shorthand()**: Retrieves the shorthand representation of the chord, if available.
74
+
-**unwrap_shorthand()**: Unwraps the shorthand notation, returning a list containing all intervals in the chord, including those represented by shorthand.
75
+
-**prettify()**: Decomposes the chord into its constituent components and recomposes it by selecting the most concise shorthand representation, if applicable.
76
76
77
77
```python
78
78
from harte.harte import Harte
@@ -82,10 +82,12 @@ chord = Harte('D:(b3,5,7,9)')
82
82
pretty_harte = chord.prettify() # D:minmaj7(9)
83
83
```
84
84
85
-
## Contributing
85
+
## Contributing
86
+
We welcome contributions from the community to enhance the Harte Library. Whether you want to report a bug, suggest a new feature, or contribute code, your help is greatly appreciated!
87
+
88
+
## Reporting Issues
86
89
87
-
Every type of contribution to the library is widely encouraged.
88
-
The library has also just been released and any bug reports are highly appreciated.
90
+
If you encounter any bugs, have feature requests, or have suggestions for improvements, please open an [issue](https://github.com/andreamust/harte-library/issues) with detailed information about the problem or suggestion.
89
91
90
92
## License
91
93
@@ -110,4 +112,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
110
112
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
111
113
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
0 commit comments