Csound Csound-dev Csound-tekno Search About

[Csnd] OT: Scala File Format Question

Date2012-09-06 20:44
FromJim Aikin
Subject[Csnd] OT: Scala File Format Question
I know a few Csounders are using microtonal tunings, so I'm taking the
liberty of posting this question to the list. I'm having a problem with
Scala .scl files -- nothing to do with Csound.

The problem is this: PianoTeq 4 (which I'm reviewing this month for Keyboard
Magazine) loads .scl files. You would think this would be great ... but
unlike most synthesizers, PianoTeq lacks an octave up/down tuning parameter
in its sound generator (because it's, you know, a piano). And .scl files
store only one octave of notes. The Scala .tun format lets you set the
center position of your tuning, so you can create a transposition, but the
.scl file format has no parameter for that.

The result is, if I load a .scl file that defines 31 equal-tempered notes
per octave, PianoTeq can only give me the MIDDLE four octaves of the pitch
range (because MIDI notes 0 through 127 cover only four octaves plus a bit
in 31ET). I could instantiate two PianoTeqs, one to play the bass register
and the other to play the treble -- but in order to do that, I would have to
be able to tell PianoTeq how to transpose the .scl file contents up or down
by some frequency ratio. I'm not sure Scala can even do that, and reading
its rather opaque help files hasn't shed any light on the question.

If there are any Scala experts hanging out here ... can you help? Thanks!



--
View this message in context: http://csound.1045644.n5.nabble.com/OT-Scala-File-Format-Question-tp5715531.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2012-09-06 21:12
FromJustin Smith
SubjectRe: [Csnd] OT: Scala File Format Question
I made a little toy web service that displays fretboard positions for
fingerings to go with various scales (really only makes sense with
true-pitch instruments with no frets). I used the .scl files from
scala, but didn't use the scala program at all.

Not all scales repeat in "octaves", to generate the next n notes in an
n-repeating scale, you multiply all the previous frequencies by the
highest multiplier that scale uses.

here is the source code for the server (made in clojure, if anyone
wants to try it you will need to have lein installed)
https://github.com/noisesmith/scale-server

For example for this .scl, by my old friend Warren Burt:
https://github.com/noisesmith/scale-server/blob/master/scl/burt1.scl

! burt1.scl
!
W. Burt's 13diatsub #1
 12
!
 26/25
 13/12
 26/23
 13/11
 13/10
 26/19
 13/9
 27/17
 13/8
 26/15
 13/7
 2/1

You would take your base frequency as a given, the second note would
be that * 26/25, third would be base * 13/12 etc. and finally for the
next base note you have the base * 2/1, and you repeat with that new
base.

The math is really easy, you don't need scala to do it for you (and
between that and the fact that scala is not even open source, I just
use the scale files and don't use the program at all).

On Thu, Sep 6, 2012 at 12:44 PM, Jim Aikin  wrote:
> I know a few Csounders are using microtonal tunings, so I'm taking the
> liberty of posting this question to the list. I'm having a problem with
> Scala .scl files -- nothing to do with Csound.
>
> The problem is this: PianoTeq 4 (which I'm reviewing this month for Keyboard
> Magazine) loads .scl files. You would think this would be great ... but
> unlike most synthesizers, PianoTeq lacks an octave up/down tuning parameter
> in its sound generator (because it's, you know, a piano). And .scl files
> store only one octave of notes. The Scala .tun format lets you set the
> center position of your tuning, so you can create a transposition, but the
> .scl file format has no parameter for that.
>
> The result is, if I load a .scl file that defines 31 equal-tempered notes
> per octave, PianoTeq can only give me the MIDDLE four octaves of the pitch
> range (because MIDI notes 0 through 127 cover only four octaves plus a bit
> in 31ET). I could instantiate two PianoTeqs, one to play the bass register
> and the other to play the treble -- but in order to do that, I would have to
> be able to tell PianoTeq how to transpose the .scl file contents up or down
> by some frequency ratio. I'm not sure Scala can even do that, and reading
> its rather opaque help files hasn't shed any light on the question.
>
> If there are any Scala experts hanging out here ... can you help? Thanks!
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/OT-Scala-File-Format-Question-tp5715531.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>

Date2012-09-07 02:41
FromJim Aikin
Subject[Csnd] Re: OT: Scala File Format Question
> You would take your base frequency as a given....

Right. That's the problem, in a nutshell. That's precisely what I _don't_
want to happen.

I need to be able to tell PianoTeq, "Look, forget about Middle C being
261Hz. When you load this scale, Middle C will be 130.5Hz. Please lay out
the rest of the scale based on that assumption." (Exact numbers may differ
slightly.)

--JA



--
View this message in context: http://csound.1045644.n5.nabble.com/OT-Scala-File-Format-Question-tp5715531p5715535.html
Sent from the Csound - General mailing list archive at Nabble.com.

Date2012-09-07 02:53
FromJustin Smith
SubjectRe: [Csnd] Re: OT: Scala File Format Question
One hack would be to write your own tuning file from scratch, one that
specifies 8 octaves worth of notes.

But if the software has no way to specify the base note of the scale,
the whole thing is pointless.

If you can find out how to set the base note, the following input
would make an 8 octave scale in standard equal temper tuning:

100
200
300
400
500
600
700
800
900
1000
1100
! second octave
1200
1300
1400
1500
1600
1700
1800
...
!8th octave
8400
8500
8600
8700
...

making a script that could generate something like this out of an
arbitrary .scl file is trivial - but first you need to be able to set
the base frequency for this approach to be useful

the .scl file format is documented here:
http://www.huygens-fokker.org/scala/scl_format.html

On Thu, Sep 6, 2012 at 6:41 PM, Jim Aikin  wrote:
>> You would take your base frequency as a given....
>
> Right. That's the problem, in a nutshell. That's precisely what I _don't_
> want to happen.
>
> I need to be able to tell PianoTeq, "Look, forget about Middle C being
> 261Hz. When you load this scale, Middle C will be 130.5Hz. Please lay out
> the rest of the scale based on that assumption." (Exact numbers may differ
> slightly.)
>
> --JA
>
>
>
> --
> View this message in context: http://csound.1045644.n5.nabble.com/OT-Scala-File-Format-Question-tp5715531p5715535.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>

Date2012-09-07 02:54
FromJustin Smith
SubjectRe: [Csnd] Re: OT: Scala File Format Question
also note the .kbm files - can your software load those?

On Thu, Sep 6, 2012 at 6:53 PM, Justin Smith  wrote:
> One hack would be to write your own tuning file from scratch, one that
> specifies 8 octaves worth of notes.
>
> But if the software has no way to specify the base note of the scale,
> the whole thing is pointless.
>
> If you can find out how to set the base note, the following input
> would make an 8 octave scale in standard equal temper tuning:
>
> 100
> 200
> 300
> 400
> 500
> 600
> 700
> 800
> 900
> 1000
> 1100
> ! second octave
> 1200
> 1300
> 1400
> 1500
> 1600
> 1700
> 1800
> ...
> !8th octave
> 8400
> 8500
> 8600
> 8700
> ...
>
> making a script that could generate something like this out of an
> arbitrary .scl file is trivial - but first you need to be able to set
> the base frequency for this approach to be useful
>
> the .scl file format is documented here:
> http://www.huygens-fokker.org/scala/scl_format.html
>
> On Thu, Sep 6, 2012 at 6:41 PM, Jim Aikin  wrote:
>>> You would take your base frequency as a given....
>>
>> Right. That's the problem, in a nutshell. That's precisely what I _don't_
>> want to happen.
>>
>> I need to be able to tell PianoTeq, "Look, forget about Middle C being
>> 261Hz. When you load this scale, Middle C will be 130.5Hz. Please lay out
>> the rest of the scale based on that assumption." (Exact numbers may differ
>> slightly.)
>>
>> --JA
>>
>>
>>
>> --
>> View this message in context: http://csound.1045644.n5.nabble.com/OT-Scala-File-Format-Question-tp5715531p5715535.html
>> Sent from the Csound - General mailing list archive at Nabble.com.
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>