# Musical Notation Symbols?

**URL:** <https://discourse.processing.org/t/musical-notation-symbols/43483>\
**Category:** Project Guidance\
**Created:** [December 15, 2023, 11:15pm UTC](https://discourse.processing.org/t/musical-notation-symbols/43483 "2023-12-15T23:15:08Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [December 20, 2023, 4:16am UTC](https://discourse.processing.org/t/musical-notation-symbols/43483/8 "2023-12-20T04:16:01Z")

</div>

One way to get musical notation is to use unicode characters. If you like quality, JavaFX can generate nice output (there are other ways, eg [Java Unicode Chars - #3 by jcgeo](https://discourse.processing.org/t/java-unicode-chars/34284/3)):

```auto
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.Text;

String unicodeToStr(String[] unicodeArray) {
  StringBuffer buffer = new StringBuffer();
  for (int i = 0; i < unicodeArray.length; i++) {
    int hexVal = Integer.parseInt(unicodeArray[i], 16);
    buffer.append(Character.toChars(hexVal));
  }
  return buffer.toString();
}

void setup() {
  size(1, 1, FX2D);
  Stage stage = new Stage();
  stage.setTitle("MusicalNotes_Unicode To String Demo");
  Pane pane = new Pane();
  // ****Musical Notation**** //
  String[] musicArray = {"2669", "266A", "266B", "266C", "266D", "266E", "266F"};
  String musicStr = unicodeToStr(musicArray);
  Text notes = new Text(30, 100, musicStr );
  notes.setFont(new Font(100));
  notes.setFill(Color.BLACK);
  pane.getChildren().add(notes);
  Scene scene = new Scene(pane, 680, 360, Color.WHITE);
  stage.setScene(scene);
  stage.show();
}

```

**Output:**

 ![notes](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/3/6326d260a9626196c7073ebd376a4c65cf02331c.png)

---

_[View the full topic](https://discourse.processing.org/t/musical-notation-symbols/43483)._
