mirror of
https://github.com/Boof2015/prism.git
synced 2026-08-20 20:39:59 +02:00
add stereo to waveform scope, add side metering to spectrum
This commit is contained in:
@@ -2,6 +2,7 @@ import type { VectorscopeMode } from '../renderer/visualizers/Vectorscope'
|
||||
import type { SpectrogramClarityMode, SpectrogramScaleMode } from './spectrogram'
|
||||
import type { VUMeterMode, VUMeterOrientation } from './vumeter'
|
||||
import type { LUFSMeterMode } from './lufsmeter'
|
||||
import { DEFAULT_WAVEFORM_MODE, type WaveformMode } from './waveform'
|
||||
|
||||
export interface ScopeSettings {
|
||||
spectrum: {
|
||||
@@ -12,6 +13,7 @@ export interface ScopeSettings {
|
||||
showGrid: boolean
|
||||
smoothing: number
|
||||
fillGradient: boolean
|
||||
showSideLine: boolean
|
||||
}
|
||||
oscilloscope: {
|
||||
pitchLock: boolean
|
||||
@@ -41,6 +43,7 @@ export interface ScopeSettings {
|
||||
mode: LUFSMeterMode
|
||||
}
|
||||
waveform: {
|
||||
mode: WaveformMode
|
||||
scrollSpeed: number
|
||||
gainDb: number
|
||||
multiband: boolean
|
||||
@@ -48,11 +51,11 @@ export interface ScopeSettings {
|
||||
}
|
||||
|
||||
export const DEFAULT_SCOPE_SETTINGS: ScopeSettings = {
|
||||
spectrum: { fftSize: 2048, tiltDbPerOctave: 2.0, heatmap: false, heatmapTiltDbPerOctave: 2.0, showGrid: true, smoothing: 0.9, fillGradient: true },
|
||||
spectrum: { fftSize: 2048, tiltDbPerOctave: 2.0, heatmap: false, heatmapTiltDbPerOctave: 2.0, showGrid: true, smoothing: 0.9, fillGradient: true, showSideLine: false },
|
||||
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 },
|
||||
waveform: { mode: DEFAULT_WAVEFORM_MODE, scrollSpeed: 1, gainDb: 0, multiband: false },
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export type WaveformMode = 'mono' | 'stereo'
|
||||
|
||||
export const MIN_WAVEFORM_SCROLL_SPEED = 0.5
|
||||
export const MAX_WAVEFORM_SCROLL_SPEED = 8
|
||||
export const WAVEFORM_SCROLL_SPEED_STEP = 0.5
|
||||
@@ -6,6 +8,7 @@ export const MIN_WAVEFORM_GAIN_DB = -12
|
||||
export const MAX_WAVEFORM_GAIN_DB = 18
|
||||
export const WAVEFORM_GAIN_DB_STEP = 0.5
|
||||
export const DEFAULT_WAVEFORM_GAIN_DB = 0
|
||||
export const DEFAULT_WAVEFORM_MODE: WaveformMode = 'mono'
|
||||
|
||||
export function clampWaveformScrollSpeed(value: unknown): number {
|
||||
const numeric = Number(value)
|
||||
|
||||
Reference in New Issue
Block a user