Tk::MusicSheet... update

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I've copied the original proposal below the current message...

Current message:



There are several key areas here:

1) Display of items on the screen
2) Addition of directions, comments, etc
3) Modification of item preferences (stalks, accidentals, etc)
4) Calculation of positions:
- a) horizontally
- b) vertically
5) Representation of musical notes
- a) length
- b) pitch

These would eventually all be part of the system, running in reverse order,
but they represent individual functional systems and will be built in the order shown.

1) Display of items onscreen..

First, we need to define what and how we want to display...

- a) I want to display music for editing only...
-- i) The staves can run on horizontally as long as they like (like in Noteworthy Composer)
-- ii) We only need one Canvas widget to display things on
-- iii) for final prints we can export to Lilypond
- b) I want to display musical directions, and perhaps other comments
- c) It would be nice to include lyric editing here too

So I need to create routines to draw notes, stems, tails, rests, etc, etc, etc
And I need to place them in the correct places using a cursor
The cursor will be moved according to the note sizes, spacing values, etc, stored
in the staff object and the note lengths stored in the note objects

For appending a single note, only that note and the length of the staff need to be altered
But for editing, inserting or deleting a note, the rest of the notes need to be re-painted/moved



Original proposal:


Proposed CPAN Module: Tk::Canvas::Music

This module will create a Tk::Widget which ISA Tk::Canvas.  It will
export functions that paint scores, notes, key signatures, time
signatures, tempo and other text, bar lines, a cursor/caret, ledger
lines, and so on.  It will have a set of default bindings that allow
input from the keyboard.  The key-mapping may be redefined at any time.

There will be a Read-Only version with none of the input bindings, for
display purposes or for the perl community to add their own bindings to.

A module like this can allow the printing of musical score, the input of
music in a conventional manner, or even the export of music to midi,
MusicXML, or any other form of storage.  The Music::Note module will be
used to create a new Note module to represent the notes as objects.

The new Note module is necessary so that notes may have a length
property and may be rests.  A Staff module will allow representation of
staves as objects.  paint()ing the Staff will automatically paint() all
of the notes that belong to it, using the treble clef by default, but
adjusting the vertical position appropriately for any clef.  Since the
Music::Note module is used, transposition will be easy, thus a
particular staff of a composition may be isolated and printed for Bb or
Eb (or any other) instruments.

This module is at the idea stage, will be written in perl, and will have
the standard perl license.

So, what do you think?... feedback please.


Re: Tk::MusicSheet... update

On 2006-08-03, Jimi-Carlo Bukowski-Wills wrote:
Quoted text here. Click to load it

Check out muscript which has compact
PostScript routines to draw all the things you want (eg. treble-clefs :-) )
I hope you can keep your things scaleable, it's pretty important to
be able to have small staves and large staves.

Try to not confine output to Lilypond format.  MusicXML can be a useful
lingua franca.  MIDI would allow the piece to be heard while editing,
very useful for proof-reading.  Hopefully it will be easy for other
programmers to generate output in their own formats, or to input a
score into your MusicSheet...

Regards, Peter

AUS/TAS/DPIW/CIT/Servers hbt/lnd/l8   6233 3061
Pasaré, pasarémos    dice el agua    y canta la verdad contra la piedra
 -- Pablo Neruda

Re: Tk::MusicSheet... update

Peter, thanks for your feedback...

I'm hoping to either...

1) Use an existing musical representation format (such as Music::Note) or

2) Create an appropriate "ideal" musical representation format

... that will allow conversion to any format...
including output using lilypond syntax, muscript syntax, and a variety of
other formats

Audio::Beep accepts the lilypond format which means that exporting in this
format would allow playback.

I suppose that one of the central parts of this module will be translation
of music from one notation/representation to another... perhaps I should
propose this as a separate system of modules...

There should be an ideal way to represent the data of music, but there are
many ways of notating it.  I want this ideal representation to allow easy
translation to any notation format.  It is this ideal representation that
the Tk::MusicSheet widget will export as a data structure.  The data can
then be filtered through another module to create a version in some format
or other, eg lilypond, noteworthy, midi, letter, ABC, number,
integer, parsons, and so on.

What do you think?


On Fri, 04 Aug 2006 08:44:20 +1100, Peter Billam wrote:

Quoted text here. Click to load it

Re: Tk::MusicSheet... update

I forgot to say...

YES, this will be entirely scalable (graphically) since each graphical
element shall be created using lines and ovals using the Tk::Canvas
createLine, createOval, etc


On Fri, 04 Aug 2006 14:29:31 +0000, Jimi-Carlo Bukowski-Wills wrote:

Quoted text here. Click to load it

Site Timeline