summaryrefslogtreecommitdiffstats
path: root/Fill_Presets/src/main.c
blob: 340cc4f811f4d904973da0b9a38bce2f8a4e2a4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
        FILE *preset_file;
        int preset, eqband;

	preset_file = fopen("presets_hardcoded.txt", "w");
        for (preset = 0; preset != 13; preset++) {
                fprintf(preset_file, "/* %.1d */\t", preset %6);
                for (eqband = 0; eqband != 128; eqband += 2) {
                       	fprintf(preset_file, "0x%.2x, ", ((eqband +1) % 0xf) +((eqband % 0xf) << 4));
               	}
               	if (12 == preset) {
                	fprintf(preset_file, "\n", eqband);
		} else {
		        fprintf(preset_file, ",\n", eqband);
		}        		       	
        }
        fclose(preset_file);

        return 0;
}