diff --git a/src/App.tsx b/src/App.tsx index cb12ba9..db5503b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -28,7 +28,10 @@ import { Mic, MicOff, SkipForward, HelpCircle, Volume2, X, Guitar, Settings, Max import './App.css'; import './styles/skip-button.css'; -const NOTE_MATCH_THRESHOLD_MS = 300; // How long to convert hold note to confirm +import { NOTE_MATCH_THRESHOLD_MS } from './AppConfig'; + + + function App() { const [listening, setListening] = useState(false); diff --git a/src/AppConfig.ts b/src/AppConfig.ts new file mode 100644 index 0000000..8f144dd --- /dev/null +++ b/src/AppConfig.ts @@ -0,0 +1,6 @@ +/** + * Global application configuration + */ + +// How long (in ms) a note must be held to be accepted as correct +export const NOTE_MATCH_THRESHOLD_MS = 50;