This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0

Maestro

This library provides music theory abstractions and functionalities.

Definition

octaveOf : Int -> Int
noteOf : Int -> Int
keyAtOctave : Key -> Int -> Int
module Maestro exposing (..)

{-| This library provides music theory abstractions and functionalities.

# Definition
@docs octaveOf, noteOf, keyAtOctave
-}

import Maestro.Tone exposing (Key, keyToValue)


{-|
-}
octaveOf : Int -> Int
octaveOf value =
    value // 12


{-|
-}
noteOf : Int -> Int
noteOf value =
    value % 12


{-|
-}
keyAtOctave : Key -> Int -> Int
keyAtOctave key octave =
    (keyToValue key) + (12 * octave)