back to list

Scala archive ontology

🔗Carl Lumma <ekin@lumma.org>

5/7/2006 9:40:01 PM

Manuel, can I convince you to put an "n_" in front of
all .scl files in the Scala archive, where n is the
number of notes in the scale, padded with leading zeros
as appropriate (say to four or five places)?

Or perhaps add a scale browser to Scala, which allows
viewing/sorting scales by various attributes like number
of notes?

-Carl

🔗Carl Lumma <ekin@lumma.org>

5/7/2006 10:03:48 PM

>Manuel, can I convince you to put an "n_" in front of
>all .scl files in the Scala archive, where n is the
>number of notes in the scale, padded with leading zeros
>as appropriate (say to four or five places)?
>
>Or perhaps add a scale browser to Scala, which allows
>viewing/sorting scales by various attributes like number
>of notes?

In my dreams it would be...

n_author-name-index.scl

Where...

n
Number of notes in file, as zero-padded integer 0 < n < 99999.

author
Name of discoverer, 16 chars max, or mailing list message number
for unknown/unclear/multiple authorship. Examples:
Ptolemy - Ptolemy
SmithGene - Gene Smith
SmithJon - Jon Smith
T66993 - Yahoo tuning list message number 66993
TM445 - Yahoo tuning-math list message number 445
MMM599 - Yahoo makemicromusic list message number 599
M1050.4 - Mills tuning digest 1050 message 4

name
Name of scale, CamelCase for multiple words, 16 chars max,
no abbreviations unless would exceed maximum.

index
Optional number for series of similar scales, as zero-padded
integer 0 < index < 99.

-Carl

🔗Manuel Op de Coul <manuel.op.de.coul@eon-benelux.com>

5/9/2006 8:18:34 AM

--- In tuning-math@yahoogroups.com, Carl Lumma <ekin@...> wrote:
>
> >Manuel, can I convince you to put an "n_" in front of
> >all .scl files in the Scala archive, where n is the
> >number of notes in the scale, padded with leading zeros
> >as appropriate (say to four or five places)?

No, you can do "dir 31" for example, or "dir f* 31", see
help directory.

> >Or perhaps add a scale browser to Scala, which allows
> >viewing/sorting scales by various attributes like number
> >of notes?

You could add a line
Scale_Count 3500
to scala.ini, and do
LOAD/ALL *.scl
then open Edit->Browse scales
and click on the Size column header to sort on scale size.

> author
> Name of discoverer, 16 chars max, or mailing list message number
> for unknown/unclear/multiple authorship. Examples:
> Ptolemy - Ptolemy
> SmithGene - Gene Smith
> SmithJon - Jon Smith
> T66993 - Yahoo tuning list message number 66993

A drawback of all this information in the file name is that it takes
longer to type in the file name.

Manuel

🔗Carl Lumma <ekin@lumma.org>

5/9/2006 12:19:42 PM

>> >Manuel, can I convince you to put an "n_" in front of
>> >all .scl files in the Scala archive, where n is the
>> >number of notes in the scale, padded with leading zeros
>> >as appropriate (say to four or five places)?
>
>No, you can do "dir 31" for example, or "dir f* 31", see
>help directory.

I knew you'd tell me it was already possible. :)

>> >Or perhaps add a scale browser to Scala, which allows
>> >viewing/sorting scales by various attributes like number
>> >of notes?
>
>You could add a line
>Scale_Count 3500
>to scala.ini, and do
>LOAD/ALL *.scl
>then open Edit->Browse scales
>and click on the Size column header to sort on scale size.

There was apparently already a Scale_Count 30 that I didn't
see, and it was overriding the line I added. But I made only
one line and made it 3500 and now it works. Cool.

>> author
>> Name of discoverer, 16 chars max, or mailing list message number
>> for unknown/unclear/multiple authorship. Examples:
>> Ptolemy - Ptolemy
>> SmithGene - Gene Smith
>> SmithJon - Jon Smith
>> T66993 - Yahoo tuning list message number 66993
>
>A drawback of all this information in the file name is that it takes
>longer to type in the file name.

A drawback to not having it is being unable to use the OS's native
tools to browse/view scales.

-Carl

🔗Gene Ward Smith <genewardsmith@coolgoose.com>

5/9/2006 6:12:26 PM

--- In tuning-math@yahoogroups.com, "Manuel Op de Coul"
<manuel.op.de.coul@...> wrote:

> No, you can do "dir 31" for example, or "dir f* 31", see
> help directory.

You first need to change directories to the scl directory. Then
"dir 24" will list everything with 24 notes to the scale in the scl
directory. This is something people want to do, so something
explaining that somewhere, or something on a pulldown menu, would be nice.

🔗Manuel Op de Coul <manuel.op.de.coul@eon-benelux.com>

5/10/2006 6:20:22 AM

--- In tuning-math@yahoogroups.com, Carl Lumma <ekin@...> wrote:
> A drawback to not having it is being unable to use the OS's native
> tools to browse/view scales.

Well there's a primitive search function in the scale browser, just
type something when focus is on the list, and it matches the
description, but only beginning on the first letter. It's a GTK
feature, and it also works in other dialogs like File:New:Mode.

I'll add a /NOOUTPUT option to the LOAD command to make it faster.

Gene wrote:
>You first need to change directories to the scl directory. Then
>"dir 24" will list everything with 24 notes to the scale in the scl
>directory. This is something people want to do, so something
>explaining that somewhere, or something on a pulldown menu, would be
>nice.

Agreed.

Manuel

🔗Graham Breed <gbreed@gmail.com>

5/10/2006 7:48:04 AM

Carl Lumma wrote:

>>>author
>>>Name of discoverer, 16 chars max, or mailing list message number
>>>for unknown/unclear/multiple authorship. Examples:
>>>Ptolemy - Ptolemy
>>>SmithGene - Gene Smith
>>>SmithJon - Jon Smith
>>>T66993 - Yahoo tuning list message number 66993
>>
>>A drawback of all this information in the file name is that it takes
>>longer to type in the file name.
> > > A drawback to not having it is being unable to use the OS's native
> tools to browse/view scales.

I think this gives all and only 12 note scales:

egrep -l "^[[:space:]]+12[[:space:]]+$" *.scl

I'd have to check the file format to be sure. Other things there would be nice to search on but a convention for metadata in comments would better than putting everything in the filename.

Graham

🔗Carl Lumma <ekin@lumma.org>

5/10/2006 8:43:46 AM

>>>A drawback of all this information in the file name is that it takes
>>>longer to type in the file name.
>>
>> A drawback to not having it is being unable to use the OS's native
>> tools to browse/view scales.
>
>I think this gives all and only 12 note scales:
>
>egrep -l "^[[:space:]]+12[[:space:]]+$" *.scl
>
>I'd have to check the file format to be sure. Other things there would
>be nice to search on but a convention for metadata in comments would
>better than putting everything in the filename.

Yes, ok, but I meant from a GUI. 'I'm browsing photos, videos,
and scl files.' I spend more time with scl files outside of Scala
than I do in.

And when I use Scala, I use the command line only. But I don't type
filenames, I drag scl files onto Scala from my GUI.

-Carl

🔗Graham Breed <gbreed@gmail.com>

5/10/2006 6:43:24 PM

Carl Lumma wrote:
>>>>A drawback of all this information in the file name is that it takes
>>>>longer to type in the file name.
>>>
>>>A drawback to not having it is being unable to use the OS's native
>>>tools to browse/view scales.
>>
>>I think this gives all and only 12 note scales:
>>
>>egrep -l "^[[:space:]]+12[[:space:]]+$" *.scl
>>
>>I'd have to check the file format to be sure. Other things there would >>be nice to search on but a convention for metadata in comments would >>better than putting everything in the filename.

FWIW, it should be

egrep -l "^[[:space:]]*12[[:space:]]+$" *.scl

and it can give false positives (most notably stockhausen.scl with 5 notes)

> Yes, ok, but I meant from a GUI. 'I'm browsing photos, videos,
> and scl files.' I spend more time with scl files outside of Scala
> than I do in.

I use grep with scl files because it seems to be the right way to do it.

This Python script will give links to your old scl files in a new folder, with the number of notes at the start of the name, provided you have the right kind of links. You'll probably have to look at the last line.

(Will probably lose indentation on the web interface, so try whatever link you use to get the original)

import sys, os

def scl_n_notes(filename):
for line in open(filename):
try:
return int(line.strip())
except ValueError:
pass
return 0

source = sys.argv[1]
destination = sys.argv[2]

try:
os.mkdir(destination)
except OSError, ose:
if ose.errno != 17: # file exists
raise ose

for filename in os.listdir(source):
sourcename = "%s%s%s"%(source, os.sep, filename)
destname = '%s%s%03i%s'%(
destination, os.sep, scl_n_notes(sourcename), filename)
os.link(sourcename, destname)

Ideally, your file browser would be aware of Scala metadata. I've no idea how to do that. But a first step would be for the scl files to contain some more metatada, like author.

> And when I use Scala, I use the command line only. But I don't type
> filenames, I drag scl files onto Scala from my GUI.

Righty ho. You'll probably need to tell it about the new folder.

Graham

🔗Carl Lumma <ekin@lumma.org>

5/10/2006 8:29:09 PM

>Ideally, your file browser would be aware of Scala metadata. I've no
>idea how to do that. But a first step would be for the scl files to
>contain some more metatada, like author.

Yeah.

-Carl