Esempio n. 1
0
 /**
  * Display the jMusic Phrase in a ShowScore window, at the specified x <br>
  * and y coordinates, measured in pixels.
  *
  * @param Phrase
  * @param xLoc the left-right location of the window
  * @param yLoc the up-down location of the window
  */
 public static void sketch(Phrase phr, int xLoc, int yLoc) {
   Score s = new Score("Phrase: " + phr.getTitle());
   Part p = new Part();
   p.addPhrase(phr);
   s.addPart(p);
   new SketchScore(s, xLoc, yLoc);
 }
Esempio n. 2
0
 /**
  * Display the jMusic CPhrase in a piano roll window
  *
  * @param CPhrase
  * @param xLoc the left-right location of the window
  * @param yLoc the up-down location of the window
  */
 public static void pianoRoll(CPhrase cphr, int xLoc, int yLoc) {
   Score s = new Score("Phrase: " + cphr.getTitle());
   Part p = new Part();
   p.addCPhrase(cphr);
   s.addPart(p);
   new ShowScore(s, xLoc, yLoc);
 }
Esempio n. 3
0
  private void displayGameOver(Graphics g) {

    g.clearRect(100, 100, 350, 350);
    g.drawString("GAME OVER", 150, 150);

    String textScore = score.getStringScore();
    String textHighScore = score.getStringHighScore();
    String newHighScore = score.newHighScore();

    g.drawString("SCORE = " + textScore, 150, 250);

    g.drawString("HIGH SCORE = " + textHighScore, 150, 300);
    g.drawString(newHighScore, 150, 400);

    g.drawString("press a key to play again", 150, 350);
    g.drawString("Press q to quit the game", 150, 400);
  }
Esempio n. 4
0
 /**
  * Print the jMusic Score in standard output
  *
  * @param Score
  */
 public static void internal(Score score) {
   System.out.println(score.toString());
 }
Esempio n. 5
0
 /**
  * Display the jMusic Part in a ShowScore window, at the specified x and<br>
  * y coordinates, measured in pixels.
  *
  * @param Part
  * @param xLoc the left-right location of the window
  * @param yLoc the up-down location of the window
  */
 public static void sketch(Part p, int xLoc, int yLoc) {
   Score s = new Score("Part: " + p.getTitle());
   s.addPart(p);
   new SketchScore(s, xLoc, yLoc);
 }
Esempio n. 6
0
 /**
  * Display the jMusic Part in a piano roll window
  *
  * @param Part
  * @param xLoc the left-right location of the window
  * @param yLoc the up-down location of the window
  */
 public static void pianoRoll(Part p, int xLoc, int yLoc) {
   Score s = new Score("Part: " + p.getTitle());
   s.addPart(p);
   new ShowScore(s, xLoc, yLoc);
 }