@molecule/app-feature-piano-roll-solid 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +350 -2
- package/dist/PianoRoll.d.ts +34 -0
- package/dist/PianoRoll.d.ts.map +1 -0
- package/dist/PianoRoll.jsx +579 -0
- package/dist/PianoRoll.jsx.map +1 -0
- package/dist/geometry.d.ts +91 -0
- package/dist/geometry.d.ts.map +1 -0
- package/dist/geometry.js +150 -0
- package/dist/geometry.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +70 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +66 -4
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solid MIDI piano-roll editor: vertical piano keys + horizontal time grid +
|
|
3
|
+
* draggable / resizable note rectangles.
|
|
4
|
+
*
|
|
5
|
+
* Solid counterpart of `@molecule/app-feature-piano-roll-react`'s `PianoRoll` —
|
|
6
|
+
* the same props (React names), the same DOM for the same input, and the same
|
|
7
|
+
* callback calls.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
import { createSignal, For, onCleanup, onMount, Show } from 'solid-js';
|
|
12
|
+
import { useTranslation } from '@molecule/app-solid';
|
|
13
|
+
import { getClassMap } from '@molecule/app-ui';
|
|
14
|
+
import { beatsToPixels, DEFAULT_NOTE_VELOCITY, DRAG_DISTANCE_THRESHOLD_PX, isBlackKey, MIN_NOTE_DURATION_BEATS, PIANO_KEYS_WIDTH_PX, pitchLabel, pitchToY, pixelsToBeats, snapBeat, snapBeatRound, snapToBeats, yToPitch, } from './geometry.js';
|
|
15
|
+
/**
|
|
16
|
+
* Next value of the module-wide grid-help id counter.
|
|
17
|
+
*
|
|
18
|
+
* React derives the note grid's `aria-describedby` id from `useId()`, which
|
|
19
|
+
* numbers ids from one process-wide counter (`_r_<base32>_`). The id appears
|
|
20
|
+
* in the `aria-describedby` attribute and the description element's `id`,
|
|
21
|
+
* which the conformance normalizer renumbers in order of appearance, so the
|
|
22
|
+
* port generates ids from the same kind of counter — unique per instance,
|
|
23
|
+
* exactly React's format.
|
|
24
|
+
*/
|
|
25
|
+
let nextGridHelpId = 0;
|
|
26
|
+
/**
|
|
27
|
+
* A fresh grid-help id, in React `useId()`'s `_r_<base32>_` shape.
|
|
28
|
+
*
|
|
29
|
+
* @returns The id for one instance's grid description element.
|
|
30
|
+
*/
|
|
31
|
+
const gridHelpId = () => `_r_${(nextGridHelpId++).toString(32)}_`;
|
|
32
|
+
/** The root's inline geometry (React's `rootStyle`). */
|
|
33
|
+
const ROOT_STYLE = {
|
|
34
|
+
display: 'flex',
|
|
35
|
+
'align-items': 'stretch',
|
|
36
|
+
width: '100%',
|
|
37
|
+
overflow: 'auto',
|
|
38
|
+
position: 'relative',
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* MIDI piano-roll editor. Renders a vertical piano keyboard on the left, a
|
|
42
|
+
* horizontal time grid on the right, and draggable / resizable note rectangles
|
|
43
|
+
* on top. Click an empty cell to paint a new note, drag a note body to move it
|
|
44
|
+
* (snapped), drag the right-edge handle to resize, right-click a note to
|
|
45
|
+
* delete it.
|
|
46
|
+
*
|
|
47
|
+
* Keyboard users get the same paint action: focus the grid (Tab), move the cell
|
|
48
|
+
* cursor with the arrow keys, and press Enter or Space to paint a new note at
|
|
49
|
+
* the cursor cell.
|
|
50
|
+
*
|
|
51
|
+
* React keys each note by its `id` value, so a re-passed or re-ordered array
|
|
52
|
+
* keeps the rendered notes per id. Solid's `For` keys by reference, so the
|
|
53
|
+
* notes are keyed through stable per-id records: the record for an id is
|
|
54
|
+
* created once and reused, while the note's content reads the CURRENT note for
|
|
55
|
+
* that id reactively.
|
|
56
|
+
*
|
|
57
|
+
* @param props - Component props (see {@link PianoRollProps}).
|
|
58
|
+
* @returns The rendered piano roll.
|
|
59
|
+
*/
|
|
60
|
+
export const PianoRoll = (props) => {
|
|
61
|
+
const cm = getClassMap();
|
|
62
|
+
const { t } = useTranslation();
|
|
63
|
+
// The id of the visually hidden element that describes the grid's keyboard
|
|
64
|
+
// interface (`aria-describedby` below); one per instance.
|
|
65
|
+
const helpId = gridHelpId();
|
|
66
|
+
let gridEl;
|
|
67
|
+
let drag = null;
|
|
68
|
+
// The keyboard cell cursor (the cell Enter / Space paint into), in raw
|
|
69
|
+
// beats + pitch. Mouse clicks move it too, so the keyboard path continues
|
|
70
|
+
// where the mouse left off.
|
|
71
|
+
const [rawCursor, setRawCursor] = createSignal({ beat: 0, pitch: props.highestPitch ?? 108 });
|
|
72
|
+
// `true` while the grid surface (or a child) has focus — drives the visible
|
|
73
|
+
// cell-cursor highlight.
|
|
74
|
+
const [gridFocused, setGridFocused] = createSignal(false);
|
|
75
|
+
/** One stable record per note id, created on first sight. */
|
|
76
|
+
const records = new Map();
|
|
77
|
+
/**
|
|
78
|
+
* The rows to render, keyed by their stable per-id records.
|
|
79
|
+
*
|
|
80
|
+
* @returns One record per current note, in display order.
|
|
81
|
+
*/
|
|
82
|
+
const keyedRows = () => {
|
|
83
|
+
const seen = new Set();
|
|
84
|
+
const rows = (props.notes ?? []).map((note) => {
|
|
85
|
+
seen.add(note.id);
|
|
86
|
+
let row = records.get(note.id);
|
|
87
|
+
if (!row) {
|
|
88
|
+
row = { id: note.id };
|
|
89
|
+
records.set(note.id, row);
|
|
90
|
+
}
|
|
91
|
+
return row;
|
|
92
|
+
});
|
|
93
|
+
for (const id of [...records.keys()])
|
|
94
|
+
if (!seen.has(id))
|
|
95
|
+
records.delete(id);
|
|
96
|
+
return rows;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* The current note for one row id.
|
|
100
|
+
*
|
|
101
|
+
* @param id - The note id.
|
|
102
|
+
* @returns The note, or undefined while it is absent.
|
|
103
|
+
*/
|
|
104
|
+
const noteFor = (id) => (props.notes ?? []).find((note) => note.id === id);
|
|
105
|
+
/**
|
|
106
|
+
* The derived grid geometry for the current props.
|
|
107
|
+
*
|
|
108
|
+
* @returns The geometry of one render.
|
|
109
|
+
*/
|
|
110
|
+
function geometry() {
|
|
111
|
+
const pixelsPerBeat = props.pixelsPerBeat ?? 80;
|
|
112
|
+
const noteHeight = props.noteHeight ?? 20;
|
|
113
|
+
const lowestPitch = props.lowestPitch ?? 21;
|
|
114
|
+
const highestPitch = props.highestPitch ?? 108;
|
|
115
|
+
const snap = props.snap ?? '1/16';
|
|
116
|
+
const safeHighest = Math.max(highestPitch, lowestPitch);
|
|
117
|
+
const safeLowest = Math.min(highestPitch, lowestPitch);
|
|
118
|
+
const rowCount = safeHighest - safeLowest + 1;
|
|
119
|
+
const gridHeight = rowCount * noteHeight;
|
|
120
|
+
// Auto-size the grid width to fit the longest note when `beatsCount` is
|
|
121
|
+
// omitted; pad to a sensible minimum so empty rolls are usable.
|
|
122
|
+
const computedBeats = props.beatsCount ??
|
|
123
|
+
Math.max(16, Math.ceil(props.notes.reduce((max, n) => Math.max(max, (n.startBeat ?? 0) + (n.durationBeats ?? 0)), 0) + 4));
|
|
124
|
+
return {
|
|
125
|
+
pixelsPerBeat,
|
|
126
|
+
noteHeight,
|
|
127
|
+
snap,
|
|
128
|
+
safeHighest,
|
|
129
|
+
safeLowest,
|
|
130
|
+
rowCount,
|
|
131
|
+
gridHeight,
|
|
132
|
+
computedBeats,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The cell cursor clamped into the current grid bounds.
|
|
137
|
+
*
|
|
138
|
+
* @param grid - The geometry of the current render.
|
|
139
|
+
* @returns The clamped cursor.
|
|
140
|
+
*/
|
|
141
|
+
function clampedCursor(grid) {
|
|
142
|
+
const cursor = rawCursor();
|
|
143
|
+
return {
|
|
144
|
+
beat: Math.max(0, Math.min(cursor.beat, grid.computedBeats)),
|
|
145
|
+
pitch: Math.max(grid.safeLowest, Math.min(grid.safeHighest, cursor.pitch)),
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Paint a new note at an exact cell: `startBeat` + `pitch`, with the
|
|
150
|
+
* configured snap-step duration and the default velocity.
|
|
151
|
+
*
|
|
152
|
+
* @param startBeat - Snapped start beat of the new note.
|
|
153
|
+
* @param pitch - MIDI pitch of the row to paint into.
|
|
154
|
+
*/
|
|
155
|
+
function paintNoteAt(startBeat, pitch) {
|
|
156
|
+
const onNoteAdd = props.onNoteAdd;
|
|
157
|
+
if (!onNoteAdd)
|
|
158
|
+
return;
|
|
159
|
+
const id = `note-${Date.now().toString(36)}-${Math.floor(Math.random() * 1e6).toString(36)}`;
|
|
160
|
+
onNoteAdd({
|
|
161
|
+
id,
|
|
162
|
+
pitch,
|
|
163
|
+
startBeat,
|
|
164
|
+
durationBeats: snapToBeats(geometry().snap),
|
|
165
|
+
velocity: DEFAULT_NOTE_VELOCITY,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Click handler on the empty grid: paints a new note at the snapped cell
|
|
170
|
+
* under the cursor and moves the keyboard cell cursor to that cell.
|
|
171
|
+
*
|
|
172
|
+
* @param event - The native click event from the grid surface.
|
|
173
|
+
*/
|
|
174
|
+
function handleGridClick(event) {
|
|
175
|
+
// Suppress synthetic clicks fired at the end of a drag.
|
|
176
|
+
if (drag && drag.moved)
|
|
177
|
+
return;
|
|
178
|
+
if (!props.onNoteAdd)
|
|
179
|
+
return;
|
|
180
|
+
const node = gridEl;
|
|
181
|
+
if (!node)
|
|
182
|
+
return;
|
|
183
|
+
const grid = geometry();
|
|
184
|
+
const rect = node.getBoundingClientRect();
|
|
185
|
+
const x = event.clientX - rect.left;
|
|
186
|
+
const y = event.clientY - rect.top;
|
|
187
|
+
if (x < 0 || y < 0 || x > rect.width || y > rect.height)
|
|
188
|
+
return;
|
|
189
|
+
const startBeat = snapBeat(pixelsToBeats(x, grid.pixelsPerBeat), grid.snap);
|
|
190
|
+
const pitch = yToPitch(y, grid.noteHeight, grid.safeHighest, grid.safeLowest);
|
|
191
|
+
setRawCursor({ beat: startBeat, pitch });
|
|
192
|
+
paintNoteAt(startBeat, pitch);
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Keyboard handler on the grid surface: the arrow keys move the cell
|
|
196
|
+
* cursor, and Enter or Space paints a new note at the cursor cell.
|
|
197
|
+
*
|
|
198
|
+
* @param event - The native keydown event from the grid surface.
|
|
199
|
+
*/
|
|
200
|
+
function handleGridKeyDown(event) {
|
|
201
|
+
if (!props.onNoteAdd)
|
|
202
|
+
return;
|
|
203
|
+
// Only the grid surface itself drives the cell cursor — a keydown
|
|
204
|
+
// bubbling from a focused note child belongs to that note.
|
|
205
|
+
if (event.target !== event.currentTarget)
|
|
206
|
+
return;
|
|
207
|
+
const grid = geometry();
|
|
208
|
+
const cursor = clampedCursor(grid);
|
|
209
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
210
|
+
// Ignore key auto-repeat so holding the key doesn't flood the roll
|
|
211
|
+
// with notes; each press paints exactly one note.
|
|
212
|
+
event.preventDefault();
|
|
213
|
+
if (!event.repeat)
|
|
214
|
+
paintNoteAt(cursor.beat, cursor.pitch);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
switch (event.key) {
|
|
218
|
+
case 'ArrowLeft':
|
|
219
|
+
setRawCursor({ ...cursor, beat: cursor.beat - snapToBeats(grid.snap) });
|
|
220
|
+
break;
|
|
221
|
+
case 'ArrowRight':
|
|
222
|
+
setRawCursor({ ...cursor, beat: cursor.beat + snapToBeats(grid.snap) });
|
|
223
|
+
break;
|
|
224
|
+
case 'ArrowUp':
|
|
225
|
+
setRawCursor({ ...cursor, pitch: cursor.pitch + 1 });
|
|
226
|
+
break;
|
|
227
|
+
case 'ArrowDown':
|
|
228
|
+
setRawCursor({ ...cursor, pitch: cursor.pitch - 1 });
|
|
229
|
+
break;
|
|
230
|
+
default:
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
// Keep the scrollable surface from moving while moving the cursor.
|
|
234
|
+
event.preventDefault();
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Right-click handler on a note: deletes it.
|
|
238
|
+
*
|
|
239
|
+
* @param event - The native mouse event.
|
|
240
|
+
* @param note - The note to delete.
|
|
241
|
+
*/
|
|
242
|
+
function handleNoteContextMenu(event, note) {
|
|
243
|
+
const onNoteDelete = props.onNoteDelete;
|
|
244
|
+
if (!onNoteDelete)
|
|
245
|
+
return;
|
|
246
|
+
event.preventDefault();
|
|
247
|
+
event.stopPropagation();
|
|
248
|
+
onNoteDelete(note.id);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Begin a drag gesture on a note body or a resize handle.
|
|
252
|
+
*
|
|
253
|
+
* @param event - The native pointer event from the note element.
|
|
254
|
+
* @param note - The note being dragged.
|
|
255
|
+
* @param mode - `'move'` for body drags, `'resize'` for handle drags.
|
|
256
|
+
*/
|
|
257
|
+
function beginDrag(event, note, mode) {
|
|
258
|
+
if (event.button !== undefined && event.button !== 0)
|
|
259
|
+
return;
|
|
260
|
+
event.stopPropagation();
|
|
261
|
+
drag = {
|
|
262
|
+
noteId: note.id,
|
|
263
|
+
mode,
|
|
264
|
+
pointerId: event.pointerId,
|
|
265
|
+
startX: event.clientX,
|
|
266
|
+
startY: event.clientY,
|
|
267
|
+
originStartBeat: note.startBeat,
|
|
268
|
+
originDurationBeats: note.durationBeats,
|
|
269
|
+
originPitch: note.pitch,
|
|
270
|
+
moved: false,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Native pointermove handler used during an active drag.
|
|
275
|
+
*
|
|
276
|
+
* @param event - Native pointer event.
|
|
277
|
+
*/
|
|
278
|
+
function onMove(event) {
|
|
279
|
+
const current = drag;
|
|
280
|
+
if (!current || event.pointerId !== current.pointerId)
|
|
281
|
+
return;
|
|
282
|
+
const dx = event.clientX - current.startX;
|
|
283
|
+
const dy = event.clientY - current.startY;
|
|
284
|
+
if (!current.moved &&
|
|
285
|
+
Math.abs(dx) < DRAG_DISTANCE_THRESHOLD_PX &&
|
|
286
|
+
Math.abs(dy) < DRAG_DISTANCE_THRESHOLD_PX) {
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
current.moved = true;
|
|
290
|
+
const grid = geometry();
|
|
291
|
+
if (current.mode === 'move') {
|
|
292
|
+
const beatDelta = pixelsToBeats(dx, grid.pixelsPerBeat);
|
|
293
|
+
const nextStart = snapBeatRound(current.originStartBeat + beatDelta, grid.snap);
|
|
294
|
+
const rowDelta = Math.round(dy / Math.max(grid.noteHeight, 1));
|
|
295
|
+
// Higher rows on screen = higher pitch numbers. Dragging down
|
|
296
|
+
// (positive dy) decreases pitch.
|
|
297
|
+
const proposedPitch = current.originPitch - rowDelta;
|
|
298
|
+
const nextPitch = Math.max(grid.safeLowest, Math.min(grid.safeHighest, proposedPitch));
|
|
299
|
+
props.onNoteMove?.(current.noteId, nextStart, nextPitch);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
const beatDelta = pixelsToBeats(dx, grid.pixelsPerBeat);
|
|
303
|
+
const nextDuration = Math.max(MIN_NOTE_DURATION_BEATS, snapBeatRound(current.originDurationBeats + beatDelta, grid.snap) ||
|
|
304
|
+
MIN_NOTE_DURATION_BEATS);
|
|
305
|
+
props.onNoteResize?.(current.noteId, nextDuration);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Native pointerup / pointercancel handler that closes the drag gesture.
|
|
310
|
+
*
|
|
311
|
+
* @param event - Native pointer event.
|
|
312
|
+
*/
|
|
313
|
+
function onUp(event) {
|
|
314
|
+
const current = drag;
|
|
315
|
+
if (!current || event.pointerId !== current.pointerId)
|
|
316
|
+
return;
|
|
317
|
+
drag = null;
|
|
318
|
+
}
|
|
319
|
+
onMount(() => {
|
|
320
|
+
window.addEventListener('pointermove', onMove);
|
|
321
|
+
window.addEventListener('pointerup', onUp);
|
|
322
|
+
window.addEventListener('pointercancel', onUp);
|
|
323
|
+
});
|
|
324
|
+
onCleanup(() => {
|
|
325
|
+
window.removeEventListener('pointermove', onMove);
|
|
326
|
+
window.removeEventListener('pointerup', onUp);
|
|
327
|
+
window.removeEventListener('pointercancel', onUp);
|
|
328
|
+
});
|
|
329
|
+
/** The translated region label (React's `pianoRoll.aria.roll`). */
|
|
330
|
+
const rollLabel = () => t('pianoRoll.aria.roll', {}, { defaultValue: 'Piano roll' });
|
|
331
|
+
/** The translated keys-column label (React's `pianoRoll.aria.keys`). */
|
|
332
|
+
const keysLabel = () => t('pianoRoll.aria.keys', {}, { defaultValue: 'Piano keys' });
|
|
333
|
+
/** The translated grid label (React's `pianoRoll.aria.grid`). */
|
|
334
|
+
const gridLabel = () => t('pianoRoll.aria.grid', {}, { defaultValue: 'Note grid' });
|
|
335
|
+
/** The translated grid keyboard help (React's `pianoRoll.aria.gridHelp`). */
|
|
336
|
+
const gridHelpLabel = () => t('pianoRoll.aria.gridHelp', {}, { defaultValue: 'The arrow keys move the cell cursor, Enter or Space paints a note at it.' });
|
|
337
|
+
/** The translated resize-handle label (React's `pianoRoll.aria.resize`). */
|
|
338
|
+
const resizeLabel = () => t('pianoRoll.aria.resize', {}, { defaultValue: 'Resize note' });
|
|
339
|
+
/** The translated cell-cursor announcement (React's `pianoRoll.aria.cursor`). */
|
|
340
|
+
const cursorLabel = () => {
|
|
341
|
+
const grid = geometry();
|
|
342
|
+
const cursor = clampedCursor(grid);
|
|
343
|
+
return t('pianoRoll.aria.cursor', { pitch: pitchLabel(cursor.pitch), beat: cursor.beat.toFixed(2) }, { defaultValue: 'Cursor on {{pitch}} at beat {{beat}}' });
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* The translated aria label of one note (React's `pianoRoll.aria.note`).
|
|
347
|
+
*
|
|
348
|
+
* @param note - The note.
|
|
349
|
+
* @returns The translated label.
|
|
350
|
+
*/
|
|
351
|
+
const noteAria = (note) => t('pianoRoll.aria.note', {
|
|
352
|
+
pitch: pitchLabel(note.pitch),
|
|
353
|
+
startBeat: note.startBeat.toFixed(2),
|
|
354
|
+
durationBeats: note.durationBeats.toFixed(2),
|
|
355
|
+
}, { defaultValue: 'Note {{pitch}} starting at beat {{startBeat}} for {{durationBeats}} beats' });
|
|
356
|
+
/** The pitch rows, top-to-bottom (highest first). */
|
|
357
|
+
const rows = () => {
|
|
358
|
+
const grid = geometry();
|
|
359
|
+
const list = [];
|
|
360
|
+
for (let pitch = grid.safeHighest; pitch >= grid.safeLowest; pitch--)
|
|
361
|
+
list.push(pitch);
|
|
362
|
+
return list;
|
|
363
|
+
};
|
|
364
|
+
/** The beatline indices — `Array.from` floors a fractional count, as React does. */
|
|
365
|
+
const beats = () => Array.from({ length: Math.max(0, geometry().computedBeats) + 1 }, (_v, beat) => beat);
|
|
366
|
+
/**
|
|
367
|
+
* The keys column's inline geometry (React's `keysColumnStyle`).
|
|
368
|
+
*
|
|
369
|
+
* @param grid - The geometry of the current render.
|
|
370
|
+
* @returns The style object.
|
|
371
|
+
*/
|
|
372
|
+
const keysColumnStyle = (grid) => ({
|
|
373
|
+
width: `${PIANO_KEYS_WIDTH_PX}px`,
|
|
374
|
+
'min-width': `${PIANO_KEYS_WIDTH_PX}px`,
|
|
375
|
+
height: `${grid.gridHeight}px`,
|
|
376
|
+
position: 'sticky',
|
|
377
|
+
left: '0px',
|
|
378
|
+
'z-index': '2',
|
|
379
|
+
background: 'var(--mol-piano-roll-keys-bg, #f6f6f8)',
|
|
380
|
+
color: 'currentcolor',
|
|
381
|
+
});
|
|
382
|
+
/**
|
|
383
|
+
* One piano key's inline geometry (React's `keyStyle`).
|
|
384
|
+
*
|
|
385
|
+
* @param black - Whether the key is black.
|
|
386
|
+
* @param noteHeight - Row height in pixels.
|
|
387
|
+
* @returns The style object.
|
|
388
|
+
*/
|
|
389
|
+
const keyStyle = (black, noteHeight) => ({
|
|
390
|
+
position: 'relative',
|
|
391
|
+
height: `${noteHeight}px`,
|
|
392
|
+
'box-sizing': 'border-box',
|
|
393
|
+
background: black
|
|
394
|
+
? 'var(--mol-piano-roll-key-black, #2b2b34)'
|
|
395
|
+
: 'var(--mol-piano-roll-key-white, #ffffff)',
|
|
396
|
+
color: black
|
|
397
|
+
? 'var(--mol-piano-roll-key-black-fg, #f6f6f8)'
|
|
398
|
+
: 'var(--mol-piano-roll-key-white-fg, #2b2b34)',
|
|
399
|
+
'border-bottom': '1px solid rgba(0, 0, 0, 0.08)',
|
|
400
|
+
'padding-left': '6px',
|
|
401
|
+
'padding-right': '6px',
|
|
402
|
+
display: 'flex',
|
|
403
|
+
'align-items': 'center',
|
|
404
|
+
'font-size': '10px',
|
|
405
|
+
'line-height': '1',
|
|
406
|
+
});
|
|
407
|
+
/**
|
|
408
|
+
* One pitch row's inline geometry (React's `rowStyle`).
|
|
409
|
+
*
|
|
410
|
+
* @param pitch - The row's pitch.
|
|
411
|
+
* @param grid - The geometry of the current render.
|
|
412
|
+
* @returns The style object.
|
|
413
|
+
*/
|
|
414
|
+
const rowStyle = (pitch, grid) => {
|
|
415
|
+
const black = isBlackKey(pitch);
|
|
416
|
+
return {
|
|
417
|
+
position: 'absolute',
|
|
418
|
+
left: '0px',
|
|
419
|
+
right: '0px',
|
|
420
|
+
top: `${pitchToY(pitch, grid.noteHeight, grid.safeHighest)}px`,
|
|
421
|
+
height: `${grid.noteHeight}px`,
|
|
422
|
+
background: black ? 'rgba(0, 0, 0, 0.04)' : 'transparent',
|
|
423
|
+
'border-bottom': '1px solid rgba(0, 0, 0, 0.04)',
|
|
424
|
+
'pointer-events': 'none',
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
/**
|
|
428
|
+
* One beat gridline's inline geometry (React's `lineStyle`).
|
|
429
|
+
*
|
|
430
|
+
* @param beat - The beat index.
|
|
431
|
+
* @param grid - The geometry of the current render.
|
|
432
|
+
* @returns The style object.
|
|
433
|
+
*/
|
|
434
|
+
const lineStyle = (beat, grid) => ({
|
|
435
|
+
position: 'absolute',
|
|
436
|
+
top: '0px',
|
|
437
|
+
bottom: '0px',
|
|
438
|
+
left: `${beatsToPixels(beat, grid.pixelsPerBeat)}px`,
|
|
439
|
+
width: '1px',
|
|
440
|
+
background: beat % 4 === 0 ? 'rgba(0, 0, 0, 0.18)' : 'rgba(0, 0, 0, 0.06)',
|
|
441
|
+
'pointer-events': 'none',
|
|
442
|
+
});
|
|
443
|
+
/**
|
|
444
|
+
* The cell cursor's inline geometry (React's cursor style).
|
|
445
|
+
*
|
|
446
|
+
* @param grid - The geometry of the current render.
|
|
447
|
+
* @returns The style object.
|
|
448
|
+
*/
|
|
449
|
+
const cursorStyle = (grid) => {
|
|
450
|
+
const cursor = clampedCursor(grid);
|
|
451
|
+
return {
|
|
452
|
+
position: 'absolute',
|
|
453
|
+
left: `${beatsToPixels(cursor.beat, grid.pixelsPerBeat)}px`,
|
|
454
|
+
top: `${pitchToY(cursor.pitch, grid.noteHeight, grid.safeHighest)}px`,
|
|
455
|
+
width: `${beatsToPixels(snapToBeats(grid.snap), grid.pixelsPerBeat)}px`,
|
|
456
|
+
height: `${grid.noteHeight}px`,
|
|
457
|
+
border: '2px solid var(--mol-piano-roll-note-bg, #5b8def)',
|
|
458
|
+
'border-radius': '3px',
|
|
459
|
+
'box-sizing': 'border-box',
|
|
460
|
+
'pointer-events': 'none',
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
/**
|
|
464
|
+
* The grid surface's inline geometry (React's `gridSurfaceStyle`).
|
|
465
|
+
*
|
|
466
|
+
* @param grid - The geometry of the current render.
|
|
467
|
+
* @returns The style object.
|
|
468
|
+
*/
|
|
469
|
+
const gridSurfaceStyle = (grid) => {
|
|
470
|
+
const width = `${beatsToPixels(grid.computedBeats, grid.pixelsPerBeat)}px`;
|
|
471
|
+
return {
|
|
472
|
+
position: 'relative',
|
|
473
|
+
width,
|
|
474
|
+
'min-width': width,
|
|
475
|
+
height: `${grid.gridHeight}px`,
|
|
476
|
+
background: 'var(--mol-piano-roll-grid-bg, #ffffff)',
|
|
477
|
+
cursor: props.onNoteAdd ? 'crosshair' : 'default',
|
|
478
|
+
'touch-action': 'pan-y',
|
|
479
|
+
'user-select': 'none',
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* One note block's inline geometry (React's `noteStyle`).
|
|
484
|
+
*
|
|
485
|
+
* @param note - The note.
|
|
486
|
+
* @param grid - The geometry of the current render.
|
|
487
|
+
* @returns The style object.
|
|
488
|
+
*/
|
|
489
|
+
const noteStyle = (note, grid) => {
|
|
490
|
+
const velocity = Math.max(0, Math.min(127, note.velocity ?? DEFAULT_NOTE_VELOCITY));
|
|
491
|
+
return {
|
|
492
|
+
position: 'absolute',
|
|
493
|
+
left: `${beatsToPixels(note.startBeat, grid.pixelsPerBeat)}px`,
|
|
494
|
+
width: `${Math.max(2, beatsToPixels(note.durationBeats, grid.pixelsPerBeat))}px`,
|
|
495
|
+
top: `${pitchToY(note.pitch, grid.noteHeight, grid.safeHighest) + 1}px`,
|
|
496
|
+
height: `${Math.max(2, grid.noteHeight - 2)}px`,
|
|
497
|
+
background: `var(--mol-piano-roll-note-bg, #5b8def)`,
|
|
498
|
+
opacity: String(0.45 + (velocity / 127) * 0.55),
|
|
499
|
+
'border-radius': '3px',
|
|
500
|
+
'box-sizing': 'border-box',
|
|
501
|
+
cursor: 'grab',
|
|
502
|
+
'touch-action': 'none',
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
/** The note handle's inline geometry (React's `handleStyle`). */
|
|
506
|
+
const handleStyle = {
|
|
507
|
+
position: 'absolute',
|
|
508
|
+
top: '0px',
|
|
509
|
+
right: '0px',
|
|
510
|
+
bottom: '0px',
|
|
511
|
+
width: '6px',
|
|
512
|
+
cursor: 'ew-resize',
|
|
513
|
+
'touch-action': 'none',
|
|
514
|
+
};
|
|
515
|
+
return (<div role="region" aria-label={rollLabel()} data-mol-id="piano-roll" class={cm.cn(props.className)} style={ROOT_STYLE}>
|
|
516
|
+
{/* Vertical piano keyboard. */}
|
|
517
|
+
<div role="list" aria-label={keysLabel()} data-mol-id="piano-roll-keys" style={keysColumnStyle(geometry())}>
|
|
518
|
+
<For each={rows()}>
|
|
519
|
+
{(pitch) => {
|
|
520
|
+
const black = isBlackKey(pitch);
|
|
521
|
+
const isC = ((pitch % 12) + 12) % 12 === 0;
|
|
522
|
+
return (<div role="listitem" data-mol-id="piano-roll-key" data-pitch={pitch} data-key-color={black ? 'black' : 'white'} style={keyStyle(black, geometry().noteHeight)}>
|
|
523
|
+
<Show when={isC}>
|
|
524
|
+
<span data-mol-id="piano-roll-key-label" class={cm.cn(cm.textSize('xs'))}>
|
|
525
|
+
{pitchLabel(pitch)}
|
|
526
|
+
</span>
|
|
527
|
+
</Show>
|
|
528
|
+
</div>);
|
|
529
|
+
}}
|
|
530
|
+
</For>
|
|
531
|
+
</div>
|
|
532
|
+
|
|
533
|
+
{/* Note grid + drawn notes. A free two-dimensional surface driven by
|
|
534
|
+
the keyboard cell cursor, so it is an `application`, not a `grid`:
|
|
535
|
+
it holds no `row`s of `gridcell`s. */}
|
|
536
|
+
<div ref={(element) => {
|
|
537
|
+
gridEl = element;
|
|
538
|
+
}} role="application" aria-label={gridLabel()} aria-describedby={helpId} data-mol-id="piano-roll-grid" data-snap={geometry().snap} style={gridSurfaceStyle(geometry())} tabIndex={0} onClick={(event) => handleGridClick(event)} onKeyDown={(event) => handleGridKeyDown(event)} onFocusIn={() => setGridFocused(true)} onFocusOut={() => setGridFocused(false)}>
|
|
539
|
+
{/* Horizontal pitch rows — alternate row tint for black keys. */}
|
|
540
|
+
<For each={rows()}>
|
|
541
|
+
{(pitch) => (<div data-mol-id="piano-roll-row" data-pitch={pitch} data-key-color={isBlackKey(pitch) ? 'black' : 'white'} style={rowStyle(pitch, geometry())}/>)}
|
|
542
|
+
</For>
|
|
543
|
+
|
|
544
|
+
{/* Vertical beat gridlines — one line per beat (slightly heavier
|
|
545
|
+
on the bar boundary every 4 beats). */}
|
|
546
|
+
<For each={beats()}>
|
|
547
|
+
{(beat) => (<div data-mol-id="piano-roll-beat-line" data-beat={beat} data-bar={beat % 4 === 0 ? 'true' : 'false'} style={lineStyle(beat, geometry())}/>)}
|
|
548
|
+
</For>
|
|
549
|
+
|
|
550
|
+
{/* Keyboard cell cursor — visible while the grid has focus. */}
|
|
551
|
+
<Show when={props.onNoteAdd && gridFocused()}>
|
|
552
|
+
<div data-mol-id="piano-roll-cell-cursor" aria-hidden="true" style={cursorStyle(geometry())}/>
|
|
553
|
+
</Show>
|
|
554
|
+
|
|
555
|
+
{/* Describes the grid's keyboard interface to assistive technology.
|
|
556
|
+
Rendered unconditionally so aria-describedby always resolves. */}
|
|
557
|
+
<div id={helpId} class={cm.srOnly}>
|
|
558
|
+
{gridHelpLabel()}
|
|
559
|
+
</div>
|
|
560
|
+
|
|
561
|
+
{/* Announces keyboard cursor moves to assistive technology. */}
|
|
562
|
+
<Show when={props.onNoteAdd}>
|
|
563
|
+
<div role="status" class={cm.srOnly}>
|
|
564
|
+
{cursorLabel()}
|
|
565
|
+
</div>
|
|
566
|
+
</Show>
|
|
567
|
+
|
|
568
|
+
{/* Notes — drawn on top of the grid. */}
|
|
569
|
+
<For each={keyedRows()}>
|
|
570
|
+
{(row) => (<Show when={noteFor(row.id)}>
|
|
571
|
+
{(note) => (<div role="button" tabIndex={0} aria-label={noteAria(note())} data-mol-id="piano-roll-note" data-note-id={note().id} data-pitch={note().pitch} data-start-beat={note().startBeat} data-duration-beats={note().durationBeats} class={cm.cn(cm.cursorPointer)} style={noteStyle(note(), geometry())} onPointerDown={(event) => beginDrag(event, note(), 'move')} onContextMenu={(event) => handleNoteContextMenu(event, note())}>
|
|
572
|
+
<div role="separator" aria-label={resizeLabel()} data-mol-id="piano-roll-note-handle" style={handleStyle} onPointerDown={(event) => beginDrag(event, note(), 'resize')}/>
|
|
573
|
+
</div>)}
|
|
574
|
+
</Show>)}
|
|
575
|
+
</For>
|
|
576
|
+
</div>
|
|
577
|
+
</div>);
|
|
578
|
+
};
|
|
579
|
+
//# sourceMappingURL=PianoRoll.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PianoRoll.jsx","sourceRoot":"","sources":["../src/PianoRoll.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAkB,YAAY,EAAE,GAAG,EAAY,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAEhG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B,UAAU,EACV,uBAAuB,EACvB,mBAAmB,EACnB,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,aAAa,EACb,WAAW,EACX,QAAQ,GACT,MAAM,eAAe,CAAA;AAGtB;;;;;;;;;GASG;AACH,IAAI,cAAc,GAAG,CAAC,CAAA;AAEtB;;;;GAIG;AACH,MAAM,UAAU,GAAG,GAAW,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAA;AAkDzE,wDAAwD;AACxD,MAAM,UAAU,GAAsB;IACpC,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,SAAS;IACxB,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,UAAU;CACrB,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,SAAS,GAA8B,CAAC,KAAK,EAAE,EAAE;IAC5D,MAAM,EAAE,GAAG,WAAW,EAAE,CAAA;IACxB,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAA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