Merge pull request 'dings: Aqua's v4 set (Void single onset, Nibu proposal 3 everywhere), behind dings.enabled' (#75) from void/dings-v4 into dev
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
Some checks failed
Rat dev preview / Build dev preview (push) Has been cancelled
This commit is contained in:
commit
0fe9ab2eee
34 changed files with 44 additions and 15 deletions
|
|
@ -12,6 +12,6 @@ with motif one of `mention`, `dm`, `message`, `invite`; paths are relative to th
|
|||
A sender's own clip wins, else the neutral clip, else silence. Without a `manifest.json` the client keeps
|
||||
its stock notification sounds; once one exists, a motif with no clip is silent.
|
||||
|
||||
The set here is Aqua's v3 (AquaSynth PR #22, staged at minds.gamecult.org/aqua/dings-voices-70a9795),
|
||||
Nibu on proposal 1 (static-filter square). Nobody has heard it. The client plays none of it unless the
|
||||
The set here is Aqua's v4 (AquaSynth merge 21e83ec, staged at minds.gamecult.org/aqua/dings-voices-dd9be66),
|
||||
Nibu on proposal 3 (8 kHz 5-bit smoothed sine) for all four events. Nobody has heard it. The client plays none of it unless the
|
||||
client config sets `"dings": { "enabled": true }` (default off, as in `config.json`).
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -4,11 +4,46 @@ import { join } from 'node:path';
|
|||
import { describe, expect, it } from 'vitest';
|
||||
import { DingManifest, Motif, dingsEnabled, parseManifest, pickDing } from './dings';
|
||||
|
||||
// The staged v3 set (Aqua, AquaSynth PR #22). Nobody has heard it; these tests check the manifest
|
||||
// The staged v4 set (Aqua, AquaSynth merge 21e83ec, page minds.gamecult.org/aqua/dings-voices-dd9be66). Nobody has heard it; these tests check the manifest
|
||||
// against this code, not the sound.
|
||||
const DINGS = join(__dirname, '../../../../public/dings');
|
||||
const raw = JSON.parse(readFileSync(join(DINGS, 'manifest.json'), 'utf8'));
|
||||
const manifest = parseManifest(raw) as DingManifest;
|
||||
// sha256 prefixes of the 32 clips as staged by Aqua; Nibu's four are proposals/nibu3 (same samples, own Ogg serial).
|
||||
const V4_SHA: Record<string, string> = {
|
||||
'aqua/mention': 'cedb63552008',
|
||||
'aqua/dm': '5b996d01c770',
|
||||
'aqua/message': '8be19ccd505a',
|
||||
'aqua/invite': '462e63687f0b',
|
||||
'eureka/mention': '7afe0bcc90d0',
|
||||
'eureka/dm': '3909d70b0d45',
|
||||
'eureka/message': '0b466cd4b437',
|
||||
'eureka/invite': '837e1bbbdacf',
|
||||
'heimdall/mention': '36051569eb2c',
|
||||
'heimdall/dm': '26ebc4158d51',
|
||||
'heimdall/message': 'c383d6ce3da0',
|
||||
'heimdall/invite': 'fd47e9a97bb2',
|
||||
'kiko/mention': 'e73d2d586f4e',
|
||||
'kiko/dm': 'b3e39946ab70',
|
||||
'kiko/message': '6730b9df5bfa',
|
||||
'kiko/invite': '1a3c1d118b9e',
|
||||
'libby/mention': 'eb9f3ac60b02',
|
||||
'libby/dm': '77dfd01cc3ca',
|
||||
'libby/message': '257b84a114a2',
|
||||
'libby/invite': '8ef7e91100b8',
|
||||
'nibu/mention': '56484d731df3',
|
||||
'nibu/dm': '573f5db4de4b',
|
||||
'nibu/message': '30f6a5c9ce54',
|
||||
'nibu/invite': 'bb36c0975f35',
|
||||
'void/mention': 'dee69f4af562',
|
||||
'void/dm': '92e3ebbc0b29',
|
||||
'void/message': 'fadc5556b681',
|
||||
'void/invite': 'd602121389d8',
|
||||
'weksa/mention': 'db46a36ab3c5',
|
||||
'weksa/dm': 'efe993382a46',
|
||||
'weksa/message': '00e323635949',
|
||||
'weksa/invite': '9bf03a36758b',
|
||||
};
|
||||
const MOTIFS: Motif[] = ['mention', 'dm', 'message', 'invite'];
|
||||
const VOICES = ['aqua', 'eureka', 'heimdall', 'kiko', 'libby', 'nibu', 'void', 'weksa'];
|
||||
|
||||
|
|
@ -37,7 +72,7 @@ describe('dings switch', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('v3 manifest against the parser', () => {
|
||||
describe('v4 manifest against the parser', () => {
|
||||
it('survives parseManifest whole: no path or motif is dropped', () => {
|
||||
expect(manifest.neutral).toEqual(raw.neutral);
|
||||
expect(Object.keys(manifest.senders).sort()).toEqual(VOICES);
|
||||
|
|
@ -72,17 +107,11 @@ describe('v3 manifest against the parser', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("Nibu's four files are AquaSynth's proposals/nibu3 (sha256 prefix)", () => {
|
||||
const want: Record<Motif, string> = {
|
||||
mention: '3833f504903f',
|
||||
dm: 'ad4839400f2c',
|
||||
message: '6ec6fc893b94',
|
||||
invite: 'aefb6ff79c42',
|
||||
};
|
||||
MOTIFS.forEach((m) => {
|
||||
const hash = createHash('sha256').update(readFileSync(join(DINGS, `senders/nibu/${m}.ogg`)));
|
||||
expect(hash.digest('hex').slice(0, 12)).toBe(want[m]);
|
||||
});
|
||||
it("every voice file is Aqua's v4 render (sha256 prefix)", () => {
|
||||
const hash = (file: string) =>
|
||||
createHash('sha256').update(readFileSync(join(DINGS, file))).digest('hex').slice(0, 12);
|
||||
expect(Object.keys(V4_SHA).length).toBe(VOICES.length * MOTIFS.length);
|
||||
Object.entries(V4_SHA).forEach(([k, want]) => expect(hash(`senders/${k}.ogg`)).toBe(want));
|
||||
});
|
||||
|
||||
it('keeps the clip lengths the design assumes: message under 400 ms, nothing over 600 ms', () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue