I apologize in advance if this request is inappropriate for this mailing list.
I would like to write a program that will help people learning to play piano. I plan to start with basic note “flashcards” where a note is displayed on screen and the user presses the corresponding key on a MIDI controller.
I have been playing around with Bravura, and I have tried every Google query I can think of, but I can’t seem to find any good examples of what I am trying to do.
Here is a small snippet of Windows code that I hoped would display a gClef at the intersection of a horizontal and a vertical line.
height = -MulDiv(24, GetDeviceCaps(hdc,
LOGPIXELSY), 72);
hf =
CreateFont(height, 0, 0, 0, 0,
FALSE, 0, 0, 0, 0, 0, 0, 0, L"Bravura");
hfOld = (HFONT)
SelectObject(hdc, hf);
TextOut(hdc,
x, y, L"\uE050", 1);
hpen = CreatePen(PS_SOLID,
1, RGB(200, 200, 200));
SelectObject(hdc, hpen);
MoveToEx(hdc, x, y - 100,
NULL);
LineTo(hdc, x, y);
LineTo(hdc, x + 100, y);
And this is what I get. The gClef is displayed significantly below the horizontal line.
http://imgur.com/YvxSES2
Perhaps I am completely misunderstanding the concept of baseline.
If anyone could suggest Google queries that will point me in the right direction I would be grateful.
Thanks,
Shawn