Giter Club home page Giter Club logo

kassia's Introduction

Kassia

build

Kassia is a scoring program for creating music written in Byzantine notation. It takes an XML file, parses the neumes and lyrics, and generates a formatted PDF using ReportLab.

Requirements

Python 3.7+

Setup

  1. Make sure Python 3.7 or higher is installed
  2. Install poetry
  3. Install the required packages by running poetry install
  4. Start a poetry shell by running poetry shell
  5. Re-create the sample score in /examples to make sure everything works properly by running python kassia.py examples/sample.xml examples/sample.pdf

Running Kassia

python kassia.py [input_xml_file] [output_pdf_file]

The examples folder has sample scores to experiment with. Input files must be XML files, using the syntax of the sample scores. Output files will be in PDF format.

Editing Scores

Scores are saved as XML files (called BNML). Our wiki page explains the structure of a score.

Fonts

Kassia can utilize true type fonts files to draw neumes. To add new neume fonts, create a folder with the font name, place TTF files in the folder, and create classes.yaml and glyphnames.yaml files. The wiki has more information about how the YAML files should be structured.

Some sample fonts are included for headings and lyrics (Alegreya, EB Garamond, and Gentium Plus). Kassia will scan the /fonts folder and use any TTF files found there.

Contributing

We need your help with documentation, testing, and submitting fixes and features!

Before submitting a pull request, make sure your changes pass all tests.

  1. Install imagemagick and poppler
  2. Run tests:
  • pytest
  • flake8
  • isort . --recursive --diff

kassia's People

Contributors

anaskaejdar avatar hermanfassett avatar ilizol avatar jdaly101 avatar t-bullock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kassia's Issues

Stacked neume alignment in English

On stacked neumes that act like ligatures (ison-apostrophos and stacked apostrophoi) lyrics are currently centered. This seems normal for Greek words/syllables, but in English we should consider having the lyric centered under the primary neume (which will be slightly to the left) and adding a connector (dash or underscore) after it.

Difference in bnml-restructure branch from master one

master branch:

        <neumes>
            bare apos_apos
        </neumes>
        <neumes color="#cf232b">
            gorgUR
        </neumes>
        <neumes>
            olig
        </neumes>
        <lyrics>
            set _
        </lyrics>

master

bnml-restructure branch:

            <syllable>
                <lyric>set</lyric>
                <neume-group>
                    <neume>bare</neume>
                    <neume type="primary">apos</neume>
                </neume-group>
            </syllable>
            <syllable>
                <lyric>_</lyric>
                <neume-group>
                    <neume>apos</neume>
                    <neume type="chronos">gorgUR</neume>
                </neume-group>
            </syllable>
            <syllable>
                <lyric>_</lyric>
                <neume-group>
                    <neume>olig</neume>
                </neume-group>
            </syllable>

bnml-restructure

Use neume names instead of font's chars

This will make Kassia BNML files much more human-readable and human-writable, and will also provide the amount of abstraction necessary to be able to incorporate other people's fonts, which aren't structured the same way that Kassia's own fonts are.

PHASE 0: Starting point
  • Finalize KA New Stathis so we have a stable starting point
    • Consider using "Byzantine Musical Symbols" Unicode block
PHASE 1: Implement the shorthand
  • Create abstractneume class
  • Replace the chars in neume_dict.py with the shorthand neume names
  • Translation layer to convert shorthand abstract neumes into font's chars
    • Read a font's fontconfig.yaml file for char assignments
    • For every neume, replace it with its char counterpart and rebuild the neumes_list
PHASE 2: KA New Stathis-based char shorthand
  • Translation layer to convert KA New Stathis chars to shorthand abstract neumes
PHASE 3: Proper syntax
  • Translation layer to convert shorthand abstract neumes into proper abstract neumes
    • For everything in the shorthand form, translate to proper
    • For everything in proper, translate to proper+positioning info
  • Translation layer from proper abstract to concrete (font chars)
    • Read fontconfig.yaml for char assignments
    • For every neume combination, substitute it with the chars specified in fontconfig (if the given combination is defined therein)
    • For every neume, replace it with the chars specified in fontconfig
    • Create a stacking engine to spatially-align combinations that weren't defined in fontconfig

Large space after Dropcap

Sometimes Kassia makes a large space after a dropcap. This is hard to reproduce, but it seems to happen when a score only takes up one line. Perhaps it's related to line justification, which doesn't always happen when a score is only one line long.

Name change for multiple gorga and haples

From @ilizol:

Could be better to change
digorg -> gorg2
trigorg -> gorg3
?

Same with haple
dipl -> hapl2
trip -> hapl3
tetr -> hapl4
?

We do specify kentimata as ken2, and we discussed naming kentima as ken1, so the suggestion for hap1, hap2, hap3 would be consistent with ken2. On the other hand, diple, triple, etc. do have their own names in Byzantine Notation (they aren't really referred to as "2 haples" or "3 haples") and keeping with diple, triple, etc. would be more consistent with their names in the Unicode block. @barudaret might have to weight in on this.

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.