1

I am trying to include a very short piece of musical score (five line stave, 10 notes) into a document of mine. Unfortunately I only have a low-res image (see attached), which is not suitable for printing.

What's the best/quickest way to recreate that score in my article, short of having to learn and deal with MusicTeX, Lilypond or whatever else there might be out there? I am looking for a flat learning curve above all.

enter image description here

5
  • ... you sure you don't want to learn MusicTeX? Then the question doesn't really have much to do with this site, does it? — anyway, pick Encore or some GUI app to draw these things, screenshot at high resolution, then include as image should be reasonably good.
    – user202729
    Jan 20, 2022 at 10:26
  • Yes, I'm positive that I don't want to learn MusicTeX at this point. That said, I am not a huge fan of „some GUI apps“. Luckily I have since found abc and are confident to be able to make it work.
    – Ingmar
    Jan 20, 2022 at 11:38
  • Actually duplicate of Can I create music sheets with LaTeX? - TeX - LaTeX Stack Exchange then, although there's no abc answer there. (I left a comment there too) you may want to post one there for completion if you know how to use it.
    – user202729
    Jan 20, 2022 at 11:52
  • I am very much for looking up old answers … That said, > 11 years is a bit dated, even by TeX standards. I’ll post an answer, though, if I manage to come up with a good one.
    – Ingmar
    Jan 20, 2022 at 13:42
  • Old answers are up-to-date or not depends on whether readers point out the errors when it becomes outdated or not...
    – user202729
    Jan 20, 2022 at 14:00

2 Answers 2

5

Here is an example of how the code to the above excerpt might look in MusicTeX. You can include the produced pdf or directly use the code between \begin{} ... \end{document} in your file.

\documentclass[11pt]{standalone} 
\usepackage{musixtex}
\def\freqbarno{9999}

\begin{document}
\begin{music}
  \generalmeter{\meterfrac68}
  \startextract
  \NOTes \qlp{jl}\en\bar
  \Notes \qa{n} \cl{l}\en \Notes \qa{j} \cl{l}\en\bar
  \NOtes \qup{g} \qu{g} \cu{g}\en\bar
  \NOTEs \hlp{j}\en
  \setrightrepeat
 \endextract
\end{music}
\end{document}

enter image description here

2
  • Thank you for your answer. I am afraid this does look more (powerful and thus) complex than the situation warrants right now. As I'll elaborate in my own answer below, I have found a solution with abc that fits my simple needs.
    – Ingmar
    Jan 21, 2022 at 6:50
  • Comparing the output of all (at the time of this writing) three examples, your example looks best. Elegant spacing and well proportioned line thicknesses, I guess.
    – Jan
    Jan 21, 2022 at 7:44
2

I am posting this as an answer, since comments don’t allow for sufficient flexibility in formatting (and I have since found a good answer to my question).

The ABC package allows for music notation in the ABC format to be incorporated in your LaTeX files. Both the approach (adding another environment to you source file) and the notation are simple – the latter very much intentionally so: a bit like Markdown for Music, if you will :-)

\documentclass{article}
\usepackage{abc}

\begin{document}
\begin{abc}
X:1
T:% Title left emptry
M:6/8
K:C treble
L: 1/8
| c3 e3 | g2 e1 c2 e1 | G3 G2 G | c6 z2 |]
\end{abc}
\end{document}

Notation should be pretty obvious when you compare to the final result:

enter image description here

1
  • 1
    Just one remark from a musician: please remove the bar before the first note, and your last measure is too full (you have inserted a rest instead of the repeat).
    – C. Peters
    Mar 31, 2022 at 11:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .