* @2019-08-18T07:27:40.479Z <> Alph Range Selectors (JZGL0WGI) Alph Simple Selectors: RANGE Selectors http://alph.io/selectors/range Draft J85 Alph RANGE selectors are for referencing a contiguous portion of media with a numeric point-to-point range. This may represent a word, sentence, or paragraph in a plain text, or a clip from an audiovisual recording, &c.. Form: #origin-extent To be clear, the length of the resulting media fragment will be equal to the origin point subtracted from the extent. For example: http://host/path/file#5-10 Applied to the following text: This is a test string. Refers to the five characters between index 5 and index 10: 0 5 10 | |---------| .T.h.i.s. .i.s. .a. .t.e.s.t. SELECTORS intRange Two integers separated by a dash. Example: http://host/path/file#12-34 Test: /\d+-\d+/ Units: text/* — The intRange represents the string between two zero-based indices into the Unicode CODEPOINTS of a text. image/* — The intRange represents the PAGES between two zero-based indices into a multi-page image, or the LAYERS of a single-page multi-layer image. audio/* — The intRange represents the audio between two zero-based indices into the SAMPLES of a PCM audio stream. video/* — The intRange represents the video between two zero-based indices into the FRAMES of a video stream. floatRange Two floating-point numbers separated by a dash. Note that a mix of integer and float is not allowed, here. That is, "0-12.34" will not match the testing regexp and is invalid; instead, use "0.0-12.34". Example: http://host/path/file#12.34-56.78 Test: /\d+\.\d+-\d+\.\d+/ Units: text/* — n/a image/* — n/a audio/* — The floatRange represents the audio between two zero-based indices into the SECONDS of the audio stream. video/* — The floatRange represents the video between two zero-based indices into the SECONDS of the video streams. normalRange A pair of floating-point values between 0.0 and 1.0, indicating the range between two proportional indices into a media buffer. For example, a normalRange of #^0.25-0.75 applied to a 12-minute audio stream would select the six minutes of audio starting at 4m00s and ending at 8m00s. Example: http://host/path/file#^0.12-0.34 Test: /\^[0,1]\.\d+-[0,1]\.\d+/ Units: text/* — Converts to an intRange: take the floor of the text's length in CODEPOINTS multiplied by the origin/extent value to get a pair of zero-based indices into the text's codepoints. image/* — Converts to an intRange: take the floor of the image's length in PAGES or LAYERS multiplied by the origin/extent value to get a pair of zero-based indices into the image's PAGES or LAYERS. audio/* — Converts to a floatRange by multiplying the origin/extent by the audio resource's duration in SECONDS. video/* — Converts to a floatRange by multiplying the origin/extent by the video resource's duration in SECONDS.