Sound font organisation/presets questions

I am not sure if my questions belong here or in another categories ?

As I understood, a preset should look like this:

   { "FontFolder;common", "tracks/title_name.wav",
    Blade1_Style,
    Blade2_Style,
    ...,
    LastBlade_Style,
    "name to be displayed on oled screen"
    },

My questions are:

  1. can “FontFolder” be with capital letters ?
  2. can “FontFolder” be a sub-folder like “FontMaker/FontFolder” ?
  3. does “common” has to be named “common” ?
  4. can “common” be a sub-folder like “VoicePack/DarthVader” for font1 & “VoicePack/Ashoka” for font2 ?
  5. can I have more than 1 “track folder”, for example “tracks/” as my default & “fontxyz/tracks/” for “fontxyz” & does it have to be called tracks ?
  6. I was led to believe by some YouTube videos that track files needed to be called “trackNumberX.wav” or could they also be called “ACDC_Thunderstuck.wav” for example ? I do understand I need to try and keep the names short to save on memory.
  7. I recently downloaded many free sound fonts, some have “*.ini” files in them. What should I do with the different *.ini files ? Keep/delete ?
  8. Is there a way to make sure a sound font is a Proffie “format” font ?
  9. “name to be displayed on oled screen”, is this necessary ? If I don’t have an OLED screen, do I use “” or may I leave it empty (and remove the last “,” comma from the last blade style.
  10. What will happen if there is a " " space in a folder name or track file name ? I try to avoid them, but I might miss one.
  11. Do tracks names need to have “.wav” extention (I know Proffie only uses .wav files but could I use “tracks/ACDCthun” or does it has to be “tracks/ACDCthun.wav” ?
  12. About #ifndef CONFIG_STYLES, I would like to put a few Fett263 styles in here to keep my presets a bit clearer but I do not know how. And for info when I tried to add the provided example on
    ProffieOS Documentation: The CONFIG_STYLES section
    I got a compile error: “error: ‘InOutHelperX’ does not name a type”

I have a strong suspicion that for questions 1 to 6, I can probably do whatever I want as long as everything is named & “pathed” correctly as per the folders on my SD-card while respecting the caps/no-caps. But is there something I shouldn’t do (like using special characters, are “-” dash and “_” underscore allowed in the names)

Thank you for reading this far.

  1. Yes, on Proffieboards the match should be case insensitive. On other boards it might not be, in which case the case as to match the folder on the SD card.
  2. Yes, but it adds a small amount of time to each file open, which can make audio glitches more likely. (~0.3ms)
  3. No, but the Fett263 will always use “common” when you edit presets.
  4. Yes, but see (3)
  5. In base ProffieOS, “tracks” has no special semantics at all. There can be only one track per preset and it has to be listed in the preset. However, some props have tracks players, and they have different rules. I think they tend to look for trakcks inside “FONT/tracks/” (where ‘FONT’ is the font folder.)
  6. Base ProffieOS: You can call it whatever you want. Props with Track players: check the rules for your specific prop.
  7. Keep.
  8. Proffieboards accept many font formats (including igniter and CFX), and there are a lot of ways to put together a proffie font, so it can be difficult to know if it is correct or not unfortunately.
  9. No, it is not required. However, it is recommended. The string itself helps the C++ compiler produce better errors, also, if you use the ProffieOS workbench, that string is used to identify the preset.
  10. spaces should work just fine, however, it forces the msdos file system to use “long filenames”, which slows things down slightly, making audio glitches more likely. 8.3 filenames are recommended if possible.
  11. ProffieOS will treat the file differently if it doesn’t end with “.wav”, there are other possibilities, like “.raw”, but I don’t recommend any of them.
  12. this is a more open-ended question, and I can’t seem to reach github right now, so I’m going to answer it in a separate post later…
1 Like

Well Profezzorn beat me to it (damn train ride).
I’ll post this anyway since I took the time to answer. Let’s see how right or wrong I was lol.

  1. Yes

  2. Yes

  3. No

  4. Yes

  5. Yes, No

  6. Tracks can be named whatever you want as well. Teensyboards used to have an 8 character limit. Proffieboards will work fine with longer names (although there’s still negligible gains to be had by adhering to 8 characters max for file and directory names)

  7. config.ini files are font specific settings and may or may not be (typically not I find) customized for a font. If anything is custom, it is usually the humStart (or ProffieOSHumDelay) value. smoothsw.ini has more hilt-centric parameters that wouldn’t likely change from font to font due to the physical properties of the saber (center of gravity, heft of the blade influecing how it swings, and so on). So, while it’s “proper” for font creators to include these files with their font, you’re milage may vary as to whether you use them or not. Personally, I found settings that work fine for me across the board and keep one set of config.ini and smoothsw.ini files in a common folder and rename the font provided ones as FONTconfig.ini. THis way I have them still, but they are ignored, and my common folder ones are used instead.

  8. Yes https://www.soundfontnamingconverter.com/ :wink:

  9. Technically no. The short version:
    Without the “message”, it’s possible to have a mismatch of the same amount of NUM_BLADES, number of styles per preset, and number of blades configured in the BladeConfig array. If you have less styles than blades, you’ll be sending NULL data to blade LEDs, and avoiding some useful errors ( not preventing errors in a good way). It also won’t display anything in Serial Monitor where it would show you the current preset name, OLED displays will be blank when the preset is loaded, and ProffieOS Workbench in a browser window won’t have a name for your preset.
    TL;DR - Why wouldn’t you include it?

  10. Spaces in font names are mostly forgiven in ProffieOS it seems. Not so much for file names though. Continue to avoid them along with any special characters like ’ ( ) - etc…

  11. Yes. Track filenames in the config file preset need to have .wav appended to them.

  12. First, those lines in the config are “if defined” as in #ifdef, not to be confused with “if NOT defined” as in #ifndef. As far as how-to use a “using” statement, it is simply an alias for the longer string that is the style.
    Everything inside StylePtr<…>(); can be set with using, so like:

using MyCoolStyle = Layers<...style code here...>;

Then in the preset it would be (using your example)

{ "FontFolder;common", "tracks/title_name.wav",
    StylePtr<MyCoolStyle>(),
    "name to be displayed on oled screen"
    },

If I had to guess, I’d say your failed compile is likely due to missing a semicolon at the end of your using statement.
-OR-
You tried to paste the POD example code as a complete style without
the StylePtr<...() wrapper.
I just tried this for the first time and found what might have been misleading. With the name saying “BatteryLevelStyle”, it might seem like a complete style where you would mistakenly have it like this:

#ifdef CONFIG_STYLES
using BatteryLevelStyle = InOutHelperX<Gradient<Red,Orange,Yellow,Green,Green,Green,Green>,BatteryLevel>;
#endif

 // more code here

{ "FontFolder;common", "tracks/title_name.wav",
    BatteryLevelStyle,
    "name"
    },

I’ve edited the POD page to be a little clearer on how to correctly apply the aliased style to a preset, as well as fix the #ifndef typo.

Note that you can also use “using” for just parts of styles, like a few layers for example.
I have some drag/melt/lockup effects that i reuse often, so I have

using BCeffects1 = Layers<
    TransitionEffectL<...lockup code here...>,
    TransitionEffectL<....melt code here >,
    TransitionEffectL<....drag code here >,
>

Then in the style I can do:

StylePtr<Layers<
    AudioFlicker<Blue, DeepSkyBlue>,
    Bceffects1,
    InOutTrL<... etc... >>(),
1 Like

Good catch, this would explain this:

1 Like
  1. So the case can even be “missmatched” ? For example font folder “abc” and in my preset “Abc” ?
  1. so it would be better to avoid. Got it.
  2. additional question: can I have “FontFolder; VoicepackDarthVader; common; Oled_Images”
  3. understood
  1. Does Fett263 & BlasterBC have tracks players ?
  2. How can I figure out what prop has tracks players ?
  1. That is great advise.
  1. Will it tell me if it is Proffie/Proffie compatible ? What would happen if I use a non-compatible font in my presets. Should I keep the files of a known working font in “common” ?
  1. I want to include it, but I have seen several configs that don’t and I was wondering why or if there was a benefit to not use it. But what would happen if I use it but I miss adding one in a preset. Would this give a compile error ?
  1. But a folder should be 8 without “.3”, or would “DarthVad.er1” & “DarthVad.er2” work as font folder name2 ?
  2. Got it.
  1. Yes I had exactly the POD example. No I wasn’t even using BatteryLevelStyle in my preset. The POD is much clearer now. Thanks

However, after changing my config to test it out, I tried with StylePtr<BatteryLevelStyle>(); but I got a compile error complaining about the semi-colon “;” so I changed it to a comma “,” and now it works. Should the POD be changed too ?

Cool.

While we are talking about confusion in the POD

I am most likely to have an image on my OLED so I thought I should use IfImageOp<OP> in my bullet count:

#ifdef CONFIG_BOTTOM
    DisplayHelper<128, uint32_t,
    BaseLayerOp<StandardDisplayController>,
    IfImageOp<OP>,
    ClearRectangleOp<10, 80, 8, 24>,
    WriteBulletCountOp<10, 20, 5> >,
    display_controller;
    SSD1306Template<128, uint32_t> display(&display_controller);
#endif // CONFIG_BOTTOM

Clearly I don’t understand how to use it as it gives this error:

        In file included from C:\..\ProffieOS_7.14\ProffieOS_7.14.ino:1477:
        C:\..\ProffieOS_7.14\config\olicomplex1.5.010.1.h:1547:15: error: 'OP' was not declared in this scope
         1547 |     IfImageOp<OP>,
              |               ^~
        C:\..\ProffieOS_7.14\config\olicomplex1.5.010.1.h:1547:17: error: template argument 1 is invalid
         1547 |     IfImageOp<OP>,
              |                 ^
  1. Back to the subject of blade styles, I have been gathering found blade styles that seem to have interesting descriptions. Some according to Fett263 are “old styles” and mixing old and new styles will take more memory. Is there an “easy” way to convert an old style to a new one ?

Only Fett263 does at the moment.

Incompatible how? The only difference generally is either a naming convention or a sample rate. All of the popular saber soundboards use .wav format. The converter page will handle all that for you.

If you do not include a “name” argument at the end of a preset, it will compile fine for you.

Yes, fixed, thanks.

Yes, I recommend reading this page especially the Required Set Up for various features including Track Player.

Additional information here:

If you’re using Edit Mode in my prop you need
“FontFolder;common” per Set Up Instructions, if you want unique Voices you add to the font. This is because Edit Mode rewrites to this set up if you make font edits, so you will lose the other folders. Everything is explained in the prop and pages linked from it.

Yes.

Yes. (But you’ll need to remove the spaces)
Might cause problems with edit mode though.

Read the beginning of the prop file, it shouls have instructions.

There are benefits to having a label in there. I’m not aware of any befefits from not having a label, except maybe saving a couple of bytes.

Not sure actually.

Please don’t throw everything and the kitchen sink into one thread.
This is likely to require significant explanations and would be better in a new thread.

An mp3 that was mistakenly named wav. A wav with the wrong bit rate or a corrupted wav. Just to name a few. And I don’t mean after coming out of your font converter page but a font that I forgot to check or I copy the wrong folder.

I have read your pages several time. The probems are: also getting conflicting information from other sources and your pages are all so long. Sometimes I even forget what I was looking for while getting distracted ready something else along the way. And remembering it all. Will my brain retain what I read on your page or something else that I saw/heard/read somewhere else. My brain works better at remembering with shorter pages that only have one subject.

Got it. So “FontFolder;common” without space. Now that I know why, I will most likely remember.

I never even noticed there was no space on other people’s config I saw.

Sorry about that.

Thank you all for your time. I think I know how I need my presets to look now.

Misnaming or mismanaging would be a mistake on your end, and only you can account for, find, and fix that.
Wrong bit or sample rate should should get fixed with the converter.
Corrupted file isn’t going to be fixed by anything.
Bottom line is the board just won’t play the file if it doesn’t like it. You’re not going to break anything though. You can always see messages in serial monitor if there’s a problem.

1 Like

Not sure your other sources, for my tools my page is the best source.

Yes, if I am looking for specific information about your prop/tools, I go look on your page. But I also stumble on other information just by browsing around, sometimes it is about Proffie, or sabers, or styles, sometimes it is about your prop or not, or I didn’t noticed it was about your prop.

My other sources are the internet (The Crucible, Reddit, Github, Youtube, other forums, …) where my brain gathers information whether I realize it or not.

Just beware that not all information out there is actually helpful. Just think of it as “here is one way to do it”, and make up your own mind about what way is actually better… :slight_smile:

Yes i know, like Abraham Lincoln said “Don’t trust everything you see on the internet.”

That is why I ask questions. Some things might seem cool but could be “incompatible” with something else.