Riemann: an OpenType font for functional analysis

Music notation symbols, fonts, font sources and font creation, SmuFL.
MalteM
Posts: 67
Joined: 07 Aug 2018, 18:26

Riemann: an OpenType font for functional analysis

Post by MalteM »

Hi everybody,

I made a font that can be used for inputting function harmony symbols in any software that supports OpenType features. For example, the input

Code: Select all

(_5>/DD-79-.> D-46-~~.3~-.~-.5)[s-n] _5T_~4 _6/D_~-9_~->_~-~_5-8 t_3G-8-~-7->=DD-5v-> T-469~~~358
has the following appearance:
Funktionssymbole.png
Funktionssymbole.png (18.25 KiB) Viewed 24729 times
As OCTO suggested in this post, I would like to say something about the font here. You can find the font at this repository on GitHub.

This is only a proof of concept but I think if some of your are interested one could make this
  • more feature-complete (f. e. add top notes above the symbol, complete set of altered figures, triple dominant, accidental glyphs, ligatures for numbers ≥ 10 that take only one horizontal space, …)
  • more robust and easy to use (f. e. another input order of several lines of figures)
  • more beautiful (better horizontal spacing, better glyphs f. e. for double subdominant or slashed subdominant)
  • and maybe base it on a different font (I’d like Helvetica or a clone).
What do you think? Would you use such a font? Anyone interested in participating?

Cheers,
Malte

Edit: Another idea for the list above:
  • Maybe one could make a Fontforge script that produces such a font from an arbitrary “base” font. Of course this would only work if one could make missing superscript glyphs like < with such a script. That script would take information about glyph widths etc. from a (probably hand-made) file, make a “bare” font containing (only) all the needed glyphs and then apply the features.
Last edited by MalteM on 11 Aug 2018, 13:39, edited 1 time in total.
MalteM
Posts: 67
Joined: 07 Aug 2018, 18:26

Re: Riemann: an OpenType font for functional analysis

Post by MalteM »

How to use:
  • Bass notes are preceded by an underscore (_), options by a dash (-).
  • A line is input as tilde (~), a space (see below) as period (.).
  • Several symbols (figures, ~, <, >, v, n, N) following a dash stack—up to three layers, the fourth will be again at lowest level but on the next column. You can skip a layer with a space.
  • Double dominant is input as DD, same for subdominant and minor versions (SS, dd, ss).
  • A slash will slash the following function, f. e. /DD.
  • Input order (all parts are optional):
    1. Bass notes below function symbol.
    2. Function symbol. (If it consists of two parts like f. e. Tp, the bass note has to go before the second part, f. e. T_3p.
    3. First column: bass note, up to three option layers.
    4. Second, third, … column: like first column.
User avatar
OCTO
Posts: 1742
Joined: 05 Oct 2015, 06:52
Location: Sweden

Re: Riemann: an OpenType font for functional analysis

Post by OCTO »

That is absolutely astonishing!
If I may ask you, right now I will not have access to FontForge for several weeks, is there any possibility to drop me a message with the generated font?
It will be nice to inspect the FF file. I guess, you have done it by using ligatures? (Maybe I have missed it completely, I am not an expert!)
It would be interesting to see how it reacts in Finale (as Lyrics).
Freelance Composer. Self-Publisher.
Finale 27.3 • Sibelius 2023.5• MuseScore 4+ • Logic Pro X+ • Ableton Live 11+ • Digital Performer 10+ /// MacOS Monterey (secondary in use systems: Fedora 35, Windows 10)
MalteM
Posts: 67
Joined: 07 Aug 2018, 18:26

Re: Riemann: an OpenType font for functional analysis

Post by MalteM »

OCTO wrote: 11 Aug 2018, 11:39 If I may ask you, right now I will not have access to FontForge for several weeks, is there any possibility to drop me a message with the generated font?
Of course, see PM :)
It will be nice to inspect the FF file. I guess, you have done it by using ligatures? (Maybe I have missed it completely, I am not an expert!)
Partly, yes. It’s done by single substitution (f. e. ~ → horizontal line), ligature substitution (f. e. -5 → ⁵ in first “layer”), contextual substitution (f. e. -56 → ⁵⁶ with the ⁶ in second layer), single glyph positioning (f. e. shift second layer up and left so that it’s set directly above first layer), and contextual gyph positioning (f. e. shift the _5 below a double dominant even further down and right).
Have a look at the file Riemann.fea to see how it works. I suppose that it becomes clearer from that file than from inspecting the font in Fontforge.
It would be interesting to see how it reacts in Finale (as Lyrics).
I’m not sure it’ll work, see this Finale feature request.That also reminds me that I should eventually add a usage example for LilyPond (like I already did for LuaLaTeX) to the repository. For now if anyone stumbles about it: If you want to use it in LilyPond lyrics, you have to

Code: Select all

\override LyricText.stencil = #ly:text-interface::print
and enclose every function symbol/“syllable” in ""; the former makes ~ “unspecial” and the latter -, _ and numbers.
Last edited by MalteM on 11 Aug 2018, 13:41, edited 1 time in total.
User avatar
OCTO
Posts: 1742
Joined: 05 Oct 2015, 06:52
Location: Sweden

Re: Riemann: an OpenType font for functional analysis

Post by OCTO »

After a short test, just a quick response:
The most of the notation programs with a GUI use different tools for creating texts, and I find the Lyrics to be the most efficient to do it. You just type the text and it appears perfectly aligned.
In Finale:

Here I have faced a problem, symbols "-" and "_" create hyphens or word extensions. So here it stopped working.

I have tried to enter it via Chords, but it is more than advanced. Finale has its own idea what I type, and swap with some random chord after I press enter.

By other means there would be Expression tool, but it is on the object basis, and needs to be created for each note.
Attachments
Screen Shot 2018-08-11 at 15.40.26.png
Screen Shot 2018-08-11 at 15.40.26.png (27.68 KiB) Viewed 24713 times
Freelance Composer. Self-Publisher.
Finale 27.3 • Sibelius 2023.5• MuseScore 4+ • Logic Pro X+ • Ableton Live 11+ • Digital Performer 10+ /// MacOS Monterey (secondary in use systems: Fedora 35, Windows 10)
User avatar
OCTO
Posts: 1742
Joined: 05 Oct 2015, 06:52
Location: Sweden

Re: Riemann: an OpenType font for functional analysis

Post by OCTO »

Also: how do you create "11" or "13"?
Freelance Composer. Self-Publisher.
Finale 27.3 • Sibelius 2023.5• MuseScore 4+ • Logic Pro X+ • Ableton Live 11+ • Digital Performer 10+ /// MacOS Monterey (secondary in use systems: Fedora 35, Windows 10)
MalteM
Posts: 67
Joined: 07 Aug 2018, 18:26

Re: Riemann: an OpenType font for functional analysis

Post by MalteM »

OCTO wrote: 11 Aug 2018, 13:40 Here I have faced a problem, symbols "-" and "_" create hyphens or word extensions. So here it stopped working.
Hm … That’s very similar to the problems in LilyPond (here numbers being another problem). There you can just add quotes:

Code: Select all

"_3D-7"
instead of

Code: Select all

_3D-7
Maybe you can get it work similarly in Finale?
MalteM
Posts: 67
Joined: 07 Aug 2018, 18:26

Re: Riemann: an OpenType font for functional analysis

Post by MalteM »

OCTO wrote: 11 Aug 2018, 13:43 Also: how do you create "11" or "13"?
For now: just put every digit in a separate column:

Code: Select all

D-1-3
Same for "9>" etc. Maybe ligatures would be nice here.

I also tried to find a solution for inputting several lines as lines instead of columns. But that would mean that one either had to have a space of negative width to go back to start for the next line or—and I think that could (should) work somehow—use mark-to-mark positioning like it’s used for multiple diacritical marks in Vietnamese.

Edit: mark-to-mark would mean that f. e. instead of D-46-~~-35 you could input D-4~3-6~5 with 4 being attached to D (mark-to-base), ~ to 4 and 3 to ~ (mark-to-mark). Then the same with the second line 6~5. Probably it won’t be possible to have several marks to the same base (D in that case) but you’d have to add the second row to an invisible base (and maybe that base could have the vertical offset so you wouldn’t even need different glyphs for different heights).

But I’m a total newbie to fonts and font features so I don’t know whether these thoughts are realistic at all ;)

2nd edit: Here you can find a shord tutorial about mark-to-mark positioning which shows an example of an “o” with six stacked diacritical marks—it seems to be possible to add an arbitrary number of marks.
User avatar
OCTO
Posts: 1742
Joined: 05 Oct 2015, 06:52
Location: Sweden

Re: Riemann: an OpenType font for functional analysis

Post by OCTO »

MalteM wrote: 11 Aug 2018, 13:46
OCTO wrote: 11 Aug 2018, 13:40 Here I have faced a problem, symbols "-" and "_" create hyphens or word extensions. So here it stopped working.
Hm … That’s very similar to the problems in LilyPond (here numbers being another problem). There you can just add quotes:

Code: Select all

"_3D-7"
instead of

Code: Select all

_3D-7
Maybe you can get it work similarly in Finale?
Unfortunately it doesn't work that way, either Sibelius nor Finale. I don't have Dorico to test.

Is it possible to add :n :s :f in to the font?
Such as:
Screen Shot 2018-08-11 at 16.26.32.png
Screen Shot 2018-08-11 at 16.26.32.png (102.61 KiB) Viewed 24700 times
As well Polar-chord (P, p) and Phrygian (F, f), as well superscript + for augm. and °for dim. chords.
I use also superscript of > < for chromatic variants, before the chords.
Screen Shot 2018-08-11 at 16.29.50.png
Screen Shot 2018-08-11 at 16.29.50.png (228.96 KiB) Viewed 24698 times
Freelance Composer. Self-Publisher.
Finale 27.3 • Sibelius 2023.5• MuseScore 4+ • Logic Pro X+ • Ableton Live 11+ • Digital Performer 10+ /// MacOS Monterey (secondary in use systems: Fedora 35, Windows 10)
MalteM
Posts: 67
Joined: 07 Aug 2018, 18:26

Re: Riemann: an OpenType font for functional analysis

Post by MalteM »

OCTO wrote: 11 Aug 2018, 14:27 Unfortunately it doesn't work that way, either Sibelius nor Finale. I don't have Dorico to test.
Hm … Maybe one should think of other symbols instead of _ and - then. Any suggestions?
Is it possible to add :n :s :f in to the font?
Yes, that would be possible. I first thought one could make this as stylistic alternates for < and > but you also use < and > at the same time so one would need another input symbol … I would like to use only ASCII symbols so ♭ and ♯ are not an option ;)
As well Polar-chord (P, p) and Phrygian (F, f)
For the function name the font already contains the complete alphabet. But I have to admit I never heard of these as functions, what are they? I also have never seen things like MD but I think that it’s the same thing I would call Dg or DG? (g/G for “Gegenklang”, in English [sic] also “Leittonwechselklang”) I tried to find it in the Swedish Wikipedia article on functional analysis but I could find only “kontraparalleler” what looks like the German “Gegenklänge”.
as well superscript + for augm. and °for dim. chords.
That could be done, also half-diminished chords; again, one would need a reasonable input symbol. Maybe +, o (the small letter), and a ligature /o?
I use also superscript of > < for chromatic variants, before the chords.
You can already do that (just type ->SMD) but again I have to admit that I have no idea what <s(D)⁶₅ is, could you please enlighten me?
Post Reply