How arminsf/songnotes works
Songnotes is a browser-based song annotation editor. Users open or create a project, optionally import audio, then annotate a measure-based timeline with patterns, chords, and notes while using playback controls to synchronize annotations. The editor separates project data from transient UI state; timeline calculations and music-theory conversions support those editing stages, while JSON serialization and browser file APIs handle project exchange. The graph reflects README capabilities and SOURCE INDEX relationships; several listed components were not excerpted, so their internal behavior is not inferred.
Main entry points: project-store.ts Project state · Timeline.tsx Timeline view · editor-store.ts Editor UI state · Ribbon.tsx Ribbon controls
Components 31
App entry
- App switch
src/App.tsx - Welcome and import
src/Welcome.tsx
Editing workspace
- Editor shell
src/Editor.tsx - Ribbon controls
src/components/ribbon/Ribbon.tsx - Playback controls
src/components/ribbon/RibbonDJ.tsx - Audio seek bar
src/components/ribbon/SeekBar.tsx - Tempo tapper
src/components/ribbon/Tapper.tsx - Timeline view
src/components/timeline/Timeline.tsx - Measure rows
src/components/timeline/MeasureRow.tsx - Measure card
src/components/timeline/MeasureCard.tsx - Pause marker
src/components/timeline/PauseBar.tsx - Section marker
src/components/timeline/SectionBar.tsx - Inline timeline control
src/components/timeline/InlineBar.tsx - Editor side panel
src/components/RightPanel.tsx - Project settings
src/components/ProjectEditor.tsx - Pattern editor
src/components/patterneditor/PatternEditor.tsx - Pattern list
src/components/patterneditor/PatternList.tsx - Pattern card
src/components/patterneditor/PatternCard.tsx
Project domain
- Project state
src/store/project-store.ts - Editor UI state
src/store/editor-store.ts - Project model
src/types/project.ts - Timeline calculations
src/project/timeline.ts - Project validation
src/project/validation.ts - Music theory conversions
src/musictheory/notes.ts
Playback and files
- Project and audio files
src/file/io.ts - Project serialization
src/file/serialization.ts - Playback hook
src/playback/usePlayback.ts - Audio playback engine
src/playback/playback.ts
Other components
- Song editor user
- Browser file picker
- Imported audio
Connections 48
- Song editor user → App switch: uses
README.md - App switch → Editor UI state: reads mode
src/App.tsx - App switch → Welcome and import: shows when closed
src/App.tsx - App switch → Editor shell: shows when open
src/App.tsx - Welcome and import → Project and audio files: imports and exports
src/Welcome.tsx - Welcome and import → Project state: loads project
src/Welcome.tsx - Welcome and import → Editor UI state: sets editor state
src/Welcome.tsx - Browser file picker → Project and audio files: selects files
src/file/io.ts - Project and audio files → Project serialization: serializes project
src/file/io.ts - Project and audio files → Imported audio: creates audio URL
src/file/io.ts - Editor shell → Ribbon controls: renders
src/Editor.tsx - Editor shell → Timeline view: renders
src/Editor.tsx - Editor shell → Editor side panel: renders
src/Editor.tsx - Ribbon controls → Project and audio files: imports project helpers
src/components/ribbon/Ribbon.tsx - Ribbon controls → Project state: reads project
src/components/ribbon/Ribbon.tsx - Ribbon controls → Playback controls: renders
src/components/ribbon/Ribbon.tsx - Ribbon controls → Tempo tapper: renders
src/components/ribbon/Ribbon.tsx - Playback controls → Playback hook: controls playback
src/components/ribbon/RibbonDJ.tsx - Playback controls → Audio seek bar: renders
src/components/ribbon/RibbonDJ.tsx - Audio seek bar → Playback hook: reads and seeks
src/components/ribbon/SeekBar.tsx - Timeline view → Editor UI state: reads UI state
src/components/timeline/Timeline.tsx - Timeline view → Project state: reads project state
src/components/timeline/Timeline.tsx - Timeline view → Inline timeline control: renders
src/components/timeline/Timeline.tsx - Timeline view → Measure rows: renders
src/components/timeline/Timeline.tsx - Timeline view → Pause marker: renders
src/components/timeline/Timeline.tsx - Timeline view → Section marker: renders
src/components/timeline/Timeline.tsx - Measure rows → Measure card: renders
src/components/timeline/MeasureRow.tsx - Measure card → Project state: edits measures
src/components/timeline/MeasureCard.tsx - Measure card → Editor UI state: reads selection
src/components/timeline/MeasureCard.tsx - Measure card → Timeline calculations: calculates timing
src/components/timeline/MeasureCard.tsx - Measure card → Playback hook: seeks and reads time
src/components/timeline/MeasureCard.tsx - Pause marker → Project state: edits pauses
src/components/timeline/PauseBar.tsx - Pause marker → Playback hook: uses playback time
src/components/timeline/PauseBar.tsx - Pause marker → Timeline calculations: calculates timing
src/components/timeline/PauseBar.tsx - Section marker → Project state: edits sections
src/components/timeline/SectionBar.tsx - Inline timeline control → Project state: edits timeline
src/components/timeline/InlineBar.tsx - Editor side panel → Project settings: renders
src/components/RightPanel.tsx - Editor side panel → Pattern editor: renders
src/components/RightPanel.tsx - Project settings → Project state: edits project
src/components/ProjectEditor.tsx - Project settings → Editor UI state: reads editor state
src/components/ProjectEditor.tsx - Project settings → Music theory conversions: uses note helpers
src/components/ProjectEditor.tsx - Project settings → Project validation: uses validation
src/components/ProjectEditor.tsx - Pattern editor → Project state: edits patterns
src/components/patterneditor/PatternEditor.tsx - Pattern editor → Editor UI state: reads selection
src/components/patterneditor/PatternEditor.tsx - Pattern editor → Music theory conversions: converts chords
src/components/patterneditor/PatternEditor.tsx - Pattern editor → Pattern list: shows pattern list
src/components/patterneditor/PatternEditor.tsx - Pattern list → Pattern card: renders
src/components/patterneditor/PatternList.tsx - Pattern card → Project state: edits project patterns
src/components/patterneditor/PatternCard.tsx