Code Monkey home page Code Monkey logo

pyabc2's Introduction

pyabc2's People

Contributors

mccalluc avatar pre-commit-ci[bot] avatar zmoon avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mccalluc

pyabc2's Issues

Don't get notes in `Tune` init?

This way, wouldn't have to reject tunes that the melody extraction doesn't currently support, enabling doing other things like working with the header data or viewing with abcjs, etc.. That is, we could wait to raise error until melody extraction is requested. Maybe use some cached properties. This should also make Tune init faster. Could also provide a simpler iterator that doesn't try to "play" the measures but just uses the note regex.

In #33 , a not-insignificant portion of The Session tunes (and 2 Norbeck tunes) are currently rejected (mostly because they have chords).

Unicode reprs

Pitch and such should have a method/property that returns a fancier text repr using unicode acc symbols and subscript octave numbers

Octave for Cb4 (e.g.) is wrong

Pitch.from_name("Cb4").octave should be 4, according to this, but currently returns 3, though with UserWarning: computed pitch class value outside 0--11

Support string kwargs

For Note, when needing to pass key and duration, would be more convenient if those could be passed as strings. These can be unambiguously converted into Key and Fraction.

Probably some other cases too, but I imagine key would be the most helpful.

Enhance coverage

In particular, some error-raising code paths aren't tested currently.

Some things buggy with `Note` to/from ABC

  • in Tune, Note._from_abc_match() should pass key=self.key in order to get the correct .value
  • Note.to_abc() isn't properly key sensitive
  • Some other Note.to_* methods seem to not always work properly if key used when constructing Note from abc

Modernize typing

Use future annotations, and increase mypy strictness. Add pyupgrade --py38-plus to pre-commit.

Update abcjs version

seems like it will take a bit more than just changing the version number (tried current release and nb tune display was broken)

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.