Move pitch control below timeline hints

This commit is contained in:
Ninosaurier committed 2026-11-18 11:27:34 +01:00
1 parent e7b6c0bb3e
commit 5425e1e3ff
4 files changed
+9 -13

No files matched your search

-2
View File
@@ -38,10 +38,8 @@ function App() {
isPlaying={studio.sequencer.isPlaying} isPlaying={studio.sequencer.isPlaying}
isStarting={studio.sequencer.isStarting} isStarting={studio.sequencer.isStarting}
hasBeats={studio.sequencer.beats.length > 0} hasBeats={studio.sequencer.beats.length > 0}
selectedBeat={studio.sequencer.selectedBeat}
onTogglePlayback={studio.sequencer.togglePlayback} onTogglePlayback={studio.sequencer.togglePlayback}
onAddInstrument={studio.addSound} onAddInstrument={studio.addSound}
onChangeBeatPitch={studio.sequencer.changeBeatPitch}
/> />
)} )}
</IonPage> </IonPage>
+5
View File
@@ -4,6 +4,7 @@ import { trash } from 'ionicons/icons';
import { BeatSelectionHint } from './BeatSelectionHint'; import { BeatSelectionHint } from './BeatSelectionHint';
import { SampleLegend } from './CategoryLegend'; import { SampleLegend } from './CategoryLegend';
import { CircularTimeline } from './CircularTimeline'; import { CircularTimeline } from './CircularTimeline';
import { PitchControl } from './PitchControl';
import { SoundRingSelector } from './SoundRingSelector'; import { SoundRingSelector } from './SoundRingSelector';
import { TempoControl } from './TempoControl'; import { TempoControl } from './TempoControl';
import { TimeSignatureSelector } from './TimeSignatureSelector'; import { TimeSignatureSelector } from './TimeSignatureSelector';
@@ -98,6 +99,10 @@ export function BeatLoopPanel({ sequencer, soundPalette }: BeatLoopPanelProps) {
)} )}
</div> </div>
</div> </div>
<PitchControl
selectedBeat={sequencer.selectedBeat}
onChangePitch={sequencer.changeBeatPitch}
/>
</section> </section>
<SampleLegend <SampleLegend
-7
View File
@@ -2,28 +2,22 @@ import { memo } from 'react';
import { IonButton, IonFooter, IonIcon, IonToolbar } from '@ionic/react'; import { IonButton, IonFooter, IonIcon, IonToolbar } from '@ionic/react';
import { pause, play } from 'ionicons/icons'; import { pause, play } from 'ionicons/icons';
import type { InstrumentId } from '../domain/instruments'; import type { InstrumentId } from '../domain/instruments';
import type { BeatPoint } from '../domain/sequencer';
import { InstrumentSelector } from './InstrumentSelector'; import { InstrumentSelector } from './InstrumentSelector';
import { PitchControl } from './PitchControl';
interface TransportBarProps { interface TransportBarProps {
isPlaying: boolean; isPlaying: boolean;
isStarting: boolean; isStarting: boolean;
hasBeats: boolean; hasBeats: boolean;
selectedBeat: BeatPoint | undefined;
onTogglePlayback: () => Promise<void>; onTogglePlayback: () => Promise<void>;
onAddInstrument: (instrumentId: InstrumentId) => void; onAddInstrument: (instrumentId: InstrumentId) => void;
onChangeBeatPitch: (beatId: string, pitchSemitones: number) => void;
} }
export const TransportBar = memo(function TransportBar({ export const TransportBar = memo(function TransportBar({
isPlaying, isPlaying,
isStarting, isStarting,
hasBeats, hasBeats,
selectedBeat,
onTogglePlayback, onTogglePlayback,
onAddInstrument, onAddInstrument,
onChangeBeatPitch,
}: TransportBarProps) { }: TransportBarProps) {
return ( return (
<IonFooter className="transport-footer"> <IonFooter className="transport-footer">
@@ -38,7 +32,6 @@ export const TransportBar = memo(function TransportBar({
{isStarting ? 'Starting' : isPlaying ? 'Pause' : 'Play'} {isStarting ? 'Starting' : isPlaying ? 'Pause' : 'Play'}
</IonButton> </IonButton>
<InstrumentSelector onSelectInstrument={onAddInstrument} /> <InstrumentSelector onSelectInstrument={onAddInstrument} />
<PitchControl selectedBeat={selectedBeat} onChangePitch={onChangeBeatPitch} />
</div> </div>
</IonToolbar> </IonToolbar>
</IonFooter> </IonFooter>
+4 -4
View File
@@ -942,12 +942,12 @@ ion-popover.instrument-picker-popover {
.pitch-control { .pitch-control {
display: flex; display: flex;
min-width: 145px; width: 100%;
max-width: 230px; min-width: 0;
flex: 1 1 160px; max-width: none;
flex-direction: column; flex-direction: column;
gap: 1px; gap: 1px;
margin-left: auto; margin: 8px 0 0;
} }
.pitch-control-heading { .pitch-control-heading {