import type { StringParams } from './model'; const steel: StringParams = { n: 50, spacing: 0.0127, // 0.65 m wall to wall mass: 5.08e-5, // 4 g/m, like a guitar G string k: 3.15e6, // EA / L for steel, 0.5 mm diameter tension: 70, leftEnd: 'clamped', rightEnd: 'clamped', pins: '', t60Low: 4, fLow: 100, t60High: 0.6, fHigh: 4000, excitation: 'pluck', excBead: 10, excWidth: 1, pluckAmp: 0.002, strikeVel: 2, hammerForce: 20, hammerMs: 1, excAngle: 0, pickupMode: 'bead', pickupBead: 4, pickupAxis: 'y', duration: 2, fs: 48000, cfl: 0.5, frameRate: 2000, }; export interface Preset { name: string; description: string; params: StringParams; } export const PRESETS: Preset[] = [ { name: 'Steel string, plucked', description: 'Guitar-like: 50 beads, 0.65 m, 70 N, ~102 Hz. Stiff springs, so longitudinal modes sit near 2.4 kHz.', params: steel, }, { name: 'Steel string, fretted at the middle', description: 'Same string with bead 25 pinned: an octave up, each half rings on its own.', params: { ...steel, pins: '25', excBead: 6, pickupBead: 3 }, }, { name: 'Steel string, hammered', description: '1 ms raised-cosine force near one end, like a piano hammer (no hammer felt or contact).', params: { ...steel, excitation: 'hammer', excBead: 6, excWidth: 1, hammerForce: 30, hammerMs: 1.5 }, }, { name: 'Rubber band, big pluck', description: 'Soft springs, 100% pre-stretch: transverse and longitudinal speeds are close, so a large pluck glides in pitch and couples the two.', params: { ...steel, n: 30, spacing: 0.01, mass: 1e-4, k: 8000, tension: 40, pluckAmp: 0.03, excBead: 8, t60Low: 1.5, t60High: 0.3, }, }, { name: 'Three beads', description: 'A very coarse string: three modes only, at inharmonic ratios 1 : 1.85 : 2.41.', params: { ...steel, n: 3, spacing: 0.1625, mass: 0.00065, k: 2.5e5, excBead: 1, pickupBead: 1, frameRate: 4000, }, }, { name: 'Whirling string', description: 'Plucked at 30 degrees out of plane with sliding ends: watch the y and z views and the pitch of each.', params: { ...steel, n: 40, spacing: 0.016, leftEnd: 'clamped', rightEnd: 'sliding', excAngle: 30, pluckAmp: 0.008, mass: 6.4e-5 }, }, ];