Groups | Search | Server Info | Login | Register


Groups > comp.lang.perl.misc > #4789

Re: Increment with '#' and decrement with 'b'

From Ivan Shmakov <oneingray@gmail.com>
Newsgroups comp.lang.perl.misc, comp.music.misc
Subject Re: Increment with '#' and decrement with 'b'
Date 2012-03-18 22:30 +0700
Organization Aioe.org NNTP Server
Message-ID <86fwd63p0p.fsf@gray.siamics.net> (permalink)
References <Au6dnWYprLy6Uv7SnZ2dnUVZ8g-dnZ2d@giganews.com> <pv3d39-ov32.ln1@anubis.morrow.me.uk> <98KdnZ0g9-yI4PnSnZ2dnUVZ8nKdnZ2d@giganews.com>

Cross-posted to 2 groups.

Show all headers | View raw


>>>>> Henry Law <news@lawshouse.org> writes:
>>>>> On 17/03/12 00:54, Ben Morrow wrote:
>>>>> Quoth Henry Law<news@lawshouse.org>:

	[Cross-posting to news:comp.music.misc, for obvious reasons.]

 >>> I'm turning a standard musical notation for a note into a pitch.
 >>> The note "A" will be zero,

 >> Do you have a reason for not starting with C?  It would make more
 >> sense.

 > As a musician I'd say yes.  As a programmer I decided that it would
 > make more sense to start at the beginning of the alphabet, as that
 > would allow me to do arithmetic on ASCII values if I needed to.  It's
 > arbitrary, since it's for internal representation only.

	Unfortunately, the tone-semitone interval pattern of the
	diatonic scale doesn't fit well the ASCII code, so one'd need
	some conversion table anyway.

 >>> other way, a "#" suffix increases by 1 and "##" by two.

 >> Don't you mean 'x'?

 > Yes, indeed.  I should have included that one too, but ## is an
 > acceptable alternative when writing chord charts.  You're obviously a
 > fellow muso!

	I'd like to note that there're quite a few ASCII-based music
	notations.  The ones that I'd readily recall are:

	* the one of the Lilypond [1] typesetting software (c d e f g a
	  b c makes the C major scale);

	* the ABC notation [2];

	* the Music Macro Language [3], as originated in certain 8-bit
	  implementations of the BASIC language (c d e f g a b > c makes
	  the C major scale), still surviving in such projects as QB64
	  [4], FreeBSD's spkr(4) [5] (with a few extensions), and
	  recently implemented in my MMLi project [6].

	Perhaps, it'd make sense to reuse one of the above for whatever
	project you're working on.

[1] http://lilypond.org/
[2] http://en.wikipedia.org/wiki/ABC_notation
[3] http://en.wikipedia.org/wiki/Music_Macro_Language
[4] http://www.qb64.net/
[5] http://www.gsp.com/cgi-bin/man.cgi?section=4&topic=spkr
[6] http://freecode.com/projects/mmli

[...]

-- 
FSF associate member #7257

Back to comp.lang.perl.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Increment with '#' and decrement with 'b' Henry Law <news@lawshouse.org> - 2012-03-16 23:39 +0000
  Re: Increment with '#' and decrement with 'b' Ben Morrow <ben@morrow.me.uk> - 2012-03-17 00:54 +0000
    Re: Increment with '#' and decrement with 'b' Henry Law <news@lawshouse.org> - 2012-03-17 12:01 +0000
      Re: Increment with '#' and decrement with 'b' Ivan Shmakov <oneingray@gmail.com> - 2012-03-18 22:30 +0700
        Re: Increment with '#' and decrement with 'b' Henry Law <news@lawshouse.org> - 2012-03-18 16:55 +0000
          Re: Increment with '#' and decrement with 'b' Ben Morrow <ben@morrow.me.uk> - 2012-03-20 15:12 +0000
  Re: Increment with '#' and decrement with 'b' Rainer Weikusat <rweikusat@mssgmbh.com> - 2012-03-17 17:05 +0000

csiph-web