banniere

Créer des partitions de musique persane avec des logiciels libres

Cette partie ne sera sans doute pas traduite, veuillez vous référer à la version anglaise pour le moment.

Playing and displaying Persian music with free software

1/4 tones music

For those interested in Persian music, I've customed some free software in order to handle Persian music, i.e. using the two specific notation symbols "koron" and "sori".

For creating partition and midi files, there are two great tools that are freely available :

  • Abcm2ps : creates professional looking partitions in postscript format
  • Abc2midi : creates midi files Both use the abc music notation, so if you want (and dare) trying this, you'd better check the ABC homepage My additions are :
  • For Abcm2ps : I've created the two symbols (glyphs) for Koron and Sori, and a definition for using them in abc. Here is this file and in this file are some samples. You just have to edit it and run abcm2ps.
  • Abc2midi : I've changed the code sources and recompiled it in order to play quartertones. Here is the command line program If you want to recompile it yourself, or improve it, you just have to get the original sources of Abc2midi (see link above) and change this :
        store.c
      
        (seek for example the part with if (strcmp(p, "fff") ==
        0) and add after it, this code :
      
              if
              (strcmp(p, "koron") == 0) {
              event_specific("MIDI", "pitchbend 0 48");
              done = 1;
              };
              if (strcmp(p, "sori") == 0) {
              event_specific("MIDI", "pitchbend 0 80");
              done = 1;
              };
              if (strcmp(p, "normal") == 0) {
              event_specific("MIDI", "pitchbend 0 64");
              done = 1;
              };
              if (strcmp(p, "b") == 0) {
              event_specific("MIDI", "pitchbend 0 48");
              done = 1;
              };
              if (strcmp(p, "_") == 0) {
              event_specific("MIDI", "pitchbend 0 48");
              done = 1;
              };
              if (strcmp(p, "#") == 0) {
              event_specific("MIDI", "pitchbend 0 80");
              done = 1;
              };
              if (strcmp(p, "=") == 0) {
              event_specific("MIDI", "pitchbend 0 64");
              done = 1;
              };
    

Yet the Abc2midi part is far from being perfect : It's not real quartertones but it uses the pitch bend definition to achieve this so it sounds a bit strange. The music won't be really nice, but it can give at least an idea of how the original sound should be.

In addition, in Persian music the quartertone may vary, it's not strictly 1/4 of a tone (it can be 1/3 and such). I don't know how to make this better because I don't have more knowledge in programming. If you're interested to help, let me know. I don't know either how to use koron in the key definition, so it's a bit annoying to enter them for each note.

For using those symbols, you just have to download this file

Once processed, you should get this pdf file, but you will need also a postscript viewer in order to read it (check ghostscript).

Then, edit it as you wish, and had more tunes to it.

For adding a specific symbol, you just have to use this, ex "A" with koron :

  !b!A!=!

The !=! is for telling Abc2midi that it has to come back to the normal pitch bend (you must always "close" a note with this otherwise the rest will be detuned)

Example of use :

You just have to use this code :

    X:1
    T:Daramad of Shur
    L:1/8
    Q:1/4=135
    M:no
    K:C
    %%MIDI program 111
    d !koron!e !=! g f !koron!e !=! d c _B A G A d2 {c}_B2 {A}G2
    |
    G A c _B A G F !koron! E !=! D !koron! E !=! F G A c {_B} A2 {G}
    F4 |
    FFF A2 G2 {F}!koron! EEE !=!G2 F2 {!koron! E !=!} DDDF2 !koron!
    E2 !=! |

and it will display :

example of play :

midi

mp3 (original)

Tombak music

I've also made a definition for abcm2ps for displaying Tombak notation. Many thanks to Denis and JF for their help in making this.

Use the same definition file as above

You can use it this way :

  X:33
  T:test tombak
  M:2/4
  L:1/8
  Q:1/8=120
  K:perc
  U:s=+head-strum+ 
  V:1 stafflines=3 stem=down
  G"3"sd/"3"sd/ G!u!B | G"3"sd/"3"sd/ G!u1!B  :| |: G"2"sd/"2"sd/ G"3"sd/"3"sd/ |
  G"2"sd/"2"sd/ G!u!B | G"3"sd/"3"sd/ Gsd/sd/    | G"3"sd/"3"sd/ G!u1!B :| G2 z2 |
  B"2"sd/"2"sd/ G"3"sd | Gsd/sd/ Gsd | !n2!d2 z2 | G"3"sd/"3"sd/ G"2"sd | G"3"sd/"3"sd/ G"2"sd | 
  G"2"sd/"2"sd/ G!u1!B/!u1!B/ | G"3"sd/"3"sd/ G"2"sd |

Call it with abcm2ps -F persia.fmt yourtunes.abc or include %%format persia within your tune and call it simply with abcm2ps.

and it should display:

get the pdf file of this (the tombak is the last tune in it)



Copyright © 2009 - http://anamnese.fr.st - Travaux personnels publiés sous licence Creative Commons BY-NC-ND

Infos sur ce site - contact