元编程参考文档

音色库

8 个节点

本页内容 8

Default SoundFont

函数

The General MIDI SoundFont that ships with Divooka: GeneralUser GS, 287 presets covering every General MIDI instrument and drum kit.

签名
DefaultSoundFont() -> Sound Font Bank
SoundFontBank DefaultSoundFont()

返回

SoundFontSound Font Bank

备注

Set SYNTHSIZER_SOUNDFONT_FILE to use another font everywhere one is not given.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
音色库
所属包
音乐

描述音色库

函数

A font's name, preset count, size and the text it stores about itself: author, copyright, comments.

签名
描述音色库(音色库: Sound Font Bank) -> 文本
string DescribeSoundFont(SoundFontBank soundFont)

参数

名称类型默认值说明
音色库Sound Font Bank—The font; the default one when not connected.

返回

描述文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
音色库
所属包
音乐

查找预设

函数

The first preset whose name contains the given text, ignoring case - "piano", "strings", "kit".

签名
查找预设 -> Sound Font Preset
    音色库: Sound Font Bank
    名称: 文本
SoundFontPreset FindPreset(
    SoundFontBank soundFont,
    string name = "piano")

参数

名称类型默认值说明
音色库Sound Font Bank—The font; the default one when not connected.
名称文本pianoPart of the preset's name.

返回

预设Sound Font Preset
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
音色库
所属包
音乐

加载音色库

函数

Opens a SoundFont 2 file.

签名
加载音色库(路径: 文本) -> Sound Font Bank
SoundFontBank LoadSoundFont(string path)

参数

名称类型默认值说明
路径文本—An .sf2 file.

返回

音色库Sound Font Bank

备注

A file is read once and shared while it is unchanged, so loading the same font on every run costs nothing after the first.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
音色库
所属包
音乐

从字节加载音色库

函数

Reads a SoundFont that is already in memory - an asset, a download, an attachment.

签名
从字节加载音色库(字节: 字节数组, 名称: 文本) -> Sound Font Bank
SoundFontBank LoadSoundFontBytes(byte[] bytes, string name = "")

参数

名称类型默认值说明
字节字节数组—The whole .sf2 file.
名称文本—What to call it; the name stored in the file when empty.

返回

音色库Sound Font Bank
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
音色库
所属包
音乐

预设列表

函数

Every preset in a font, by bank and program.

签名
预设列表(音色库: Sound Font Bank) -> Sound Font Preset 数组
SoundFontPreset[] Presets(SoundFontBank soundFont)

参数

名称类型默认值说明
音色库Sound Font Bank—The font; the default one when not connected.

返回

预设Sound Font Preset 数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
音色库
所属包
音乐

保存音色库

函数

Saves a font as an .sf2 file, creating the folder if it is not there.

签名
保存音色库(音色库: Sound Font Bank, 路径: 文本) -> 文本
string SaveSoundFont(SoundFontBank soundFont, string path)

参数

名称类型默认值说明
音色库Sound Font Bank—The font to save.
路径文本—Where to write it.

返回

路径文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
音色库
所属包
音乐

精简音色库

函数

A smaller font holding only the chosen presets and the instruments and samples they use - for shipping the three sounds a piece plays instead of the whole bank.

签名
精简音色库 -> Sound Font Bank
    音色库: Sound Font Bank
    预设: 文本数组
SoundFontBank TrimSoundFont(
    SoundFontBank soundFont,
    string[] presets)

参数

名称类型默认值说明
音色库Sound Font Bank—The font to trim; the default one when not connected.
预设文本数组—The presets to keep, written bank:program, such as 0:0 for the piano and 128:0 for the standard drum kit.

返回

音色库Sound Font Bank

备注

Stereo partners of kept samples are kept with them. Every kept preset sounds exactly as it did in the original.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
音色库
所属包
音乐