-
Notifications
You must be signed in to change notification settings - Fork 0
feat(player): 신스 다듬기 — 벨로시티·엔벨로프·로우패스 (음색 3단계) #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
docs/superpowers/specs/2026-08-05-player-synth-polish-design.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Maestro Player 신스 다듬기 설계 (음색 3단계) | ||
|
|
||
| - 날짜: 2026-08-05 | ||
| - 상태: 확정 (화음 발성 2단계의 예고된 후속 — 벨로시티·엔벨로프·필터) | ||
| - 범위: `player/src/lib/` + 테스트 | ||
|
|
||
| ## 1. 벨로시티 커브 (chartMapper) | ||
|
|
||
| 모든 노트에 `velocity` 부여: `clamp(0.7 + accentLevel×0.3 + energy×0.1, 0.6, 1.1)` | ||
| (소수 2자리). 강조 이벤트일수록 실제로 크게 울린다 — 지금까지는 noteType | ||
| 3단 고정 게인뿐이었다. | ||
|
|
||
| ## 2. 엔벨로프 (replayAudioEngine) | ||
|
|
||
| cue에 `attackSeconds`/`releaseSeconds`를 noteType별로 부여하고 엔진이 사용: | ||
|
|
||
| | type | attack | release | 의도 | | ||
| | --- | --- | --- | --- | | ||
| | tap | 0.008 | 0.06 | 짧고 깔끔한 타격 | | ||
| | accent | 0.005 | 0.12 | 즉각 타격 + 여운 | | ||
| | hold | 0.03 | 0.2 | 패드성 페이드 | | ||
|
|
||
| 게인은 `type 기본 게인 × velocity`. release는 duration 이후 꼬리로 감쇠 | ||
| (기존: 고정 attack 0.01, 종료 시 급감). | ||
|
|
||
| ## 3. 로우패스 필터 (replayAudioEngine) | ||
|
|
||
| voice별 BiquadFilter(lowpass) 삽입 — 멜로디 cue.filterCutoffHz: hold(sawtooth) | ||
| 1400 / accent(triangle) 2600 / tap(sine) 3200, 화음 패드는 1200 고정. | ||
| 사각·톱니 하모닉의 날카로움을 정리한다. `createBiquadFilter` 미지원 | ||
| 환경(구형 mock)은 필터 없이 폴백. | ||
|
|
||
| ## 4. 테스트 | ||
|
|
||
| - 하니스: 전 픽스처 노트 velocity ∈ [0.6, 1.1], accent 평균 velocity > | ||
| tap 평균 (강조가 실제로 더 크게). | ||
| - 엔진: cue 필드(velocity 반영 게인, type별 envelope/cutoff), 드라이버가 | ||
| 필터 노드를 voice 수만큼 생성·연결. 구필드 없는 cue 폴백 동작. | ||
| - fingerprint 결정성·스케일 적합률 등 기존 게이트 무회귀. | ||
|
|
||
| ## 5. 비범위 | ||
|
|
||
| 보이스리딩(전위), 리버브/딜레이 등 공간계, 악기 다층 패치. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With Web Audio automation, this second
exponentialRampToValueAtTimestarts from the previous scheduled event, which is the attack peak, so every cue begins fading immediately after attack and reaches silence only atendTime + release. In normal playback this means the new release tail is not actually after the note duration; hold/accent cues lose their body over the whole note instead of sustaining untilendTime. Schedule the peak value atendTimebefore ramping down to make the release happen after the cue duration.Useful? React with 👍 / 👎.