lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Note names in Midi Note Numbers?


From: Tim Roberts
Subject: Re: Note names in Midi Note Numbers?
Date: Mon, 27 Feb 2012 15:24:40 -0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Jonghyun Kim wrote:
> Thanks Tim for the advise,

Please keep your replies on the mailing list.  That way, others can
benefit and participate in this exchange.  Although I've done several
dozen LilyPond projects and consider myself competent, I am a raw newbie
compared to the rest of the folks on this list.


> Can I try to this?
>
> I can define all of notes as numbers:
> ...
> 48 = c3
> 49 = c#3
> 50 = d3
> 51 = d#3
> 52 = e3
> ...etc
>
> And replace the note names to numbers:

No.  Lilypond really is a programming language.  You're essentially
writing Scheme code with macros, and numbers really are numbers.  They
can't be redefined.  3 needs to be the number immediately above 2.


> { 48 50 52 49 51 }
> Then I get engraved score:
> c3 d3 e3 c#3 d#3

No, and you shouldn't WANT to do that.

Look, the whole point of LilyPond is to allow you to produce beautiful
printed music that human beings can read and play.  Human beings need to
know the difference between D# and Eb, and there is a difference between
them.  If a piece is in the key of F, then note 51 probably means Eb. 
If a piece is in the key of B, then note 51 means D#.  You can't
arbitrarily choose one or the other, because human beings will be confused.

I'm really confused about what you are trying to accomplish.  Human
musicians do not think in terms of MIDI note numbers.  It's simply not
sensible.  Are you trying to create an automatic MIDI-to-LilyPond
converter?  That is not an easy task by any means.  You have to have a
lot of knowledge of music and of LilyPond to do that sensibly.  MIDI
doesn't have the concept of a key signature to begin with.  You would
need to scan the music and make an intelligent guess to what the key
signature should be.


> At this point my question is: How to define note names to
> numbers(midi), and how to call them in the code.

You cannot.  You must learn and use the note names.  I'm sorry, that's
just the way it is.  That's how LilyPond works.  That's how MUSIC works.


> Unfortunately I don't have a lot of knowledge of programming... Any
> suggest?

Yes.  Learn the note names.

-- 
Tim Roberts, address@hidden
Providenza & Boekelheide, Inc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]