Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)

Derive.Call.ScaleDegree

Contents

Description

Create val calls for scale degrees. These are the calls that a scale brings into scope, so they should be referenced from scale_note_to_call implementations.

Synopsis

equal tempered

Create a pitch val call for the given scale degree. This is intended to be used by scales to generate their calls, but of course each scale may define calls in its own way.

Convert a note and frac arg into a tracklang expression representing that note.

TODO This is actually totally wrong, because a Pitch.Note isn't expected an expression, but just the call part of the expression. Other functions want to parse it, and they're not expecting spaces in there. What this should actually do is return a real Expr Text, or a specialized version where the Call is known to be a Pitch.Note. But for that, scale_input_to_note would have to change, and that would probably touch a lot of things. So for the moment, I leave this function in place to document where a hypothetical pitch_expr should be called, but it doesn't actually do anything.

just

Map from named intervals to the interval's ratio.

Arguments

 :: DeriveT.Scale -> NamedIntervals -> Pitch.Hz add an arbitrary extra interval to the output -> Scale.PitchNn -> Scale.PitchNote -> ValCall

A fancier version of scale_degree that takes interval arguments.