Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-111997.svg)](#build--distribution)
[![Electron](https://img.shields.io/badge/Electron-43-47848F.svg)](https://www.electronjs.org/)
[![Downloads](https://img.shields.io/github/downloads/CaYatur/SoundVisualizer/total?label=downloads)](https://github.com/CaYatur/SoundVisualizer/releases)
[![Tests](https://img.shields.io/badge/tests-2184%20passing-2ea043.svg)](#tests)
[![Tests](https://img.shields.io/badge/tests-2187%20passing-2ea043.svg)](#tests)
[![cayadev.com](https://img.shields.io/badge/cayadev.com-e11d2a.svg)](https://cayadev.com)

</div>
Expand Down Expand Up @@ -253,8 +253,11 @@ that asserts the bar profile has no step in it.
on); echo orientation is `(int)x % 4`; gamma below 1 is ignored while echo is on; and when two
presets whose echoes point different ways blend, the echo fades out and back in instead of
flipping. A preset that leaves out its decay or gamma gets MilkDrop's 0.98 and 2.0 instead of 0,
and so do most other values a preset leaves out; a rotation centre of 0 stays in the corner.
Rendered through the engine, every case matches MilkDrop's formula within 2/255.
and so do the other values it leaves out — down to MilkDrop's quirk of reading a missing wave
colour as 0; a rotation centre of 0 stays in the corner. The values MilkDrop keeps out of the
equations (wave scale and smoothing, the volume fade, warp speed and scale) come from the file as
they do there, so a wave scale of 0 flattens the wave (102 presets of the corpus). Rendered
through the engine, every case matches MilkDrop's formula within 2/255.
- **Composite shaders get the hue colour MilkDrop gives them.** MilkDrop passes every composite
shader four slowly drifting corner colours as `hue_shader`, whatever the preset's `fShader`
says; `fShader` only scales them on the fixed pipeline. The engine applied `fShader` to shaders
Expand Down Expand Up @@ -1305,7 +1308,7 @@ npm test
npm start -- --smoke
```

**2184 unit tests, all passing.** They are written to check answers, not to exercise lines:
**2187 unit tests, all passing.** They are written to check answers, not to exercise lines:

- **Formulas** are checked against values derived by hand from their definitions — Viviani's curve
staying on its sphere, the torus tube radius, Chladni's m↔n antisymmetry, every attractor
Expand Down
11 changes: 7 additions & 4 deletions README.tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-111997.svg)](#paketleme--dağıtım)
[![Electron](https://img.shields.io/badge/Electron-43-47848F.svg)](https://www.electronjs.org/)
[![İndirme](https://img.shields.io/github/downloads/CaYatur/SoundVisualizer/total?label=indirme)](https://github.com/CaYatur/SoundVisualizer/releases)
[![Test](https://img.shields.io/badge/test-2184%20geçiyor-2ea043.svg)](#testler)
[![Test](https://img.shields.io/badge/test-2187%20geçiyor-2ea043.svg)](#testler)
[![cayadev.com](https://img.shields.io/badge/cayadev.com-e11d2a.svg)](https://cayadev.com)

</div>
Expand Down Expand Up @@ -246,8 +246,11 @@ profilinde basamak olmadığını doğruluyor.
solarize'ı açıyor); yankı yönü `(int)x % 4`; yankı açıkken 1'in altındaki gama uygulanmıyor;
yankıları farklı yöne bakan iki preset geçişte karışırken yankı bir anda dönmüyor, sönüp
yeniden beliriyor. Sönmesini ya da gamasını yazmayan bir preset 0 yerine MilkDrop'un 0,98 ve
2,0'ını alıyor, yazmadığı öteki değerlerin çoğu da öyle; dönme merkezi 0 ise köşede kalıyor.
Motordan geçirilerek çizildi: her durum MilkDrop'un formülüyle 2/255 içinde aynı.
2,0'ını alıyor, yazmadığı öteki değerler de öyle — MilkDrop'un eksik dalga rengini 0 okuyan
tuhaflığına kadar; dönme merkezi 0 ise köşede kalıyor. MilkDrop'un denklemlere açmadığı değerler
(dalga ölçeği ve yumuşatması, sesle sönme, warp hızı ve ölçeği) oradaki gibi dosyadan geliyor, yani
0 dalga ölçeği dalgayı düzleştiriyor (korpusta 102 preset). Motordan geçirilerek çizildi: her
durum MilkDrop'un formülüyle 2/255 içinde aynı.
- **Birleştirme shader'ları MilkDrop'un verdiği ton rengini alıyor.** MilkDrop her birleştirme
shader'ına `hue_shader` olarak dört köşede yavaşça gezinen renkler veriyor, presetin `fShader`ı
ne derse desin; `fShader` onları yalnız sabit yolda ölçekliyor. Motor `fShader`ı shader'lara da
Expand Down Expand Up @@ -1303,7 +1306,7 @@ npm test
npm start -- --smoke
```

**2184 birim testi, hepsi geçiyor.** Satır çalıştırmak için değil, cevap denetlemek için yazıldılar:
**2187 birim testi, hepsi geçiyor.** Satır çalıştırmak için değil, cevap denetlemek için yazıldılar:

- **Formüller**, tanımlarından elle türetilmiş değerlerle sınanıyor — Viviani eğrisinin küre
üzerinde kalması, simidin boru yarıçapı, Chladni'nin m↔n antisimetrisi, her çekicinin sınırlı
Expand Down
54 changes: 40 additions & 14 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ npm test
npm start -- --smoke
```

- **2184 unit tests, all passing** on `main`. 703 of those shipped in v3.1.0;
- **2187 unit tests, all passing** on `main`. 703 of those shipped in v3.1.0;
105 came with v3.1.1; 163 came with v3.1.2; 157 came with v3.1.3 — 1128 at
that tag — 469 more with v3.1.4, most of them from the MilkDrop work, and 587
that tag — 469 more with v3.1.4, most of them from the MilkDrop work, and 590
on `main` since.
Formulas are checked against values derived
by hand from their definitions — Viviani's curve staying on its sphere, the
Expand Down Expand Up @@ -2032,8 +2032,8 @@ rest after. No version number yet.
the old ring nouns, the " · " in mash-up names or removing the
module's script tag each fails a test.
- **Fidelity follow-ups (#580)** · the fixed composite, the stage rule,
MilkDrop's defaults and the hue colour are done; the remaining defaults,
the other audits and the file-reading differences are next.
MilkDrop's defaults, the hue colour and the values that stay in the file
are done; the other audits and the file-reading differences are next.
- **Checked against the source.** Nullsoft's own code
(jecassis/foo_vis_milk2 5b44cea) and, for the fixed pipeline's blend
passes, the D3D9 code the D3D11 fork was ported from (BeatDrop
Expand Down Expand Up @@ -2146,15 +2146,34 @@ rest after. No version number yet.
byte-identical; presets that read `hue_shader` differ in at most 0.1%
of pixels by one level, the same four equal corner colours summed in
another order.
- **Next: keys that fall back to other values.** MilkDrop reads a
missing `wave_r`, `wave_g`, `wave_b`, `wave_x` or `wave_y` as `rot`'s
value at that point, which is 0, where the engine has 1, 1, 1, 0.5 and
0.5. Missing wave smoothing is 0.75, and the volume fade runs from 0.75
to 0.95. Custom shapes default to red inside and green outside. MilkDrop
also blends its other file-only values linearly through a transition
(wave scale and smoothing, the fade range, warp scale), where the engine
reads them from per-frame values. No corpus preset leaves any of these
keys out, and neither do ours.
- **Keys that fall back to other values.** MilkDrop reads a missing
`wave_r`, `wave_g`, `wave_b`, `wave_x` or `wave_y` with `rot`'s value as
the default (state.cpp:1389-1393, the same in the D3D9 code), and `rot`
is still Default's 0 at that point — so a file without them draws a
black wave in the corner, where the engine had white and centred.
Custom shapes that leave out their colours are red inside and green
outside (state.cpp:619-626), where the engine had white and black. With
fidelity on the engine now does both. No corpus preset leaves any of
these keys out, and neither do ours.
- **Values that stay in the file.** Wave scale and smoothing, the volume
fade's switch and range, warp speed and warp scale are not per-frame
variables in MilkDrop; the engine read them from per-frame values, with
`|| 1` fallbacks. With fidelity on they now come from the file: missing
smoothing is 0.75 and the fade range 0.75 to 0.95, as in MilkDrop; a
wave scale of 0 flattens the wave (102 presets) and a warp speed of 0
stops the warp pattern (4 presets), where `|| 1` turned both into 1.
Through a transition wave scale and smoothing, the fade range and warp
scale blend linearly between the two files, and the warp's speed and
scale are the new preset's for both meshes, since MilkDrop computes the
warp frequencies once a frame from the new state (milkdropfs.cpp:
1591-1597); a custom wave takes the wave scale of its own preset,
unblended (2429).
- **Measured** against `main`, the last ten of 60 frames: 120 presets
that write none of these zeros are identical; of the 102 with wave
scale 0, 12 change and 7 by more than 1% (up to 23%), their waves now
flat; of the 4 with warp speed 0, one changes, slightly. With fidelity
off all of them are identical. The 900-preset sample sorts into the
same classes, preset for preset.
- **Not done yet:** the fixed warp path, the blur chain, borders and
centre darkening, and the rest of the blend snap points; the
file-reading differences found while building the mash-ups (a
Expand Down Expand Up @@ -2190,7 +2209,14 @@ rest after. No version number yet.
`fShader`; the fixed amount's threshold, partial mix and no clamp; the
draw weights (pass counts, the 1.0001 cut, the edge below −0.999,
wraparound, per-corner order); the echo fade with no echo on the new
side; and `hueAt` not flipping y. 18 of 18 mutations are caught.
side; and `hueAt` not flipping y. 18 of 18 mutations are caught. The
values that stay in the file add three: missing wave keys at 0 and
shape colours red and green with fidelity on and the old base with it
off; a wave scale of 0 flattening the main wave with fidelity on and
counting as 1 with it off; and the volume fade's switch and range from
the file with MilkDrop's defaults, a negative switch counting as on.
Five test files follow the new reads, one of them with a flat custom
wave at scale 0. 16 of 16 mutations are caught.

## v3.1.6 — Comprehensive video export

Expand Down
23 changes: 19 additions & 4 deletions src/shared/milkdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -970,11 +970,20 @@
yazdığı için ad hep "var" görünüyordu.

`mv_a` MilkDrop'ta da sonunda 0: `bMotionVectorsOn` yoksa 0'a
çevriliyor (state.cpp:1402), ancak sonra `mv_a` okunuyor. Uyum açıkken
bu tablo, kapalıyken eski taban geçerli. */
çevriliyor (state.cpp:1402), ancak sonra `mv_a` okunuyor.

`wave_r/g/b/x/y` yazılmamışsa 0, CState::Default'un 1 ve 0,5'i DEĞİL:
Import onları varsayılan olarak `rot`un o anki değeriyle okuyor
(`GetFastFloat("wave_r", m_fRot.eval(-1), f)`, state.cpp:1389-1393;
BeatDrop'un D3D9 hâli 1368-1372 aynı) ve `rot` henüz okunmadığı için
o değer Default'un 0'ı. Yani bu anahtarları yazmayan bir dosyanın
dalgası MilkDrop'ta siyah ve köşede. Korpusta hiçbir dosya onları
atlamıyor, yerleşiklerimiz ve üreticimiz de yazıyor (#580).

Uyum açıkken bu tablo, kapalıyken eski taban geçerli. */
const MD2_PF_DEFAULTS = {
zoom: 1, zoomexp: 1, rot: 0, warp: 1, cx: 0.5, cy: 0.5, dx: 0, dy: 0, sx: 1, sy: 1,
decay: 0.98, wave_a: 0.8, wave_r: 1, wave_g: 1, wave_b: 1, wave_x: 0.5, wave_y: 0.5,
decay: 0.98, wave_a: 0.8, wave_r: 0, wave_g: 0, wave_b: 0, wave_x: 0, wave_y: 0,
wave_mystery: 0, wave_mode: 0,
ob_size: 0.01, ob_r: 0, ob_g: 0, ob_b: 0, ob_a: 0,
ib_size: 0.01, ib_r: 0.25, ib_g: 0.25, ib_b: 0.25, ib_a: 0,
Expand Down Expand Up @@ -1283,6 +1292,12 @@
pool,
initialised: false,
};
/* MilkDrop'un şekil renkleri, dosya yazmamışsa (state.cpp:619-626):
iç renk KIRMIZI (1,0,0), dış renk YEŞİL ve saydam (0,1,0,0).
Eski tabanımız beyaz ve siyahtı. Fark yalnız dosyanın atladığı
renklerde — korpustaki 15.982 açık şeklin hiçbiri atlamıyor. Uyum
açıkken bu taban geçerli (shapeFrame; #580). */
shape.baseMd2 = Object.assign({}, shape.base, { g: g('g', 0), b: g('b', 0), g2: g('g2', 1) });
shape.cInit = compile(s.init || '', pool, { seed: o.seed, loopBudget: 65536 });
shape.cFrame = compile(s.per_frame || '', pool, { seed: o.seed, loopBudget: 65536 });
for (const c of [shape.cInit, shape.cFrame]) {
Expand Down Expand Up @@ -1381,7 +1396,7 @@
if (!s || !s.enabled) return null;
const P = s.pool;
this._shareInto(P);
const b = s.base;
const b = this.accurate !== false && s.baseMd2 ? s.baseMd2 : s.base;
for (const k in b) P.set(k, b[k]);
P.set('instance', instance);
P.set('num_inst', s.instances);
Expand Down
Loading
Loading