Mask file - HeidenBZR/WavConfigTool Wiki

The mask file is a file that can limit things WavConfigTools does. So, here you can limit duplicates count, what aliases types must be used for what wav group, etc. Your reclist can work without a mask file, then it will generate all possible.

Mask .file must have same name like the .reclist file, and have ".mask" extension. It uses YAML syntax, same as .reclist file. Once again, I recommend you to use Notepad++ for creating and editing .mask file.

Content

    class WavMask
    {
        WavGroup[] WavGroups = new WavGroup[0];
        WavGroup Default = new WavGroup();
        int MaxDuplicates = 0;
    }

MaxDuplicates

Since it's the easiest part and quite separated, let's start from it.

In classic reclist you probably don't need duplicates at all, then you should put:

MaxDuplicates: 0

However if it's a words based reclist, you may want up to some number of duplicates per wave, because of possible pronunciations problems:

MaxDuplicates: 3

And you may also want all duplicates possible, well, probably. Then put -1:

MaxDuplicates: -1

WavGroups and Default WavGroup

A Wav Group is a class that defines some rules for a group of waves, the content will be described bellow. You can see in content section that you have a WavGroup collection WavGroups, and the Default WavGroup.

If you have a separated groups in reclist, like VV group, CV-VC group in classic CVVC-like reclist, you would use WavGroups field, and just skip Default field. Then each group would have name, filenames and different rules.

However, in words based or in VCV/CV reclist, when all of content is the same, you can use Default group, without WavGroups. Then you won't need to put there name and files list, only the rules.

You can also leave the two fields and only have MaxDuplicates field, that also would work. Then all alias types will be generated, but with your duplicates limit.

Also it's possible that all your reclist is pretty much the same, but you have for example one group with a few files and special rules. For example, the V-group, which is allowed to generate RV, V, VV and VR, and the rest, that can generate only VC and CV. Then you can use both Default and WavGroups fields. That must work, but wasn't actually tested, so report me if something is working wrong.

So you can have:

  • No wav group settings
  • Default wav group settings, that will be applied to all wav controlls
  • WavGroups with different rules for each group
  • WavGroups with different rules for each group and the Default settigns for the wav controlls, that wasn't included in any group in WavGroups.

WavGroup Content

    class IOWavGroup
    {
        string Name;
        string[] WavFiles = new string[0];
        AliasTypeMask[] AliasTypeMasks = new AliasTypeMask[0];
        int[] SkipV = new int[0];
        int[] SkipC = new int[0];
        int[] SkipR = new int[0];
    }

And again, a Wav Group is a class that defines some rules for a group of waves. You have next fields there:

  • Name. It's not yet used, i'm only planning to use it to filter displayed wav controls. For now, the only thing is that they must be unique, you can't have two groups with the same name. The Default WavGroup doesn't need a name.
  • WavFiles. A list of reclist lines in this group, same like in .reclist, without suffixes, prefixes and file extension. You don't need that in Default group, it would be ignored anyway.
  • AliasTypeMask. These are rules, that limit alias types that can be generated. If a wav is not in any group and there is no Default group settings, all possible alias types will be generated; else, only those you write. The details about the AliasTypeMask class will be described bellow.
  • SkipR, SkipC, SkipV, optional. This option doesn't limit the generation, but limit the count of phonemes that used have to put to have the wav control completed. This will be described below in Skips section.

AliasTypeMask Content

    class AliasTypeMask
    {
        string Name;
        int[] Positions = new int[0];
        bool CanTakeFromAllPositions = false;
    }

AliasTypeMask is a rule, that can limit, which aliases can be taken and where from.

The Name field can be one of followings:

  • V
  • VV
  • CV
  • CmV
  • VCV
  • VCmV
  • RV
  • RCV
  • RCmV
  • RC
  • RCm
  • VR
  • VCR
  • VCmR
  • CR
  • CmR
  • VC
  • VCm
  • Cm
  • CmC

When:

  • V is vowel
  • C is consonant
  • R is rest, so it's used for beginnigs and endings. VR means "vowel ending". The rest is interpreted as phoneme in WavConfigTool, and there is always a Rest-phoneme at the beginning and at the end of all files.
  • m is "multi" for consonants, so CmV means CCV, CCCV, etc, but not singe CV. and without any space.

The V alias type is used for vowel transitions. It's equal to the VV with the same vowels, but only one phoneme is used for generation. It's used for short reclists without VV, like CVC.

There is actually a strict list of there alias types, and other strings won't be read and possibly may break the .mask file.

So, for your alias type rule you need to put Name and one on the options: CanTakeFromAllPositions or Positions.

If you want to take any VC that WavConfigTool can find in the reclist line, put:

CanTakeFromAllPositions: true

However, if you have different aliases for CV and RCV (beginning CV) for example, you may have some restrictions. Then you put Positions with the list of allowed positions.

What is position? Well, any rest and vowel takes one position, and consonants relate to the left position, and you start counting from zero (the number of the first Rest). You write in the settings a position of the last phoneme, if it makes position (CV, VCV, RV. VCR, etc) else for the first (VC, RC).

For example we have line "put it" with the rest between the words, having these phonemes and positions:

  • - 0
  • p (still 0)
  • u 1
  • t (still 1)
  • - 2
  • i 3
  • t (3)
  • - 4

In CVC rus CV-VC group is formed with pattern C-V-C-V-C and is used for CV, VC, RCV, VCR, so there is an example for its rules:

  AliasTypes:
  - Name: RCV
    CanTakeFromAllPositions: true
  - Name: CV
    Positions:
    - 2
  - Name: VC
    Positions:
    - 1
  - Name: VCR
    CanTakeFromAllPositions: true

As far as there are only one place to take RCV and one for VCR, no need to put a certain position. However, CV will be taken only like C-V-C-V-C (second V is third position, because we also have - at the beginning, and we count from zero), and VC only like C-V-C-V-C (in VC we put V position, because the last phoneme doesn't provide a position, and its position is 1, because we also have - at the beginning, and we count from zero).

Skips

Here you should know, that WavConfigTool only uses the first and the last phonemes for oto. So for RCV only R and V need to be configured, C marker won't be used.

An exception is RC, it uses the vowel next it, if there is.

So in the example above, we have need:

  • RCVCVCR for RCV
  • RCVCVCR for CV
  • RCVCVCR for VC
  • RCVCVCR for VCR

You see that the first and the last C are not used in any alias. So why configure them?

You can use Skip fields to skip some phonemes in configuring. To to this, write the field SkipC/SkipV/SkipR, and then the list of indexes of phonemes you want to skip, counting from zero. In our example we have 3 consonants, so to skip the first and the third one, we write the next:

  SkipC:
    - 0
    - 2

Final Examples

So there is a shortened example of CVC .mask, that uses WavGroups:

MaxDuplicates: 0
WavGroups:
- Name: CV-VC
  WavFiles:
  - babab
  - bebeb
  - bobob
  - bubub
  - bibib
  - vavav
  - vevev
  - vovov
  - vuvuv
  - viviv
  AliasTypes:
  - Name: RCV
    CanTakeFromAllPositions: true
  - Name: CV
    Positions:
    - 2
  - Name: VC
    Positions:
    - 1
  - Name: VCR
    CanTakeFromAllPositions: true
  SkipC:
    - 0
    - 2
- Name: V
  WavFiles:
  - a
  - e
  - o
  - u
  - i
  AliasTypes:
  - Name: RV
    CanTakeFromAllPositions: true
  - Name: VR
    CanTakeFromAllPositions: true

This is an example of Arpasing-like mask, that only uses Default field:

MaxDuplicates: 10
Default:
  AliasTypes:
  - Name: RC
    CanTakeFromAllPositions: true
  - Name: RV
    CanTakeFromAllPositions: true
  - Name: CR
    CanTakeFromAllPositions: true
  - Name: CV
    CanTakeFromAllPositions: true
  - Name: CC
    CanTakeFromAllPositions: true
  - Name: VC
    CanTakeFromAllPositions: true
  - Name: VR
    CanTakeFromAllPositions: true
  - Name: VV
    CanTakeFromAllPositions: true

You can also take a look to the legacy files. There is the Release page, the settings files, including .mask, are in Settings archive.