Add category rings and beat labels
This commit is contained in:
1 parent
9d8f277971
commit
4f221ea122
21 files changed
+752
-339
No files matched your search
+18
-13
@@ -27,12 +27,13 @@ When you select a point for an instrument with pitch support, a pitch slider app
|
||||
### Move and select sound points
|
||||
|
||||
- Drag a point around its circle to change when it plays.
|
||||
- Click or tap a point to select it. Its sound ring is selected too.
|
||||
- Click or tap a point to select it. Its category ring is selected too.
|
||||
- You can also focus a point with the keyboard. Use the arrow keys to move it. Hold **Shift** with an arrow key to move by a larger step.
|
||||
- The rings are separate for each sound type. Click or tap a ring to select that sound. The ring selector at the top of the loop can also do this.
|
||||
- The colored legend below the loop shows which sounds are in the current pattern.
|
||||
- Instruments in the same category share one ring. Each ring has an uppercase letter, from **A** to **G**. Each beat has its own lowercase letter inside the ring. For example, **A-a** means beat `a` in category `A`.
|
||||
- The legend below the loop connects category letters and beat letters to their names. Press and hold a category in the legend to rename it for the current page session.
|
||||
- Click or tap a ring or use the category-ring selector above the loop to focus a category.
|
||||
|
||||
Use the trash button beside the loop to remove sound. If a point is selected, the button removes only that point. If a sound ring is selected and no point is selected, it removes every point of that sound.
|
||||
Use the trash button beside the loop to remove sound. If a point is selected, the button removes only that beat. If a category ring is selected and no point is selected, it removes every beat in that category.
|
||||
|
||||
### Change the loop and speed
|
||||
|
||||
@@ -124,27 +125,30 @@ The main path through the app is:
|
||||
| `src/views/AboutView.tsx` | Shows the version, license, technologies, source repository, and issue tracker. |
|
||||
| `src/views/viewTypes.ts` | Defines the names of the app's views. |
|
||||
| `src/config/projectInfo.ts` | Keeps version and project links in one place for the About view. |
|
||||
| `src/components/BeatLoopPanel.tsx` | Combines the circular loop, tempo, time signature, sound ring, hint, and delete button. |
|
||||
| `src/components/CircularTimeline.tsx` | Draws the loop, sound points, and playback marker. It handles pointer and keyboard movement. |
|
||||
| `src/components/BeatLoopPanel.tsx` | Combines the circular loop, tempo, time signature, category rings, hint, legend, and delete button. |
|
||||
| `src/components/CircularTimeline.tsx` | Draws category rings, labeled beat points, and the playback marker. It handles pointer and keyboard movement. |
|
||||
| `src/components/CategoryRingSelector.tsx` | Selects one of the active category rings. |
|
||||
| `src/components/CategoryLegend.tsx` | Maps category and beat letters to instrument names; a long press opens the rename dialog. |
|
||||
| `src/components/TransportBar.tsx` | Shows Play/Pause, the instrument menu, and pitch control. |
|
||||
| `src/components/InstrumentSelector.tsx` | Selects an instrument category and shows its choices from the plus button. |
|
||||
| `src/components/PitchControl.tsx` | Changes pitch on a selected point when its instrument supports pitch. |
|
||||
| `src/components/BeatTemplateSelector.tsx` | Shows the template menu. |
|
||||
| `src/components/TempoControl.tsx` | Changes the speed. |
|
||||
| `src/components/TimeSignatureSelector.tsx` | Changes the number of beats in the loop. |
|
||||
| `src/components/SoundRingSelector.tsx` | Selects a sound ring. |
|
||||
| `src/components/BeatSelectionHint.tsx` | Shows the selected sound and point position. |
|
||||
| `src/components/SoundRingSelector.tsx` | Compatibility export for the category ring selector. |
|
||||
| `src/components/BeatSelectionHint.tsx` | Shows the selected category, beat letter, instrument, and position. |
|
||||
| `src/hooks/useBeatStudio.ts` | Connects the sequencer and sound color palette. |
|
||||
| `src/hooks/useBeatSequencer.ts` | Gives the interface actions for adding, moving, selecting, and removing points. |
|
||||
| `src/hooks/useBeatPlayback.ts` | Starts and stops playback and moves the play marker. |
|
||||
| `src/hooks/useSoundPalette.ts` | Gives each active sound a color. |
|
||||
| `src/hooks/useSoundPalette.ts` | Gives each active category a color. |
|
||||
| `src/hooks/useCategoryLabels.ts` | Stores custom legend names for the current page session. |
|
||||
| `src/hooks/usePopoverDisclosure.ts` | Tracks whether an Ionic popover is open. |
|
||||
| `src/domain/sequencer.ts` | Defines beat data, loop sizes, tempo limits, and timing helpers. |
|
||||
| `src/domain/sequencerReducer.ts` | Applies changes to the sequencer state. |
|
||||
| `src/domain/timeline.ts` | Converts between loop positions and points on the circle. |
|
||||
| `src/domain/instruments.ts` | Lists instruments, categories, and pitch settings. |
|
||||
| `src/domain/sounds.ts` | Re-exports older sound names for compatibility. |
|
||||
| `src/domain/soundColors.ts` | Creates distinct colors for active sounds. |
|
||||
| `src/domain/soundColors.ts` | Creates distinct colors for active categories. |
|
||||
| `src/domain/beatTemplates.ts` | Defines the included templates. |
|
||||
| `src/audio/AudioEngine.ts` | Starts the browser audio context and sends sounds to it. |
|
||||
| `src/audio/instruments.ts` | Creates the synthesized instrument sounds. |
|
||||
@@ -169,14 +173,15 @@ The main path through the app is:
|
||||
|
||||
## 6. How loop data works
|
||||
|
||||
Each sound point has three values:
|
||||
Each beat point has these values:
|
||||
|
||||
- `id`: a unique name for that point.
|
||||
- `soundId`: the sound type, such as `kick` or `hi-hat`.
|
||||
- `soundId`: the instrument type, such as `kick` or `hi-hat`.
|
||||
- `letter`: its lowercase label inside the category ring. Labels are unique within a category.
|
||||
- `step`: its position in the loop. Whole numbers are main steps. Fractions allow small timing changes.
|
||||
- `pitchSemitones`: an optional pitch offset for instruments that support pitch.
|
||||
|
||||
The sequencer state also tracks the selected point, selected sound ring, tempo, and beats per bar. `src/domain/sequencerReducer.ts` receives named actions and returns the next state. This keeps changes in one predictable place.
|
||||
The sequencer state also tracks the selected point, selected category ring, tempo, and beats per bar. `src/domain/sequencerReducer.ts` receives named actions and returns the next state. This keeps changes in one predictable place.
|
||||
|
||||
The loop size is four main steps per beat. For example, 4/4 has 16 main steps and 8/4 has 32. Playback checks four smaller timing points within each main step.
|
||||
|
||||
|
||||
Reference in new issue
Block a user