1.18.00.00 .scl support is buggy

Started by uncloned, February 02, 2010, 04:04:26

Previous topic - Next topic

uncloned

Full Version:
OpenMPT v1.18.00.00

Has the bug occured in previous versions? If yes, please specify version(s): (This option is optional, and doesn't need research. But in case you know...)


Description of the bug:

incorrect interpretation of scala tuning file import

How often does it happen?:

100% so far

How to reproduce (step by step description):

create a MPTM module
load a single sample into an instrument
set up midi record per your set up
use tuning support to load a scala file of 12 or more notes per octave (or other repeating interval)

play a scale and you will hear the notes repeat after X with X being the number of notes in the scala file you loaded.

I'm not sure how to suggest a fix at this point.
This happens regardless of midi controller for me.

Edit by dev: Fixed topic title

Relabsoluness

This is "by design". In many cases the expected result can be obtained by reducing groupsize by one and setting groupratio to 2 after importing a SCL file. The reason why this isn't done automatically is that it wasn't clear how scala files such as {1; 3.01} should be interpreted. Say that OpenMPT loads 1 as the first note and 3.01 as the second. What should the third and fourth be?

uncloned

Hi Reb,

Can you explain what group size and group ratio do?

I can guess, but better to know...

Relabsoluness

Quote from: "uncloned"Can you explain what group size and group ratio do?
The ratio between notes with distance of group size is group ratio: ratio(k + group size) / ratio(k) = group ratio for all k. With SCL-import, notes in range [0, group size-1] are the loaded ratios and groupratio is one, so the same pattern repeats in [group size, group size + groups - 1] etc.. If group ratio is set to two, then notes in range [group size, group size + group size - 1] have double the ratio compared to notes in range [0, group size -1].

uncloned

Hi Reb

Lets see if I understand

group ratio is the factor in *equal* divisions of an interval, such as an octave.

prime example being 2^(1/12) =  1.05946309 is the ratio between semitones in 12 EDO (standard western tuning)

Then... group size is how many times this set of X repeats?

A couple thoughts here.

Alternative solution => I think the (real) .TUN format specifies the frequency for each of the 128 midi notes. Scala can export those files as well and perhaps this would be easier to implement?

Working with .SCL files

I think the interpetation of the scala file needs to be expanded. What the scala file gives you is an example octave (or whatever period). So there are three things missing as far as I can tell.

1. a true tuning origin - C 5 is the usual I see - when I tried changing this in OMPT even weirder things happened.

2. Repeating + tuning overall interval. For example:

! 19-36.scl
!
19 out of 36-tET, Tomasz Liese, Tuning List, 1997
19
!
66.66667
133.33333
200.00000
266.66667
333.33333
400.00000
466.66667
500.00000
566.66667
633.33333
700.00000
766.66667
833.33333
900.00000
966.66667
1033.33333
1100.00000
1133.33333
2/1

The 2/1 indicates an octave - the tuning needs to be repeated tuning, tuning + 2/1, tuning + 2/1 +2/1, etc.

3. the tuning needs to be read backwards from the origin in a manner like the above statement except tuning - 2/1, tuning - 2/1-2/1, etc.


In the next post I will post a "true" .TUN format, which like I said might be easier to implement.

uncloned

; AnaMark tuning keymap
; exported from Max Magic Microtuner
;
; LucyTuned0b5s
;
; AA#BCC#DD#EFF#GG#
;
[Exact Tuning]
basefreq=8.2399026845
note 0=0
note 1=68.450761
note 2=190.985932
note 3=259.436693
note 4=381.971863
note 5=504.507034
note 6=572.957795
note 7=695.492966
note 8=763.943727
note 9=886.478898
note 10=954.929659
note 11=1077.464829
note 12=1200
note 13=1268.450761
note 14=1390.985932
note 15=1459.436693
note 16=1581.971863
note 17=1704.507034
note 18=1772.957795
note 19=1895.492966
note 20=1963.943727
note 21=2086.478898
note 22=2154.929659
note 23=2277.464829
note 24=2400
note 25=2468.450761
note 26=2590.985932
note 27=2659.436693
note 28=2781.971863
note 29=2904.507034
note 30=2972.957795
note 31=3095.492966
note 32=3163.943727
note 33=3286.478898
note 34=3354.929659
note 35=3477.464829
note 36=3600
note 37=3668.450761
note 38=3790.985932
note 39=3859.436693
note 40=3981.971863
note 41=4104.507034
note 42=4172.957795
note 43=4295.492966
note 44=4363.943727
note 45=4486.478898
note 46=4554.929659
note 47=4677.464829
note 48=4800
note 49=4868.450761
note 50=4990.985932
note 51=5059.436693
note 52=5181.971863
note 53=5304.507034
note 54=5372.957795
note 55=5495.492966
note 56=5563.943727
note 57=5686.478898
note 58=5754.929659
note 59=5877.464829
note 60=6000
note 61=6068.450761
note 62=6190.985932
note 63=6259.436693
note 64=6381.971863
note 65=6504.507034
note 66=6572.957795
note 67=6695.492966
note 68=6763.943727
note 69=6886.478898
note 70=6954.929659
note 71=7077.464829
note 72=7200
note 73=7268.450761
note 74=7390.985932
note 75=7459.436693
note 76=7581.971863
note 77=7704.507034
note 78=7772.957795
note 79=7895.492966
note 80=7963.943727
note 81=8086.478898
note 82=8154.929659
note 83=8277.464829
note 84=8400
note 85=8468.450761
note 86=8590.985932
note 87=8659.436693
note 88=8781.971863
note 89=8904.507034
note 90=8972.957795
note 91=9095.492966
note 92=9163.943727
note 93=9286.478898
note 94=9354.929659
note 95=9477.464829
note 96=9600
note 97=9668.450761
note 98=9790.985932
note 99=9859.436693
note 100=9981.971863
note 101=10104.507034
note 102=10172.957795
note 103=10295.492966
note 104=10363.943727
note 105=10486.478898
note 106=10554.929659
note 107=10677.464829
note 108=10800
note 109=10868.450761
note 110=10990.985932
note 111=11059.436693
note 112=11181.971863
note 113=11304.507034
note 114=11372.957795
note 115=11495.492966
note 116=11563.943727
note 117=11686.478898
note 118=11754.929659
note 119=11877.464829
note 120=12000
note 121=12068.450761
note 122=12190.985932
note 123=12259.436693
note 124=12381.971863
note 125=12504.507034
note 126=12572.957795
note 127=12695.492966

Relabsoluness

In order to understand the problem here, I would like to hear answers to the following questions:

-What would be the .tun file made from SCL file with just two ratios {2.45; 3.152}? (this is a simplified example of SCL-files such as ligon3.scl)?
-Does the suggestion "reduce group size by one, set group ratio to 2" not work as expected? If not, please provide a test case.

Quote from: "uncloned"group ratio is the factor in *equal* divisions of an interval, such as an octave.
....
Then... group size is how many times this set of X repeats?
I don't know how to explain these much better than the mathematical form given earlier. With group geometric type, notes in range [0, group range -1] are the "free" notes that define all other ratios by the formula mentioned earlier. If this doesn't help, simply testing different values can illustrate this (note that the inputted value won't be applied before changing the cursor focus out of the text edit box).

Quote from: "uncloned"1. a true tuning origin - C 5 is the usual I see - when I tried changing this in OMPT even weirder things happened.
I'm not quite sure what you mean there, but "Multiply" can be used to shift the ratio origin (for example multiplying 12EDO with 0.5 transposes by octave). Any help from that?

Quote from: "uncloned"2. Repeating + tuning overall interval. For example:
3. the tuning needs to be read backwards from the origin in a manner like the above statement except tuning - 2/1, tuning - 2/1-2/1, etc.
These are better discussed after I hear the answer to the second question.

uncloned

Hi Rebs,

I'm no expert on the .scl format - I just pointed it out.

I'll look into what you suggested and also that odd file you are pointing to and see if I can make sense of it.

Let me point out that scala supports a lot of soft and hardware synths - so it is possible the minimalistic example you have is a variant that is off the beaten track.

I think a reasonable goal is to support main stream scala files - and put a note to that somewhere in the documentation.

Chris

uncloned

Hi Rebs,


Finally I had some time to play with this.

Changing the group ratio to 2 did make the tuning continuous across the keyboard.

I did reduce the group size by one where it made sense (17 ET showing up as 18) but I need to investigate this further to get an exact handle on this.

Got an idea - work with 13 ET as a model tuning - not as mind bending. C and C# an octave above should be the same note.

I must say that having this tuning ability is great - I was able to do some interesting passages in 17 ET and a guitar sound. Not good enough to share but - proof of concept.

Let me look at that weird scala file tonight too.

uncloned

Quote from: "Relabsoluness"In order to understand the problem here, I would like to hear answers to the following questions:

-What would be the .tun file made from SCL file with just two ratios {2.45; 3.152}? (this is a simplified example of SCL-files such as ligon3.scl)?
.

Rebs,

I am confused because ligon3.scl looks like this to me on two computers in notepad:

! ligon3.scl
!
Jacky Ligon, 23-limit non-octave scale (2001)
16
!
23/22
23/21
23/20
23/19
23/18
30/23
23/16
23/15
368/225
12167/6750
46/25
437/225
92/45
161/75
506/225
529/225


It is a normal scala file.

Relabsoluness

Quote from: "uncloned"It is a normal scala file.
No disagreement there. The point was that it is an example of a file where the last ratio is not 2 but something between 2 and 3. Would one still like to use the earlier trick of setting group ratio to 2?

uncloned

well, ok, so what you are saying is

group ratio of 2 equals repeating at the octave.

and yes there are many tunings that repeat at a different interval.

How would you use group ratio to indicate repeat at 1.5 octaves?

uncloned


Relabsoluness

Quote from: "uncloned"How would you use group ratio to indicate repeat at 1.5 octaves?
I'm not sure whether I understand this correctly, but the group ratio doesn't have to be an integer. For example setting group ratio = 1.5 and group size = 1 would result to ratios  ...1/(1.5*1.5*1.5); 1/(1.5*1.5); 1/1.5; 1; 1.5; 1.5*1.5; 1.5*1.5*1.5....

Quote from: "uncloned"so... this is a dead bug?
Perhaps not, I think the behaviour needs revision.

uncloned

Hi Rebs, microtonal tunings don't have to repeat at the octave.

A very popular tuning, Bohlen Pierce, http://en.wikipedia.org/wiki/Bohlen%E2%80%93Pierce_scale  repeats at the octave plus a fifth.

So I was trying to understand how the group ratio works.

So then, 1.5 would be less than an octave and then 2+3/2 (whatever that works out to be) would be the Bohlen Pierce octave and a fifth?

So group size 1 = 1 octave  - the for Bohlen Pierce we'd need 1+3/2?

group ratio of 2 would mean to span an octave?

Another popular tuning, Carlos Alpha repeats at the 5th - (3/2)