元编程参考文档

歌曲

7 个节点

本页内容 7

乐器映射

函数

An instrument map: what plays the drums and what plays every program not mapped. Map Instrument adds programs to it.

签名
乐器映射(其余乐器: Instrument, 鼓: Instrument) -> Instrument Map
InstrumentMap Map(Instrument fallback, Instrument drums)

参数

名称类型默认值说明
其余乐器Instrument—What plays any program not mapped; the default SoundFont's preset for it when not connected.
鼓Instrument—What plays the drums; the default SoundFont's kit when not connected.

返回

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

映射乐器

函数

A map with one more program given its own instrument: the song's bass on a synth, its strings on a sampler.

签名
映射乐器 -> Instrument Map
    映射: Instrument Map
    音色号: General Midi Instrument
    乐器: Instrument
InstrumentMap MapInstrument(
    InstrumentMap map,
    GeneralMidiInstrument program,
    Instrument instrument)

参数

名称类型默认值说明
映射Instrument Map—The map so far; an empty one when not connected.
音色号General Midi Instrument—The program the song names.
乐器Instrument—What plays it.

返回

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

MIDI 歌曲声部

函数

A MIDI file played part by part, at its own tempo.

签名
MIDI 歌曲声部 -> Song Part 数组
    MIDI: MidiDocument
    映射: Instrument Map
    尾音: 数字
    采样率: 整数
SongPart[] MidiSongParts(
    MidiDocument midi,
    InstrumentMap map,
    double tail = 1,
    int sampleRate = 44100)

参数

名称类型默认值说明
MIDIMidiDocument—The MIDI document.
映射Instrument Map—The instrument map.
尾音数字1Seconds after the last note.
采样率整数44100Output rate.

返回

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

MIDI 速度

函数

The tempo a MIDI file starts at, for playing music read from it with From MIDI at the speed it was written.

签名
MIDI 速度(MIDI: MidiDocument) -> 数字
double MidiTempo(MidiDocument midi)

参数

名称类型默认值说明
MIDIMidiDocument—The MIDI document.

返回

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

演奏 MIDI 歌曲

函数

A MIDI file played as it is written - its own tempo changes and program changes - with every instrument on what the map gives it.

签名
演奏 MIDI 歌曲 -> AudioBuffer
    MIDI: MidiDocument
    映射: Instrument Map
    尾音: 数字
    采样率: 整数
AudioBuffer PlayMidiSong(
    MidiDocument midi,
    InstrumentMap map,
    double tail = 1,
    int sampleRate = 44100)

参数

名称类型默认值说明
MIDIMidiDocument—The MIDI document.
映射Instrument Map—The instrument map; every program on the default SoundFont when not connected.
尾音数字1Seconds after the last note.
采样率整数44100Output rate.

返回

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

演奏歌曲

函数

A piece of music played with every instrument it names, each on what the map gives it.

签名
演奏歌曲 -> AudioBuffer
    音乐: Music
    映射: Instrument Map
    每分钟拍数: 数字
    尾音: 数字
    采样率: 整数
AudioBuffer PlaySong(
    Music music,
    InstrumentMap map,
    double beatsPerMinute = 120,
    double tail = 1,
    int sampleRate = 44100)

参数

名称类型默认值说明
音乐Music—The piece.
映射Instrument Map—The instrument map; every program on the default SoundFont when not connected.
每分钟拍数数字120Quarter notes a minute.
尾音数字1Seconds after the last note.
采样率整数44100Output rate.

返回

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

歌曲声部

函数

A piece of music played part by part: one clip for each instrument it names and one for its drums, all as long as the song, ready for Arrange Song or a Mix Track each.

签名
歌曲声部 -> Song Part 数组
    音乐: Music
    映射: Instrument Map
    每分钟拍数: 数字
    尾音: 数字
    采样率: 整数
SongPart[] SongParts(
    Music music,
    InstrumentMap map,
    double beatsPerMinute = 120,
    double tail = 1,
    int sampleRate = 44100)

参数

名称类型默认值说明
音乐Music—The piece.
映射Instrument Map—The instrument map.
每分钟拍数数字120Quarter notes a minute.
尾音数字1Seconds after the last note.
采样率整数44100Output rate.

返回

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