元編程參考文件

歌曲

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 陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
歌曲
所屬包
音樂