<jupyter_start><jupyter_text>Music21Music21 is a set of tools for helping scholars and other active listeners answer questions about music quickly and simply.<jupyter_code>from music21 import *
environment.UserSettings()['lilypondPath']='/Users/francois/bin/lilypond'
environment.set('pdfPath','/Users/francois/bin/musescore')
environment.set('graphicsPath','/Users/francois/bin/musescore')<jupyter_output><empty_output><jupyter_text>ipython magic, this one to handle show() directly<jupyter_code>%load_ext music21.ipython21
c = chord.Chord("C4 E4 G4")
c.isConsonant()
c.show()
!wget http://www.piano-midi.de/midis/debussy/deb_clai_format0.mid
midi_data = converter.parse('deb_clai_format0.mid')
midi_data.show()
sp = midi.realtime.StreamPlayer(midi_data)
sp.play()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13081761006289308, 'fraction_numerical': 0.018867924528301886, 'mean_word_length': 8.255813953488373, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '580891', 'license': 'MIT', 'n_tokens_mistral': 300, 'n_tokens_neox': 291, 'n_words': 47, 'path': 'notebooks/music21.ipynb', 'repo_name': 'fdion/5_music_things', 'size': '795'}