recursal/MDN huggingface dataset:
BiquadFilterNode: Q property
============================

The `Q` property of the `BiquadFilterNode` interface is an a-rate `AudioParam`, a double representing a Q factor, or *quality factor*.

It is a dimensionless value with a default value of `1` and a nominal range of `0.0001` to `1000`.

Value
-----

An `AudioParam`.

**Note:** Though the `AudioParam` returned is read-only, the value it represents is not.

Examples
--------

 The following example shows basic usage of an AudioContext to create a Biquad filter node.
 For more complete applied examples/information, check out our Voice-change-O-matic demo (see app.js lines 108–193 for relevant code).


```js
const audioCtx = new AudioContext();

//set up the different audio nodes we will use for the app
const analyser = audioCtx.createAnalyser();
const distortion = audioCtx.createWaveShaper();
const gainNode = audioCtx.createGain();
const biquadFilter = audioCtx.createBiquadFilter();
const convolver = audioCtx.createConvolver();

// connect the nodes together

source = audioCtx.createMediaStreamSource(stream);
source.connect(analyser);
analyser.connect(distortion);
distortion.connect(biquadFilter);
biquadFilter.connect(convolver);
convolver.connect(gainNode);
gainNode.connect(audioCtx.destination);

// Manipulate the Biquad filter

biquadFilter.type = "lowshelf";
biquadFilter.frequency.value = 1000;
biquadFilter.gain.value = 25;

biquadFilter.type = "peaking";
biquadFilter.frequency.value = 1000;
biquadFilter.Q.value = 100;
biquadFilter.gain.value = 25;
```

Specifications
--------------

| Specification |
| --- |
| Web Audio API # dom-biquadfilternode-q |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Using the Web Audio API
BiquadFilterNode: frequency property
====================================

The `frequency` property of the `BiquadFilterNode` interface is an a-rate `AudioParam` — a double representing a frequency in the current filtering algorithm measured in hertz (Hz).

Its default value is `350`, with a nominal range of `10` to the Nyquist frequency — that is, half of the sample rate.

Value
-----

An `AudioParam`.

**Note:** Though the `AudioParam` returned is read-only, the value it represents is not.

Examples
--------

 The following example shows basic usage of an AudioContext to create a Biquad filter node.
 For a complete working example, check out our voice-change-o-matic demo (look at the source code too).


```js
const audioCtx = new AudioContext();

//set up the different audio nodes we will use for the app
const analyser = audioCtx.createAnalyser();
const distortion = audioCtx.createWaveShaper();
const gainNode = audioCtx.createGain();
const biquadFilter = audioCtx.createBiquadFilter();
const convolver = audioCtx.createConvolver();

// connect the nodes together

source = audioCtx.createMediaStreamSource(stream);
source.connect(analyser);
analyser.connect(distortion);
distortion.connect(biquadFilter);
biquadFilter.connect(convolver);
convolver.connect(gainNode);
gainNode.connect(audioCtx.destination);

// Manipulate the Biquad filter

biquadFilter.type = "lowshelf";
biquadFilter.frequency.value = 1000;
biquadFilter.gain.value = 25;
```

Specifications
--------------

| Specification |
| --- |
| Web Audio API # dom-biquadfilternode-frequency |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Using the Web Audio API
BiquadFilterNode: detune property
=================================

The `detune` property of the `BiquadFilterNode` interface is an a-rate `AudioParam` representing detuning of the frequency in cents.

Value
-----

An a-rate `AudioParam`.

**Note:** Though the `AudioParam` returned is read-only, the value it represents is not.

Examples
--------

 The following example shows basic usage of an AudioContext to create a Biquad filter node.
 For more complete applied examples/information, check out our Voice-change-O-matic demo (see app.js lines 108–193 for relevant code).


```js
const audioCtx = new AudioContext();

//set up the different audio nodes we will use for the app
const analyser = audioCtx.createAnalyser();
const distortion = audioCtx.createWaveShaper();
const gainNode = audioCtx.createGain();
const biquadFilter = audioCtx.createBiquadFilter();
const convolver = audioCtx.createConvolver();

// connect the nodes together

source = audioCtx.createMediaStreamSource(stream);
source.connect(analyser);
analyser.connect(distortion);
distortion.connect(biquadFilter);
biquadFilter.connect(convolver);
convolver.connect(gainNode);
gainNode.connect(audioCtx.destination);

// Manipulate the Biquad filter

biquadFilter.type = "lowshelf";
biquadFilter.frequency.value = 1000;
biquadFilter.gain.value = 25;
biquadFilter.detune.value = 100;
```

Specifications
--------------

| Specification |
| --- |
| Web Audio API # dom-biquadfilternode-detune |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Using the Web Audio API
URL: pathname property
======================

The **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.

URLs such as `https` and `http` URLs that have hierarchical schemes (which the URL standard calls "special schemes") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such "special scheme" URLs can never be the empty string, but will instead always have a least one `/` character.

For example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.

Some systems define the term *slug* to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.

Some systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.

**Note:** This feature is available in Web Workers

Value
-----

A string.

Examples
--------


```js
const url = new URL(
  "https://developer.mozilla.org/en-US/docs/Web/API/URL/pathname?q=value",
);
console.log(url.pathname); // Logs "/en-US/docs/Web/API/URL/pathname"
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-pathname |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface it belongs to.
URL: toJSON() method
====================

 The **`toJSON()`** method of the `URL` interface
 returns a string containing a serialized version of the URL,
 although in practice it seems to have the same effect as
 `URL.toString()`.

**Note:** This feature is available in Web Workers

Syntax
------


```js
toJSON()
```

### Parameters

None.

### Return value

A string.

Examples
--------


```js
const url = new URL(
  "https://developer.mozilla.org/en-US/docs/Web/API/URL/toString",
);
url.toJSON(); // should return the URL as a string
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-tojson |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Polyfill of `URL.prototype.toJSON` in `core-js`
URL: port property
==================

 The **`port`** property of the `URL` interface is
 a string containing the port number of the URL.

**Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.

**Note:** This feature is available in Web Workers

Value
-----

A string.

Examples
--------


```js
// https protocol with non-default port number
new URL("https://example.com:5443/svn/Repos/").port; // '5443'
// http protocol with non-default port number
new URL("http://example.com:8080/svn/Repos/").port; // '8080'
// https protocol with default port number
new URL("https://example.com:443/svn/Repos/").port; // '' (empty string)
// http protocol with default port number
new URL("http://example.com:80/svn/Repos/").port; // '' (empty string)
// https protocol with no explicit port number
new URL("https://example.com/svn/Repos/").port; // '' (empty string)
// http protocol with no explicit port number
new URL("https://example.com/svn/Repos/").port; // '' (empty string)
// ftp protocol with non-default port number
new URL("ftp://example.com:221/svn/Repos/").port; // '221'
// ftp protocol with default port number
new URL("ftp://example.com:21/svn/Repos/").port; // '' (empty string)
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-port |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface it belongs to.
URL: createObjectURL() static method
====================================

 The **`URL.createObjectURL()`** static
 method creates a string containing a URL representing the object
 given in the parameter.

 The URL lifetime is tied to the `document`
 in the window on which it was created. The new object URL represents the specified
 `File` object or `Blob` object.

To release an object URL, call `revokeObjectURL()`.

**Note:** This feature is available in Web Workers, except for Service Workers


**Note:** This feature is *not* available in Service Workers due to its
 potential to create memory leaks.


Syntax
------


```js
URL.createObjectURL(object)
```

### Parameters

`object`

 A `File`, `Blob`, or `MediaSource` object to
 create an object URL for.


### Return value

 A string containing an object URL that can be used to reference the
 contents of the specified source `object`.

Examples
--------

See Using object URLs to display images.

Usage notes
-----------

### Memory management

 Each time you call `createObjectURL()`, a new object URL is created, even if
 you've already created one for the same object. Each of these must be released by
 calling `URL.revokeObjectURL()` when you no longer need them.

 Browsers will release object URLs automatically when the document is unloaded; however,
 for optimal performance and memory usage, if there are safe times when you can
 explicitly unload them, you should do so.

### Using object URLs for media streams

 In older versions of the Media Source specification, attaching a stream to a
 `<video>` element required creating an object URL for the
 `MediaStream`. This is no longer necessary, and browsers are removing
 support for doing this.


**Warning:** If you still have code that relies on
 `createObjectURL()` to attach streams to media
 elements, you need to update your code to set `srcObject` to the `MediaStream` directly.


Specifications
--------------

| Specification |
| --- |
| File API # dfn-createObjectURL |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Using files from web applications
* Using object URLs to display images
* `URL.revokeObjectURL()`
* `HTMLMediaElement.srcObject`
* `FileReader.readAsDataURL()`
URL: toString() method
======================

 The **`toString()`** method of the `URL` interface returns a
 string containing the whole URL. It is effectively a read-only version
 of `URL.href`.

**Note:** This feature is available in Web Workers

Syntax
------


```js
toString()
```

### Parameters

None.

### Return value

A string.

Examples
--------


```js
const url = new URL(
  "https://developer.mozilla.org/en-US/docs/Web/API/URL/toString",
);
url.toString(); // should return the URL as a string
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # URL-stringification-behavior |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface it belongs to.
URL: host property
==================

 The **`host`** property of the `URL` interface is
 a string containing the host, that is the `hostname`, and then, if the port of the URL is nonempty, a
 `':'`, followed by the `port` of the URL.

**Note:** This feature is available in Web Workers

Value
-----

A string.

Examples
--------


```js
let url = new URL("https://developer.mozilla.org/en-US/docs/Web/API/URL/host");
console.log(url.host); // "developer.mozilla.org"

url = new URL("https://developer.mozilla.org:443/en-US/docs/Web/API/URL/host");
console.log(url.host); // "developer.mozilla.org"
// The port number is not included because 443 is the scheme's default port

url = new URL("https://developer.mozilla.org:4097/en-US/docs/Web/API/URL/host");
console.log(url.host); // "developer.mozilla.org:4097"
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-host |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface it belongs to.
URL: URL() constructor
======================

 The **`URL()`** constructor returns a newly created
 `URL` object representing the URL defined by the parameters.

 If the given base URL or the resulting URL are not valid URLs, the JavaScript
 `TypeError` exception is thrown.

**Note:** This feature is available in Web Workers

Syntax
------


```js
new URL(url)
new URL(url, base)
```

### Parameters

`url`

 A string or any other object with a stringifier — including, for example, an `<a>` or `<area>` element — that represents an absolute or relative URL.
 If `url` is a relative URL, `base` is
 required, and will be used as the base URL. If `url` is an
 absolute URL, a given `base` will be ignored.


`base` Optional

 A string representing the base URL to use in cases where
 `url` is a relative URL. If not specified, it defaults to
 `undefined`.




**Note:** The `url` and `base` arguments will
 each be stringified from whatever value you pass, just like with other Web APIs
 that accept a string. In particular, you can use an existing
 `URL` object for either argument, and it will stringify to the
 object's `href` property.


### Exceptions

| Exception | Explanation |
| --- | --- |
| `TypeError` | `url` (in the case of absolute URLs) or `base` + `url` (in the case of relative URLs) is not a valid URL. |

Examples
--------


```js
// Base URLs:
let baseUrl = "https://developer.mozilla.org";

let A = new URL("/", baseUrl);
// => 'https://developer.mozilla.org/'

let B = new URL(baseUrl);
// => 'https://developer.mozilla.org/'

new URL("en-US/docs", B);
// => 'https://developer.mozilla.org/en-US/docs'

let D = new URL("/en-US/docs", B);
// => 'https://developer.mozilla.org/en-US/docs'

new URL("/en-US/docs", D);
// => 'https://developer.mozilla.org/en-US/docs'

new URL("/en-US/docs", A);
// => 'https://developer.mozilla.org/en-US/docs'

new URL("/en-US/docs", "https://developer.mozilla.org/fr-FR/toto");
// => 'https://developer.mozilla.org/en-US/docs'

// Invalid URLs:

new URL("/en-US/docs", "");
// Raises a TypeError exception as '' is not a valid URL

new URL("/en-US/docs");
// Raises a TypeError exception as '/en-US/docs' is not a valid URL

// Other cases:

new URL("http://www.example.com");
// => 'http://www.example.com/'

new URL("http://www.example.com", B);
// => 'http://www.example.com/'

new URL("", "https://example.com/?query=1");
// => 'https://example.com/?query=1' (Edge before 79 removes query arguments)

new URL("/a", "https://example.com/?query=1");
// => 'https://example.com/a' (see relative URLs)

new URL("//foo.com", "https://example.com");
// => 'https://foo.com/' (see relative URLs)
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-url |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Polyfill of `URL` in `core-js`
* The interface it belongs to: `URL`.
URL: href property
==================

 The **`href`** property of the `URL` interface is
 a string containing the whole URL.

**Note:** This feature is available in Web Workers

Value
-----

A string.

Examples
--------


```js
const url = new URL(
  "https://developer.mozilla.org/en-US/docs/Web/API/URL/href",
);
console.log(url.href); // Logs: 'https://developer.mozilla.org/en-US/docs/Web/API/URL/href'
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-href |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface it belongs to.
URL: origin property
====================

 The **`origin`** read-only property of
 the `URL` interface returns a string containing the
 Unicode serialization of the origin of the represented URL.

 The exact structure
 varies depending on the type of URL:

* For `http` or `https` URLs, the scheme followed by
 `'://'`, followed by the domain, followed by `':'`, followed by
 the port (if explicitly specified, unless it is the default port - `80` and `443` respectively).
* For `file:` URLs, the value is browser dependent.
* for `blob:` URLs, the origin of the URL following `blob:` will
 be used. For example, `"blob:https://mozilla.org"` will be returned as
 `"https://mozilla.org".`

**Note:** This feature is available in Web Workers

Value
-----

A string.

Examples
--------


```js
const url = new URL("blob:https://mozilla.org:443/");
console.log(url.origin); // Logs 'https://mozilla.org'

const url = new URL("http://localhost:80/");
console.log(url.origin); // Logs 'http://localhost'

const url = new URL("https://mozilla.org:8080/");
console.log(url.origin); // Logs 'https://mozilla.org:8080'
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-origin |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface
URL: protocol property
======================

 The **`protocol`** property of the `URL` interface
 is a string representing the protocol scheme of the URL, including the
 final `':'`.

**Note:** This feature is available in Web Workers

Value
-----

A string.

Examples
--------


```js
const url = new URL(
  "https://developer.mozilla.org/en-US/docs/Web/API/URL/protocol",
);
console.log(url.protocol); // Logs "https:"
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-protocol |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface it belongs to.
URL: username property
======================

 The **`username`** property of the `URL` interface
 is a string containing the username specified before the domain name.

**Note:** This feature is available in Web Workers

Value
-----

A string.

Examples
--------


```js
const url = new URL(
  "https://anonymous:flabada@developer.mozilla.org/en-US/docs/Web/API/URL/username",
);
console.log(url.username); // Logs "anonymous"
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-username |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface it belongs to.
URL: hostname property
======================

 The **`hostname`** property of the `URL` interface
 is a string containing the domain name of the URL.

**Note:** This feature is available in Web Workers

Value
-----

A string.

Examples
--------


```js
const url = new URL(
  "https://developer.mozilla.org/en-US/docs/Web/API/URL/hostname",
);
console.log(url.hostname); // Logs: 'developer.mozilla.org'
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-hostname |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface it belongs to.
URL: hash property
==================

 The **`hash`** property of the
 `URL` interface is a string containing a
 `'#'` followed by the fragment identifier of the URL.

 The fragment is not URL decoded. If the URL does not
 have a fragment identifier, this property contains an empty string — `""`.

**Note:** This feature is available in Web Workers

Value
-----

A string.

Examples
--------


```js
const url = new URL(
  "https://developer.mozilla.org/en-US/docs/Web/API/URL/href#Examples",
);
console.log(url.hash); // Logs: '#Examples'
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-hash |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface it belongs to.
URL: revokeObjectURL() static method
====================================

 The **`URL.revokeObjectURL()`** static
 method releases an existing object URL which was previously created by calling
 `URL.createObjectURL()`.

 Call this method when you've finished
 using an object URL to let the browser know not to keep the reference to the file any
 longer.

**Note:** This feature is available in Web Workers, except for Service Workers


**Note:** This method is *not* available in Service Workers, due to
 issues with the `Blob` interface's life cycle and the potential for leaks.


Syntax
------


```js
URL.revokeObjectURL(objectURL)
```

### Parameters

`objectURL`

 A string representing an object URL that was previously created by
 calling `createObjectURL()`.


### Return value

None (`undefined`).

Examples
--------

See Using object URLs to display images.

Specifications
--------------

| Specification |
| --- |
| File API # dfn-revokeObjectURL |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* Using files from web applications
* Using object URLs to display images
* `URL.createObjectURL()`
URL: password property
======================

 The **`password`** property of the `URL` interface
 is a string containing the password specified before the domain name.

 If it is set without first setting the `username`
 property, it silently fails.

**Note:** This feature is available in Web Workers

Value
-----

A string.

Examples
--------


```js
const url = new URL(
  "https://anonymous:flabada@developer.mozilla.org/en-US/docs/Web/API/URL/password",
);
console.log(url.password); // Logs "flabada"
```

Specifications
--------------

| Specification |
| --- |
| URL Standard # dom-url-password |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* The `URL` interface it belongs to.