## 3 Experiments and Discussion
When determining the key using samples obtained as the concatenation of the chords located at the beginning and the end of a composition, the major character of the ending chord is often masked by the minor sounding of the beginning and the ending chords just before the final ending in a major key. This is reflected by an efficacy of about 90%. When analyzing entire pieces of music (Whole), the efficacy obtained for the set of preludes by [PERSON] reached 100% both using the method implementing the signature of fifths and using the strictly correlational approach based on 24 key-profiles of Albrecht-Shanahan. A much lower efficacy (79.2%) was obtained in the case of the strictly correlational method using Temperley key-profiles: incorrect keys were indicated for five preludes (Preludes No. 10, 14, 18, 20, and 24), all composed in minor keys. In the collection of preludes by [PERSON], the highest efficacies of key detection were observed while analyzing the ending chords of pieces. The key was detected with 100% efficacy using the method based on the signature of fifths as well as utilizing the strictly correlational approach with the Albrecht-Shanahan key-profiles. Significantly lower efficacies (<80%) were observed while analyzing the initial fragments of the preludes (Beginning). This can be explained by the uniqueness/originality of the beginning of many preludes, which mask the true key of the overall composition. Good examples of such pieces are preludes No. 2, 5, and 11. It is also worth noticing that the efficacy of the key detection performed on entire pieces was lower (reaching about 80%) than the efficacy corresponding to the analyses conducted on the beginning or the ending fragments (>87%). This was undoubtedly caused by the unambiguous setting of the ending of the preludes in the correct key but also due to the presence of pieces whose middle parts were composed in a different key than the beginning and ending ones (e.g., Prelude No. 15). As far as the songs by The Beatles are concerned, the worst results were obtained when analyzing the initial fragments of pieces (Beginning). In other cases, the results were slightly better. The results obtained for the sample representations using the aggregate durations of individual pitch-classes, illustrated in Figures 11-13, were in most cases very similar to the ones obtained for the multiplicities of pitch-classes, illustrated in Figures 8-10. In the case of [PERSON]'s preludes, there was a rather significant discrepancy between the key detection efficacies observed for the approaches with the multiplicities of occurrences and the aggregate durations of individual pitch-classes, when analyzing the ending chords (End) as well as the concatenation of the beginning and ending fragments of these pieces (Beginning_End). This observation can be explained by the major chord endings of many of the preludes written in minor keys (Preludes No. 6, 8, 10, 12, 14, 16, 18, 20, 22, and 24). In these cases, the final chords were usually relatively long, hence the chances of detecting a major key were higher. Better results were obtained for the analysis of samples comprised  
Figure 13: The key-finding efficacies obtained for the songs from the album A Hard Day’s Night by The Beatles; the samples represented with the aggregate durations of individual pitch-classes. of the concatenated beginning and ending fragments of pieces (Beginning_End). This is the result of the temporal dominances of the minor parts of the beginning and the ending of the analyzed pieces (e.g., Preludes No. 6, 16, and 22). One of the purposes of the experiments we conducted was to find out whether it is worth analyzing the entire piece of music in order to determine its key, or if it is enough to analyze much shorter fragments. In general, determining the key based on the entire piece should provide better results, however, the analysis of the entire piece may not always be desired or possible.