开发者

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

开发者 https://www.devze.com 2022-12-31 09:36 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 4 years ago.

Improve this question 开发者_如何学Go

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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消