Sound Operators

bpy.ops.sound.bake_animation()

Update the audio animation cache

bpy.ops.sound.mixdown(filepath='', check_existing=True, filter_blender=False, filter_backup=False, filter_image=False, filter_movie=False, filter_python=False, filter_font=False, filter_sound=True, filter_text=False, filter_archive=False, filter_btx=False, filter_collada=False, filter_alembic=False, filter_usd=False, filter_volume=False, filter_folder=True, filter_blenlib=False, filemode=9, relative_path=True, display_type='DEFAULT', sort_method='FILE_SORT_ALPHA', accuracy=1024, container='FLAC', codec='FLAC', format='S16', bitrate=192, split_channels=False)

Mix the scene’s audio to a sound file

Parameters
  • filepath (string, (optional, never None)) – File Path, Path to file

  • check_existing (boolean, (optional)) – Check Existing, Check and warn on overwriting existing files

  • filter_blender (boolean, (optional)) – Filter .blend files

  • filter_backup (boolean, (optional)) – Filter .blend files

  • filter_image (boolean, (optional)) – Filter image files

  • filter_movie (boolean, (optional)) – Filter movie files

  • filter_python (boolean, (optional)) – Filter python files

  • filter_font (boolean, (optional)) – Filter font files

  • filter_sound (boolean, (optional)) – Filter sound files

  • filter_text (boolean, (optional)) – Filter text files

  • filter_archive (boolean, (optional)) – Filter archive files

  • filter_btx (boolean, (optional)) – Filter btx files

  • filter_collada (boolean, (optional)) – Filter COLLADA files

  • filter_alembic (boolean, (optional)) – Filter Alembic files

  • filter_usd (boolean, (optional)) – Filter USD files

  • filter_volume (boolean, (optional)) – Filter OpenVDB volume files

  • filter_folder (boolean, (optional)) – Filter folders

  • filter_blenlib (boolean, (optional)) – Filter Blender IDs

  • filemode (int in [1, 9], (optional)) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file

  • relative_path (boolean, (optional)) – Relative Path, Select the file relative to the blend file

  • display_type (enum in ['DEFAULT', 'LIST_VERTICAL', 'LIST_HORIZONTAL', 'THUMBNAIL'], (optional)) –

    Display Type

    • DEFAULT Default, Automatically determine display type for files.

    • LIST_VERTICAL Short List, Display files as short list.

    • LIST_HORIZONTAL Long List, Display files as a detailed list.

    • THUMBNAIL Thumbnails, Display files as thumbnails.

  • sort_method (enum in ['FILE_SORT_ALPHA', 'FILE_SORT_EXTENSION', 'FILE_SORT_TIME', 'FILE_SORT_SIZE'], (optional)) –

    File sorting mode

    • FILE_SORT_ALPHA Name, Sort the file list alphabetically.

    • FILE_SORT_EXTENSION Extension, Sort the file list by extension/type.

    • FILE_SORT_TIME Modified Date, Sort files by modification time.

    • FILE_SORT_SIZE Size, Sort files by size.

  • accuracy (int in [1, inf], (optional)) – Accuracy, Sample accuracy, important for animation data (the lower the value, the more accurate)

  • container (enum in ['AC3', 'FLAC', 'MATROSKA', 'MP2', 'MP3', 'OGG', 'WAV'], (optional)) –

    Container, File format

    • AC3 ac3, Dolby Digital ATRAC 3.

    • FLAC flac, Free Lossless Audio Codec.

    • MATROSKA mkv, Matroska.

    • MP2 mp2, MPEG-1 Audio Layer II.

    • MP3 mp3, MPEG-2 Audio Layer III.

    • OGG ogg, Xiph.Org Ogg Container.

    • WAV wav, Waveform Audio File Format.

  • codec (enum in ['AAC', 'AC3', 'FLAC', 'MP2', 'MP3', 'PCM', 'VORBIS'], (optional)) –

    Codec, Audio Codec

    • AAC AAC, Advanced Audio Coding.

    • AC3 AC3, Dolby Digital ATRAC 3.

    • FLAC FLAC, Free Lossless Audio Codec.

    • MP2 MP2, MPEG-1 Audio Layer II.

    • MP3 MP3, MPEG-2 Audio Layer III.

    • PCM PCM, Pulse Code Modulation (RAW).

    • VORBIS Vorbis, Xiph.Org Vorbis Codec.

  • format (enum in ['U8', 'S16', 'S24', 'S32', 'F32', 'F64'], (optional)) –

    Format, Sample format

    • U8 U8, 8 bit unsigned.

    • S16 S16, 16 bit signed.

    • S24 S24, 24 bit signed.

    • S32 S32, 32 bit signed.

    • F32 F32, 32 bit floating point.

    • F64 F64, 64 bit floating point.

  • bitrate (int in [32, 512], (optional)) – Bitrate, Bitrate in kbit/s

  • split_channels (boolean, (optional)) – Split channels, Each channel will be rendered into a mono file

bpy.ops.sound.open(filepath='', hide_props_region=True, filter_blender=False, filter_backup=False, filter_image=False, filter_movie=True, filter_python=False, filter_font=False, filter_sound=True, filter_text=False, filter_archive=False, filter_btx=False, filter_collada=False, filter_alembic=False, filter_usd=False, filter_volume=False, filter_folder=True, filter_blenlib=False, filemode=9, relative_path=True, show_multiview=False, use_multiview=False, display_type='DEFAULT', sort_method='FILE_SORT_ALPHA', cache=False, mono=False)

Load a sound file

Parameters
  • filepath (string, (optional, never None)) – File Path, Path to file

  • hide_props_region (boolean, (optional)) – Hide Operator Properties, Collapse the region displaying the operator settings

  • filter_blender (boolean, (optional)) – Filter .blend files

  • filter_backup (boolean, (optional)) – Filter .blend files

  • filter_image (boolean, (optional)) – Filter image files

  • filter_movie (boolean, (optional)) – Filter movie files

  • filter_python (boolean, (optional)) – Filter python files

  • filter_font (boolean, (optional)) – Filter font files

  • filter_sound (boolean, (optional)) – Filter sound files

  • filter_text (boolean, (optional)) – Filter text files

  • filter_archive (boolean, (optional)) – Filter archive files

  • filter_btx (boolean, (optional)) – Filter btx files

  • filter_collada (boolean, (optional)) – Filter COLLADA files

  • filter_alembic (boolean, (optional)) – Filter Alembic files

  • filter_usd (boolean, (optional)) – Filter USD files

  • filter_volume (boolean, (optional)) – Filter OpenVDB volume files

  • filter_folder (boolean, (optional)) – Filter folders

  • filter_blenlib (boolean, (optional)) – Filter Blender IDs

  • filemode (int in [1, 9], (optional)) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file

  • relative_path (boolean, (optional)) – Relative Path, Select the file relative to the blend file

  • show_multiview (boolean, (optional)) – Enable Multi-View

  • use_multiview (boolean, (optional)) – Use Multi-View

  • display_type (enum in ['DEFAULT', 'LIST_VERTICAL', 'LIST_HORIZONTAL', 'THUMBNAIL'], (optional)) –

    Display Type

    • DEFAULT Default, Automatically determine display type for files.

    • LIST_VERTICAL Short List, Display files as short list.

    • LIST_HORIZONTAL Long List, Display files as a detailed list.

    • THUMBNAIL Thumbnails, Display files as thumbnails.

  • sort_method (enum in ['FILE_SORT_ALPHA', 'FILE_SORT_EXTENSION', 'FILE_SORT_TIME', 'FILE_SORT_SIZE'], (optional)) –

    File sorting mode

    • FILE_SORT_ALPHA Name, Sort the file list alphabetically.

    • FILE_SORT_EXTENSION Extension, Sort the file list by extension/type.

    • FILE_SORT_TIME Modified Date, Sort files by modification time.

    • FILE_SORT_SIZE Size, Sort files by size.

  • cache (boolean, (optional)) – Cache, Cache the sound in memory

  • mono (boolean, (optional)) – Mono, Merge all the sound’s channels into one

bpy.ops.sound.open_mono(filepath='', hide_props_region=True, filter_blender=False, filter_backup=False, filter_image=False, filter_movie=True, filter_python=False, filter_font=False, filter_sound=True, filter_text=False, filter_archive=False, filter_btx=False, filter_collada=False, filter_alembic=False, filter_usd=False, filter_volume=False, filter_folder=True, filter_blenlib=False, filemode=9, relative_path=True, show_multiview=False, use_multiview=False, display_type='DEFAULT', sort_method='FILE_SORT_ALPHA', cache=False, mono=True)

Load a sound file as mono

Parameters
  • filepath (string, (optional, never None)) – File Path, Path to file

  • hide_props_region (boolean, (optional)) – Hide Operator Properties, Collapse the region displaying the operator settings

  • filter_blender (boolean, (optional)) – Filter .blend files

  • filter_backup (boolean, (optional)) – Filter .blend files

  • filter_image (boolean, (optional)) – Filter image files

  • filter_movie (boolean, (optional)) – Filter movie files

  • filter_python (boolean, (optional)) – Filter python files

  • filter_font (boolean, (optional)) – Filter font files

  • filter_sound (boolean, (optional)) – Filter sound files

  • filter_text (boolean, (optional)) – Filter text files

  • filter_archive (boolean, (optional)) – Filter archive files

  • filter_btx (boolean, (optional)) – Filter btx files

  • filter_collada (boolean, (optional)) – Filter COLLADA files

  • filter_alembic (boolean, (optional)) – Filter Alembic files

  • filter_usd (boolean, (optional)) – Filter USD files

  • filter_volume (boolean, (optional)) – Filter OpenVDB volume files

  • filter_folder (boolean, (optional)) – Filter folders

  • filter_blenlib (boolean, (optional)) – Filter Blender IDs

  • filemode (int in [1, 9], (optional)) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file

  • relative_path (boolean, (optional)) – Relative Path, Select the file relative to the blend file

  • show_multiview (boolean, (optional)) – Enable Multi-View

  • use_multiview (boolean, (optional)) – Use Multi-View

  • display_type (enum in ['DEFAULT', 'LIST_VERTICAL', 'LIST_HORIZONTAL', 'THUMBNAIL'], (optional)) –

    Display Type

    • DEFAULT Default, Automatically determine display type for files.

    • LIST_VERTICAL Short List, Display files as short list.

    • LIST_HORIZONTAL Long List, Display files as a detailed list.

    • THUMBNAIL Thumbnails, Display files as thumbnails.

  • sort_method (enum in ['FILE_SORT_ALPHA', 'FILE_SORT_EXTENSION', 'FILE_SORT_TIME', 'FILE_SORT_SIZE'], (optional)) –

    File sorting mode

    • FILE_SORT_ALPHA Name, Sort the file list alphabetically.

    • FILE_SORT_EXTENSION Extension, Sort the file list by extension/type.

    • FILE_SORT_TIME Modified Date, Sort files by modification time.

    • FILE_SORT_SIZE Size, Sort files by size.

  • cache (boolean, (optional)) – Cache, Cache the sound in memory

  • mono (boolean, (optional)) – Mono, Mixdown the sound to mono

bpy.ops.sound.pack()

Pack the sound into the current blend file

bpy.ops.sound.unpack(method='USE_LOCAL', id='')

Unpack the sound to the samples filename

Parameters
  • method (enum in ['REMOVE', 'USE_LOCAL', 'WRITE_LOCAL', 'USE_ORIGINAL', 'WRITE_ORIGINAL'], (optional)) – Method, How to unpack

  • id (string, (optional, never None)) – Sound Name, Sound data-block name to unpack

bpy.ops.sound.update_animation_flags()

Update animation flags