Repository navigation
[DONE] 정리 4단계 PR 16 — 가상 패널이 손으로 돌린 노브와 누른 버튼, 바뀐 패턴을 MIDI 로 보내고 /api/midi 에 답한다 - #86
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NEBrYPPE5rzyWZ4xHhbfUE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NEBrYPPE5rzyWZ4xHhbfUE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NEBrYPPE5rzyWZ4xHhbfUE
patternflow-bot
marked this pull request as ready for review
October 15, 2026 16:11
This was referenced Oct 15, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 15, 2026
engmung
pushed a commit
to engmung/Patternflow
that referenced
this pull request
Oct 15, 2026
Patternflow-lab#11 Patternflow-lab#12 Patternflow-lab#13 Patternflow-lab#15 Patternflow-lab#17 Patternflow-lab#14 Patternflow-lab#16 Patternflow-lab#19 Patternflow-lab#20 Patternflow-lab#18 Patternflow-lab#21 Patternflow-lab#23 Patternflow-lab#24 Patternflow-lab#25 Patternflow-lab#26 Patternflow-lab#28 Patternflow-lab#29 Patternflow-lab#30 Patternflow-lab#27 Patternflow-lab#31 Patternflow-lab#32 Patternflow-lab#34 Patternflow-lab#35 Patternflow-lab#33 Patternflow-lab#36 Patternflow-lab#37 Patternflow-lab#38 Patternflow-lab#39 Patternflow-lab#40 Patternflow-lab#41 Patternflow-lab#42 Patternflow-lab#43 Patternflow-lab#46 Patternflow-lab#44 Patternflow-lab#47 Patternflow-lab#48 Patternflow-lab#49 Patternflow-lab#45 Patternflow-lab#50 Patternflow-lab#51 Patternflow-lab#52 Patternflow-lab#54 Patternflow-lab#57 Patternflow-lab#55 Patternflow-lab#53 Patternflow-lab#56 Patternflow-lab#59 Patternflow-lab#58 Patternflow-lab#60 Patternflow-lab#61 Patternflow-lab#62 Patternflow-lab#63 Patternflow-lab#64 Patternflow-lab#65 Patternflow-lab#66 Patternflow-lab#67 Patternflow-lab#68 Patternflow-lab#69 Patternflow-lab#70 Patternflow-lab#72 Patternflow-lab#73 Patternflow-lab#71 Patternflow-lab#75 Patternflow-lab#74 Patternflow-lab#77 Patternflow-lab#78 Patternflow-lab#76 Patternflow-lab#79 Patternflow-lab#80 Patternflow-lab#81 Patternflow-lab#82 Patternflow-lab#84 Patternflow-lab#83 Patternflow-lab#85 Patternflow-lab#86 Patternflow-lab#87 Patternflow-lab#88 Patternflow-lab#90 Patternflow-lab#91 Patternflow-lab#89 Patternflow-lab#92
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
studio / https://claude.ai/code/session_01NEBrYPPE5rzyWZ4xHhbfUE
정리 4단계 계획서 표의 PR 16 이다. 가상 패널에 tools/virtual-panel/transports/midi-out.ts 하나를 더해, MIDI 를 넣은 패널이 손으로 돌린 노브를 CC 24
27 로, 손으로 누른 버튼을 노트 6063 으로, 바뀐 패턴을 Program Change 로 세션에 보내고 /api/midi 와 status 의 midi 에 답하게 했다. 머지되면 PR 18 의 보내는 쪽 MIDI 벡터와 /api/midi 벡터가 돌 패널이 생긴다.좋아지는 것: 없음
할 일
docs/rfc-cleanup.md§2.11, PR 15([DONE] 정리 4단계 PR 15 — 가상 패널이 RTP-MIDI 세션을 받고 CC, 노트, Program Change 를 노브와 버튼, 패턴에 옮긴다 #83) 본문의 「for another k」를 읽는다midi-spec.md53~120행과 펌웨어(core_midi.h의observeFrame,core_midi_http.h,feature_midi.h의appendStatus,core_midi_rtp.h의appendDiagnostics)를 맞대 본다tools/virtual-panel/transports/midi-out.ts, 표가 PR 16 에 적은 파일 하나rtpmidi_probe.py로. 스크립트는 커밋하지 않았다78b4538그대로라 merge 할 것이 없다e614d5b에서 Drift checks(38766298571), Docs point at files that exist(38766298510) 둘 다 success한 일
midi-out.ts는feature: "midi"인 transport 라--features midi일 때만 붙는다. caps 는midi.ts가 주므로[]다. 파일 이름이midi.ts보다 앞에 정렬돼 먼저 붙기 때문에, 세션은 프레임이나 요청이 올 때midi(sim)으로 찾는다. 기본 빌드에는 아무것도 더하지 않는다.보내는 것. 펌웨어의
observeFrame()처럼 프레임마다 한 번 돈다. 손의 클릭은knobState().knobs를 앞 프레임과 견줘 얻는다.knobs는 손의 클릭만 세므로(계획서 발견 4) 호스트가 보낸 CC 2427, OSC, MQTT, 레인이 움직인 노브는 나가지 않는다(57행의 hand motion only, 62행). 클릭은 노브마다127 안에서 옮기고,outDiv로 나뉘어 걸음이 되고 나머지는 남는다. 걸음에outMul을 곱하고 한 프레임에 ±63 에서 자른다.abs는 64 에서 시작하는 위치를 0rel은 걸음을 모은다. CC 24~27 은 노브마다 50 ms 에 한 번까지 나가고 마지막 값은 늘 나간다.abs는 마지막으로 보낸 위치와 다를 때만 보내고,rel은 모은 합이 ±63 을 넘으면 기다리지 않고 63 을 보낸 뒤 나머지를 남긴다. 첫 메시지는 바로 나간다. 시계는millis()처럼 프레임 시각을 ms 정수로 내린다.버튼은
/vp/button의 손만 본다. 누름은 노트 온 벨로시티 127, 놓음은 노트 오프다. 한 프레임 안에서 눌렀다 놓아도 노트 오프가 따라간다. 패턴이 바뀌면 누가 바꿨든(60행, MIDI 포함) Program Change 가 나가고, 127 넘는 번호는 보내지 않는다. SELECT 에서는osc.ts처럼 커서 아래 패턴이다.GET /api/midi는ok,channel,outDiv,outMul,outMode,host,runtime,rtpPeers,rtpPeer,ip,port,outPos,rx,tx,rxDetail를 준다./api/status의midi는 그중runtime부터rxDetail까지다(72행, 81~93행).POST /api/midi는knob,outDiv,outMul,outMode,host를 펌웨어 차례대로 읽고 하나씩 적용한다. 틀린 값은 400 과 펌웨어와 같은 오류 글이다.outDiv나outMul을 정하면 다른 쪽이 1 로 돌아가고(117행),outMode를 정하면 모아 둔 걸음을 버린다.증거
로컬, web/:
rest-vectors의absent-*(PR 7)는 기본 빌드의/api/midi가 여전히 404 임을 보고,virtual-panel(PR 8)은midi-out.ts까지 불러온 채로 프리셋 34개를 돌렸다.check:midi-vectors와check:audio-vectors는 스크립트가 아직 없어(PR 17, PR 20) 실패하고,check:drift는 그 둘을 부르지 않는다.끝에서 끝까지(손 시계).
start({ features: ["midi"], clock: "manual", ports: { "*": 0 } })로 패널을 띄우고rtpmidi_probe.py처럼 제어 소켓과 그다음 번호의 데이터 소켓으로 세션에 들어갔다. 손은/vp/turn과/vp/button, 시간은advance(), 받은 것은 RTP 패킷의 명령 목록을 16진수로 적었다:위 출력은 두 번 돌린 것을 합쳤다. 「rel 40 then 40」 자리를 「rel 1」부터의 세 줄로 바꿔 한 번 더 돌렸고, 나머지 줄은 두 번 같았다. 마지막 줄의
rxDetail은 GET 과 같아 줄였다.실제 시계, 레포의 프로브. PR 15 에서
midi None과received []로 비어 있던 줄이 찼다. 긴 dict 는...으로 줄였다:CC 24 와 노트 60 은 돌아오지 않고(62행), Program Change 는 돌아온다(60행).
GitHub, 이 PR:
e614d5b에서 「Drift checks / check」(38766298571)와 「Docs point at files that exist / check」(38766298510)가 success. 「Web CI」는web/**에서만 돌아 이 PR 에서는 돌지 않았다. typecheck 는 위 로컬 결과다.실행법
그다음
/vp/turn?knob=1&detents=3은 Audio MIDI Setup 이나 rtpMIDI 로 패널 세션을 연 DAW 에 CC 24 로 보인다.가정
CHANGELOG.md,docs/rfc-cleanup-progress.md, doc-map CSV,panel.ts,midi.ts,README.md는 안 고쳤다. 라벨은 앞 PR 들처럼 달지 않았다.core_midi.h와core_midi_http.h다. 인자를 읽는 차례와 오류 글,outDiv나outMul을 1 로 정해도 다른 쪽이 1 로 돌아가는 것, 참가자가 없을 때 나간 것도tx가 세는 것(emit()), SELECT 의 커서가 그쪽에서 왔다.rtpPeer는 마지막에 참가한 이름이다. PR 15 본문은 첫 이름이라 적었지만, 펌웨어는 참가할 때마다 이름을 덮는다(core_midi_rtp.h:163).core_midi.h:403,paramAbsoluteActive). 패널은 57행대로 손의 클릭을 보낸다. 잠든 패널에서도 같다. 펌웨어는 잠든 프레임에observeFrame()을 부르지 않지만(patternflow.ino:1534), 스펙은 잠을 말하지 않는다.runtime은 늘 true 고on=은 읽지 않는다. 스펙의 Settings 표에 없고,midi.ts가 스위치와 상관없이 받은 것을 적용하므로 보내는 쪽만 끄면 status 가 틀린 말을 한다.host는 IPv4 나 빈 글만 받아 저장하고 보고한다. 초대는 하지 않는다.midi.ts가 초대하지 않는다(PR 15 의 가정).you는 뺐다.http.ts의Request에는 묻는 쪽 주소가 없다.port는 펌웨어의 5004 대신 묶인 제어 포트다.rxDetail의worker는 true 다.midi.ts는 소켓을 프레임과 따로 읽는다.abs,rel,queueDropped는midi.ts가 센 수이고, 나머지 진단 값은 0 이다.firmware/와web/src/를 건드리지 않아build.sh all,check:ci,check:panels는 §2.1(1) 대상이 아니다. 계획서대로 typecheck 와 깨뜨린 typecheck 한 번을 적었다. 이 PR 만의 check 는 없다(check:midi-vectors는 PR 17).Changelog
Tools
tools/virtual-panel/transports/midi-out.tsreports a hand's turns on CC 24 to 27 (a position by default, 64 ± steps withoutMode=rel, at most one message a knob every 50 ms), a hand's buttons on notes 60 to 63 and each pattern change as Program Change, by the device → host table indocs/midi-spec.md. It answersGETandPOST /api/midiand addsmidito/api/status.for another k
/vp/turnand/vp/button, thenwait. A hand's CC goes out at the end of the next frame, soby 20 msis enough for the first; the next on the same knob waits until 50 ms after the last. Three detents on knob 1 from start are CC 24 = 67 (abs); afterPOST /api/midi?outMode=rel, two back are CC 24 = 62. A pattern picked over HTTP or by a host's Program Change comes back as Program Change on the next frame. A host's CC 24 to 27 and notes never come back.core_midi.h:403drops a hand's clicks on a knob the bus held under 250 ms ago, wheremidi-spec.md57 says a hand's turn is reported.core_midi_http.h:107readson=0|1, andGET /api/midicarriesyou,ip,portandoutPos; the Settings table names none of them.midi-spec.md32 says the panel "never echoes a host's messages back to it", where 60 sends Program Change for a change "by anyone", MIDI included. The panel follows 60, as the firmware does.POST /api/midi?host=invites only oncemidi.tssends IN from its control socket, andruntimecan go false only oncemidi.tsdrops what comes in while it is.tools/virtual-panel/README.mdlistsmidi-out.tsbesidemidi.ts, and/api/midi.Upstream
npm run typecheck(which reads tools/virtual-panel) andnpm run lintpass; firmware/ and web/src/ are untouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01NEBrYPPE5rzyWZ4xHhbfUE