Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Music notation UI VCL Component. Does it exist? [closed]

Tags:

delphi

I'd like to write a simple application that needs to display notes on a score (musical notes on a music staff). It is not for writing a music notation software, it is just for showing some notes on the staff, in readonly mode. I could of course have an image as background with an empty staff and paint the notes... But of course this takes time.

Is there a suitable VCL component?

Of course, the richer the better, anyway even a basic component that can display notes one after the other would be enough. If an instance of TMusicStaff is called MyMusicStaff I could add notes to it in this way:

MyMusicStaff.Add([G4,F4,D4])

(of course here in the Add method I am not specifing the duration, or if they are in a chord or in melodic fashion, it is just to give an idea).

I think I expressed myself.

like image 221
LaBracca Avatar asked May 18 '10 13:05

LaBracca


1 Answers

One possibility is to draw the notes on a canvas using a music note font like this one.

For example:

procedure TFormMain.PaintBoxNotesPaint(Sender: TObject);
var
  Canvas: TCanvas;
begin
  Canvas := TPaintBox(Sender).Canvas;

  Canvas.Font.Name := 'MusiQwik';
  Canvas.Font.Size := 30;

  Canvas.TextOut(10, 30, '&=B=C=D=E=F=G=H=I=!=R=S=T=U=!');
end;

gives:

notes http://img534.imageshack.us/img534/3290/clipboard01fl.png

like image 85
ulrichb Avatar answered Oct 27 '22 19:10

ulrichb