"use strict"; // Short handbooks behind the book symbol: what it is for, then real cases step by step. const DOC_LAB = () => ({ title: t("Sound Lab handbook"), parts: [ { h: t("What it is for"), p: t("REW (Room EQ Wizard, free) measures your speakers in the room. Sound Lab brings its filters onto a channel of the DSP and sends the channel's EQ back to REW, so you don't type values by hand.") }, { h: t("Setting up"), steps: [ t("Install REW on the computer running this app and connect a measuring microphone."), t("In REW: Preferences → API → start the API, and tick that it starts with REW."), t("Open Sound Lab and press “Check”. The dot turns green and shows the REW version."), ], p: t("REW's API only answers on its own computer. With the app on a Raspberry Pi, use the filter file instead.") }, { h: t("Example: correcting a top in a hall"), steps: [ t("Export a preset first (File… → Export), so you can go back."), t("Mute everything except the speaker you are measuring and set a low level. Put the microphone at ear height in the audience area."), t("Measure in REW, open its EQ window, choose the equaliser “Generic” and let it calculate filters with “Match response to target”."), t("In Sound Lab pick the channel of this speaker, e.g. Out 1, choose the measurement and press “Take filters”."), t("Check the orange curve and the table. Outputs have 9 bands and inputs 8; anything above that is left out and shown in the note."), t("Press “Apply” and measure again. The new measurement should now look like the prediction."), ], p: t("Tip: prefer cutting peaks to filling dips. A dip caused by the room can't be filled by more power, and big boosts only use up headroom.") }, { h: t("Example: checking the channel against a measurement"), steps: [ t("Pick the channel and press “Send curve as a new measurement”."), t("In REW it appears in the measurement list. Show it in “All SPL” together with your real measurement."), t("So you see at a glance whether crossover and EQ on the DSP do what the measurement needs."), ] }, { h: t("Example: trying changes in REW first"), steps: [ t("Choose a measurement and press “Send filters to the chosen measurement”. This replaces the filters of that measurement in REW."), t("In REW's EQ window change the filters and watch the predicted result. Nothing changes on the DSP."), t("If you like it, press “Take filters” in Sound Lab, check and apply."), ] }, { h: t("Without a connection (app on a Raspberry Pi)"), steps: [ t("In REW's EQ window: File → Export → Filter settings as text."), t("In Sound Lab press “Load REW filter file…”, check and apply."), ] }, ], }); const DOC_SF = () => ({ title: t("SoundField handbook"), parts: [ { h: t("What it is for"), p: t("SoundField is a top view of the room for planning before you set up: where speakers go, how evenly the room is covered, and which delays they need. It calculates a free field without reflections, so it is a planning aid, not a measurement.") }, { h: t("Example: a band in a hall of 20 × 30 m"), steps: [ t("Under “Room” enter width 20 and depth 30, stage 8 × 4 m, the temperature and the ear height of the audience."), t("Press “Quick start” under “Suggestions” for a stereo pair and a sub, or “Stacks” for a sub left and right with the top on a pole."), t("Drag the reference cross to your mixing position. Mains and subs are aligned in time at this point."), t("Click a speaker: set its type, height and coverage, drag it into place and aim it with the white handle."), t("Look at the “Level” map and the spread below the plan. Aim for as many listeners as possible within ±3 dB."), t("Follow “Suggestions”: they offer aiming, raising the mains, or delay speakers when the back of the room falls off."), ] }, { h: t("Example: the back of the hall is too quiet"), steps: [ t("Press “Add delay line” in the suggestion, or add “+ Delay” and drag it to about two thirds of the room."), t("Drag its dashed target point to the middle of the area it should cover."), t("Switch the map to “Timing”: marked areas mean the delay arrives before the mains or more than 30 ms late."), t("The offset under “Delays” keeps the mains arriving first, so the sound still seems to come from the stage. 5 ms is a good start."), ] }, { h: t("Example: subs, and why two can be worse than one"), steps: [ t("Switch the map to “Sub” and choose a frequency such as 80 Hz."), t("With subs left and right you see lanes of cancellation through the room."), t("Try the “Centre cluster” suggestion and compare: the lanes disappear."), ] }, { h: t("Taking the delays to the DSP"), steps: [ t("Export a preset first (File… → Export)."), t("Select a speaker and tick which DSP outputs feed it."), t("In the “Delays” table press “Apply” for one speaker, or “Apply all”. The column “Now on DSP” shows what is set."), t("Check the result by ear or with a measurement: temperature, reflections and real speakers differ from the model."), ] }, ], }); function docDialog(doc) { const d = doc(); return modal({ title: d.title, body: h("div", { class: "docbody" }, d.parts.map(part => h("section", {}, h("h4", {}, part.h), part.steps ? h("ol", {}, part.steps.map(s => h("li", {}, s))) : null, part.p ? h("p", {}, part.p) : null))), actions: [{ label: t("Close"), primary: true, value: () => true }] }); } const docButton = doc => h("button", { class: "icon docbtn", "data-view-ok": "", title: t("Handbook"), "aria-label": t("Handbook"), onclick: () => docDialog(doc) }, svgIcon(''));