Skip to content
Implementation of the musicXML specification in Swift
Swift
Branch: latest
Clone or download

README.md

MusicXML

Swift Version Platforms Build Status Code Coverage

A work-in-progress implementation of the musicXML specification in Swift.

The goal of this project is to allow Swift users to read, manipulate, and write musicXML files in a richly-typed manner on any platform supported by Swift.

Roadmap

The upcoming pre-release versions will be focused on completing different tasks.

0.3.0

Pre-release version 0.3.0 will be defined by completing the implementation of the encoding of abstract musical content. The LilyPond Test Suite tests will be transformed into round-trip tests to ensure that the plumbing is clean.

0.4.0

Pre-release version 0.4.0 will be defined by refining the public interfaces exposed by the MusicXML package. Up until this point, pubic initializers may be somewhat clumsy.

Getting Started

Requirements

Use the Swift Package Manager to include the MusicXML module into your project.

Usage

If you want to use the MusicXML module in your own project, add the MusicXML package to the dependencies section of your Package.swift file:

let package = Package(
    name: ...,
    products: [ ... ],
    dependencies: [
        ...,
        .package(url: "https://github.com/dn-m/MusicXML", from: "0.1.0")
    ],
    targets: [ ... ]
)

Then, import the MusicXML module into a file which uses it:

import MusicXML

You can decode a MusicXML structure in a variety of ways:

let fromData: MusicXML = try MusicXML(data: data)
let fromString: MusicXML = try MusicXML(string: string)
let fromURL: MusicXML = try MusicXML(url: url)

Development

To contribute to the MusicXML package, clone the git repository:

git clone https://github.com/dn-m/MusicXML && cd MusicXML

Build the package:

swift build

Run the tests:

swift test

If you use the Xcode IDE, use the Swift Package Manager to generate an .xcodeproj file:

swift package generate-xcodeproj

More Resources

See the MusicXML XSD Schema Reference for more information about how musicXML is structured.

You can’t perform that action at this time.