Discussion:
Persian musical koron and sori
Hans Aberg
2009-02-01 22:14:47 UTC
Permalink
LilyPond now has the capability to typeset these, if one can get
hold of glyphs, and produce correctly tuned MIDI files.
I may be able to produce the glyph (with some additional studies)
but I can only support you in getting the code for it.
It would be great - I searched for that on the Internet and could not
find it.

Graham Breed or Kees van den Doel on the LilyPond list may know better
exactly what might be needed.

Hans
Kees van den Doel
2009-02-01 23:07:50 UTC
Permalink
Here's an example from a Persian music book.
Kees

----- Original Message -----
From: Hans Aberg <***@math.su.se>
Date: Sunday, February 1, 2009 2:14 pm
Subject: Re: Persian musical koron and sori
LilyPond now has the capability to typeset these, if one can
get 
hold of glyphs, and produce correctly tuned MIDI files.
I may be able to produce the glyph (with some additional
studies) 
but I can only support you in getting the code for it.
It would be great - I searched for that on the Internet and
could not 
find it.
Graham Breed or Kees van den Doel on the LilyPond list may know
better 
exactly what might be needed.
   Hans
Kees van den Doel
2009-02-01 23:18:14 UTC
Permalink
Is this for tuning a key or marking a specific note? or both?
Both. They are used exactly as normal accidentals.

Kees
Behnam
Post by Kees van den Doel
Here's an example from a Persian music book.
Kees
----- Original Message -----
Date: Sunday, February 1, 2009 2:14 pm
Subject: Re: Persian musical koron and sori
users list 
Post by Kees van den Doel
LilyPond now has the capability to typeset these, if one can
get
hold of glyphs, and produce correctly tuned MIDI files.
I may be able to produce the glyph (with some additional
studies)
but I can only support you in getting the code for it.
It would be great - I searched for that on the Internet and
could not
find it.
Graham Breed or Kees van den Doel on the LilyPond list may know better
exactly what might be needed.
    Hans
<koronSori.jpg>
Kees van den Doel
2009-02-02 05:00:23 UTC
Permalink
PS The symbols for koron and sori were introduced by Vaziri (1888-1980). His quartertone theory
didn't last but his symbols have. Millions of pages of printed Persian music are around, with the
koron and sori always obviously handwritten. Hopefully we (I) can typeset them in lilypond very soon.

Kees

----- Original Message -----
From: Behnam <***@gmail.com>
Date: Sunday, February 1, 2009 3:16 pm
Subject: Re: Persian musical koron and sori
Thanks Kees.
Is this for tuning a key or marking a specific note? or both?
Behnam
Post by Kees van den Doel
Here's an example from a Persian music book.
Kees
----- Original Message -----
Date: Sunday, February 1, 2009 2:14 pm
Subject: Re: Persian musical koron and sori
users list 
Post by Kees van den Doel
LilyPond now has the capability to typeset these, if one can
get
hold of glyphs, and produce correctly tuned MIDI files.
I may be able to produce the glyph (with some additional
studies)
but I can only support you in getting the code for it.
It would be great - I searched for that on the Internet and
could not
find it.
Graham Breed or Kees van den Doel on the LilyPond list may know better
exactly what might be needed.
    Hans
<koronSori.jpg>
Behnam
2009-02-01 23:16:33 UTC
Permalink
Thanks Kees.
Is this for tuning a key or marking a specific note? or both?
Behnam
Post by Kees van den Doel
Here's an example from a Persian music book.
Kees
----- Original Message -----
Date: Sunday, February 1, 2009 2:14 pm
Subject: Re: Persian musical koron and sori
LilyPond now has the capability to typeset these, if one can
get
hold of glyphs, and produce correctly tuned MIDI files.
I may be able to produce the glyph (with some additional
studies)
but I can only support you in getting the code for it.
It would be great - I searched for that on the Internet and
could not
find it.
Graham Breed or Kees van den Doel on the LilyPond list may know better
exactly what might be needed.
Hans
<koronSori.jpg>
Graham Breed
2009-02-02 11:34:00 UTC
Permalink
Graham,
Do you what types of fonts that LilyPond can use? - Behnam Rassi he says
he only knows how to make music fonts.
There are two ways Lilypond loads its fonts: music fonts and
Pango fonts. The music fonts start out as Metafont and get
converted to OTF along with some special tables that I never
sorted out. Music fonts are what Lilypond uses by default
for accidentals so that's the best way to go. And once
somebody's drawn them they're likely to get added to the
standard fonts I'd have thought if we're only talking two
new glyphs.

The Pango route is a bit of a hack. The accidental engraver
is a bit picky about what fonts it can work with. You can't
load a font by name but you can load one of the system fonts
and use it in a markup block. But as it's very useful, and
can be used with a variety of third-party fonts (whatever
Pango supports, to answer you question) I'll explain how it
works.

The first step, then is to load you font into the system. I
get Sagittal like this:

\paper{
newStaffSize = #20
#(define fonts (make-pango-font-tree "Century Schoolbook L"
"Sagittal"
"Bitstream Vera Sans Mono"
(/ newStaffSize 20)))
}

"Sagittal" is the one I use for the accidentals. The other
two have to be on your system. I've discovered that the
sans font is used by default for chord symbols so overriding
the typewriter font may be safer.

Then you need to set glyphs from the music font the way you
always did because some redundant code is still active. For
this example the alist is called "tripodGlyphs". After
that, something like this:

tripodStrings = #'(
(3/5 . "\xe2\x88\x86") ;rightscrolltripleup, 15:14
(-11/100 . "\xc3\xba") ;rightarcup, 7-comma
(1/10 . "\xc3\xb6") ;leftbarbup, 25:24
( 0 . "\xc3\xaa") ;natural
(-1/10 . "\xc3\x9c") ;leftbarbdown, 25:24
(-11/100 . "\xc3\x91") ;rightarcdown, 7-comma
(-1/5 . "\xc3\x87") ;rightbarbdown, 2/60
(-2/5 . "\x68") ;rightarcdoubledown
(-3/5 . "\x5a") ;rightscrolltripledown, 14:15
)

The strings are the accidentals you want to show in UTF-8
format (there is a function to convert to UTF-8).

Then add this code:

#(define (accidental-text grob)
(cdr (assoc (ly:grob-property grob 'alteration)

tripodStrings)))

And wire everything up:

\layout {
\context {
\Score
\override Accidental #'stencil = #ly:text-interface::print
\override Accidental #'text = #accidental-text
\override Accidental #'font-family = #'sans
\override Accidental #'font-size = #4
\override Accidental #'glyph-name-alist = \tripodGlyphs
\override Accidental #'Y-extent = #'(-1 . 1)
}
}

The font-size is because they come out too small by default.
The Y-extend is because Lilypond allows way too much
vertical space by default. If you're conscientious you'll
make the X- and Y-extents into functions so that you can
specify the size of each glyph.

These examples are taken from the code to my tripod notation
exposition:

http://x31eq.com/magic/tripod-code.zip


Graham
Hans Aberg
2009-02-02 12:09:45 UTC
Permalink
Do you what types of fonts that LilyPond can use? - Behnam Rassi he
says he only knows how to make music fonts.
There are two ways Lilypond loads its fonts: music fonts and Pango
fonts. The music fonts start out as Metafont and get converted to
OTF along with some special tables that I never sorted out. Music
fonts are what Lilypond uses by default for accidentals so that's
the best way to go.
So this problem might then have been fixed - I forwarded your message
to Behnam Rassi in case he didn't see it on the list.
And once somebody's drawn them they're likely to get added to the
standard fonts I'd have thought if we're only talking two new glyphs.
Though there are some variations, I think they semantically the same.
The variation used by Farhat is for koron like an inverted flat b, but
with the loop have the form >, and for the sori, a sharp # but with
the horizontal lines changed to a >. A variation can be seen on
http://www.96edo.com/24_EDO.html
The small koron look like an inverted flat b without shape change, and
the large sori uses a largish > with the vertical lines slanted.

I like the first variation: the koron is different from an inverted
flat b, and the sori is possibly easier to read in small type.

Hans
Kees van den Doel
2009-02-02 19:58:07 UTC
Permalink
Post by Graham Breed
standard fonts I'd have thought if we're only talking two new
glyphs.
Though there are some variations, I think they semantically the
same. 
The variation used by Farhat is for koron like an inverted flat
b, but 
with the loop have the form >, and for the sori, a sharp # but
with 
the horizontal lines changed to a >. A variation can be seen on
   http://www.96edo.com/24_EDO.html
The small koron look like an inverted flat b without shape
change, and 
the large sori uses a largish > with the vertical lines slanted.
I have several shelves of Persian music books and I have never seen that "variation".
The sori is always a rotated = with an > on it, and the koron akways has the '>' body.

Kees
Hans Aberg
2009-02-02 21:17:05 UTC
Permalink
Post by Kees van den Doel
I have several shelves of Persian music books and I have never seen that "variation".
The sori is always a rotated = with an > on it, and the koron akways has the '>' body.
That is good to know - I think what you say is best, being most
distinguishable (like from an inverted b or some other sharp variation).

There is a small subtlety: the usual sharp # is usually drawn a bit
slanted (endpoints of vertical bars not exactly level, but moving up).
I think this may have to do with how the horizontal lines "=" are
drawn (somewhat slanted upwards). These horizontal lines are also
usually drawn fat.

Can you see in your examples how the sori is drawn in these respects?
That is, are vertical line endpoints level, and is the ">" fatter?

Hans
Kees van den Doel
2009-02-02 21:50:08 UTC
Permalink
Post by Kees van den Doel
I have several shelves of Persian music books and I have never
seen 
Post by Kees van den Doel
that "variation".
The sori is always a rotated = with an > on it, and the koron
akways 
Post by Kees van den Doel
has the '>' body.
That is good to know - I think what you say is best, being
most 
distinguishable (like from an inverted b or some other sharp
variation).
There is a small subtlety: the usual sharp # is usually drawn a
bit 
slanted (endpoints of vertical bars not exactly level, but
moving up). 
I think this may have to do with how the horizontal lines "="
are 
drawn (somewhat slanted upwards). These horizontal lines are
also 
usually drawn fat.
Can you see in your examples how the sori is drawn in these
respects? 
That is, are vertical line endpoints level,
No, the vertical lines are just as in the normal sharp.
and is the ">" fatter?
Usually not, but they are handwritten. I'll scan in some more examples to compare.

Kees
Kees van den Doel
2009-02-03 00:20:23 UTC
Permalink
If you want to support more Persian notation the most important (and universal) is probably the symbol for tahrir, which is a small o above (if stems up) or below (if stems down) and in the middle of two equal notes.
Something like
o o <- tahrir
O O O
| | |
| | |

it indicates a small grace note of undefined pitch.

There are some symbols for tar/setar and santur as well, let me know if you want to see any.

Kees
----- Original Message -----
From: Behnam Rassi <***@videotron.qc.ca>
Date: Monday, February 2, 2009 2:46 pm
Subject: Re: Persian musical koron and sori
I also hopefully will get some pictures from Iran.
The thickness of the lines have also something to do with its
harmony 
with other music notes. So this is not much of an issue. But
the 
basic shaping has something that should be looked more
carefully. But 
generally speaking it is pretty clear to me.
There is apparently some specific notation marks for some
specific 
instruments as well (Taar for example) I'm waiting for the scans
to 
see what's the situation.
Behnam
Post by Kees van den Doel
Post by Kees van den Doel
Post by Kees van den Doel
I have several shelves of Persian music books and I have never
seen
Post by Kees van den Doel
that "variation".
The sori is always a rotated = with an > on it, and the koron
akways
Post by Kees van den Doel
has the '>' body.
That is good to know - I think what you say is best, being
most
distinguishable (like from an inverted b or some other sharp variation).
There is a small subtlety: the usual sharp # is usually drawn a bit
slanted (endpoints of vertical bars not exactly level, but
moving up).
I think this may have to do with how the horizontal lines "=" are
drawn (somewhat slanted upwards). These horizontal lines are also
usually drawn fat.
Can you see in your examples how the sori is drawn in these
respects?
That is, are vertical line endpoints level,
No, the vertical lines are just as in the normal sharp.
Post by Kees van den Doel
and is the ">" fatter?
Usually not, but they are handwritten.  I'll scan in some
more 
Post by Kees van den Doel
examples to compare.
Kees
Kees van den Doel
2009-02-03 01:37:22 UTC
Permalink
Really all that's lacking is the koron and sori. A small o is fine for the tahrir, we have that already.
Kees

----- Original Message -----
From: Behnam Rassi <***@videotron.qc.ca>
Date: Monday, February 2, 2009 4:48 pm
Subject: Re: Persian musical koron and sori
Yes of-course send me any relevant picture of Persian music
notation.
I'm currently in the phase of collecting information as much as
possible.
I also need to study more about the specifics of font making for
LilyPond. I did not have time yet to delve in this issue. But I'm
pretty much confident it's a no brainer.
What I'm not clear about is that you don't need just a font
containing two glyphs for Sori and Koron right? You need a font
containing all necessary glyphs for music writing, including Sori
and
Koron. So I have to add them to an existing font. Did I understand
it
correctly? I don't think I will be able to design ALL of them. I'll
be able to design Sori and Koron (and Tahrir and whatever else I
found consistently used) in visual harmony with other existing
notations.
I will get back to you when I collected the information I need. I
did
not have time to study the font part yet. I will get back to you
when
I have a clearer idea about the whole issue.
Behnam
Post by Kees van den Doel
If you want to support more Persian notation the most important
(and universal) is probably the symbol for tahrir, which is a
small
Post by Kees van den Doel
o above (if stems up) or below (if stems down) and in the middle
of
Post by Kees van den Doel
two equal notes.
Something like
o o <- tahrir
O O O
| | |
| | |
it indicates a small grace note of undefined pitch.
There are some symbols for tar/setar and santur as well, let me
know if you want to see any.
Kees
----- Original Message -----
Date: Monday, February 2, 2009 2:46 pm
Subject: Re: Persian musical koron and sori
I also hopefully will get some pictures from Iran.
The thickness of the lines have also something to do with its
harmony
with other music notes. So this is not much of an issue. But
the
basic shaping has something that should be looked more
carefully. But
generally speaking it is pretty clear to me.
There is apparently some specific notation marks for some
specific
instruments as well (Taar for example) I'm waiting for the scans
to
see what's the situation.
Behnam
Post by Kees van den Doel
Post by Kees van den Doel
Post by Kees van den Doel
I have several shelves of Persian music books and I have never
seen
Post by Kees van den Doel
that "variation".
The sori is always a rotated = with an > on it, and the koron
akways
Post by Kees van den Doel
has the '>' body.
That is good to know - I think what you say is best, being most
distinguishable (like from an inverted b or some other sharp variation).
There is a small subtlety: the usual sharp # is usually drawn a bit
slanted (endpoints of vertical bars not exactly level, but moving up).
I think this may have to do with how the horizontal lines "=" are
drawn (somewhat slanted upwards). These horizontal lines are also
usually drawn fat.
Can you see in your examples how the sori is drawn in these respects?
That is, are vertical line endpoints level,
No, the vertical lines are just as in the normal sharp.
Post by Kees van den Doel
and is the ">" fatter?
Usually not, but they are handwritten. I'll scan in some
more
Post by Kees van den Doel
examples to compare.
Kees
Graham Breed
2009-02-03 02:33:19 UTC
Permalink
What I'm not clear about is that you don't need just a font containing
two glyphs for Sori and Koron right? You need a font containing all
necessary glyphs for music writing, including Sori and Koron. So I have
to add them to an existing font. Did I understand it correctly? I don't
think I will be able to design ALL of them. I'll be able to design Sori
and Koron (and Tahrir and whatever else I found consistently used) in
visual harmony with other existing notations.
No. You should be able to set the font for a given glyph.
I forget if that works, but you can certainly set the font
for the Accidental object and whatever other objects you
want to draw the symbols. In that case you'll need all the
glyphs you want as accidentals (including naturals and maybe
parentheses) in your font. Which is generally a good thing
because you can distribute it as a "Persian music font" that
can work with different applications.

If you add your glyphs to Lilypond's fonts, OTOH, you'll
naturally have all the other glyphs in there as well.


Graham
Behnam Rassi
2009-02-03 00:47:55 UTC
Permalink
Yes of-course send me any relevant picture of Persian music notation.
I'm currently in the phase of collecting information as much as
possible.
I also need to study more about the specifics of font making for
LilyPond. I did not have time yet to delve in this issue. But I'm
pretty much confident it's a no brainer.
What I'm not clear about is that you don't need just a font
containing two glyphs for Sori and Koron right? You need a font
containing all necessary glyphs for music writing, including Sori and
Koron. So I have to add them to an existing font. Did I understand it
correctly? I don't think I will be able to design ALL of them. I'll
be able to design Sori and Koron (and Tahrir and whatever else I
found consistently used) in visual harmony with other existing
notations.

I will get back to you when I collected the information I need. I did
not have time to study the font part yet. I will get back to you when
I have a clearer idea about the whole issue.

Behnam
Post by Kees van den Doel
If you want to support more Persian notation the most important
(and universal) is probably the symbol for tahrir, which is a small
o above (if stems up) or below (if stems down) and in the middle of
two equal notes.
Something like
o o <- tahrir
O O O
| | |
| | |
it indicates a small grace note of undefined pitch.
There are some symbols for tar/setar and santur as well, let me
know if you want to see any.
Kees
----- Original Message -----
Date: Monday, February 2, 2009 2:46 pm
Subject: Re: Persian musical koron and sori
I also hopefully will get some pictures from Iran.
The thickness of the lines have also something to do with its
harmony
with other music notes. So this is not much of an issue. But
the
basic shaping has something that should be looked more
carefully. But
generally speaking it is pretty clear to me.
There is apparently some specific notation marks for some
specific
instruments as well (Taar for example) I'm waiting for the scans to
see what's the situation.
Behnam
Post by Kees van den Doel
Post by Kees van den Doel
Post by Kees van den Doel
I have several shelves of Persian music books and I have never
seen
Post by Kees van den Doel
that "variation".
The sori is always a rotated = with an > on it, and the koron
akways
Post by Kees van den Doel
has the '>' body.
That is good to know - I think what you say is best, being
most
distinguishable (like from an inverted b or some other sharp variation).
There is a small subtlety: the usual sharp # is usually drawn a bit
slanted (endpoints of vertical bars not exactly level, but
moving up).
I think this may have to do with how the horizontal lines "=" are
drawn (somewhat slanted upwards). These horizontal lines are also
usually drawn fat.
Can you see in your examples how the sori is drawn in these
respects?
That is, are vertical line endpoints level,
No, the vertical lines are just as in the normal sharp.
Post by Kees van den Doel
and is the ">" fatter?
Usually not, but they are handwritten. I'll scan in some
more
Post by Kees van den Doel
examples to compare.
Kees
Kees van den Doel
2009-02-15 23:00:52 UTC
Permalink
I found a font which has the koron and sori, apparently it's available in Finale.

See http://www.pertout.com/PhD2007Introduction.htm links at bottom (downloads) for the fonts.

I have no idea how to use this in lilypond though.

Kees
----- Original Message -----

----- Original Message -----
From: Behnam Rassi <***@videotron.qc.ca>
Date: Monday, February 2, 2009 4:48 pm
Subject: Re: Persian musical koron and sori
Yes of-course send me any relevant picture of Persian music
notation. 
I'm currently in the phase of collecting information as much
as 
possible.
I also need to study more about the specifics of font making
for 
LilyPond. I did not have time yet to delve in this issue. But
I'm 
pretty much confident it's a no brainer.
What I'm not clear about is that you don't need just a
font 
containing two glyphs for Sori and Koron right? You need a
font 
containing all necessary glyphs for music writing, including
Sori and 
Koron. So I have to add them to an existing font. Did I
understand it 
correctly? I don't think I will be able to design ALL of them.
I'll 
be able to design Sori and Koron (and Tahrir and whatever else

found consistently used) in visual harmony with other
existing 
notations.
I will get back to you when I collected the information I need.
I did 
not have time to study the font part yet. I will get back to you
when 
I have a clearer idea about the whole issue.
Behnam
If you want to support  more Persian notation the most
important 
(and universal) is probably the symbol for tahrir, which is a
small 
o above (if stems up) or below (if stems down) and in the
middle of 
two equal notes.
Something like
    o  
o        <- tahrir
O  O  O
|    |   |
|    |   |
it indicates a small grace note of undefined pitch.
There are some symbols for tar/setar and santur as well, let
me 
know if you want to see any.
Kees
  ----- Original Message -----
Date: Monday, February 2, 2009 2:46 pm
Subject: Re: Persian musical koron and sori
I also hopefully will get some pictures from Iran.
The thickness of the lines have also something to do with its harmony
with other music notes. So this is not much of an issue. But the
basic shaping has something that should be looked more
carefully. But
generally speaking it is pretty clear to me.
There is apparently some specific notation marks for some
specific
instruments as well (Taar for example) I'm waiting for the scans to
see what's the situation.
Behnam
Post by Kees van den Doel
Post by Kees van den Doel
Post by Kees van den Doel
I have several shelves of Persian music books and I have never
seen
Post by Kees van den Doel
that "variation".
The sori is always a rotated = with an > on it, and the koron
akways
Post by Kees van den Doel
has the '>' body.
That is good to know - I think what you say is best, being most
distinguishable (like from an inverted b or some other sharp variation).
There is a small subtlety: the usual sharp # is usually
drawn a
Post by Kees van den Doel
Post by Kees van den Doel
bit
slanted (endpoints of vertical bars not exactly level, but moving up).
I think this may have to do with how the horizontal lines "=" are
drawn (somewhat slanted upwards). These horizontal lines are also
usually drawn fat.
Can you see in your examples how the sori is drawn in these respects?
That is, are vertical line endpoints level,
No, the vertical lines are just as in the normal sharp.
Post by Kees van den Doel
and is the ">" fatter?
Usually not, but they are handwritten.  I'll scan in some
more
Post by Kees van den Doel
examples to compare.
Kees
Behnam Rassi
2009-02-15 23:31:59 UTC
Permalink
Yes Kees I downloaded the font and saw the glyphs.
This is as far as I can go with my current work too. Except that I
will add additional Persian music notations (and perhaps somewhat
better looking glyphs!). But I can only produce a font in ttf format,
another one perhaps in otf format. I can also extract the glyphs in
EPS format individually. I wouldn't know how to put them in LilyPond.
Behnam
Post by Kees van den Doel
I found a font which has the koron and sori, apparently it's
available in Finale.
See http://www.pertout.com/PhD2007Introduction.htm links at bottom
(downloads) for the fonts.
I have no idea how to use this in lilypond though.
Graham Breed
2009-02-15 23:45:15 UTC
Permalink
Post by Behnam Rassi
Yes Kees I downloaded the font and saw the glyphs.
This is as far as I can go with my current work too. Except that I will
add additional Persian music notations (and perhaps somewhat better
looking glyphs!). But I can only produce a font in ttf format, another
one perhaps in otf format. I can also extract the glyphs in EPS format
individually. I wouldn't know how to put them in LilyPond.
You need to say what interval (as a fraction of a 200 cent
whole tone) you want each symbol to correspond to.


Graham
Hans Aberg
2009-02-16 09:25:00 UTC
Permalink
You need to say what interval (as a fraction of a 200 cent whole
tone) you want each symbol to correspond to.
If one would use E53 (the Pythagorean tuning), how would it work now,
after your work of implementing microtonality into LilyPond? If M (the
major second) is 9 commas, and koron lowers with three, what would one
set it to?

Hans
Behnam Rassi
2009-02-16 00:02:20 UTC
Permalink
Post by Behnam Rassi
Yes Kees I downloaded the font and saw the glyphs.
This is as far as I can go with my current work too. Except that I
will add additional Persian music notations (and perhaps somewhat
better looking glyphs!). But I can only produce a font in ttf
format, another one perhaps in otf format. I can also extract the
glyphs in EPS format individually. I wouldn't know how to put them
in LilyPond.
You need to say what interval (as a fraction of a 200 cent whole
tone) you want each symbol to correspond to.
I guess this has been already sorted out for koron and sori before I
was exposed to this. If not, I can do some research to provide the
information. The other notations I mentioned are more like overhead
marks about 'how' the note should sound and not 'what'.
I'm not finished with my work yet. I may be able to explain more when
I'm done. It's still a couple of weeks to go I guess.

Behnam
Kees van den Doel
2009-02-16 02:48:03 UTC
Permalink
Hi Folks,

I made an init file "persian.ly" with support for Persian accidentals and scale signatures.
The only thing missing is correct glyphs for koron and sori. I include it below.

Kees
----- Original Message -----
From: Behnam Rassi <***@videotron.qc.ca>
Date: Sunday, February 15, 2009 4:02 pm
Subject: Re: Persian musical koron and sori
Post by Graham Breed
Post by Behnam Rassi
Yes Kees I downloaded the font and saw the glyphs.
This is as far as I can go with my current work too. Except
that I 
Post by Graham Breed
Post by Behnam Rassi
will add additional Persian music notations (and perhaps
somewhat 
Post by Graham Breed
Post by Behnam Rassi
better looking glyphs!). But I can only produce a font in
ttf 
Post by Graham Breed
Post by Behnam Rassi
format, another one perhaps in otf format. I can also extract
the 
Post by Graham Breed
Post by Behnam Rassi
glyphs in EPS format individually. I wouldn't know how to put
them 
Post by Graham Breed
Post by Behnam Rassi
in LilyPond.
You need to say what interval (as a fraction of a 200 cent
whole 
Post by Graham Breed
tone) you want each symbol to correspond to.
I guess this has been already sorted out for koron and sori
before I 
was exposed to this. If not, I can do some research to provide
the 
information. The other notations I mentioned are more like
overhead 
marks about 'how' the note should sound and not 'what'.
I'm not finished with my work yet. I may be able to explain more
when 
I'm done. It's still a couple of weeks to go I guess.
Behnam
--------------------------------------BEGIN----------persian.ly
\version "2.12.0"
%{
Author: Kees van den Doel ***@shaw.ca

This file defines Persian microtonal alterations, the approximate
quartertone flat (koron) and the approximate quartertone sharp
(sori). They can be obtained by appending 'k' (koron) and 'o' (sori) to
the English note symbol. The standard symbols for this were introduced
by Vaziri. For now I've represented them by accidentals.mirroredflat and
accidentals.sharp.slashslash.stem.

Key signatures are defined for all the Persian modes, there are 5 scales
with microtones and the normal major scale. All the gushe's from all
dastgahs can be notated with these 6.

The note immediately following a koron is sometimes (when the interval
defined by the note before the koron and after the koron is a minor
third, and the note below the finalis in esfahan according to some (but
not all) Persian musicians)) lowered by about 20 cents. This is not
notated, but considered part of the scale tuning. To accomodate this for
getting better sounding MIDI I've introduced the "vlat" (append 'v' to
the note) to indicate this. Actually this note should also get a strong
vibrato, and the vibrato and low tuning are perceptually integrated
(serialism!).

In the tuning I've followed "Traditional Persian Art Music, by Dariush
Tala'i". The tunings are also very close to those suggested in "The
Dastgah Concept in Persian Music, by Hormoz Farhat". See also "Le
repertoire-modele de la musique iranienne, by Jean During" which
contains measurements of the intervals in actual practice.

There are no other tuning issues in Persian music. Because the music is
monophonic the difference between just intonation (for example) and
equal temperament is not academic, because are no chords where out of
tune intervals are noticeable.

Note name suffixes:

ff for double-flat
f for flat
k for koron (about quarter-flat, -3/10 of whole tone, 60 cent)
o for sori (about quarter-sharp, 2/10 of whole tone, 40 cent)
s for sharp
x for double-sharp
v for 20 cent flat tuned note ("vlat", not notated)
%}

% Define tunings:

#(define-public KORON -3/10)
#(define-public SORI 1/5)
#(define-public VLAT -1/10)

pitchnamesEnglish = #`(
(cflatflat . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
(cflat . ,(ly:make-pitch -1 0 FLAT))
(c . ,(ly:make-pitch -1 0 NATURAL))
(csharp . ,(ly:make-pitch -1 0 SHARP))
(csharpsharp . ,(ly:make-pitch -1 0 DOUBLE-SHARP))
(dflatflat . ,(ly:make-pitch -1 1 DOUBLE-FLAT))
(dflat . ,(ly:make-pitch -1 1 FLAT))
(d . ,(ly:make-pitch -1 1 NATURAL))
(dsharp . ,(ly:make-pitch -1 1 SHARP))
(dsharpsharp . ,(ly:make-pitch -1 1 DOUBLE-SHARP))
(eflatflat . ,(ly:make-pitch -1 2 DOUBLE-FLAT))
(eflat . ,(ly:make-pitch -1 2 FLAT))
(e . ,(ly:make-pitch -1 2 NATURAL))
(esharp . ,(ly:make-pitch -1 2 SHARP))
(esharpsharp . ,(ly:make-pitch -1 2 DOUBLE-SHARP))
(fflatflat . ,(ly:make-pitch -1 3 DOUBLE-FLAT))
(fflat . ,(ly:make-pitch -1 3 FLAT))
(f . ,(ly:make-pitch -1 3 NATURAL))
(fsharp . ,(ly:make-pitch -1 3 SHARP))
(fsharpsharp . ,(ly:make-pitch -1 3 DOUBLE-SHARP))
(gflatflat . ,(ly:make-pitch -1 4 DOUBLE-FLAT))
(gflat . ,(ly:make-pitch -1 4 FLAT))
(g . ,(ly:make-pitch -1 4 NATURAL))
(gsharp . ,(ly:make-pitch -1 4 SHARP))
(gsharpsharp . ,(ly:make-pitch -1 4 DOUBLE-SHARP))
(aflatflat . ,(ly:make-pitch -1 5 DOUBLE-FLAT))
(aflat . ,(ly:make-pitch -1 5 FLAT))
(a . ,(ly:make-pitch -1 5 NATURAL))
(asharp . ,(ly:make-pitch -1 5 SHARP))
(asharpsharp . ,(ly:make-pitch -1 5 DOUBLE-SHARP))
(bflatflat . ,(ly:make-pitch -1 6 DOUBLE-FLAT))
(bflat . ,(ly:make-pitch -1 6 FLAT))
(b . ,(ly:make-pitch -1 6 NATURAL))
(bsharp . ,(ly:make-pitch -1 6 SHARP))
(bsharpsharp . ,(ly:make-pitch -1 6 DOUBLE-SHARP))

(cff . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
(cf . ,(ly:make-pitch -1 0 FLAT))
(cv . ,(ly:make-pitch -1 0 VLAT))
(ck . ,(ly:make-pitch -1 0 KORON))
(c . ,(ly:make-pitch -1 0 NATURAL))
(co . ,(ly:make-pitch -1 0 SORI))
(cs . ,(ly:make-pitch -1 0 SHARP))
(css . ,(ly:make-pitch -1 0 DOUBLE-SHARP))
(cx . ,(ly:make-pitch -1 0 DOUBLE-SHARP))

(dff . ,(ly:make-pitch -1 1 DOUBLE-FLAT))
(df . ,(ly:make-pitch -1 1 FLAT))
(dv . ,(ly:make-pitch -1 1 VLAT))
(dk . ,(ly:make-pitch -1 1 KORON))
(d . ,(ly:make-pitch -1 1 NATURAL))
(do . ,(ly:make-pitch -1 1 SORI))
(ds . ,(ly:make-pitch -1 1 SHARP))
(dss . ,(ly:make-pitch -1 1 DOUBLE-SHARP))
(dx . ,(ly:make-pitch -1 1 DOUBLE-SHARP))

(eff . ,(ly:make-pitch -1 2 DOUBLE-FLAT))
(ef . ,(ly:make-pitch -1 2 FLAT))
(ev . ,(ly:make-pitch -1 2 VLAT))
(ek . ,(ly:make-pitch -1 2 KORON))
(e . ,(ly:make-pitch -1 2 NATURAL))
(eo . ,(ly:make-pitch -1 2 SORI))
(es . ,(ly:make-pitch -1 2 SHARP))
(ess . ,(ly:make-pitch -1 2 DOUBLE-SHARP))
(ex . ,(ly:make-pitch -1 2 DOUBLE-SHARP))

(fff . ,(ly:make-pitch -1 3 DOUBLE-FLAT))
(ff . ,(ly:make-pitch -1 3 FLAT))
(fv . ,(ly:make-pitch -1 3 VLAT))
(fk . ,(ly:make-pitch -1 3 KORON))
(f . ,(ly:make-pitch -1 3 NATURAL))
(fo . ,(ly:make-pitch -1 3 SORI))
(fs . ,(ly:make-pitch -1 3 SHARP))
(fss . ,(ly:make-pitch -1 3 DOUBLE-SHARP))
(fx . ,(ly:make-pitch -1 3 DOUBLE-SHARP))

(gff . ,(ly:make-pitch -1 4 DOUBLE-FLAT))
(gf . ,(ly:make-pitch -1 4 FLAT))
(gv . ,(ly:make-pitch -1 4 VLAT))
(gk . ,(ly:make-pitch -1 4 KORON))
(g . ,(ly:make-pitch -1 4 NATURAL))
(go . ,(ly:make-pitch -1 4 SORI))
(gs . ,(ly:make-pitch -1 4 SHARP))
(gss . ,(ly:make-pitch -1 4 DOUBLE-SHARP))
(gx . ,(ly:make-pitch -1 4 DOUBLE-SHARP))

(aff . ,(ly:make-pitch -1 5 DOUBLE-FLAT))
(af . ,(ly:make-pitch -1 5 FLAT))
(av . ,(ly:make-pitch -1 5 VLAT))
(ak . ,(ly:make-pitch -1 5 KORON))
(a . ,(ly:make-pitch -1 5 NATURAL))
(ao . ,(ly:make-pitch -1 5 SORI))
(as . ,(ly:make-pitch -1 5 SHARP))
(ass . ,(ly:make-pitch -1 5 DOUBLE-SHARP))
(ax . ,(ly:make-pitch -1 5 DOUBLE-SHARP))

(bff . ,(ly:make-pitch -1 6 DOUBLE-FLAT))
(bf . ,(ly:make-pitch -1 6 FLAT))
(bv . ,(ly:make-pitch -1 6 VLAT))
(bk . ,(ly:make-pitch -1 6 KORON))
(b . ,(ly:make-pitch -1 6 NATURAL))
(bo . ,(ly:make-pitch -1 6 SORI))
(bs . ,(ly:make-pitch -1 6 SHARP))
(bss . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
(bx . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
)


% Define accidental symbols.
% Really need to have accidentals.koron and accidentals.sori

persianGlyphs = #`((-3/10 . "accidentals.mirroredflat")
(1/5 . "accidentals.sharp.slashslash.stem")
(0 . "accidentals.natural")
(1/2 . "accidentals.sharp")
(-1/2 . "accidentals.flat")
(-1/10 . "")
(-3/5 . "")
(-1 . "accidentals.flatflat")
( 1 . "accidentals.doublesharp")
)


\layout {
\context {
\Score
\override KeySignature #'glyph-name-alist = \persianGlyphs
\override Accidental #'glyph-name-alist = \persianGlyphs
\override AccidentalCautionary #'glyph-name-alist = \persianGlyphs
\override TrillPitchAccidental #'glyph-name-alist = \persianGlyphs
\override AmbitusAccidental #'glyph-name-alist = \persianGlyphs
}
}

pitchnames = \pitchnamesEnglish

#(ly:parser-set-note-names parser pitchnames)

%{
Define key signatures for Persian modes

Instead of the \key command use e.g. for dastgah shur on D:

\set Staff.keySignature = \shurD

There are fewer scales than dastgah's in Persian music, and each dastgah
can have many scales. So I provide here key signatures for scales
(modes) named after representative dastgahs featuring this scale.

Dastgah shur can have the 5th degree natural or koron, so two versions
are provided (shur, shurk). Secondary dastgahs dashti, abuata,
bayat-e-tork have the same signature as shur, and derived dastgah
afshari has signature shurk. Nava on G is like shur on D (4th apart).
Scale of segah is shurk. Other scales are esfahan (homayoun on C is like
esfahan on G, a 5th apart), chahargah, and mokhalef-segah. For dastgahs
mahur and rast-panjgah we just use the major scale.

Each key signature symbol is appended by a capitalized "key" (or
"finalis"). If you want to use the \transpose command you'll have to
manually adjust the key signature of the scale.

All the various modulatory gushes in all dastgah's can be notated with
these key signatures with the exception of delkash in mahur, but
traditionally the peculiar accidentals there are notated explicitly.

In summary I provide key signatures for: (shur, shurk, esfahan,
chahargah, mokhalefsegah).

%}

shurC = #`(
(1 . ,KORON)
(2 . ,FLAT)
(5 . ,FLAT)
(6 . ,FLAT)
)

shurD = #`(
(2 . ,KORON)
(6 . ,FLAT)
)

shurE = #`(
(3 . ,SORI)
)

shurF = #`(
(1 . ,FLAT)
(2 . ,FLAT)
(4 . ,KORON)
(5 . ,FLAT)
(6 . ,FLAT)
)

shurG = #`(
(2 . ,FLAT)
(5 . ,KORON)
(6 . ,FLAT)
)

shurA = #`(
(6 . ,KORON)
)

shurB = #`(
(0 . ,SORI)
(3 . ,SHARP)
)

shurkC = #`(
(1 . ,KORON)
(2 . ,FLAT)
(4 . ,KORON)
(5 . ,FLAT)
(6 . ,FLAT)
)

shurkD = #`(
(2 . ,KORON)
(5 . ,KORON)
(6 . ,FLAT)
)

shurkE = #`(
(3 . ,SORI)
(6 . ,KORON)
)

shurkF = #`(
(0 . ,KORON)
(1 . ,FLAT)
(2 . ,FLAT)
(4 . ,KORON)
(5 . ,FLAT)
(6 . ,FLAT)
)

shurkG = #`(
(1 . ,KORON)
(2 . ,FLAT)
(5 . ,KORON)
(6 . ,FLAT)
)

shurkA = #`(
(2 . ,KORON)
(6 . ,KORON)
)

shurkB = #`(
(0 . ,SORI)
(3 . ,SORI)
)


esfahanC = #`(
(2 . ,FLAT)
(5 . ,KORON)
)

esfahanD = #`(
(0 . ,SHARP)
(6 . ,KORON)
)

esfahanE = #`(
(0 . ,SORI)
(1 . ,SHARP)
(3 . ,SHARP)
)

esfahanF = #`(
(1 . ,KORON)
(5 . ,FLAT)
(6 . ,FLAT)
)

esfahanG = #`(
(2 . ,KORON)
(3 . ,SHARP)
(6 . ,FLAT)
)

esfahanA = #`(
(3 . ,SORI)
(4 . ,SHARP)
)

esfahanB = #`(
(0 . ,SHARP)
(3 . ,SHARP)
(4 . ,SORI)
(5 . ,SHARP)
)


mokhalefsegahC = #`(
(2 . ,FLAT)
(5 . ,KORON)
(6 . ,KORON)
)

mokhalefsegahD = #`(
(0 . ,SORI)
(6 . ,KORON)
)

mokhalefsegahE = #`(
(0 . ,SORI)
(1 . ,SORI)
(3 . ,SHARP)
)

mokhalefsegahF = #`(
(1 . ,KORON)
(2 . ,KORON)
(5 . ,FLAT)
(6 . ,FLAT)
)

mokhalefsegahG = #`(
(2 . ,KORON)
(3 . ,SORI)
(6 . ,FLAT)
)

mokhalefsegahA = #`(
(3 . ,SORI)
(4 . ,SORI)
)

mokhalefsegahB = #`(
(0 . ,SHARP)
(3 . ,SHARP)
(4 . ,SORI)
(5 . ,SORI)
)


chahargahC = #`(
(1 . ,KORON)
(5 . ,KORON)
)

chahargahD = #`(
(0 . ,SHARP)
(2 . ,KORON)
(3 . ,SHARP)
(6 . ,KORON)
)

chahargahE = #`(
(0 . ,SORI)
(1 . ,SHARP)
(3 . ,SORI)
(4 . ,SHARP)
)

chahargahF = #`(
(1 . ,KORON)
(4 . ,KORON)
(6 . ,FLAT)
)

chahargahG = #`(
(2 . ,KORON)
(3 . ,SHARP)
(5 . ,KORON)
)

chahargahA = #`(
(0 . ,SHARP)
(3 . ,SORI)
(4 . ,SHARP)
(6 . ,KORON)
)

chahargahB = #`(
(0 . ,SORI)
(1 . ,SHARP)
(3 . ,SHARP)
(4 . ,SORI)
(5 . ,SHARP)
)
Werner LEMBERG
2009-02-16 06:54:47 UTC
Permalink
Post by Kees van den Doel
I made an init file "persian.ly" with support for Persian
accidentals and scale signatures.
The only thing missing is correct glyphs for koron and sori. I
include it below.
Can someone please provide high-resolution scans of the Persian stuff
in action? What I've seen so far are some low-resolution images which
are rather useless to understand how it should really look like.


Werner
Kees van den Doel
2009-02-16 21:17:22 UTC
Permalink
I guess you need context more than resolution; here's a couple of scanned pages:

http://www.cs.ubc.ca/~kvdoel/tmp/koronSori.pdf

Kees

----- Original Message -----
From: Werner LEMBERG <***@gnu.org>
Date: Sunday, February 15, 2009 10:54 pm
Subject: Re: Persian musical koron and sori
Post by Werner LEMBERG
Post by Kees van den Doel
I made an init file "persian.ly" with support for Persian
accidentals and scale signatures.
The only thing missing is correct glyphs for koron and sori. I include it below.
Can someone please provide high-resolution scans of the Persian stuff
in action?  What I've seen so far are some low-resolution
images which
are rather useless to understand how it should really look like.
    Werner
Werner LEMBERG
2009-02-17 07:54:11 UTC
Permalink
Post by Kees van den Doel
http://www.cs.ubc.ca/~kvdoel/tmp/koronSori.pdf
Thanks.


Werner
Hans Aberg
2009-02-16 09:56:39 UTC
Permalink
Post by Kees van den Doel
The note immediately following a koron is sometimes (when the interval
defined by the note before the koron and after the koron is a minor
third, and the note below the finalis in esfahan according to some (but
not all) Persian musicians)) lowered by about 20 cents. This is not
notated, but considered part of the scale tuning. To accomodate this for
getting better sounding MIDI I've introduced the "vlat" (append 'v' to
the note) to indicate this. Actually this note should also get a strong
vibrato, and the vibrato and low tuning are perceptually
integrated
(serialism!).
I think there may be no need for special note for this, as it merely
indicates a cancellation of the intermediate pitch relative the
diatonic notation system. That is lowering a note with a koron this
way is the same as writing it with a sori and cancel it. This is in
fact how Hormoz Farhat writes it, like for the note below the finalis
in Dastgah-e Bayat-e Esfahan. It will work in any tuning, also E53
(Pythagorean tuning).

Details with your cent values:

The sum of the koron and sori intervals are always equal to M-m. Since
you have decided to use E12, M-m = 100 cents. And you set the koron
lowering 30 cents, and the sori raising 20 cents. So lowering a note
with a koron with 20 cents is the same as writing it with a sori and
canceling it.

Hans
Hans Aberg
2009-02-16 19:10:59 UTC
Permalink
Post by Kees van den Doel
The note immediately following a koron is sometimes (when the interval
defined by the note before the koron and after the koron is a minor
third, and the note below the finalis in esfahan according to some (but
not all) Persian musicians)) lowered by about 20 cents. This is not
notated, but considered part of the scale tuning.
Might you give some examples of this (which written notes)? The 20
cents you are mentioning are about the same size as a comma (or E53
tonestep), so perhaps this shows up if you use E12 as basis for
description, and not the Pythagorean tuning (practically the same as
E53).

Hans
Kees van den Doel
2009-02-16 20:43:43 UTC
Permalink
----- Original Message -----
From: Hans Aberg <***@math.su.se>
Date: Monday, February 16, 2009 11:12 am
Subject: Re: Persian musical koron and sori
The note immediately  following a koron is
sometimes  (when the 
interval
defined by  the note  before the koron  and
after  the koron is  a 
minor
third, and the note below the  finalis in esfahan
according to some 
(but
not all)  Persian musicians))  lowered by
about  20 cents.  This  is 
not
notated, but considered part of the scale tuning.
Might you give some examples of this (which written notes)?
E.g., D Ep F (F 20 cent flat, so actually D Ep and Ep F are the same interval)

Kees
 
Hans Aberg
2009-02-16 21:52:02 UTC
Permalink
Post by Kees van den Doel
Post by Hans Aberg
Might you give some examples of this (which written notes)?
E.g., D Ep F (F 20 cent flat, so actually D Ep and Ep F are the same interval)
If the musical function or intent is that these intervals should be
equal, then the note is F#pp, that is, a double koron. One has (in any
tuning) F#pp - Ep = F#p - E = F> - E = n, where n is the neutral
second that Farhat uses, the same as Ep - D, then.

On the other hand, if it is lowered an unspecified amount, then when
transposed, you will need another symbol that raises an interval so
that the sum is M-m.

Hans
Kees van den Doel
2009-02-16 22:14:53 UTC
Permalink
----- Original Message -----
From: Hans Aberg <***@math.su.se>
Date: Monday, February 16, 2009 1:52 pm
Subject: Re: Persian musical koron and sori
Post by Kees van den Doel
Post by Hans Aberg
Might you give some examples of this (which written notes)?
E.g., D Ep F (F 20 cent flat, so actually D Ep and Ep F are
the same 
Post by Kees van den Doel
interval)
If the musical function or intent is that these intervals should
be 
equal, then the note is F#pp, that is, a double koron.
Cute, I never thought of that! However it does't quite work because the *approximate* 20C fat
is independent of the koron (which is *approximately* 40C). So the equation
'>' = "#p' is an exact constraint.

Anyways the 20C flat note is not considered an accidental, not notated, inconsistently used, and
irrelevant for notation.

One has
(in any 
tuning) F#pp - Ep = F#p - E = F> - E = n, where n is the
neutral 
second that Farhat uses, the same as Ep - D, then.
On the other hand, if it is lowered an unspecified amount, then
when 
transposed, you will need another symbol that raises an interval
so 
that the sum is M-m.
If you look at the persian.ly file I sent, you will find the symbol for that I think (a blank).

Kees
   Hans
Kees van den Doel
2009-02-16 22:35:24 UTC
Permalink
Post by Graham Breed
Post by Hans Aberg
On the other hand, if it is lowered an unspecified amount,
then
Post by Hans Aberg
when 
transposed, you will need another symbol that raises an
interval
Post by Hans Aberg
so 
that the sum is M-m.
If you look at the persian.ly file I sent, you will find the
symbol for that I think (a blank).
On the other hand if you meant not the glyph but the input suffix you're right that I need to define
also "flat-20C", e.g. in G Ap Bb, with Bb 20C flat. I don't see why I should need something else
to raise an interval, can you show me an example?

Kees
Hans Aberg
2009-02-16 23:20:22 UTC
Permalink
Post by Kees van den Doel
If you look at the persian.ly file I sent, you will find the
symbol for that I think (a blank).
On the other hand if you meant not the glyph but the input suffix...
Perhaps an unfortunate choice of word: as a musical function,
regardless whether it is notated.
...you're right that I need to define
also "flat-20C", e.g. in G Ap Bb, with Bb 20C flat. I don't see why
I should need something else
to raise an interval, can you show me an example?
D# E#p F-raised - I just added a sharp to your example.

I know what makes the underlying theory. Start with minor (resp.
major) second m (resp M), which generates sharps and flats with
interval M-m. Then add a neutral second: one needs symbols to get from
m to n (example: sori) and from M to n (example: koron).

So each n generates a symbol pair. This has to do with the notation
system expresses all pitches of the form p m + q M, where p, q run
through the integers. By adding the the symbol pairs, one can also
express p m + q M + r n, where the integer r >= 0.

If one wants r < 0, then one need another pair of symbols. This
happens in Turkish music. The reason is that when one divided the
perfect fourth symmetrically as n P n, instead of the Persian n P m.

So I just think of that theory, and know that some transposition will
generate those symbols. They may not be used in practice, but without
them, one may end up in a situation where they might be needed.

Hans
Kees van den Doel
2009-02-16 23:32:23 UTC
Permalink
Post by Hans Aberg
Post by Kees van den Doel
If you look at the persian.ly file I sent, you will find the
symbol for that I think (a blank).
On the other hand if you meant not the glyph but the input suffix...
Perhaps an unfortunate choice of word: as a musical
function, 
regardless whether it is notated.
...you're right that I need to define
also "flat-20C", e.g. in G Ap Bb, with Bb 20C flat. I don't
see why 
I should need something else
to raise an interval, can you show me an example?
D# E#p F-raised - I just added a sharp to your example.
Oh, I see, but non-white key finalis is never used, yet for completeness I'll add it too.
It should of course be notated D# E#p F#, with the F# tuned 20 C down.

Thanks,
Kees
Hans Aberg
2009-02-16 23:47:17 UTC
Permalink
Post by Kees van den Doel
Post by Hans Aberg
D# E#p F-raised - I just added a sharp to your example.
Oh, I see, but non-white key finalis is never used, yet for
completeness I'll add it too.
Though transposition is not used much now, if a program can do it for
you, perhaps. Anyway, it is easy to give LilyPond able to handle it.
Post by Kees van den Doel
It should of course be notated D# E#p F#, with the F# tuned 20 C down.
Or Fxpp = F##pp. :-)

Hans
Hans Aberg
2009-02-16 22:40:55 UTC
Permalink
Post by Kees van den Doel
Post by Hans Aberg
Post by Kees van den Doel
E.g., D Ep F (F 20 cent flat, so actually D Ep and Ep F are
the same
Post by Kees van den Doel
interval)
If the musical function or intent is that these intervals should be
equal, then the note is F#pp, that is, a double koron.
Cute, I never thought of that! However it does't quite work because
the *approximate* 20C fat
is independent of the koron (which is *approximately* 40C). So the equation
'>' = "#p' is an exact constraint.
That is why I mentioned musical function: if it is that D Ep and Ep F-
lowered should always be equal, then the note will always be F#pp,
regardless what the koron is set to.

If one the other hand, it is just lowered an indefinite amount for
stylistic reason not attempting to achieve equality of these
intervals, then it is a different musical function, resulting in the
pair independent of the koron-sori one, resulting in a new
intermediate pith relative to the diatonic notation system (regardless
whether you want top print them or not in the score).
Post by Kees van den Doel
Anyways the 20C flat note is not considered an accidental, not
notated, inconsistently used, and
irrelevant for notation.
Post by Hans Aberg
On the other hand, if it is lowered an unspecified amount, then when
transposed, you will need another symbol that raises an interval so
that the sum is M-m.
If you look at the persian.ly file I sent, you will find the symbol
for that I think (a blank).
So it means that you have two notational symbols, both printed as a
blank: in a transposed situation, you may have to use the other. It is
not very intuitive - so even though it is not explicitly notated, it
might be good to be able to do so.

Hans
Graham Breed
2009-02-17 10:08:38 UTC
Permalink
Post by Kees van den Doel
Hi Folks,
I made an init file "persian.ly" with support for Persian accidentals and scale signatures.
The only thing missing is correct glyphs for koron and sori. I include it below.
You don't want glyphs. You want strings, because we're not
expecting a music font, so the mechanism for glyphs won't work.
Post by Kees van den Doel
% Define accidental symbols.
% Really need to have accidentals.koron and accidentals.sori
persianGlyphs = #`((-3/10 . "accidentals.mirroredflat")
(1/5 . "accidentals.sharp.slashslash.stem")
(0 . "accidentals.natural")
(1/2 . "accidentals.sharp")
(-1/2 . "accidentals.flat")
(-1/10 . "")
(-3/5 . "")
(-1 . "accidentals.flatflat")
( 1 . "accidentals.doublesharp")
)
Then add:

persianStrings = #`((-3/10 . "???")
(1/5 . "???")
...
)

where the ??? are replaced with the UTF-8 strings of the
symbols you want. Then in "\context" add

\override Accidental #'stencil = #ly:text-interface::print
\override Accidental #'text = #accidental-text
\override Accidental #'font-name = #"???"
\override Accidental #'font-size = #?
\override Accidental #'text = #(lambda (grob)
(cdr (assoc (ly:grob-property grob 'alteration)
persianStrings)))
\override Accidental #'X-extent = #(0 . 1)
\override Accidental #'Y-extent = #(-1 . 1)

and so on for KeySignature and whatever else you want to use
the new symbols. The font name is what Pango uses to find
the new font and you may need to adjust the font size. For
the best results use lookups for the X- and Y-extents as well.

Something I'm doing is causing a bug on another system, but
this works for me.


Graham
Kees van den Doel
2009-02-17 19:52:48 UTC
Permalink
----- Original Message -----
From: Graham Breed <***@gmail.com>
Date: Tuesday, February 17, 2009 2:06 am
Subject: Re: Persian musical koron and sori
Post by Kees van den Doel
Post by Kees van den Doel
Hi Folks,
I made an init file "persian.ly" with support for Persian
accidentals and scale signatures.
Post by Kees van den Doel
The only thing missing is correct glyphs for koron and sori. I
include it below.
You don't want glyphs.  You want strings, because we're not
expecting a music font, so the mechanism for glyphs won't work.
Post by Kees van den Doel
% Define accidental symbols.
% Really need to have accidentals.koron and accidentals.sori
persianGlyphs = #`((-3/10 . "accidentals.mirroredflat")
        (1/5 .
"accidentals.sharp.slashslash.stem")>        (0 . "accidentals.natural")
Post by Kees van den Doel
        (1/2 .
"accidentals.sharp")>       
(-1/2 . "accidentals.flat")
Post by Kees van den Doel
        (-1/10 . "")
        (-3/5 . "")
        (-1 .
"accidentals.flatflat")>        ( 1 . "accidentals.doublesharp")
Post by Kees van den Doel
)
persianStrings = #`((-3/10 . "???")
        (1/5 . "???")
...
)
where the ??? are replaced with the UTF-8 strings of the
symbols you want.  Then in "\context" add
\override Accidental #'stencil = #ly:text-interface::print
\override Accidental #'text = #accidental-text
\override Accidental #'font-name = #"???"
\override Accidental #'font-size = #?
\override Accidental #'text = #(lambda (grob)
         (cdr (assoc
(ly:grob-property grob 'alteration)
                  persianStrings)))
\override Accidental #'X-extent = #(0 . 1)
\override Accidental #'Y-extent = #(-1 . 1)
and so on for KeySignature and whatever else you want to use
the new symbols.  The font name is what Pango uses to find
the new font and you may need to adjust the font size.  For
the best results use lookups for the X- and Y-extents as well.
Something I'm doing is causing a bug on another system, but
this works for me.
Tried it, it does print the character but on the note and I'm getting a bunch of errors:

c:/Program Files/LilyPond/usr/share/lilypond/current/ly/persian.ly:200:35: error: GUILE signaled an error for the expression beginning here

\override Accidental #'text = #

accidental-text


c:/Program Files/LilyPond/usr/share/lilypond/current/ly/persian.ly:206:39: error: GUILE signaled an error for the expression beginning here

\override Accidental #'X-extent = #

(0 . 1)


c:/Program Files/LilyPond/usr/share/lilypond/current/ly/persian.ly:207:39: error: GUILE signaled an error for the expression beginning here

\override Accidental #'Y-extent = #

(-1 . 1)


Interpreting music...

Interpreting music...

warning: type check for `text' failed; value `#<unspecified>' must be of type `markup'

warning: type check for `X-extent' failed; value `#<unspecified>' must be of type `pair of numbers'

warning: type check for `Y-extent' failed; value `#<unspecified>' must be of type `pair of numbers'

Preprocessing graphical objects...

MIDI output to `t2.mid'...

Finding the ideal number of pages...

Fitting music on 1 page...

Drawing systems...

Layout output to `t2.ps'...

Converting to `./t2.pdf'...

error: failed files: "t2"

Unbound variable: accidental-text

Wrong number of arguments to 0

Wrong number of arguments to -1


Any idea of what is the problem?

Kees
Kees van den Doel
2009-02-18 17:03:25 UTC
Permalink
Post by Graham Breed
Then in "\context" add
\override Accidental #'stencil = #ly:text-interface::print
\override Accidental #'font-name = #"???"
\override Accidental #'font-size = #?
\override Accidental #'text = #(lambda (grob)
         (cdr (assoc
(ly:grob-property grob 'alteration)
                  persianStrings)))
\override Accidental #'X-extent = #'(0 . 1)
\override Accidental #'Y-extent = #'(-1 . 1)
Works great with the typo's fixed. Is there a way to do this only for koron and sori and render the
normal accidentals as usual?
Post by Graham Breed
and so on for KeySignature
If I do the same for KeySignature

\override KeySignature #'text = #(lambda (grob)
(cdr (assoc
(ly:grob-property grob 'alteration)
persianStrings)))

gives me an error. It's been almost 20 years since I've used Scheme and I don't remember
enough to be able to guess what the problem is...
Post by Graham Breed
and whatever else you want to use
the new symbols.  The font name is what Pango uses to find
the new font and you may need to adjust the font size.  For
the best results use lookups for the X- and Y-extents as well.
Thanks a lot!

Kees
Graham Breed
2009-02-19 00:09:34 UTC
Permalink
Post by Kees van den Doel
Post by Graham Breed
Then in "\context" add
\override Accidental #'stencil = #ly:text-interface::print
\override Accidental #'font-name = #"???"
\override Accidental #'font-size = #?
\override Accidental #'text = #(lambda (grob)
(cdr (assoc
(ly:grob-property grob 'alteration)
persianStrings)))
\override Accidental #'X-extent = #'(0 . 1)
\override Accidental #'Y-extent = #'(-1 . 1)
Works great with the typo's fixed. Is there a way to do this only for koron and sori and render the
normal accidentals as usual?
There surely is, but it won't be pretty. You can try:

-- Scheme functions for all these properties, that check if
the alteration requires the new font, and default to the
original values if it doesn't.

-- Putting all the \override commands in a variable, and
calling it with \once when you need it.

-- Writing all the normal accidentals as \markup blocks that
load the correct glyphs.

Note that if you want two glyphs at the same time for the
same note they have to be strings or markup.
Post by Kees van den Doel
Post by Graham Breed
and so on for KeySignature
If I do the same for KeySignature
\override KeySignature #'text = #(lambda (grob)
(cdr (assoc
(ly:grob-property grob 'alteration)
persianStrings)))
gives me an error. It's been almost 20 years since I've used Scheme and I don't remember
enough to be able to guess what the problem is...
Ah, yes. That's not going to work. The key signatures are
drawn differently to accidentals. They have to place all
the glyphs, not only one glyph for a given accidental.
Maybe somebody on the list can suggest a way to override
them...


Graham
Kees van den Doel
2009-02-20 23:23:14 UTC
Permalink
Post by Graham Breed
Post by Graham Breed
\override Accidental #'stencil = #ly:text-interface::print
\override Accidental #'font-name = #"???"
\override Accidental #'font-size = #?
\override Accidental #'text = #(lambda (grob)
          (cdr
(assoc
Post by Graham Breed
(ly:grob-property grob 'alteration)
                   persianStrings)))
\override Accidental #'X-extent = #'(0 . 1)
\override Accidental #'Y-extent = #'(-1 . 1)
and so on for KeySignature
I added lookup code for the positioning of the symbols and it works great with Pertout's microtonal font (http://www.pertout.com/PhD2007Introduction.htm), sample attached! Thanks again.

But can't understand how to get KeySignature to print these symbols though, anyone out there
that understands how to do that? Should KeySignature have a list in # 'text perhaps?

Kees
Kees van den Doel
2009-02-22 06:20:09 UTC
Permalink
I managed to print custom key signatures from a microtonal font. One problem remains, and I wonder if anyone can help me.

In my init file persian.ly I have defined variables for various key signatures and keys, e.g. for Shur in E

shurEKey = \markup{
\translate #'(0 . 1) \SORISYMBOL
}
shurE = #`(
(3 . ,SORI)
)

were SORISYMBOL is my UTF-8 code form the font I've loaded.

My source file looks like this:

\include "persian.ly"
\score {
\relative c' {
\set Staff.keySignature = \shurE
a b c
}
\midi { }
\layout {
\context {
\Score \override KeySignature #'text = #shurEKey
}
}
}

which works fine. I would instead like to put the statement

\Score \override KeySignature #'text = #shurEKey

not in the layout{} but in my music expression, because now I can't change key signature in a piece.

If I try that it will complain that shurKey is not a markup.

Can anybody explain what the problem is?

Thanks,
Kees
Kees van den Doel
2009-02-23 06:59:44 UTC
Permalink
Hi all,

Many thanks for all your help, we can now write Persian music!!

If you want to try it you can download the init file persian.ly and
the font file (put in Lilypond font directory) from here:

http://www.cs.ubc.ca/~kvdoel/tmp/persian.zip

and try stuff like:

\include "persian.ly"
\version "2.12.2"
\score {
\relative c' {
\set Staff.keySignature = \chahargahD
bk'8 a gs fo r g ak g fs ek d c d ef16 d c4
}
\midi { }
\layout {
\context {
\Score \override KeySignature #'text = #chahargahDKey
}
}
}

Kees
Werner LEMBERG
2009-02-23 09:25:35 UTC
Permalink
Post by Kees van den Doel
Many thanks for all your help, we can now write Persian music!!
Great! Please file a bug report (with all your macros, fonts, etc.)
so that we eventually add Persian accidentals directly to the feta
fonts -- as you can see, the stem widths and the height of the Persian
accidentals don't completely fit to the other accidentals.


Werner
Mats Bengtsson
2009-02-23 15:05:12 UTC
Permalink
Post by Kees van den Doel
\include "persian.ly"
\score {
\relative c' {
\set Staff.keySignature = \shurE
a b c
}
\midi { }
\layout {
\context {
\Score \override KeySignature #'text = #shurEKey
}
}
}
which works fine. I would instead like to put the statement
\Score \override KeySignature #'text = #shurEKey
not in the layout{} but in my music expression, because now I can't change key signature in a piece.
The syntax for overriding properties within the music expressions is
\override Score.KeySignature #'text = #shurEKey
This should be clear if you have read the section on "Tweaking output"
in the Learning Manual.

/Mats

Behnam Rassi
2009-02-22 20:21:34 UTC
Permalink
Hi,
I produced a package of things that I could do.
I made a TTF Persian font called Vaziri which has the music notations.
I also created a separate folder for a version of the font (without
Persian text characters) in OTF and Type1 format with all their
related files.
There is also a PDF for 21 Persian music symbols that I could collect.
Hope it helps.
http://idisk.mac.com/behnam-Public?view=web
Behnam
Post by Kees van den Doel
Post by Graham Breed
Post by Graham Breed
\override Accidental #'stencil = #ly:text-interface::print
\override Accidental #'font-name = #"???"
\override Accidental #'font-size = #?
\override Accidental #'text = #(lambda (grob)
(cdr
(assoc
Post by Graham Breed
(ly:grob-property grob 'alteration)
persianStrings)))
\override Accidental #'X-extent = #'(0 . 1)
\override Accidental #'Y-extent = #'(-1 . 1)
and so on for KeySignature
I added lookup code for the positioning of the symbols and it works
great with Pertout's microtonal font (http://www.pertout.com/
PhD2007Introduction.htm), sample attached! Thanks again.
But can't understand how to get KeySignature to print these
symbols though, anyone out there
that understands how to do that? Should KeySignature have a list in
# 'text perhaps?
Kees
<font.pdf>
Behnam Rassi
2009-02-02 22:46:18 UTC
Permalink
I also hopefully will get some pictures from Iran.
The thickness of the lines have also something to do with its harmony
with other music notes. So this is not much of an issue. But the
basic shaping has something that should be looked more carefully. But
generally speaking it is pretty clear to me.
There is apparently some specific notation marks for some specific
instruments as well (Taar for example) I'm waiting for the scans to
see what's the situation.
Behnam
Post by Kees van den Doel
Post by Kees van den Doel
Post by Kees van den Doel
I have several shelves of Persian music books and I have never
seen
Post by Kees van den Doel
that "variation".
The sori is always a rotated = with an > on it, and the koron
akways
Post by Kees van den Doel
has the '>' body.
That is good to know - I think what you say is best, being
most
distinguishable (like from an inverted b or some other sharp
variation).
There is a small subtlety: the usual sharp # is usually drawn a bit
slanted (endpoints of vertical bars not exactly level, but
moving up).
I think this may have to do with how the horizontal lines "="
are
drawn (somewhat slanted upwards). These horizontal lines are
also
usually drawn fat.
Can you see in your examples how the sori is drawn in these
respects?
That is, are vertical line endpoints level,
No, the vertical lines are just as in the normal sharp.
Post by Kees van den Doel
and is the ">" fatter?
Usually not, but they are handwritten. I'll scan in some more
examples to compare.
Kees
Loading...