CI / Build & test (Node 20) (push) Canceled after 0s
CI / Build & test (Node 24) (push) Canceled after 0s
CI / Build & test (push) Canceled after 0s
CodeQL / Analyze (javascript-typescript) (push) Canceled after 0s
Security / Secret scan (gitleaks) (push) Canceled after 0s
Security / Dependency scan (OSV-Scanner) (push) Canceled after 0s
Security / IaC/config scan (Trivy) (push) Canceled after 0s
Security / License compliance scan (Trivy) (push) Canceled after 0s
OpenSSF Scorecard / Scorecard analysis (push) Canceled after 0s
Four owner requests in one pass. Rename: the PATCH /api/channels/:id route already accepted a name and a topic, and the API client already exposed it — the only thing missing was a way to reach it. The channel settings Overview tab now edits both, gated on MANAGE_CHANNELS like the server is, with Save/Discard appearing only when the form is dirty. The server's lowercase-and-hyphenate rule moved to @backspace/shared so the field can show what a name will actually become instead of letting it change shape on save; one copy of the rule, used by both sides. Stream volume: someone else's screen share now starts at 50 instead of 100 (DEFAULT_STREAM_VOLUME). The publisher boosts system audio before sending, so the old default arrived far too loud for a viewer who never touched the slider. Only the default moves — the slider still covers the full range and a value the user set is still persisted. Sound effects: SFX_BASE_VOLUME 0.8 -> 0.4, halving every cue. The .ogg files were left alone; they already peak below full scale, so the harshness was level, not recorded distortion. Every SFX playback path goes through getSfxVolume(), so this is the single knob. Translations: channel settings (including the override editor's permission labels), the friends page end to end — tabs, lists, requests, the add tab and discovery cards — the invite modal including its per-invite failure reasons, and the group-DM member actions. Failure reasons are carried as translation keys rather than finished text, so results already on screen re-label when the language changes. Verified: web build (tsc + vite), server typecheck, 490 web tests, 804 server tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
42 lines
1.8 KiB
Markdown
42 lines
1.8 KiB
Markdown
# Geradores dos efeitos sonoros
|
|
|
|
Os `.ogg` em `packages/web/public/sounds/` para call e transmissão são
|
|
sintetizados por estes scripts — nenhum arquivo de terceiros, nenhuma questão
|
|
de licença num repositório público.
|
|
|
|
Os parâmetros não foram escolhidos a gosto: saíram da **medição** de dois sons
|
|
de referência fornecidos pelo dono da instância (análise de envelope, picos
|
|
espectrais e tempo de decaimento). O timbre resultante é fundamental + oitava
|
|
quase na mesma intensidade, com pouco acima disso:
|
|
|
|
| Harmônico | Proporção medida |
|
|
|---|---|
|
|
| 1x (fundamental) | 1.00 |
|
|
| 2x (oitava) | 0.85 |
|
|
| 3x | 0.10 |
|
|
| 4x | 0.02 |
|
|
|
|
Decaimento a 1/e: ~0,19 s. Sem reverberação.
|
|
|
|
| Script | Gera | Notas |
|
|
|---|---|---|
|
|
| `build.py` | `user_join`, `user_leave` | C4→G4 subindo / D4→G3 descendo |
|
|
| `stream.py` | `stream_user_joined`, `stream_user_left` | nota única (G4 / G3), ~55% do volume |
|
|
| `started4.py` | `stream_started` | acorde de dó + golpe grave + sopro de ar |
|
|
| `ended.py` | `stream_ended` | arpejo descendo, resolve na raiz grave |
|
|
|
|
Para regerar: `python3 <script>.py` produz `.wav`, depois converter com
|
|
`ffmpeg -i X.wav -c:a libvorbis -q:a 5 -ar 48000 X.ogg`.
|
|
|
|
Ajustes comuns: `HARM` muda o timbre, `tau` a duração, `step` a velocidade do
|
|
arpejo, e o alvo em `write()` o volume (pico RMS).
|
|
|
|
## Volume de reprodução
|
|
|
|
O nível com que os arquivos tocam **não** está aqui: está em
|
|
`packages/web/src/utils/sfx.ts`, na constante `SFX_BASE_VOLUME`, multiplicada
|
|
pelo controle de efeitos sonoros do usuário. Em 2026-09-02 ela caiu de `0.8`
|
|
para `0.4` — o dono achou os sons estourados. Os `.ogg` não foram regerados:
|
|
eles já têm pico abaixo do máximo, então o problema era de nível, não de
|
|
distorção gravada. Mexa nessa constante, não nos alvos de RMS daqui.
|