mirror of
https://github.com/Boof2015/prism.git
synced 2026-08-20 20:39:59 +02:00
UI/UX improvements, scope popouts
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import type { CaptureBackendKind } from './capture'
|
||||
import type { ScopeKind } from './scope'
|
||||
import type { ScopeSettings } from './settings'
|
||||
|
||||
export interface WindowBounds {
|
||||
x: number
|
||||
y: number
|
||||
width: number
|
||||
height: number
|
||||
}
|
||||
|
||||
export interface ScopePopoutState {
|
||||
poppedOut: boolean
|
||||
windowBounds?: WindowBounds
|
||||
}
|
||||
|
||||
export type ScopePopoutStateMap = Record<ScopeKind, ScopePopoutState>
|
||||
|
||||
export interface ScopePopoutSyncState {
|
||||
shouldBeOpen: boolean
|
||||
bounds?: WindowBounds
|
||||
}
|
||||
|
||||
export type ScopePopoutSyncStateMap = Record<ScopeKind, ScopePopoutSyncState>
|
||||
|
||||
export interface ScopePopoutSessionState {
|
||||
sessionId: number
|
||||
sampleRate: number
|
||||
channelCount: number
|
||||
capturing: boolean
|
||||
backendKind: CaptureBackendKind | null
|
||||
}
|
||||
|
||||
export interface ScopePopoutStereoChunk {
|
||||
left: Float32Array
|
||||
right: Float32Array
|
||||
}
|
||||
|
||||
export type ScopePopoutMonoBatch = Float32Array[]
|
||||
export type ScopePopoutStereoBatch = ScopePopoutStereoChunk[]
|
||||
export type ScopePopoutAudioBatch = ScopePopoutMonoBatch | ScopePopoutStereoBatch
|
||||
|
||||
export interface ScopePopoutSnapshot<K extends ScopeKind = ScopeKind> {
|
||||
kind: K
|
||||
label: string
|
||||
accent: string
|
||||
settings: ScopeSettings[K]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
export interface ProfileMenuProfileSummary {
|
||||
id: string
|
||||
name: string
|
||||
isDefault: boolean
|
||||
}
|
||||
|
||||
export interface ProfileMenuRequest {
|
||||
x: number
|
||||
y: number
|
||||
profiles: ProfileMenuProfileSummary[]
|
||||
activeProfileId: string | null
|
||||
}
|
||||
@@ -9,3 +9,13 @@ export const SCOPE_KINDS: ScopeKind[] = [
|
||||
'lufsmeter',
|
||||
'waveform',
|
||||
]
|
||||
|
||||
export const SCOPE_LABELS: Record<ScopeKind, string> = {
|
||||
spectrum: 'Spectrum',
|
||||
oscilloscope: 'Oscilloscope',
|
||||
vectorscope: 'Vectorscope',
|
||||
spectrogram: 'Spectrogram',
|
||||
vumeter: 'VU Meter',
|
||||
lufsmeter: 'LUFS Meter',
|
||||
waveform: 'Waveform',
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import type { VectorscopeMode } from '../renderer/visualizers/Vectorscope'
|
||||
import type { SpectrogramClarityMode, SpectrogramScaleMode } from './spectrogram'
|
||||
import type { VUMeterMode, VUMeterOrientation } from './vumeter'
|
||||
import type { LUFSMeterMode } from './lufsmeter'
|
||||
|
||||
export interface ScopeSettings {
|
||||
spectrum: {
|
||||
fftSize: number
|
||||
tiltDbPerOctave: number
|
||||
heatmap: boolean
|
||||
heatmapTiltDbPerOctave: number
|
||||
showGrid: boolean
|
||||
smoothing: number
|
||||
fillGradient: boolean
|
||||
}
|
||||
oscilloscope: {
|
||||
pitchLock: boolean
|
||||
underfillEnabled: boolean
|
||||
showGrid: boolean
|
||||
lineWidth: number
|
||||
}
|
||||
vectorscope: {
|
||||
mode: VectorscopeMode
|
||||
multiband: boolean
|
||||
showGrid: boolean
|
||||
persistence: number
|
||||
lineWidth: number
|
||||
}
|
||||
spectrogram: {
|
||||
fftSize: number
|
||||
scrollSpeed: number
|
||||
clarityMode: SpectrogramClarityMode
|
||||
scaleMode: SpectrogramScaleMode
|
||||
colorScheme: 'heat' | 'mono'
|
||||
}
|
||||
vumeter: {
|
||||
mode: VUMeterMode
|
||||
orientation: VUMeterOrientation
|
||||
}
|
||||
lufsmeter: {
|
||||
mode: LUFSMeterMode
|
||||
}
|
||||
waveform: {
|
||||
scrollSpeed: number
|
||||
gainDb: number
|
||||
multiband: boolean
|
||||
}
|
||||
}
|
||||
|
||||
export const DEFAULT_SCOPE_SETTINGS: ScopeSettings = {
|
||||
spectrum: { fftSize: 2048, tiltDbPerOctave: 2.0, heatmap: false, heatmapTiltDbPerOctave: 2.0, showGrid: true, smoothing: 0.9, fillGradient: true },
|
||||
oscilloscope: { pitchLock: true, underfillEnabled: false, showGrid: true, lineWidth: 2 },
|
||||
vectorscope: { mode: 'lissajous', multiband: false, showGrid: true, persistence: 0.10, lineWidth: 1.5 },
|
||||
spectrogram: { fftSize: 2048, scrollSpeed: 2, clarityMode: 'sharper', scaleMode: 'log', colorScheme: 'heat' },
|
||||
vumeter: { mode: 'bar', orientation: 'horizontal' },
|
||||
lufsmeter: { mode: 'bar' },
|
||||
waveform: { scrollSpeed: 1, gainDb: 0, multiband: false },
|
||||
}
|
||||
Reference in New Issue
Block a user