# Evaluating Preprocessing Techniques for Unsupervised Mode Detection in Irish Traditional Music
## 3 Methods
These binary PCP vectors consist of 12 elements, each assigned a value of 1 if a pitch class appears in the piece or 0 if it does not. This binary approach provides a highly simplified representation that may highlight certain modal characteristics while ignoring specific pitch counts. On the other hand, we obtained embeddings from a previous study on genre classification [19], which extracted features directly from ABC notation. In this work, each musical piece was converted into WAV audio format before applying different embedding models. The models used were JukeMIR, Mule, and MERT [42; 43; 44], each providing unique representations of audio. * **JukeMIR. ** This approach is currently one of the most prominent in the field, initially introduced as part of the Jukebox system, which generates music [43]. Jukebox utilizes the latest advancements in Natural Language Processing (NLP) by transforming raw audio signals into discrete sequences, which are then processed directly by NLP models, specifically Transformers. This approach enables Jukebox to train a Transformer-based autoregressive generative model using encoded audio data from an extensive dataset of one million songs. This model has proven to be effective in music generation. However, there is also another work, developed by [PERSON] et al. [45], that demonstrates that meaningful representations can be extracted from Jukebox by utilizing the activations of layer 36. This method generates a 4800-dimensional embedding that effectively represents each song. This one is the implementation used in this work to extract embeddings from the pieces. **Rule. ** [PERSON] [42] recently developed a model that features various types of embeddings using both supervised and unsupervised approaches. In the supervised learning setup, large sets of log-mel spectrograms are used, sourced from both music and general audio domains. For unsupervised learning, SimCLR loss is applied to the same datasets, resulting in a more compact embedding (1728 dimensions) that requires fewer computational resources. In this work, we used the _xxmp-mule_ Python package (version 1.1.2), which implements this algorithm. The default configuration was used. * **MERT. ** The MERT model [44] is designed to capture acoustic patterns inherent in musical audio signals. It employs a deep learning architecture with an initial unsupervised pretraining phase to detect salient spectrogram patterns, followed by a supervised fine-tuning phase. The model is given an unlabeled dataset, enabling it to align its learned representations with specific musical attributes, such as instrument classification. This convergence of unsupervised and supervised learning allows MERT to map raw audio spectrograms to a high-dimensional latent space, where musical information is compactly encoded. The network's final layer produces an N-dimensional vector representation that encapsulates the essence of the input audio, serving as an embedding that reflects the original audio waveform.In this work, we used the _transformers_ Python package, particularly the _m-a-p/MERT-v1-330M_ pretrained model of the _AutoModel class_. After this large preprocessing step, we obtained all the representations. In summary, all of these combinations produced the following representations:  
* Simple PCP, Weighted PCP, and Binary PCP, which have 12 dimensions;
* LLE reduction algorithm applied to Simple PCP, producing a 2-dimensional vector;
* LLE reduction algorithm applied to Weighted PCP, which produced a 2-dimensional vector;
* UMAP reduction algorithm applied to Simple PCP, which produced a 2-dimensional vector;
* UMAP reduction algorithm applied to Weighted PCP, which produced a 2-dimensional vector;
* The three embedding representations--JukeMIR, Mule and MERT--have 4800, 1728 and 1024 dimensions, respectively. Then, we input the obtained representations into various classifiers for unsupervised mode classification. The classifiers were evaluated for both the simple and weighted PCP representations and the embeddings.