### Initial Setup: Install Dependencies Source: https://github.com/w3c/musicxml/blob/gh-pages/doctools/README.md Installs all required Python modules, including Django, from the 'requirements.txt' file. This ensures all necessary libraries are available for the project. ```shell pip install -r requirements.txt ``` -------------------------------- ### Running Locally: Start Development Server Source: https://github.com/w3c/musicxml/blob/gh-pages/doctools/README.md Starts the Django development web server. This allows you to preview and interact with the MusicXML documentation locally. ```shell python manage.py runserver ``` -------------------------------- ### Initial Setup: Install Local Generator Tool Source: https://github.com/w3c/musicxml/blob/gh-pages/doctools/README.md Installs the 'mxdocgenerator' tool from a local git checkout. This makes the tool available as an editable package for the project. ```shell git clone https://github.com/w3c-cg/mnxdocgenerator.git /path/to/local/mnxdocgenerator pip install -e /path/to/local/mnxdocgenerator ``` -------------------------------- ### Viewing Static Site: Python HTTP Server Source: https://github.com/w3c/musicxml/blob/gh-pages/doctools/README.md Starts a simple HTTP server to view the generated static HTML documentation. It serves files from the specified directory, making the site accessible via a web browser. ```shell python -m http.server --directory /path/to/docs/ ``` -------------------------------- ### MusicXML Example XML Files Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/sffz-element/index.html Lists example XML files related to MusicXML, including data files and catalog files, which can be used for testing or understanding MusicXML content. ```XML sounds.xml ``` ```XML catalog.xml ``` -------------------------------- ### CSS Styling Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/senza-misura-element/index.html An example of CSS rules that might be applied to elements within a MusicXML document or its rendering context. ```CSS * { font-weight: bold; color: blue !important; } ``` -------------------------------- ### MusicXML sfzp Element Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/sfzp-element/index.html This example demonstrates the structure of the MusicXML sfzp (fortississimo) element within a direction-type and dynamics context. It shows attribute usage for placement and alignment. ```xml ``` -------------------------------- ### MusicXML Prefix Element Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/prefix-element/index.html An example demonstrating the usage of the element within MusicXML, shown in the context of a element. It illustrates how prefixes are represented in musical notation data. ```musicxml
flat 7
``` -------------------------------- ### Initial Setup: Create Virtual Environment Source: https://github.com/w3c/musicxml/blob/gh-pages/doctools/README.md Creates a Python virtual environment named 'musicxmldocs' in the user's home directory. This isolates project dependencies. ```shell python3 -m venv ~/musicxmldocs ``` -------------------------------- ### Initial Setup: Initialize Database Source: https://github.com/w3c/musicxml/blob/gh-pages/doctools/README.md Applies database migrations to set up the project's database schema. This creates a SQLite file named 'db.sqlite3' in the current directory. ```shell python manage.py migrate ``` -------------------------------- ### MusicXML Slide Element Usage Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/slide-element/index.html Illustrates the MusicXML slide element, used for indicating slides in musical notation. This example shows how to mark the start and stop points of a slide associated with musical notes. ```XML G 4 4 1 half up B 4 4 1 half down ``` -------------------------------- ### MusicXML Wavy Line Element Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/wavy-line-element/index.html Demonstrates the usage of the element within MusicXML to represent musical ornaments, specifically a wavy line starting and stopping above a note. This example shows its placement within a and structure. ```MusicXML F 4 2 1 quarter up F 4 2 1 quarter up ``` -------------------------------- ### Initial Setup: Import MusicXML Data Source: https://github.com/w3c/musicxml/blob/gh-pages/doctools/README.md Imports the MusicXML specification data into the local database using the 'loaddb' management command. This populates the database with content. ```shell python manage.py loaddb musicxmldoc.json ``` -------------------------------- ### Trill Sound Attributes Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/listings/musicxml.xsd/index.html Defines attributes for guiding the sound of trills, mordents, turns, shakes, and wavy lines. It specifies start note, step, turn type, acceleration, and beat percentages. ```APIDOC Attribute Group: trill-sound Description: Attributes used to guide the sound of trills, mordents, turns, shakes, and wavy lines. Defaults differ for mordents/inverted-mordents. Default Values (Trills): start-note = "upper" trill-step = "whole" two-note-turn = "none" accelerate = "no" beats = "4" second-beat = 25% last-beat = 75% Default Values (Mordents/Inverted-Mordents): start-note = "main" beats = "3" second-beat = 12% last-beat = 24% Attributes: start-note: Specifies the starting note of the trill (type: start-note) trill-step: Defines the interval step for the trill (type: trill-step) two-note-turn: Specifies the type of two-note turn (type: two-note-turn) accelerate: Indicates if the trill should accelerate (type: yes-no) beats: Number of beats for the trill (type: trill-beats) second-beat: Percentage of the beat for the second note (type: percent) last-beat: Percentage of the beat for the last note (type: percent) ``` -------------------------------- ### Initial Setup: Activate Virtual Environment Source: https://github.com/w3c/musicxml/blob/gh-pages/doctools/README.md Activates the previously created Python virtual environment. All subsequent Python commands will use this environment's interpreter and packages. ```shell source ~/musicxmldocs/bin/activate ``` -------------------------------- ### MusicXML Hello, World Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/tutorial-hello-world/index.html This MusicXML snippet demonstrates the basic structure for a musical score, including the score-partwise element, part-list, score-part, and a measure with attributes like divisions, key, time, and clef. It concludes with a single note (C4) represented by its pitch and duration. ```XML Music 1 0 G 2 C 4 4 whole ``` -------------------------------- ### MusicXML Measure with Notes and Beams Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/slur-element/index.html This snippet demonstrates a MusicXML measure containing several eighth notes. It includes details on pitch (step and octave), duration, voice, type, stem direction, and beaming. The example also shows the start and end of a slur notation. ```XML F 4 2 1 eighth up begin G 4 2 1 eighth up continue A 4 2 1 eighth up continue B 4 2 1 eighth up end ``` -------------------------------- ### MusicXML Barre Element in Frame Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/barre-element/index.html Illustrates the MusicXML `` element used within a `` to define guitar tablature. It shows how to mark the start and stop points of a barre across specific strings and frets, along with other frame-related attributes. ```XML 6 5 12 5 12 4 14 3 14 2 14 1 12 ``` -------------------------------- ### MusicXML Measure with Notes and Slur Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/chord-element-multiple-stop/index.html Demonstrates a MusicXML measure containing two notes. The first note includes a slur notation starting above the staff, and the second note shows standard pitch, duration, stem, and beam information, along with a slur notation ending the sequence. ```XML continueB51116thdownendend ``` -------------------------------- ### MusicXML Hello World Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/tutorial/hello-world/index.html This snippet shows a basic MusicXML file structure for a single measure. It includes the XML declaration, DOCTYPE, and a simple musical notation with a whole note on middle C in 4/4 time. It serves as a minimal MusicXML example. ```XML Music 1 0 G 2 C 4 4 whole ``` -------------------------------- ### MusicXML Element Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/except-voice-element/index.html An example of the element within MusicXML, used to indicate that a voice should be excluded from processing or rendering. ```XML ``` -------------------------------- ### MusicXML Example XML Files Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/opus-reference/examples/index.html Contains links to example XML files used within the MusicXML specification. This includes a sounds.xml file, which likely demonstrates the usage of sound-related elements, and a catalog.xml file, possibly for managing resources. ```XML ``` ```XML ``` -------------------------------- ### MusicXML Chord Diagram Frame Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/tutorial/chord-symbols-and-diagrams/index.html Illustrates the MusicXML element used to define a chord diagram. It specifies attributes like default vertical position, horizontal alignment, and vertical alignment. It includes details about the number of strings and frets, the starting fret position, and individual notes within the chord diagram. ```xml 6 4 6 5 7 4 7 3 6 2 5 1 5 ``` -------------------------------- ### MusicXML Defaults and Part List Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/tutorial-percussion/index.html This snippet demonstrates the structure of a MusicXML document, including default settings for appearance and fonts, and the definition of musical parts with associated instruments and MIDI configurations. ```xml 60 60 7.5 unpitchedPercussionClef1 Drums Snare Drum Kick Drum Crash Cymbal Hi-Hat%g Closed 10 1 39 80 0 10 1 37 80 0 10 1 50 80 0 10 1 43 80 0 Cowbell Cowbell metal.bells.cowbell ``` -------------------------------- ### MusicXML Data and Catalog Files Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/with-bar-element/index.html Includes example data files and catalog files used within the MusicXML ecosystem, such as sounds.xml and catalog.xml. ```XML ``` ```XML ``` -------------------------------- ### MusicXML staff-divide Element Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/staff-divide-element/index.html An example of the MusicXML staff-divide element used within a direction element. It specifies how staff lines should be divided. ```XML ``` -------------------------------- ### CSS Styling Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/attributes-element/index.html An example of CSS rules that might be applied to render or style MusicXML-related content, such as highlighting specific elements or attributes. ```CSS { font-weight: bold; color: blue !important; } ``` -------------------------------- ### CSS Styling Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/tuplet-dot-element/index.html A basic CSS rule demonstrating how to apply font-weight and color styles. This snippet is often used in web contexts to style elements. ```css .diff { font-weight: bold; color: blue !important; } ``` -------------------------------- ### CSS Styling Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/staff-type-element/index.html Demonstrates basic CSS styling rules, likely for presentation or highlighting within a web context. This snippet shows how to apply bold font weight and blue color with important precedence. ```CSS font-weight: bold; color: blue !important; ``` -------------------------------- ### MusicXML Element Example Source: https://github.com/w3c/musicxml/blob/gh-pages/docs/musicxml-reference/examples/damp-element/index.html An example of the element used within a MusicXML score to indicate dampening, shown in context with note and direction elements. ```XML C 5 16 1 half down -2 ```