public BeamingHelper(global::alphatab.model.Track track) { unchecked { global::alphatab.rendering.utils.BeamingHelper.__hx_ctor_alphatab_rendering_utils_BeamingHelper(this, track); } }
public virtual void render(global::alphatab.model.Track track) { unchecked { this.track = track; this.invalidate(); } }
public virtual void addTrack(global::alphatab.model.Track track) { unchecked { track.score = this; track.index = this.tracks.length; this.tracks.push(track); } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 1565120129: { this.voices = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@value))))); return(@value); } case 371166859: { this.track = ((global::alphatab.model.Track)(@value)); return(@value); } case 1103260490: { this.clef = ((global::alphatab.model.Clef)(@value)); return(@value); } case 855239132: { this.previousBar = ((global::alphatab.model.Bar)(@value)); return(@value); } case 624508576: { this.nextBar = ((global::alphatab.model.Bar)(@value)); return(@value); } case 1041537810: { this.index = ((int)(global::haxe.lang.Runtime.toInt(@value))); return(@value); } default: { return(base.__hx_setField(field, hash, @value, handleProperties)); } } } }
public static void __hx_ctor_alphatab_model_Track(global::alphatab.model.Track __temp_me86) { unchecked { __temp_me86.tuning = new global::haxe.root.Array <int>(); __temp_me86.bars = new global::haxe.root.Array <object>(); __temp_me86.chords = new global::haxe.ds.StringMap <object>(); __temp_me86.playbackInfo = new global::alphatab.model.PlaybackInformation(); __temp_me86.color = new global::alphatab.platform.model.Color(((int)(200)), ((int)(0)), ((int)(0)), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>)))); } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 448361819: { this._beatLineXPositions = ((global::haxe.ds.IntMap <object>)(global::haxe.ds.IntMap <object> .__hx_cast <object>(((global::haxe.ds.IntMap)(@value))))); return(@value); } case 302437836: { this._track = ((global::alphatab.model.Track)(@value)); return(@value); } case 1228566710: { this.maxNote = ((global::alphatab.model.Note)(@value)); return(@value); } case 974358180: { this.minNote = ((global::alphatab.model.Note)(@value)); return(@value); } case 2112234752: { this.lastMaxNote = ((global::alphatab.model.Note)(@value)); return(@value); } case 1858026222: { this.lastMinNote = ((global::alphatab.model.Note)(@value)); return(@value); } case 1921156710: { this.firstMaxNote = ((global::alphatab.model.Note)(@value)); return(@value); } case 1666948180: { this.firstMinNote = ((global::alphatab.model.Note)(@value)); return(@value); } case 173283864: { this.maxDuration = ((global::alphatab.model.Duration)(@value)); return(@value); } case 468906571: { this._lastBeat = ((global::alphatab.model.Beat)(@value)); return(@value); } case 810640957: { this.beats = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@value))))); return(@value); } case 989275570: { this.voice = ((global::alphatab.model.Voice)(@value)); return(@value); } default: { return(base.__hx_setField(field, hash, @value, handleProperties)); } } } }
public static void __hx_ctor_alphatab_rendering_utils_BeamingHelper(global::alphatab.rendering.utils.BeamingHelper __temp_me268, global::alphatab.model.Track track) { unchecked { __temp_me268.beats = new global::haxe.root.Array <object>(); __temp_me268._track = track; __temp_me268._beatLineXPositions = new global::haxe.ds.IntMap <object>(); __temp_me268.maxDuration = global::alphatab.model.Duration.Whole; } }
public virtual void parseTrack(global::haxe.root.Xml node) { unchecked { global::alphatab.model.Track track = new global::alphatab.model.Track(); string trackId = node.@get("id"); { object __temp_iterator424 = node.iterator(); while (((bool) (global::haxe.lang.Runtime.callField(__temp_iterator424, "hasNext", 407283053, default(global::haxe.root.Array))) )) { global::haxe.root.Xml c = ((global::haxe.root.Xml) (global::haxe.lang.Runtime.callField(__temp_iterator424, "next", 1224901875, default(global::haxe.root.Array))) ); if (( c.nodeType == global::haxe.root.Xml.Element )) { string _g = c._get_nodeName(); switch (_g) { case "Name": { track.name = this.getValue(c); break; } case "ShortName": { track.shortName = this.getValue(c); break; } case "Properties": { this.parseTrackProperties(track, c); break; } case "GeneralMidi": { this.parseGeneralMidi(track, c); break; } case "PlaybackState": { string state = this.getValue(c); track.playbackInfo.isSolo = string.Equals(state, "Solo"); track.playbackInfo.isMute = string.Equals(state, "Mute"); break; } } } } } this._tracksById.@set(trackId, track); } }
public override void paint(int cx, int cy, global::alphatab.platform.ICanvas canvas) { unchecked { global::alphatab.rendering.TabBarRenderer tabBarRenderer = ((global::alphatab.rendering.TabBarRenderer)(this.renderer)); global::alphatab.model.Track track = this.renderer.stave.staveGroup.layout.renderer.track; global::alphatab.rendering.RenderingResources res = this.renderer.stave.staveGroup.layout.renderer.renderingResources; double startY = ((cy + this.y) + ((10 * this.renderer.stave.staveGroup.layout.renderer.settings.scale) * 0.6)); int endY = ((cy + this.y) + tabBarRenderer.getTabY(track.tuning.length, new global::haxe.lang.Null <int>(-2, true))); double fontScale = ((double)(1)); double correction = ((double)(0)); { int _g = track.tuning.length; switch (_g) { case 4: { fontScale = 0.6; break; } case 5: { fontScale = 0.8; break; } case 6: { fontScale = 1.1; correction = ((double)(1)); break; } case 7: { fontScale = 1.15; break; } case 8: { fontScale = 1.35; break; } } } global::alphatab.platform.model.Font font = res.tabClefFont.clone(); font.setSize((font.getSize() * fontScale)); canvas.setColor(res.mainGlyphColor); canvas.setFont(font); canvas.setTextAlign(global::alphatab.platform.model.TextAlign.Center); canvas.fillText("T", ((double)(((cx + this.x) + (this.width / 2)))), startY); canvas.fillText("A", ((double)(((cx + this.x) + (this.width / 2)))), ((startY + font.getSize()) - ((int)((correction * this.renderer.stave.staveGroup.layout.renderer.settings.scale))))); canvas.fillText("B", ((double)(((cx + this.x) + (this.width / 2)))), (startY + (((font.getSize() - ((int)((correction * this.renderer.stave.staveGroup.layout.renderer.settings.scale))))) * 2))); } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 188579043: { this.settings = ((global::alphatab.Settings)(@value)); return(@value); } case 307761913: { this.renderingResources = ((global::alphatab.rendering.RenderingResources)(@value)); return(@value); } case 1488498346: { this.layout = ((global::alphatab.rendering.layout.ScoreLayout)(@value)); return(@value); } case 223048071: { this._currentLayoutMode = global::haxe.lang.Runtime.toString(@value); return(@value); } case 371166859: { this.track = ((global::alphatab.model.Track)(@value)); return(@value); } case 2027516754: { this.score = ((global::alphatab.model.Score)(@value)); return(@value); } case 943871192: { this.canvas = ((global::alphatab.platform.ICanvas)(@value)); return(@value); } case 1842287352: { this._renderFinishedListeners = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@value))))); return(@value); } default: { return(base.__hx_setField(field, hash, @value, handleProperties)); } } } }
public virtual void createDefaultScore() { unchecked { this._score = new global::alphatab.model.Score(); this._score.tempo = 120; this._score.tempoLabel = ""; this._track = new global::alphatab.model.Track(); this._track.playbackInfo.program = 25; this._track.playbackInfo.primaryChannel = global::alphatab.importer.AlphaTexImporter.TrackChannels[0]; this._track.playbackInfo.secondaryChannel = global::alphatab.importer.AlphaTexImporter.TrackChannels[1]; this._track.tuning = ((global::alphatab.model.Tuning) (global::alphatab.model.Tuning.getPresetsFor(6)[0]) ).tuning; this._score.addTrack(this._track); } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 1565120129: { this.voices = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) ); return @value; } case 371166859: { this.track = ((global::alphatab.model.Track) (@value) ); return @value; } case 1103260490: { this.clef = ((global::alphatab.model.Clef) (@value) ); return @value; } case 855239132: { this.previousBar = ((global::alphatab.model.Bar) (@value) ); return @value; } case 624508576: { this.nextBar = ((global::alphatab.model.Bar) (@value) ); return @value; } case 1041537810: { this.index = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } default: { return base.__hx_setField(field, hash, @value, handleProperties); } } } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 448361819: { this._beatLineXPositions = ((global::haxe.ds.IntMap<object>) (global::haxe.ds.IntMap<object>.__hx_cast<object>(((global::haxe.ds.IntMap) (@value) ))) ); return @value; } case 302437836: { this._track = ((global::alphatab.model.Track) (@value) ); return @value; } case 1228566710: { this.maxNote = ((global::alphatab.model.Note) (@value) ); return @value; } case 974358180: { this.minNote = ((global::alphatab.model.Note) (@value) ); return @value; } case 2112234752: { this.lastMaxNote = ((global::alphatab.model.Note) (@value) ); return @value; } case 1858026222: { this.lastMinNote = ((global::alphatab.model.Note) (@value) ); return @value; } case 1921156710: { this.firstMaxNote = ((global::alphatab.model.Note) (@value) ); return @value; } case 1666948180: { this.firstMinNote = ((global::alphatab.model.Note) (@value) ); return @value; } case 173283864: { this.maxDuration = ((global::alphatab.model.Duration) (@value) ); return @value; } case 468906571: { this._lastBeat = ((global::alphatab.model.Beat) (@value) ); return @value; } case 810640957: { this.beats = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) ); return @value; } case 989275570: { this.voice = ((global::alphatab.model.Voice) (@value) ); return @value; } default: { return base.__hx_setField(field, hash, @value, handleProperties); } } } }
public virtual void finish(global::alphatab.model.Score score) { unchecked { global::haxe.root.Array <object> _g10 = new global::haxe.root.Array <object>(new object[] { this }); { int _g = 0; global::haxe.root.Array <object> _g1 = score.tracks; while ((_g < _g1.length)) { global::alphatab.model.Track t = ((global::alphatab.model.Track)(_g1[_g])); ++_g; if (!(t.isPercussion)) { int _g2 = 0; global::haxe.root.Array <object> _g3 = t.bars; while ((_g2 < _g3.length)) { global::alphatab.model.Bar bar = ((global::alphatab.model.Bar)(_g3[_g2])); ++_g2; { int _g4 = 0; global::haxe.root.Array <object> _g5 = bar.voices; while ((_g4 < _g5.length)) { global::alphatab.model.Voice v = ((global::alphatab.model.Voice)(_g5[_g4])); ++_g4; { int _g6 = 0; global::haxe.root.Array <object> _g7 = v.beats; while ((_g6 < _g7.length)) { global::alphatab.model.Beat beat = ((global::alphatab.model.Beat)(_g7[_g6])); ++_g6; if (((beat.voice.bar.index == 0) && (beat.index == 0))) { beat.start = 0; beat.previousBeat = default(global::alphatab.model.Beat); } else { if ((beat.index == 0)) { beat.previousBeat = ((global::alphatab.model.Beat)(((global::alphatab.model.Voice)(bar.previousBar.voices[v.index])).beats[(((global::alphatab.model.Voice)(bar.previousBar.voices[v.index])).beats.length - 1)])); } else { beat.previousBeat = ((global::alphatab.model.Beat)(v.beats[(beat.index - 1)])); } beat.previousBeat.nextBeat = beat; beat.start = (beat.previousBeat.start + beat.previousBeat.calculateDuration()); } { int _g8 = 0; global::haxe.root.Array <object> _g9 = beat.notes; while ((_g8 < _g9.length)) { global::haxe.root.Array <object> n = new global::haxe.root.Array <object>(new object[] { ((global::alphatab.model.Note)(_g9[_g8])) }); ++_g8; global::alphatab.util.LazyVar <object> nextNoteOnLine = new global::alphatab.util.LazyVar <object>(((global::haxe.lang.Function)(new global::alphatab.importer.ScoreImporter_finish_100__Fun(((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(_g10))))), ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(n))))))))); global::alphatab.util.LazyVar <object> prevNoteOnLine = new global::alphatab.util.LazyVar <object>(((global::haxe.lang.Function)(new global::alphatab.importer.ScoreImporter_finish_101__Fun(((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(_g10))))), ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(n))))))))); if (((global::alphatab.model.Note)(n[0])).isTieDestination) { if ((((global::alphatab.model.Note)(prevNoteOnLine.getValue())) == default(global::alphatab.model.Note))) { ((global::alphatab.model.Note)(n[0])).isTieDestination = false; } else { ((global::alphatab.model.Note)(n[0])).tieOrigin = ((global::alphatab.model.Note)(prevNoteOnLine.getValue())); ((global::alphatab.model.Note)(n[0])).tieOrigin.isTieOrigin = true; ((global::alphatab.model.Note)(n[0])).fret = ((global::alphatab.model.Note)(n[0])).tieOrigin.fret; } } if (((global::alphatab.model.Note)(n[0])).isHammerPullOrigin) { if ((((global::alphatab.model.Note)(nextNoteOnLine.getValue())) == default(global::alphatab.model.Note))) { ((global::alphatab.model.Note)(n[0])).isHammerPullOrigin = false; } else { ((global::alphatab.model.Note)(nextNoteOnLine.getValue())).isHammerPullDestination = true; ((global::alphatab.model.Note)(nextNoteOnLine.getValue())).hammerPullOrigin = ((global::alphatab.model.Note)(n[0])); } } if ((((global::alphatab.model.Note)(n[0])).slideType != global::alphatab.model.SlideType.None)) { ((global::alphatab.model.Note)(n[0])).slideTarget = ((global::alphatab.model.Note)(nextNoteOnLine.getValue())); } } } } } } } } } } } } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 188579043: { this.settings = ((global::alphatab.Settings) (@value) ); return @value; } case 307761913: { this.renderingResources = ((global::alphatab.rendering.RenderingResources) (@value) ); return @value; } case 1488498346: { this.layout = ((global::alphatab.rendering.layout.ScoreLayout) (@value) ); return @value; } case 223048071: { this._currentLayoutMode = global::haxe.lang.Runtime.toString(@value); return @value; } case 371166859: { this.track = ((global::alphatab.model.Track) (@value) ); return @value; } case 2027516754: { this.score = ((global::alphatab.model.Score) (@value) ); return @value; } case 943871192: { this.canvas = ((global::alphatab.platform.ICanvas) (@value) ); return @value; } case 1842287352: { this._renderFinishedListeners = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) ); return @value; } default: { return base.__hx_setField(field, hash, @value, handleProperties); } } } }
public override object __hx_setField(string field, int hash, object @value, bool handleProperties) { unchecked { switch (hash) { case 1405029166: { this._currentDuration = ((global::alphatab.model.Duration) (@value) ); return @value; } case 1686416180: { this._allowNegatives = ((bool) (@value) ); return @value; } case 1111114639: { this._syData = ((object) (@value) ); return @value; } case 4750021: { this._sy = ((global::alphatab.importer.AlphaTexSymbols) (@value) ); return @value; } case 1424663982: { this._curChPos = ((int) (global::haxe.lang.Runtime.toInt(@value)) ); return @value; } case 4746436: { this._ch = global::haxe.lang.Runtime.toString(@value); return @value; } case 302437836: { this._track = ((global::alphatab.model.Track) (@value) ); return @value; } case 1958787731: { this._score = ((global::alphatab.model.Score) (@value) ); return @value; } default: { return base.__hx_setField(field, hash, @value, handleProperties); } } } }
public virtual void readTrack() { unchecked { global::alphatab.model.Track newTrack = new global::alphatab.model.Track(); this._score.addTrack(newTrack); int flags = this._data.readByte(); newTrack.name = this.readStringByteLength(40); newTrack.isPercussion = ( (( flags & 1 )) != 0 ); int stringCount = this.readInt32(); { int _g = 0; while (( _g < 7 )) { int i = _g++; int tuning = this.readInt32(); if (( stringCount > i )) { newTrack.tuning.push(tuning); } } } int port = this.readInt32(); int index = ( this.readInt32() - 1 ); int effectChannel = ( this.readInt32() - 1 ); this._data.read(4); if (( ( index >= 0 ) && ( index < this._playbackInfos.length ) )) { global::alphatab.model.PlaybackInformation info = ((global::alphatab.model.PlaybackInformation) (this._playbackInfos[index]) ); info.port = port; info.isSolo = ( (( flags & 16 )) != 0 ); info.isMute = ( (( flags & 32 )) != 0 ); info.secondaryChannel = effectChannel; newTrack.playbackInfo = info; } newTrack.capo = this.readInt32(); newTrack.color = this.readColor(); if (( this._versionNumber >= 500 )) { this._data.readByte(); this._data.readByte(); this._data.read(43); } if (( this._versionNumber >= 510 )) { this._data.read(4); this.readStringIntByte(); this.readStringIntByte(); } } }
public override void doLayout() { unchecked { base.doLayout(); int minY = 0; int maxY = 0; int sizeY = ((int)((60 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))); if ((this._beat.whammyBarPoints.length >= 2)) { double dy = (((double)(sizeY)) / 24); { int _g1 = 0; int _g = this._beat.whammyBarPoints.length; while ((_g1 < _g)) { int i = _g1++; global::alphatab.model.BendPoint pt = ((global::alphatab.model.BendPoint)(this._beat.whammyBarPoints[i])); int ptY = ((int)((0 - (dy * pt.@value)))); if ((ptY > maxY)) { maxY = ptY; } if ((ptY < minY)) { minY = ptY; } } } } global::alphatab.rendering.TabBarRenderer tabBarRenderer = ((global::alphatab.rendering.TabBarRenderer)(this.renderer)); global::alphatab.model.Track track = this.renderer.stave.staveGroup.layout.renderer.track; int tabTop = tabBarRenderer.getTabY(0, new global::haxe.lang.Null <int>(-2, true)); int tabBottom = tabBarRenderer.getTabY(track.tuning.length, new global::haxe.lang.Null <int>(-2, true)); int absMinY = ((this.y + minY) + tabTop); int absMaxY = ((this.y + maxY) - tabBottom); if ((absMinY < 0)) { int __temp_stmt601 = default(int); { double x = global::System.Math.Abs(((double)(absMinY))); __temp_stmt601 = ((int)(x)); } tabBarRenderer.registerOverflowTop(__temp_stmt601); } if ((absMaxY > 0)) { int __temp_stmt602 = default(int); { double x1 = global::System.Math.Abs(((double)(absMaxY))); __temp_stmt602 = ((int)(x1)); } tabBarRenderer.registerOverflowBottom(__temp_stmt602); } int height = tabBarRenderer.height; } }