Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm looking for a way to typeset Carnatic (Indian) music. The notation system is textual, similar to solfa, with some symbols like comma, semi-colon and | for durations, and bar lines.

Fine control for notes, phrases, and spacing between is needed. Control over Vertical alignment is needed too.

Carnatic Music Score with LaTeX

\documentclass[10pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\author{Ananth}
\begin{document}

$ \begin{array}{llll|ll|ll||}
\\
g,m,    & d,,,  & nndn  & \dot{s},,, &
d n s n     & , d d n   & d d m g   & m g r s \\
nin ne  & ko-   & - & ri- &
yun & ,nna  & ---ra & ---- \\
\\
rs\d{nd}    &, \d{n}sr  & snsg  &mddn   &
\dot{s}\dot{g}\dot{r}\dot{s}    & nd\dot{s}n    &dmgd   &mgrs \\
ne--na  &--rum- &chi--- &nan--- &
nee--lu &--ko-  &---ra  &----\\

\end{array} $

\paragraph* { another array  \break}

$
\begin{array}{llllllllllllllll|}
s&g&r&s&n&d&s&n&d&m&g&d&m&g&r&s\\
ne&&&lu&&&ko&&&&&ra&&&\\
\end{array} $

\paragraph*{That was array. Now using ams' align package}

 \begin{align}
rsn & d && ,nsr && snsg && mddn | \\
ne-- & na   &&--rum-    &&chi---    &&nan---    \\
\intertext{and}
sgrs    && ndsn && dmgd && mgrs || \\
nee--lu &&--ko- &&---ra &&----\\ \end{align} 

verdict: Tables, Arrays, ams' align package - all  are good for swara notation. Not upto the mark for synchronizing lyrics.


\end{document}

Grid like, fixed spacing between notes is possible - Tables etc., and are widely used too. I'm looking for flexible spacing between musical phrases, and points of alignment between lines. Inspired by Lilypond, one could say.

Is it possible to do these with LaTeX? If so, how?

I've tried using arrays and align (ams) with not so satisfactory results.

share|improve this question
1  
Till a better answer comes along: the TeX FAQ has a list of packages for typsetting music in TeX. And there's also Lilypond. Have you tried some of these, and what do they fail at? –  ShreevatsaR Jul 27 '10 at 12:44
    
What ShreevatsaR said... (Perhaps you should promote that to an answer rather than a comment?) –  Norman Gray Jul 27 '10 at 16:04
    
Lilypond produces excellent music score, but in western staff notation/guitar tab etc. I'm using lilypond for such scores. Indian music notation is not graphic, it's mostly textual. Most folks use a word processor/ spreadsheet to get it done. Problem is the score becomes a 'grid' and 'phrases' are difficult to distinguish. I will add an image and make my point more clear. –  ananth.p Jul 27 '10 at 22:09
    
Is this correct? Each "phrase" is a block of text in two lines with notes above lyrics, and you want to typeset these "phrases"/blocks with flexible spacing and alignment. –  ShreevatsaR Jul 31 '10 at 18:56
1  
I had never seen this notation before, but at a first glance it seems to have a lot in common with linguistic glosses. Perhaps the gloss macros from gb4e can be of help. –  Taco Hoekwater Aug 8 '10 at 19:12

2 Answers 2

I have to experience in this type of music. But it seems that you want some fancy align/verbantim stuff to typeset it.

Ideally a new package needs to be designed for this.

I seems that ConTeXt with Auctex and table editing mode can greatly simplify such typesetting for you.

Samples: http://wiki.contextgarden.net/TABLE
Auctex help: http://wiki.contextgarden.net/More_AUCTeX

share|improve this answer

enter image description here

\documentclass[0.10pt,a4paper]{book}
\usepackage[utf8x]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{shadow}
\usepackage{tikz}

\renewcommand{\baselinestretch}{1.0}  %  To make the linespacing in the document 1.5cm
\renewcommand{\bibname}{References}  %  To make the linespacing in the document 1.5cm
\usepackage{amsmath,graphicx,color,geometry,fancyhdr,subfigure, multicol,multirow}
\geometry{left=0.31in,right=1in}
\geometry{top=1.1in,bottom=1in}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
%\documentclass[10pt]{article}


\renewcommand{\baselinestretch}{1.5}  %  To make the linespacing in the document 1.5cm
\renewcommand{\bibname}{References}  %  To make the linespacing in the document 1.5cm
\usepackage{graphicx}\usepackage{color}\usepackage{fancyhdr}\usepackage{subfigure}\usepackage{multicol}\usepackage{multirow}%\usepackage[T1]{fontec}
\usepackage{listings}



\usepackage{ucs}
\usepackage{amsfonts}
\author{Ananth}


\makeatother

\begin{document}

\[ \left\{
\begin{array}{l|llllll|llllll|llllll|lllll}
\rm{:s} & \rm{s} & :- & \rm{:m} & |\rm{d} & :- & \rm{:r} & \rm{m} & :- & \rm{:f} & |\rm{s} & :- & \rm{:l} & \rm{s} & :- & \rm{:d.f} & |\rm{m} & :- & \rm{:r} & \rm{d} & :- & :- & |- & :-\\
\rm{:d} & \rm{d} & :- & \rm{:d} & |\rm{s_{1}} & :- & \rm{:t_{1}} & \rm{d} & :- & \rm{:r} & |\rm{d} & :- & \rm{:d} & \rm{t_{1}} & :- & \rm{:d.r} & |\rm{d} & :- & \rm{:t_{1}} & \rm{d} & :- & :- & |- & :-\\
\rm{:m} & \rm{m} & :- & \rm{:s} & |\rm{m} & :- & \rm{:s} & \rm{s} & :- & \rm{:f} & |\rm{m} & :- & \rm{:f} & \rm{r} & :- & \rm{:f.l} & |\rm{s} & :- & \rm{:f} & \rm{m} & :- & :- & |- & :-\\
\rm{:d} & \rm{d} & :- & \rm{:d} & |\rm{d} & :- & \rm{:s_{1}} & \rm{d} & :- & \rm{:d} & |\rm{d} & :- & \rm{:f_{1}} & \rm{s_{1}} & :- & \rm{:s_{1}.s_{1}} & |\rm{s_{1}} & :- & \rm{:f_{1}} & \rm{d} & :- & :- & |- & :-
\end{array}\right\} \]

\vspace{2mm}
\[ \left\{
\begin{array}{l|llllll|llllll|llllll|lllll}
\rm{:s} & \rm{s} & :- & \rm{:m} & |\rm{d} & :- & \rm{:r} & \rm{m} & :- & \rm{:f} & |\rm{s} & :- & \rm{:l} & \rm{s} & :- & \rm{:d.f} & |\rm{m} & :- & \rm{:r} & \rm{d} & :- & :- & |- & :-\\
\rm{:d} & \rm{d} & :- & \rm{:d} & |\rm{s_{1}} & :- & \rm{:t_{1}} & \rm{d} & :- & \rm{:r} & |\rm{d} & :- & \rm{:d} & \rm{t_{1}} & :- & \rm{:d.r} & |\rm{d} & :- & \rm{:t_{1}} & \rm{d} & :- & :- & |- & :-\\
\rm{:m} & \rm{m} & :- & \rm{:s} & |\rm{m} & :- & \rm{:s} & \rm{s} & :- & \rm{:f} & |\rm{m} & :- & \rm{:f} & \rm{r} & :- & \rm{:f.l} & |\rm{s} & :- & \rm{:f} & \rm{m} & :- & :- & |- & :-\\
\rm{:d} & \rm{d} & :- & \rm{:d} & |\rm{d} & :- & \rm{:s_{1}} & \rm{d} & :- & \rm{:d} & |\rm{d} & :- & \rm{:f_{1}} & \rm{s_{1}} & :- & \rm{:s_{1}.s_{1}} & |\rm{s_{1}} & :- & \rm{:f_{1}} & \rm{d} & :- & :- & |- & :-
\end{array}\right\| \]
 Kerui:

\vspace{2mm}
\[ \left\{
\begin{array}{l|llllll|llllll|llllll|lllll}
\rm{:d} & \rm{f} & :- & \rm{:m} & |\rm{l} & :-\rm{.l} & \rm{:l} & \rm{s} & :- & :- & |- & :- & \rm{:m} & \rm{s} & :- & \rm{:s.m} & |\rm{d} & :- & \rm{:m} & \rm{r} & :- & :- & |- & :-\\
\rm{:d} & \rm{d} & :- & \rm{:d} & |\rm{d} & :-\rm{.d} & \rm{:d} & \rm{d} & :- & :- & |- & :- & \rm{:d} & \rm{m} & :- & \rm{:d.t_{1}} & |\rm{l_{1}} & :- & \rm{:d} & \rm{t_{1}} & :- & \rm{:t_{1}} & |\rm{t_{1}} & :-\\
\rm{:m} & \rm{l} & :- & \rm{:l} & |\rm{f} & :-\rm{.f} & \rm{:f} & \rm{m} & :- & \rm{:m} & |\rm{m} & :- & \rm{:s} & \rm{s} & :- & \rm{:s.s} & |\rm{m} & :- & \rm{:s} & \rm{s} & :- & \rm{:s} & |\rm{s} & :-\\
\rm{:d} & \rm{f_{1}} & :- & \rm{:f_{1}} & |\rm{f_{1}} & :-\rm{.f_{1}} & \rm{:f_{1}} & \rm{d} & :- & \rm{:d} & |\rm{d} & :- & \rm{:d} & \rm{d} & :- & \rm{:d.r} & |\rm{m} & :- & \rm{:d} & \rm{s_{1}} & :- & \rm{:s_{1}} & |\rm{s_{1}} & :-
\end{array}\right\} \]

\vspace{2mm}
\[ \left\{
\begin{array}{l|llllll|llllll|llllll|lllll}
\rm{:s} & \rm{s} & :- & \rm{:m} & |\rm{d} & :- & \rm{:r} & \rm{m} & :- & \rm{:f} & |\rm{s} & :- & \rm{:l} & \rm{s} & :- & \rm{:d.f} & |\rm{m} & :- & \rm{:r} & \rm{d} & :- & :- & |- & :-\\
\rm{:d} & \rm{d} & :- & \rm{:d} & |\rm{s_{1}} & :- & \rm{:t_{1}} & \rm{d} & :- & \rm{:r} & |\rm{d} & :- & \rm{:d} & \rm{t_{1}} & :- & \rm{:d.r} & |\rm{d} & :- & \rm{:t_{1}} & \rm{d} & :- & :- & |- & :-\\
\rm{:m} & \rm{m} & :- & \rm{:s} & |\rm{m} & :- & \rm{:s} & \rm{s} & :- & \rm{:f} & |\rm{m} & :- & \rm{:f} & \rm{r} & :- & \rm{:f.l} & |\rm{s} & :- & \rm{:f} & \rm{m} & :- & :- & |- & :-\\
\rm{:d} & \rm{d} & :- & \rm{:d} & |\rm{d} & :- & \rm{:s_{1}} & \rm{d} & :- & \rm{:d} & |\rm{d} & :- & \rm{:f_{1}} & \rm{s_{1}} & :- & \rm{:s_{1}.s_{1}} & |\rm{s_{1}} & :- & \rm{:f_{1}} & \rm{d} & :- & :- & |- & :-
\end{array}\right\| \]

\end{document}
share|improve this answer
1  
Welcome to TeX.sx! You do know that \rm a) does not have an argument but is a switch and b) is deprecated 20 years (!) ago, right? –  cgnieder Jun 28 at 12:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.