SOUN Record – Sound

SOUN record type.

Classes:

SOUN(flags, id[, revision, version, ...])

Sound.

class SOUN(flags, id, revision=0, version=15, unknown=b'\x00\x00', data=[])[source]

Bases: Record

Sound.

Parameters
  • flags (int)

  • id (bytes)

  • revision (int) – Default 0.

  • version (int) – Default 15.

  • unknown (bytes) – Default b'\x00\x00'.

  • data (List[RecordType]) – Default [].

Classes:

FNAM([cstring])

Sound Filename.

GNAM(*args, **kwargs)

Reverb Attenuation Control.

HNAM(*args, **kwargs)

Priority.

RNAM(*args, **kwargs)

Random Chance % (New Vegas only).

SNDD([min_attenuation_distance, ...])

Sound Data.

Attributes:

data

Subrecords of this record.

flags

Record flags

id

4-byte form ID

revision

Used for revision control by the Creation Kit, if enabled.

unknown

version

Form version

Methods:

parse_subrecords(raw_bytes)

Parse this record's subrecords.

class FNAM(cstring: Union[str, bytes] = b'')[source]

Bases: CStringRecord

Sound Filename.

class GNAM(*args, **kwargs)[source]

Bases: Int16Record

Reverb Attenuation Control.

class HNAM(*args, **kwargs)[source]

Bases: Int32Record

Priority.

class RNAM(*args, **kwargs)[source]

Bases: Uint8Record

Random Chance % (New Vegas only).

class SNDD(min_attenuation_distance=0, max_attenuation_distance=0, frequency_adjustment_percentage=0, unused=b'\x00', flags=256, static_attenuation=0, stop_time=0, start_time=0, attenuation_points=(0, 0, 0, 0, 0), reverb_attenuation_control=0, priority=0, x=b'\x00\x00\x00\x00\x00\x00\x00\x00', y=b'')[source]

Bases: RecordType

Sound Data.

Parameters
  • min_attenuation_distance (int) – Minimum Attenuation Distance. Multiplied by 5. Default 0.

  • max_attenuation_distance (int) – Maximum Attenuation Distance. Multiplied by 100. Default 0.

  • frequency_adjustment_percentage (int) – Default 0.

  • unused (bytes) – Default b'\x00'.

  • flags (int) – Default 256.

  • static_attenuation (int) – Static Attenuation cdB . Default 0.

  • stop_time (int) – Default 0.

  • start_time (int) – Default 0.

  • attenuation_points (Tuple[int, int, int, int, int]) – Points on the attenuation curve. Default (0, 0, 0, 0, 0).

  • reverb_attenuation_control (int) – Default 0.

  • priority (int) – Default 0.

  • x (bytes) – New Vegas only (bytes representation of int32). Unused on Fallout 3 . Default b'\x00\x00\x00\x00\x00\x00\x00\x00'.

  • y (bytes) – New Vegas only (bytes representation of int32). Not present on Fallout 3 (so should be empty) . Default b''.

Attributes:

attenuation_points

Points on the attenuation curve.

flags

frequency_adjustment_percentage

max_attenuation_distance

Maximum Attenuation Distance.

min_attenuation_distance

Minimum Attenuation Distance.

priority

reverb_attenuation_control

start_time

static_attenuation

Static Attenuation cdB

stop_time

unused

x

New Vegas only (bytes representation of int32).

y

New Vegas only (bytes representation of int32).

Methods:

parse(raw_bytes)

Parse this subrecord.

unparse()

Turn this subrecord back into raw bytes for an ESP file.

attenuation_points

Type:    Tuple[int, int, int, int, int]

Points on the attenuation curve.

flags

Type:    int

frequency_adjustment_percentage

Type:    int

max_attenuation_distance

Type:    int

Maximum Attenuation Distance. Multiplied by 100.

min_attenuation_distance

Type:    int

Minimum Attenuation Distance. Multiplied by 5.

classmethod parse(raw_bytes)[source]

Parse this subrecord.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record

Return type

Self

priority

Type:    int

reverb_attenuation_control

Type:    int

start_time

Type:    int

static_attenuation

Type:    int

Static Attenuation cdB

stop_time

Type:    int

unparse()[source]

Turn this subrecord back into raw bytes for an ESP file.

Return type

bytes

unused

Type:    bytes

x

Type:    bytes

New Vegas only (bytes representation of int32). Unused on Fallout 3

y

Type:    bytes

New Vegas only (bytes representation of int32). Not present on Fallout 3 (so should be empty)

data

Type:    List[RecordType]

flags

Type:    int

id

Type:    bytes

classmethod parse_subrecords(raw_bytes)[source]

Parse this record’s subrecords.

Parameters

raw_bytes (BytesIO) – Raw bytes for this record’s subrecords

Return type

Iterator[RecordType]

revision

Type:    int

unknown

Type:    bytes

version

Type:    int