public static void __hx_ctor_alphatab_importer_MixTableChange(global::alphatab.importer.MixTableChange __temp_me64) { unchecked { __temp_me64.volume = -1; __temp_me64.balance = -1; __temp_me64.instrument = -1; __temp_me64.tempoName = default(string); __temp_me64.tempo = -1; __temp_me64.duration = 0; } }
public virtual void readMixTableChange(global::alphatab.model.Beat beat) { unchecked { global::alphatab.importer.MixTableChange tableChange = new global::alphatab.importer.MixTableChange(); tableChange.instrument = this._data.readInt8(); if (( this._versionNumber >= 500 )) { this._data.read(16); } tableChange.volume = this._data.readInt8(); tableChange.balance = this._data.readInt8(); int chorus = this._data.readInt8(); int reverb = this._data.readInt8(); int phaser = this._data.readInt8(); int tremolo = this._data.readInt8(); if (( this._versionNumber >= 500 )) { tableChange.tempoName = this.readStringIntByte(); } tableChange.tempo = this.readInt32(); if (( tableChange.volume >= 0 )) { this._data.readByte(); } if (( tableChange.balance >= 0 )) { this._data.readByte(); } if (( chorus >= 0 )) { this._data.readByte(); } if (( reverb >= 0 )) { this._data.readByte(); } if (( phaser >= 0 )) { this._data.readByte(); } if (( tremolo >= 0 )) { this._data.readByte(); } if (( tableChange.tempo >= 0 )) { tableChange.duration = this._data.readInt8(); if (( this._versionNumber >= 510 )) { this._data.readByte(); } } if (( this._versionNumber >= 400 )) { this._data.readByte(); } if (( this._versionNumber >= 500 )) { this._data.readByte(); } if (( this._versionNumber >= 510 )) { this.readStringIntByte(); this.readStringIntByte(); } if (( tableChange.volume >= 0 )) { global::alphatab.model.Automation volumeAutomation = new global::alphatab.model.Automation(); volumeAutomation.isLinear = true; volumeAutomation.type = global::alphatab.model.AutomationType.Volume; volumeAutomation.@value = ((double) (tableChange.volume) ); beat.automations.push(volumeAutomation); } if (( tableChange.balance >= 0 )) { global::alphatab.model.Automation balanceAutomation = new global::alphatab.model.Automation(); balanceAutomation.isLinear = true; balanceAutomation.type = global::alphatab.model.AutomationType.Balance; balanceAutomation.@value = ((double) (tableChange.balance) ); beat.automations.push(balanceAutomation); } if (( tableChange.instrument >= 0 )) { global::alphatab.model.Automation instrumentAutomation = new global::alphatab.model.Automation(); instrumentAutomation.isLinear = true; instrumentAutomation.type = global::alphatab.model.AutomationType.Instrument; instrumentAutomation.@value = ((double) (tableChange.instrument) ); beat.automations.push(instrumentAutomation); } if (( tableChange.tempo >= 0 )) { global::alphatab.model.Automation tempoAutomation = new global::alphatab.model.Automation(); tempoAutomation.isLinear = true; tempoAutomation.type = global::alphatab.model.AutomationType.Tempo; tempoAutomation.@value = ((double) (tableChange.tempo) ); beat.automations.push(tempoAutomation); global::alphatab.model.MasterBar __temp_stmt503 = default(global::alphatab.model.MasterBar); { global::alphatab.model.Bar _this = beat.voice.bar; __temp_stmt503 = ((global::alphatab.model.MasterBar) (_this.track.score.masterBars[_this.index]) ); } __temp_stmt503.tempoAutomation = tempoAutomation; } } }