GithubHelp home page GithubHelp logo

adlrwbr / staff Goto Github PK

View Code? Open in Web Editor NEW

This project forked from staff-rs/staff

0.0 0.0 0.0 568 KB

Music theory and score rendering library with midi, notes, chords, scales, and more.

Home Page: https://staff-rs.github.io

License: MIT License

Rust 100.00%

staff's Introduction

Staff

crate documentation

Website

Music theory and score rendering library with midi, notes, chords, scales, and more.

Usage

use staff::{midi, Chord, Pitch};

let chord = Chord::from_midi(
    midi!(C, 4),
    [midi!(E, 3), midi!(G, 3), midi!(C, 4)]
);

assert_eq!(chord.to_string(), "C/E");

let pitches = [Pitch::E, Pitch::G, Pitch::C];
assert!(chord.into_iter().eq(pitches));

Dioxus

Staff { 
    note {
        natural: Natural::F,
        accidental: Accidental::Sharp
    }
    note {
        natural: Natural::G,
        accidental: Accidental::Flat,
        duration: Duration::from(DurationKind::Half)
    }
    note { natural: Natural::A }
    
    hr {}
    
    note {
        natural: Natural::C,
        octave: Octave::FIVE,
        duration: Duration::from(DurationKind::Whole)
    }
}
svg { width: "500px", height: "500px", xmlns: "http://www.w3.org/2000/svg",
    FretDiagram { 
        fret { index: 1, string: 0 }
        frets { from: 2, to: 4, string: 0 }
        fret { index: 5, string: 0, is_muted: true }
    }
}

Features

  • render: Enable render module
    • svg: Enable rendering to SVG
  • synth: Enable synth module for
  • serde: Impl Deserialize and Serialize for many crate types

staff's People

Contributors

matthunz avatar vortexofdoom avatar norcalaussie avatar plule avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.