Skip to content

Commit

Permalink
ly folder revamp
Browse files Browse the repository at this point in the history
  • Loading branch information
JosePedroDias committed Jul 21, 2024
1 parent 62e18bc commit 7de9481
Show file tree
Hide file tree
Showing 36 changed files with 190 additions and 120 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ midis/FluidR3_GM_GS.sf2
midis/rhcp-californication.mid
midis/rhcp-californication.txt
midis/rhcp-californication.wav

*.logs
49 changes: 32 additions & 17 deletions ly/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
## transformations

ly =( lilypond )=> (pdf + midi)
midi =( musescore )=> musicxml

# install

## cheat sheet
brew install lilypond
brew install frescobaldi
## commands

generates both a mid and a pdf file:

lilypond double-croche.ly
lilypond ex18.ly

generates musicxml file musescore can read (failing?)

pip install python-ly
ly musicxml double-croche.ly > double-croche.musicxml

# install

brew install lilypond
brew install frescobaldi


# handle midis

play
Expand All @@ -35,3 +22,31 @@ to wav
export events

fluidsynth -i ../midis/FluidR3_GM_GS.sf2 -n -v -F /dev/null double-croche.midi


# convert to musicxml

(I didn't use this.
i opened the midi files directly on musescore with decent results for these files)

http://www.mankin.org.uk/howto/lilypond-to-xml.html

Reference: https://music.stackexchange.com/questions/42315/lilypond-to-musicxml-to-sibelius

Clone this project to your local machine https://github.com/openlilylib/oll-core
Clone this project to your local machine https://github.com/openlilylib/lilypond-export
Set the include path for lilypond to point to the parent folder which contains the two projects above. In Frescobaldi this can be done by opening Preferences > Lilypond Preferences
Add the following lines at the top of the file:

\include "oll-core/package.ily"
\loadPackage lilypond-export

opts.exporter = #exportMusicXML

Update the \layout command to be like so:

\layout{
\FileExport #opts
}

Now when running the file through Lilypond it should also produce a .xml file. I find the results to be better than the output from python-ly.
3 changes: 3 additions & 0 deletions ly/clean_volatile_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

rm -f *.wav *.midi *.pdf
70 changes: 70 additions & 0 deletions ly/double-croche-22-23.ly
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
\version "2.24.2"

doc_title = "la double croche - 22 and 23"
page_no = "1"
bpm = 60
timezp = 4/4

xxiia = \drummode {
sn2 16 16 16 16 4
16 16 8 4 16 16 8 16 16 16 16
8 16 16 4 16 16 16 16 16 16 8

}
xxiib = \drummode {
16 16 16 16 8 16 16 8 8 4
4 8 16 16 2
4 16 16 8 16 16 8 16 16 16 16
}
xxiic = \drummode {
16 16 16 16 8 16 16 8 8 4
16 16 8 16 16 8 8 16 16 4
8 16 16 8 8 4 16 16 8
}
xxiid = \drummode {
16 16 16 16 8 16 16 16 16 8 8 8
16 16 16 16 16 16 8 16 16 8 8 16 16
16 16 8 16 16 16 16 8 16 16 16 16 8
}

xxiiia = \drummode {
2 8 8 16 16 16 16
8 8 16 16 16 16 2
16 16 16 16 8 8 2
4 16 16 16 16 8 8 4
}
xxiiib = \drummode {
4 4 4 16 16 16 16
8 8 4 4 16 16 16 16
16 16 16 16 4 4 4
16 16 16 16 8 8 4 4
}
xxiiic = \drummode {
16 16 16 16 16 16 16 16 4 4
16 16 16 16 4 16 16 16 16 4
4 16 16 16 16 4 8 8
4 4 16 16 16 16 16 16 16 16
}
xxiiid = \drummode {
4 16 16 16 16 2
4 16 16 16 16 4 16 16 16 16
4 2 16 16 16 16
2 4 16 16 16 16
16 16 16 16 2 4
}

main = {
\stemUp

\xxiia \section \break
\xxiib \section \break
\xxiic \section \break
\xxiid \section \break

\xxiiia \section \break
\xxiiib \section \break
\xxiiic \section \break
\xxiiid \section \break
}

\include "./zp-drums.ly"
Binary file added ly/double-croche-22-23.midi
Binary file not shown.
Binary file added ly/double-croche-22-23.mscz
Binary file not shown.
Binary file added ly/double-croche-22-23.pdf
Binary file not shown.
43 changes: 43 additions & 0 deletions ly/double-croche-24.ly
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
\version "2.24.2"

doc_title = "la double croche - 24"
page_no = "2"
bpm = 60
timezp = 3/4

xxiva = \drummode {
sn8 8 16 16 16 16 16 16 16 16
16 16 16 16 16 16 16 16 16 16 16 16
2 16 16 16 16
}
xxivb = \drummode {
16 16 16 16 16 16 16 16 4
16 16 16 16 16 16 16 16 16 16 16 16
8 8 4 16 16 16 16
16 16 16 16 16 16 16 16 8 8
}
xxivc = \drummode {
8 8 8 8 16 16 16 16
8 8 16 16 16 16 8 8
8 8 16 16 16 16 8 8
8 8 8 8 8 8
8 8 16 16 16 16 8 8
}
xxivd = \drummode {
8 8 8 8 16 16 16 16
4 16 16 16 16 4
8 8 8 8 8 8
8 8 4 16 16 16 16
4 r4 r4
}

main = {
\stemUp

\xxiva \section \break
\xxivb \section \break
\xxivc \section \break
\xxivd \section \break
}

\include "./zp-drums.ly"
Binary file added ly/double-croche-24.midi
Binary file not shown.
Binary file added ly/double-croche-24.mscz
Binary file not shown.
Binary file added ly/double-croche-24.pdf
Binary file not shown.
19 changes: 0 additions & 19 deletions ly/double-croche.ly

This file was deleted.

Empty file added ly/double-croche.oll.log
Empty file.
25 changes: 9 additions & 16 deletions ly/ex18.ly
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

doc_title = "ex 18"
page_no = "1"

bpm = 60
timezp = 2/4


pi = \drummode {
8 8 8 8
i = \drummode {
sn8 8 8 8
4 r8 8
8 8 4
8 8 4
Expand All @@ -18,7 +16,7 @@ pi = \drummode {
r8 8 4
}

pii = \drummode {
ii = \drummode {
r8 8 r8 8
r2
r8 8 8 8
Expand All @@ -31,7 +29,7 @@ pii = \drummode {
8 8 r8 8
}

piii = \drummode {
iii = \drummode {
4 8 8
r4 r8 8
r8 8 8 8
Expand All @@ -43,7 +41,7 @@ piii = \drummode {
r8 8 8 8
}

piv = \drummode {
iv = \drummode {
r8 8 r8 8
8 8 8 8
r8 8 r8 8
Expand All @@ -58,15 +56,10 @@ piv = \drummode {

main = {
\stemUp

\pi \section
\break
\pii \section
\break
\piii \section
\break
\piv \section
\break
\i \section \break
\ii \section \break
\iii \section \break
\iv \section \break
}

\include "./zp-drums.ly"
Binary file added ly/ex18.midi
Binary file not shown.
Binary file added ly/ex18.mscz
Binary file not shown.
Binary file added ly/ex18.pdf
Binary file not shown.
3 changes: 3 additions & 0 deletions ly/ly_to_midi_and_pdf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

lilypond $1
3 changes: 3 additions & 0 deletions ly/midi_play.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

fluidsynth -i ../midis/FluidR3_GM_GS.sf2 $1
7 changes: 7 additions & 0 deletions ly/midi_to_wav.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

filename_with_ext=$1
FN="${filename_with_ext%.*}"
#echo "$FN"

fluidsynth -i ../midis/FluidR3_GM_GS.sf2 -n -L 1 -r 44100 -g 1 -R 0 -F $FN.wav $FN.midi
2 changes: 1 addition & 1 deletion ly/p01.ly
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

doc_title = "Ritmos 1"
page_no = "1"

bpm = 60
timezp = 4/4

pat_i = \drummode {
<bd hh>8 hh <sn hh> hh <bd hh> hh <sn hh> hh
Expand Down
Binary file removed ly/p01.midi
Binary file not shown.
Binary file removed ly/p01.pdf
Binary file not shown.
20 changes: 0 additions & 20 deletions ly/p02.ly

This file was deleted.

Binary file removed ly/p02.midi
Binary file not shown.
Binary file removed ly/p02.pdf
Binary file not shown.
20 changes: 0 additions & 20 deletions ly/p03.ly

This file was deleted.

Binary file removed ly/p03.midi
Binary file not shown.
Binary file removed ly/p03.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion ly/p04.ly
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

doc_title = "quatro"
page_no = "4"

bpm = 60
timezp = 4/4

pat_o = \drummode {
r1
Expand Down
Binary file removed ly/p04.midi
Binary file not shown.
Binary file removed ly/p04.pdf
Binary file not shown.
25 changes: 0 additions & 25 deletions ly/rhcp-californication.ly

This file was deleted.

Binary file removed ly/rhcp-californication.midi
Binary file not shown.
Binary file removed ly/rhcp-californication.pdf
Binary file not shown.
Loading

0 comments on commit 7de9481

Please sign in to comment.