You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backend/app/models/schemas.py
+29Lines changed: 29 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -186,6 +186,35 @@ class BuildSongRequest(BaseModel):
186
186
progression_text: Optional[str] =Field(default=None, max_length=200) # free-typed roman numerals or chord names ("Am F C G"); parsed server-side into progression_override
187
187
188
188
189
+
classHummedNote(BaseModel):
190
+
"""One note from client-side pitch detection (roadmap 8.2 — see
191
+
frontend/src/utils/pitchDetect.ts). Units match NoteEvent: beats, not
192
+
seconds — the frontend quantizes to a grid before posting."""
193
+
pitch: int=Field(..., ge=0, le=127)
194
+
start: float=Field(..., ge=0.0)
195
+
duration: float=Field(..., gt=0.0)
196
+
velocity: int=Field(default=90, ge=1, le=127)
197
+
198
+
199
+
classBuildSongFromNotesRequest(BaseModel):
200
+
"""Build a song around a hummed/whistled melody, pitch-detected client-side
201
+
(roadmap 8.2). Mirrors build-song-from-melody's fields, minus the MIDI file —
0 commit comments