Skip to content

Commit

Permalink
New song: Frère Jacques (Are you sleeping, brother John?).
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules Kerssemakers committed Jan 11, 2024
1 parent 225bd8e commit 63d4078
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/src/main/java/com/nicobrailo/pianoli/melodies/Melody.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.nicobrailo.pianoli.melodies;

import android.util.Log;
import com.nicobrailo.pianoli.song.ImALittleTeapot;
import com.nicobrailo.pianoli.song.InsyWinsySpider;
import com.nicobrailo.pianoli.song.TwinkleTwinkleLittleStar;
import com.nicobrailo.pianoli.song.WaltzingMatilda;
import com.nicobrailo.pianoli.song.*;
import org.jetbrains.annotations.NotNull;

/**
Expand Down Expand Up @@ -32,6 +29,7 @@ public class Melody {
InsyWinsySpider.melody,
ImALittleTeapot.melody,
WaltzingMatilda.melody,
BrotherJohn.melody,
};

/**
Expand Down
44 changes: 44 additions & 0 deletions app/src/main/java/com/nicobrailo/pianoli/song/BrotherJohn.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.nicobrailo.pianoli.song;

import com.nicobrailo.pianoli.melodies.Melody;

/**
* The massively translated Frère Jacques ("Are you sleeping, Brother John?")
*
* <p>
* This nursery rhyme has been translated to dozens of languages, so it should reach a very wide audience.
* </p>
*
* <p>
* Compared to the classic C-D-E-C arrangement, this version is up-shifted by three full notes,
* to account for the bass-note the final chord. Without this shift, it would fall below where we have sound samples.
* </p>
*
*
* <p>
* Further reading:<ul>
* <li><a href="https://en.wikipedia.org/wiki/Fr%C3%A8re_Jacques">English Wikipedia: Frère Jacques</a></li>
* <li><a href="https://de.wikipedia.org/wiki/Fr%C3%A8re_Jacques">German Wikipedia: Frère Jacques</a> (listing some 50 translations)</li>
* </ul></p>
*/
public class BrotherJohn {
public static final Melody melody = Melody.fromString(
"brother_john",
" " + // 'useless' string so that code formatting indentation nicely lines up
// Are you sleeping, 2x
"F G A F " +
"F G A F " +

// Brother John? 2x
"A A# C2 " +
"A A# C2 " +

// Morning bells are ringing! 2x
"C2 D2 C2 A# A F " +
"C2 D2 C2 A# A F " +

// Please come on! 2x
"F C F " +
"F C F "
);
}
1 change: 1 addition & 0 deletions app/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@
<string name="melody_twinkle_twinkle_little_star">Morgen kommt der Weihnachtsmann</string>
<string name="melody_waltzing_matilda">Waltzing Matilda</string>
<string name="soundset_piano2">Piano 2</string>
<string name="melody_brother_john">Bruder Jakob</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
<string name="preferences">Voorkeuren</string>
<string name="melody_waltzing_matilda">Waltzing Matilda</string>
<string name="soundset_piano2">Piano 2</string>
<string name="melody_brother_john">Vader Jacob</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<string name="melody_im_a_little_teapot">I\'m a Little Teapot</string>
<string name="melody_insy_winsy_spider">Incy Winsy Spider</string>
<string name="melody_waltzing_matilda">Waltzing Matilda</string>
<string name="melody_brother_john">Brother John</string>

<!-- keyboard colour themes -->
<string name="theme">Key Colours</string>
Expand Down

0 comments on commit 63d4078

Please sign in to comment.