back to list

abc2midi -- peppermint.snt file

🔗Margo Schulter <mschulter@...>

7/9/2006 3:39:40 AM

Hello Hudson and all.

Please let me thank you for your enthusiasm about the
documentation project, and check as to whether I may have
solved one problem in the process of using Peppermint 24 as
a tuning to generate both Sagittal notation and retuned midi
files.

As you point out, I might generate a midi file without pitch
bends and then retune it with Scala, or use a Timidity
tuning table with the -Z option to generate an ogg file from
the midi. However, to generate a retuned midi using an snt
file seems an attractive option to me also, and I therefore
looked at pythagorean.snt.

Realizing that the notation looked quite logical, I
concluded that although I didn't yet know how to use the
'scl' command in microabc to generate an snt file, I might
be able to do it simply by taking pythagorean.snt as a
template and editing it with GNU Emacs to substitute the
correct values for Peppermint 24.

First, here's a Scala file for Peppermint 24 with C as the
1/1:

! peprmint.scl
!
Peppermint 24: Wilson/Pepper apotome/limma=Phi, 2 chains spaced for pure 7:6
24
!
58.679693 cents
128.669246 cents
187.348938 cents
208.191213 cents
7/6
287.713180 cents
346.392873 cents
416.382426 cents
475.062119 cents
495.904393 cents
554.584086 cents
624.573639 cents
683.253332 cents
704.095607 cents
762.775299 cents
832.764852 cents
891.444545 cents
912.286820 cents
970.966512 cents
991.808787 cents
1050.488479 cents
1120.478033 cents
1179.157725 cents
2/1

Note that while Peppermint has two 12-note chains in the
same linear temperament (fifth = 704.0956 cents), it is not
itself a linear temperament, so an snt mapping is indeed
necessary. My decision was to use this mapping for midi (for
occasions when I chose not to use the timidity -Z option),
and a modification of the 121-EDO Sagittal set for the
PostScript notation (more in another post).

To get a convenient listing for an snt file, with A as the
1/1, we can simply use the Scala command 'KEY 18', which
produces this convenient data for use in editing the snt
file:

! peprmintA.scl
!
Peppermint 24 with A as 1/1 (KEY 18 of C version)
24
!
58.67969
79.52197
138.20166
208.19121
266.87090
287.71318
346.39287
416.38243
475.06212
495.90439
554.58409
575.42636
634.10605
704.09561
762.77530
783.61757
842.29727
912.28682
970.96651
991.80879
1050.48848
1120.47803
1179.15772
2/1

Now taking note 60 as middle C or C.0 in microabc terms if
I'm right, we find that A.0 (A440 in one modern standard
pitch) is note 78 (18 scale steps or a regular major sixth
higher than middle C), with a value of 69.000000. Each 24
notes up or down will raise or lower the value by 12.000000.
thus we have:

% 6 = 33.000000 A.-3
% 30 = 45.000000 A.-2
% 54 = 57.000000 A.-1
% 78 = 69.000000 A.0
% 102 = 81.000000 A.1
% 126 = 93.000000 A.2

From here it is just a matter of filling in each 24-note
octave of A-A in the snt template, taking the value of
A at the beginning of the octave (e.g. 69.000000) as a
reference and adding for each note its distance from this A
in midi semitones of 100 cents each.

Thus for note 79, A/|\ in Sagittal, we have a distance of
about 58.6797 cents or 0.586797 semitones (using the
template of pythagorean.snt with six decimal places,
rounding to the nearest millionth (10^-6) of a semitone or
1/10,000 (10^-4) of a cent. This produces:

%%MIDI snt 78 69.000000
%%MIDI snt 79 69.586797

Before posting my peppermint.snt file, maybe I should have
it checked for bugs -- not the fault of either microabc or
GNU Emacs, of course, but my own fallibility. Thus I'll
e-mail you a copy, Hudson, and ask if some debugging is in
order.

Peace and love,

Margo

🔗Hudson Lacerda <hfmlacerda@...>

7/9/2006 8:39:48 AM

Margo Schulter escreveu:
> Hello Hudson and all.

Hi.

> > Please let me thank you for your enthusiasm about the
> documentation project,

Yes. I think that user cases (like this PepperMint-24 instance) are a good way to carry out the documentation project.

> and check as to whether I may have
> solved one problem in the process of using Peppermint 24 as
> a tuning to generate both Sagittal notation and retuned midi
> files.

I think so.

Now I am wondering about the notation (3rd column of microabc input).

> > As you point out, I might generate a midi file without pitch
> bends and then retune it with Scala, or use a Timidity
> tuning table with the -Z option to generate an ogg file from
> the midi. However, to generate a retuned midi using an snt
> file seems an attractive option to me also, and I therefore
> looked at pythagorean.snt.

All these ways -- Scala, Timidity, SMT -- are very similar, concerning to microabc usage; you can use them all. The basic difference is that for Timidity and SMT you need to import the .scl file to microabc, while to retune with Scala you import the .scl to Scala.

> > Realizing that the notation looked quite logical, I
> concluded that although I didn't yet know how to use the
> 'scl' command in microabc to generate an snt file, I might
> be able to do it simply by taking pythagorean.snt as a
> template and editing it with GNU Emacs to substitute the
> correct values for Peppermint 24.

A few helpful microabc commands:

inputscl:<filename> import a .scl file
snt:<filename> export a .snt file
timidity:<filename> export frequency table for timidity
basefreq:<cps> <pitchnum> set the frequency for a given pitch
center:<MIDIpitch> map central pitch 0 to a given MIDI pitch

> > First, here's a Scala file for Peppermint 24 with C as the
> 1/1:
> > ! peprmint.scl

If middle C is the standard MIDI 60, this command line will do the job:

microabc -i- \
inputscl:peprmint.scl \
snt:peprmint.snt \
timitidy:peprmint.tbl

> To get a convenient listing for an snt file, with A as the
> 1/1, we can simply use the Scala command 'KEY 18', which
> produces this convenient data for use in editing the snt
> file:
> > ! peprmintA.scl

You can do:

microabc -i- \
inputscl:peprmintA.scl \
snt:peprmintA.snt \
timitidy:peprmintA.tbl \
basefreq:440.00\ 78 \
centre:0

Of course, for convenience you can put the commands inside the microabc setup file:

{----------------------}
inputscl:peprmintA.scl
snt:peprmintA.snt
timitidy:peprmintA.tbl
basefreq:440.00 78
centre:0
alias:1
0 A ^/144A
1 A> ^/168A
{...}
{...}
{...}
{----------------------}

You can add more aliases:

alias: 1 3 4
0 A ^/144A Ae A|//|
1 A> ^/168A A^ A/|\
{etc.}

(I think the things will become easier when I implement the mapping of Sagittal pitches to arbitrary scales.)

Regards,
Hudson


_______________________________________________________ Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! http://br.mobile.yahoo.com/mailalertas/