Music sheet, notes, and the like

Blitz3D Forums/Blitz3D Programming/Music sheet, notes, and the like

semar(Posted 2009) [#1]
Hello Blitzers.

I would like to develop a program to edit a music sheet by inserting single notes on a pentagram.

What puzzles me, is the way to draw the five lines (or more) on the screen, enlarging each beat while inserting the notes.

The program should also be able to print the music sheet with a printer.

Is there something out there that can be used to this purpose ? Any interesting DLL that can be easily integrated in Blitz3D ?

Cheers,
Sergio.


Warner(Posted 2009) [#2]
Maybe you would be best off using a 3D sprite/quad instead of a 2D image. That way, you can zoom in/out quite easily.

As far as printing goes, there should be something in the archive.


semar(Posted 2009) [#3]
Hi Thom,
thank you for the code sample - really inspiring.

And yes, I'll definately use a quad, since I'll use Sprite Candy - which uses quads.

Inserting notes and shifting the bar line accordingly will be the next challenge...

All the best,
Sergio.


Kryzon(Posted 2009) [#4]
That's a challenge.
I guess the biggest problem you'll have is that Sprite Candy uses a single surface system. Meaning, even if you use Camera Pick to detect which note you are picking, there's no way to tell which one of them you picked (it'll return the entity containing all quads, not a single note quad).
I didn't quite get what you meant with "enlarging each beat". Got a sample of that?

As for printing, you're gonna have to learn the classes and functions that the windows API uses, so you can build a userlib to access that and print your documents.
EDIT: Scratch that, after a little research I found something interesting: http://www.radioactivegamer.com/Blitz/

big thanks to "Kanati" for making that lib.

One other thing that might help you out is this:
http://blitzbasic.com/codearcs/codearcs.php?code=1513
A PDF generator for Blitz.

PS: You're welcome :°)


semar(Posted 2009) [#5]
@Kryzon,
thanks for the useful links.

Well, as far as I know, SC uses quads but you can test an object image against another object (image or shape), so I can trace the collision between mouse and a single note, for instance.

Also the pentagram, it will be made of line shape objects, with a medium height so that the program recognize where the user want to put a note (on a black line, or on a space between two lines; musically speaking, a C is usually between lines, a D is on a black line).

As for 'enlarging each beat' - sorry for my english. I meant the bar, the measure; in other words, if you type 4 notes on a bar, the lenght of that bar is smaller than if you type 6 or 11 notes on it. The vertical line which indicates the end of a bar, should shift accordingly to the right, as more notes are inserted in the bar.

That is the most challenging part. Each note and sign must shift on the right (or shrink to the left) as more (or less) notes are inserted on each bar.

A software, similar to what I'd like to develop, is TabTrax. Google it and you'll know what I'm trying to achieve.

Cheers,
Sergio.