Lilypond Batch

From Fxp Wiki

Jump to: navigation, search

Produce scores in pdf from midi files


For information:

  • I keep my midi files in the c:\Gammes\ directory
  • The midi2ly.py is at c:\Lily\usr\bin\midi2ly.py

If you keep your files in subdirectories whose name contains spaces (as "document and settings" or "program files") put the whole adress between '"'

  • example: dir /B "c:\Document and Settings\Gammes\*.mid" > files.txt


 
 
rem first create a text file containing the list of .mid files 
rem Créer un fichier text avec la liste des fichier .mid
dir /B c:\Gammes\*.mid > files.txt
 
rem loop through the list and send each file name to the midi2ly.py programme
rem send the errors to an error.txt file
rem Envoyer tour à tour les noms de fichier au programme midi2ly.py
rem Mettre les messages d'erreur dans un fichier error.txt
For /F %%Z in (c:\Gammes\files.txt) DO c:\Lily\usr\bin\midi2ly.py c:\gammes\%%Z > c:\Gammes\error.txt
 
rem Now do the same for .ly files
rem Faire la même chose pour les fichiers .ly
dir /B c:\Gammes\*.ly > filesLy.txt
For /F %%Z in (c:\Gammes\filesLy.txt) DO c:\Lily\usr\bin\lilypond.exe c:\gammes\%%Z 
 
rem delete the .ps files because I don't need them
rem if you want to keep the ps files
rem put a "rem" (as remark) in front of the next lines
 
rem Effacer les fichiers .ps parce que je n'en ai pas besoin
rem si vous voulez les garder mettez un "rem" (comme dans remarque) 
rem devant les lignes suivantes
 
dir /B c:\Gammes\*.ps > filesPs.txt
For /F %%Z in (c:\Gammes\filesPs.txt) DO del c:\Gammes\%%Z
 
 
Personal tools