Example #1
0
        public virtual global::alphatab.rendering.glyphs.LazySvg getNoteSvg(global::alphatab.model.Duration duration)
        {
            unchecked
            {
                switch (global::haxe.root.Type.enumIndex(duration))
                {
                case 0:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.NoteWhole);
                }


                case 1:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.NoteHalf);
                }


                default:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.NoteQuarter);
                }
                }
            }
        }
Example #2
0
        public virtual global::alphatab.rendering.glyphs.LazySvg getSvg(global::alphatab.model.Duration duration)
        {
            unchecked
            {
                switch (global::haxe.root.Type.enumIndex(duration))
                {
                case 5:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.TremoloPickingThirtySecond);
                }


                case 4:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.TremoloPickingSixteenth);
                }


                case 3:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.TremoloPickingEighth);
                }


                default:
                {
                    return(default(global::alphatab.rendering.glyphs.LazySvg));
                }
                }
            }
        }
Example #3
0
 public static int durationToTicks(global::alphatab.model.Duration @value)
 {
     unchecked
     {
         return(global::alphatab.audio.MidiUtils.valueToTicks(global::alphatab.model.ModelUtils.getDurationValue(@value)));
     }
 }
Example #4
0
        public virtual int getBeatDurationWidth()
        {
            unchecked
            {
                global::alphatab.model.Duration _g = this.container.beat.duration;
                switch (global::haxe.root.Type.enumIndex(_g))
                {
                case 0:
                {
                    return(103);
                }


                case 1:
                {
                    return(45);
                }


                case 2:
                {
                    return(29);
                }


                case 3:
                {
                    return(19);
                }


                case 4:
                {
                    return(11);
                }


                case 5:
                {
                    return(11);
                }


                case 6:
                {
                    return(11);
                }
                }

                return(default(int));
            }
        }
Example #5
0
        public static int getDurationValue(global::alphatab.model.Duration duration)
        {
            unchecked
            {
                switch (global::haxe.root.Type.enumIndex(duration))
                {
                case 0:
                {
                    return(1);
                }


                case 1:
                {
                    return(2);
                }


                case 2:
                {
                    return(4);
                }


                case 3:
                {
                    return(8);
                }


                case 4:
                {
                    return(16);
                }


                case 5:
                {
                    return(32);
                }


                case 6:
                {
                    return(64);
                }
                }

                return(default(int));
            }
        }
Example #6
0
        public static int getDurationIndex(global::alphatab.model.Duration duration)
        {
            unchecked
            {
                int index  = 0;
                int @value = global::alphatab.model.ModelUtils.getDurationValue(duration);
                while (((@value = (@value >> 1)) > 0))
                {
                    index++;
                }

                return(index);
            }
        }
Example #7
0
        public virtual global::alphatab.rendering.glyphs.LazySvg getRestSvg(global::alphatab.model.Duration duration)
        {
            unchecked
            {
                switch (global::haxe.root.Type.enumIndex(duration))
                {
                case 0:
                case 1:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.RestWhole);
                }


                case 2:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.RestQuarter);
                }


                case 3:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.RestEighth);
                }


                case 4:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.RestSixteenth);
                }


                case 5:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.RestThirtySecond);
                }


                case 6:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.RestSixtyFourth);
                }
                }

                return(default(global::alphatab.rendering.glyphs.LazySvg));
            }
        }
Example #8
0
        public virtual global::alphatab.rendering.glyphs.LazySvg getRestSvg(global::alphatab.model.Duration duration, global::alphatab.rendering.utils.BeamDirection direction, bool isGrace)
        {
            unchecked
            {
                if (isGrace)
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.FooterUpEighth);
                }

                switch (global::haxe.root.Type.enumIndex(duration))
                {
                case 3:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.FooterUpEighth);
                }


                case 4:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.FooterUpSixteenth);
                }


                case 5:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.FooterUpThirtySecond);
                }


                case 6:
                {
                    return(global::alphatab.rendering.glyphs.MusicFont.FooterUpSixtyFourth);
                }


                default:
                {
                    return(default(global::alphatab.rendering.glyphs.LazySvg));
                }
                }
            }
        }
Example #9
0
        public static bool canJoinDuration(global::alphatab.model.Duration d)
        {
            unchecked
            {
                switch (global::haxe.root.Type.enumIndex(d))
                {
                case 0:
                case 1:
                case 2:
                {
                    return(false);
                }


                default:
                {
                    return(true);
                }
                }
            }
        }
Example #10
0
        public virtual bool checkBeat(global::alphatab.model.Beat beat)
        {
            unchecked
            {
                if ((this.voice == default(global::alphatab.model.Voice)))
                {
                    this.voice = beat.voice;
                }

                bool @add = false;
                if ((this.beats.length == 0))
                {
                    @add = true;
                }
                else
                {
                    if (global::alphatab.rendering.utils.BeamingHelper.canJoin(this._lastBeat, beat))
                    {
                        @add = true;
                    }
                }

                if (@add)
                {
                    this._lastBeat = beat;
                    this.beats.push(beat);
                    this.checkNote(beat.minNote());
                    this.checkNote(beat.maxNote());
                    if ((global::alphatab.model.ModelUtils.getDurationValue(this.maxDuration) < global::alphatab.model.ModelUtils.getDurationValue(beat.duration)))
                    {
                        this.maxDuration = beat.duration;
                    }
                }

                return(@add);
            }
        }
Example #11
0
        public virtual double getSvgScale(global::alphatab.model.Duration duration, global::alphatab.rendering.utils.BeamDirection direction, bool isGrace)
        {
            unchecked
            {
                double scale = default(double);
                if (isGrace)
                {
                    scale = 0.7;
                }
                else
                {
                    scale = ((double)(1));
                }

                if ((direction == global::alphatab.rendering.utils.BeamDirection.Up))
                {
                    return(scale);
                }
                else
                {
                    return(-1 * scale);
                }
            }
        }
Example #12
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 792673520:
                {
                    this.octave = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 1751303026:
                {
                    this.dynamicValue = ((global::alphatab.model.DynamicValue)(@value));
                    return(@value);
                }


                case 1091821942:
                {
                    this.beat = ((global::alphatab.model.Beat)(@value));
                    return(@value);
                }


                case 2132043430:
                {
                    this.swapAccidentals = ((bool)(@value));
                    return(@value);
                }


                case 949687761:
                {
                    this.durationPercent = ((double)(global::haxe.lang.Runtime.toDouble(@value)));
                    return(@value);
                }


                case 1428159260:
                {
                    this.trillSpeed = ((global::alphatab.model.Duration)(@value));
                    return(@value);
                }


                case 91153158:
                {
                    this.trillValue = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 1618969487:
                {
                    this.isFingering = ((bool)(@value));
                    return(@value);
                }


                case 1806698356:
                {
                    this.rightHandFinger = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 1286276959:
                {
                    this.leftHandFinger = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 55629992:
                {
                    this.isTieDestination = ((bool)(@value));
                    return(@value);
                }


                case 1361216012:
                {
                    this.isTieOrigin = ((bool)(@value));
                    return(@value);
                }


                case 1923205974:
                {
                    this.tieOrigin = ((global::alphatab.model.Note)(@value));
                    return(@value);
                }


                case 253080294:
                {
                    this.isStaccato = ((bool)(@value));
                    return(@value);
                }


                case 1598475321:
                {
                    this.vibrato = ((global::alphatab.model.VibratoType)(@value));
                    return(@value);
                }


                case 59156322:
                {
                    this.slideTarget = ((global::alphatab.model.Note)(@value));
                    return(@value);
                }


                case 1293078667:
                {
                    this.slideType = ((global::alphatab.model.SlideType)(@value));
                    return(@value);
                }


                case 1607275438:
                {
                    this.isDead = ((bool)(@value));
                    return(@value);
                }


                case 1725549749:
                {
                    this.isPalmMute = ((bool)(@value));
                    return(@value);
                }


                case 1914101345:
                {
                    this.isLetRing = ((bool)(@value));
                    return(@value);
                }


                case 1528640775:
                {
                    this.harmonicType = ((global::alphatab.model.HarmonicType)(@value));
                    return(@value);
                }


                case 1969111172:
                {
                    this.harmonicValue = ((double)(global::haxe.lang.Runtime.toDouble(@value)));
                    return(@value);
                }


                case 1833015931:
                {
                    this.isHammerPullOrigin = ((bool)(@value));
                    return(@value);
                }


                case 152554969:
                {
                    this.isHammerPullDestination = ((bool)(@value));
                    return(@value);
                }


                case 1958899313:
                {
                    this.hammerPullOrigin = ((global::alphatab.model.Note)(@value));
                    return(@value);
                }


                case 288368849:
                {
                    this.@string = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 803091205:
                {
                    this.isGhost = ((bool)(@value));
                    return(@value);
                }


                case 1136827579:
                {
                    this.fret = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 1402094524:
                {
                    this.bendPoints = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@value)))));
                    return(@value);
                }


                case 860647805:
                {
                    this.accentuated = ((global::alphatab.model.AccentuationType)(@value));
                    return(@value);
                }


                default:
                {
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
        }
Example #13
0
        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));
                }
                }
            }
        }
Example #14
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 792673520:
					{
						this.octave = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1751303026:
					{
						this.dynamicValue = ((global::alphatab.model.DynamicValue) (@value) );
						return @value;
					}
					
					
					case 1091821942:
					{
						this.beat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					case 2132043430:
					{
						this.swapAccidentals = ((bool) (@value) );
						return @value;
					}
					
					
					case 949687761:
					{
						this.durationPercent = ((double) (global::haxe.lang.Runtime.toDouble(@value)) );
						return @value;
					}
					
					
					case 1428159260:
					{
						this.trillSpeed = ((global::alphatab.model.Duration) (@value) );
						return @value;
					}
					
					
					case 91153158:
					{
						this.trillValue = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1618969487:
					{
						this.isFingering = ((bool) (@value) );
						return @value;
					}
					
					
					case 1806698356:
					{
						this.rightHandFinger = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1286276959:
					{
						this.leftHandFinger = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 55629992:
					{
						this.isTieDestination = ((bool) (@value) );
						return @value;
					}
					
					
					case 1361216012:
					{
						this.isTieOrigin = ((bool) (@value) );
						return @value;
					}
					
					
					case 1923205974:
					{
						this.tieOrigin = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					case 253080294:
					{
						this.isStaccato = ((bool) (@value) );
						return @value;
					}
					
					
					case 1598475321:
					{
						this.vibrato = ((global::alphatab.model.VibratoType) (@value) );
						return @value;
					}
					
					
					case 59156322:
					{
						this.slideTarget = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					case 1293078667:
					{
						this.slideType = ((global::alphatab.model.SlideType) (@value) );
						return @value;
					}
					
					
					case 1607275438:
					{
						this.isDead = ((bool) (@value) );
						return @value;
					}
					
					
					case 1725549749:
					{
						this.isPalmMute = ((bool) (@value) );
						return @value;
					}
					
					
					case 1914101345:
					{
						this.isLetRing = ((bool) (@value) );
						return @value;
					}
					
					
					case 1528640775:
					{
						this.harmonicType = ((global::alphatab.model.HarmonicType) (@value) );
						return @value;
					}
					
					
					case 1969111172:
					{
						this.harmonicValue = ((double) (global::haxe.lang.Runtime.toDouble(@value)) );
						return @value;
					}
					
					
					case 1833015931:
					{
						this.isHammerPullOrigin = ((bool) (@value) );
						return @value;
					}
					
					
					case 152554969:
					{
						this.isHammerPullDestination = ((bool) (@value) );
						return @value;
					}
					
					
					case 1958899313:
					{
						this.hammerPullOrigin = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					case 288368849:
					{
						this.@string = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 803091205:
					{
						this.isGhost = ((bool) (@value) );
						return @value;
					}
					
					
					case 1136827579:
					{
						this.fret = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1402094524:
					{
						this.bendPoints = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 860647805:
					{
						this.accentuated = ((global::alphatab.model.AccentuationType) (@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);
					}
					
				}
				
			}
		}
Example #16
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 1751303026:
					{
						this.dynamicValue = ((global::alphatab.model.DynamicValue) (@value) );
						return @value;
					}
					
					
					case 67859554:
					{
						this.start = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 848728090:
					{
						this.crescendo = ((global::alphatab.rendering.glyphs.CrescendoType) (@value) );
						return @value;
					}
					
					
					case 706091227:
					{
						this.tremoloSpeed = new global::haxe.lang.Null<global::alphatab.model.Duration>(global::haxe.lang.Null<object>.ofDynamic<global::alphatab.model.Duration>(@value).@value, true);
						return @value;
					}
					
					
					case 1801219961:
					{
						this.pickStroke = ((global::alphatab.model.PickStrokeType) (@value) );
						return @value;
					}
					
					
					case 233406162:
					{
						this.graceType = ((global::alphatab.model.GraceType) (@value) );
						return @value;
					}
					
					
					case 1594575703:
					{
						this.chordId = global::haxe.lang.Runtime.toString(@value);
						return @value;
					}
					
					
					case 1598475321:
					{
						this.vibrato = ((global::alphatab.model.VibratoType) (@value) );
						return @value;
					}
					
					
					case 1147430701:
					{
						this.whammyBarPoints = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 438479229:
					{
						this.tupletNumerator = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1310257562:
					{
						this.tupletDenominator = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1650208238:
					{
						this.brushDuration = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1321811028:
					{
						this.brushType = ((global::alphatab.model.BrushType) (@value) );
						return @value;
					}
					
					
					case 1291439277:
					{
						this.text = global::haxe.lang.Runtime.toString(@value);
						return @value;
					}
					
					
					case 5790307:
					{
						this.tap = ((bool) (@value) );
						return @value;
					}
					
					
					case 1280692680:
					{
						this.slap = ((bool) (@value) );
						return @value;
					}
					
					
					case 650430015:
					{
						this.hasRasgueado = ((bool) (@value) );
						return @value;
					}
					
					
					case 5594513:
					{
						this.pop = ((bool) (@value) );
						return @value;
					}
					
					
					case 632389428:
					{
						this.lyrics = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 1688947841:
					{
						this.fadeIn = ((bool) (@value) );
						return @value;
					}
					
					
					case 1114502602:
					{
						this.dots = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 638277820:
					{
						this.automations = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 207609411:
					{
						this.isEmpty = ((bool) (@value) );
						return @value;
					}
					
					
					case 344854356:
					{
						this.duration = ((global::alphatab.model.Duration) (@value) );
						return @value;
					}
					
					
					case 49465911:
					{
						this._maxNote = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					case 1942741029:
					{
						this._minNote = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					case 533388353:
					{
						this.notes = ((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;
					}
					
					
					case 1041537810:
					{
						this.index = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1826654217:
					{
						this.nextBeat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					case 1739960653:
					{
						this.previousBeat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}
Example #17
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 1751303026:
                {
                    this.dynamicValue = ((global::alphatab.model.DynamicValue)(@value));
                    return(@value);
                }


                case 67859554:
                {
                    this.start = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 848728090:
                {
                    this.crescendo = ((global::alphatab.rendering.glyphs.CrescendoType)(@value));
                    return(@value);
                }


                case 706091227:
                {
                    this.tremoloSpeed = new global::haxe.lang.Null <global::alphatab.model.Duration>(global::haxe.lang.Null <object> .ofDynamic <global::alphatab.model.Duration>(@value).@value, true);
                    return(@value);
                }


                case 1801219961:
                {
                    this.pickStroke = ((global::alphatab.model.PickStrokeType)(@value));
                    return(@value);
                }


                case 233406162:
                {
                    this.graceType = ((global::alphatab.model.GraceType)(@value));
                    return(@value);
                }


                case 1594575703:
                {
                    this.chordId = global::haxe.lang.Runtime.toString(@value);
                    return(@value);
                }


                case 1598475321:
                {
                    this.vibrato = ((global::alphatab.model.VibratoType)(@value));
                    return(@value);
                }


                case 1147430701:
                {
                    this.whammyBarPoints = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@value)))));
                    return(@value);
                }


                case 438479229:
                {
                    this.tupletNumerator = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 1310257562:
                {
                    this.tupletDenominator = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 1650208238:
                {
                    this.brushDuration = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 1321811028:
                {
                    this.brushType = ((global::alphatab.model.BrushType)(@value));
                    return(@value);
                }


                case 1291439277:
                {
                    this.text = global::haxe.lang.Runtime.toString(@value);
                    return(@value);
                }


                case 5790307:
                {
                    this.tap = ((bool)(@value));
                    return(@value);
                }


                case 1280692680:
                {
                    this.slap = ((bool)(@value));
                    return(@value);
                }


                case 650430015:
                {
                    this.hasRasgueado = ((bool)(@value));
                    return(@value);
                }


                case 5594513:
                {
                    this.pop = ((bool)(@value));
                    return(@value);
                }


                case 632389428:
                {
                    this.lyrics = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@value)))));
                    return(@value);
                }


                case 1688947841:
                {
                    this.fadeIn = ((bool)(@value));
                    return(@value);
                }


                case 1114502602:
                {
                    this.dots = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 638277820:
                {
                    this.automations = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@value)))));
                    return(@value);
                }


                case 207609411:
                {
                    this.isEmpty = ((bool)(@value));
                    return(@value);
                }


                case 344854356:
                {
                    this.duration = ((global::alphatab.model.Duration)(@value));
                    return(@value);
                }


                case 49465911:
                {
                    this._maxNote = ((global::alphatab.model.Note)(@value));
                    return(@value);
                }


                case 1942741029:
                {
                    this._minNote = ((global::alphatab.model.Note)(@value));
                    return(@value);
                }


                case 533388353:
                {
                    this.notes = ((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);
                }


                case 1041537810:
                {
                    this.index = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 1826654217:
                {
                    this.nextBeat = ((global::alphatab.model.Beat)(@value));
                    return(@value);
                }


                case 1739960653:
                {
                    this.previousBeat = ((global::alphatab.model.Beat)(@value));
                    return(@value);
                }


                default:
                {
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
        }
Example #18
0
 public RestGlyph(global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, global::alphatab.model.Duration duration) : base(global::haxe.lang.EmptyObject.EMPTY)
 {
     unchecked
     {
         global::alphatab.rendering.glyphs.RestGlyph.__hx_ctor_alphatab_rendering_glyphs_RestGlyph(this, x, y, duration);
     }
 }
Example #19
0
 public static void __hx_ctor_alphatab_rendering_glyphs_NoteHeadGlyph(global::alphatab.rendering.glyphs.NoteHeadGlyph __temp_me170, global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, global::alphatab.model.Duration duration, bool isGrace)
 {
     unchecked
     {
         int __temp_y169 = ((global::haxe.lang.Runtime.eq((y).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (y.@value));
         int __temp_x168 = ((global::haxe.lang.Runtime.eq((x).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (x.@value));
         global::alphatab.rendering.glyphs.SvgGlyph.__hx_ctor_alphatab_rendering_glyphs_SvgGlyph(__temp_me170, new global::haxe.lang.Null <int>(__temp_x168, true), new global::haxe.lang.Null <int>(__temp_y169, true), __temp_me170.getNoteSvg(duration), ((isGrace) ? (0.7) : (((double)(1)))), ((isGrace) ? (0.7) : (((double)(1)))));
         __temp_me170._isGrace = isGrace;
     }
 }
Example #20
0
		public virtual   bool checkBeat(global::alphatab.model.Beat beat)
		{
			unchecked 
			{
				if (( this.voice == default(global::alphatab.model.Voice) )) 
				{
					this.voice = beat.voice;
				}
				
				bool @add = false;
				if (( this.beats.length == 0 )) 
				{
					@add = true;
				}
				 else 
				{
					if (global::alphatab.rendering.utils.BeamingHelper.canJoin(this._lastBeat, beat)) 
					{
						@add = true;
					}
					
				}
				
				if (@add) 
				{
					this._lastBeat = beat;
					this.beats.push(beat);
					this.checkNote(beat.minNote());
					this.checkNote(beat.maxNote());
					if (( global::alphatab.model.ModelUtils.getDurationValue(this.maxDuration) < global::alphatab.model.ModelUtils.getDurationValue(beat.duration) )) 
					{
						this.maxDuration = beat.duration;
					}
					
				}
				
				return @add;
			}
		}
		public override   global::alphatab.model.Score readScore()
		{
			unchecked 
			{
				try 
				{
					this.createDefaultScore();
					this._curChPos = 0;
					this._currentDuration = global::alphatab.model.Duration.Quarter;
					this.nextChar();
					this.newSy();
					this.score();
					this.finish(this._score);
					return this._score;
				}
				catch (global::System.Exception __temp_catchallException494)
				{
					object __temp_catchall495 = __temp_catchallException494;
					if (( __temp_catchall495 is global::haxe.lang.HaxeException )) 
					{
						__temp_catchall495 = ((global::haxe.lang.HaxeException) (__temp_catchallException494) ).obj;
					}
					
					{
						object e = __temp_catchall495;
						global::haxe.Log.trace.__hx_invoke2_o(default(double), default(double), e, new global::haxe.lang.DynamicObject(new global::haxe.root.Array<int>(new int[]{302979532, 1547539107, 1648581351}), new global::haxe.root.Array<object>(new object[]{"readScore", "alphatab.importer.AlphaTexImporter", "AlphaTexImporter.hx"}), new global::haxe.root.Array<int>(new int[]{1981972957}), new global::haxe.root.Array<double>(new double[]{((double) (84) )})));
						throw global::haxe.lang.HaxeException.wrap(global::alphatab.importer.ScoreImporter.UnsupportedFormat);
					}
					
				}
				
				
			}
		}
		public virtual   void beat(global::alphatab.model.Voice voice)
		{
			unchecked 
			{
				if (( this._sy == global::alphatab.importer.AlphaTexSymbols.DoubleDot )) 
				{
					this.newSy();
					if (( this._sy != global::alphatab.importer.AlphaTexSymbols.Number )) 
					{
						this.error("duration", global::alphatab.importer.AlphaTexSymbols.Number, default(global::haxe.lang.Null<bool>));
					}
					
					if (( ( ( ( ( ( global::haxe.lang.Runtime.eq(this._syData, 1) || global::haxe.lang.Runtime.eq(this._syData, 2) ) || global::haxe.lang.Runtime.eq(this._syData, 4) ) || global::haxe.lang.Runtime.eq(this._syData, 8) ) || global::haxe.lang.Runtime.eq(this._syData, 16) ) || global::haxe.lang.Runtime.eq(this._syData, 32) ) || global::haxe.lang.Runtime.eq(this._syData, 64) )) 
					{
						this._currentDuration = this.parseDuration(((int) (global::haxe.lang.Runtime.toInt(this._syData)) ));
					}
					 else 
					{
						this.error("duration", global::alphatab.importer.AlphaTexSymbols.Number, new global::haxe.lang.Null<bool>(false, true));
					}
					
					this.newSy();
					return ;
				}
				
				global::alphatab.model.Beat beat = new global::alphatab.model.Beat();
				voice.addBeat(beat);
				if (( this._sy == global::alphatab.importer.AlphaTexSymbols.LParensis )) 
				{
					this.newSy();
					this.note(beat);
					while (( ( this._sy != global::alphatab.importer.AlphaTexSymbols.RParensis ) && ( this._sy != global::alphatab.importer.AlphaTexSymbols.Eof ) ))
					{
						this.note(beat);
					}
					
					if (( this._sy != global::alphatab.importer.AlphaTexSymbols.RParensis )) 
					{
						this.error("note-list", global::alphatab.importer.AlphaTexSymbols.RParensis, default(global::haxe.lang.Null<bool>));
					}
					
					this.newSy();
				}
				 else 
				{
					if (( ( this._sy == global::alphatab.importer.AlphaTexSymbols.String ) && string.Equals(global::Std.@string(this._syData).ToLower(), "r") )) 
					{
						this.newSy();
					}
					 else 
					{
						this.note(beat);
					}
					
				}
				
				if (( this._sy == global::alphatab.importer.AlphaTexSymbols.Dot )) 
				{
					this.newSy();
					if (( this._sy != global::alphatab.importer.AlphaTexSymbols.Number )) 
					{
						this.error("duration", global::alphatab.importer.AlphaTexSymbols.Number, default(global::haxe.lang.Null<bool>));
					}
					
					if (( ( ( ( ( ( global::haxe.lang.Runtime.eq(this._syData, 1) || global::haxe.lang.Runtime.eq(this._syData, 2) ) || global::haxe.lang.Runtime.eq(this._syData, 4) ) || global::haxe.lang.Runtime.eq(this._syData, 8) ) || global::haxe.lang.Runtime.eq(this._syData, 16) ) || global::haxe.lang.Runtime.eq(this._syData, 32) ) || global::haxe.lang.Runtime.eq(this._syData, 64) )) 
					{
						beat.duration = this.parseDuration(((int) (global::haxe.lang.Runtime.toInt(this._syData)) ));
					}
					 else 
					{
						this.error("duration", global::alphatab.importer.AlphaTexSymbols.Number, new global::haxe.lang.Null<bool>(false, true));
					}
					
					this.newSy();
				}
				 else 
				{
					beat.duration = this._currentDuration;
				}
				
				int beatRepeat = 1;
				if (( this._sy == global::alphatab.importer.AlphaTexSymbols.Multiply )) 
				{
					this.newSy();
					if (( this._sy != global::alphatab.importer.AlphaTexSymbols.Number )) 
					{
						this.error("multiplier", global::alphatab.importer.AlphaTexSymbols.Number, default(global::haxe.lang.Null<bool>));
					}
					 else 
					{
						beatRepeat = ((int) (global::haxe.lang.Runtime.toInt(this._syData)) );
					}
					
					this.newSy();
				}
				
				this.beatEffects(beat);
				{
					int _g1 = 0;
					int _g = ( beatRepeat - 1 );
					while (( _g1 < _g ))
					{
						int i = _g1++;
						voice.addBeat(beat.clone());
					}
					
				}
				
			}
		}
Example #23
0
 public BeamGlyph(global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, global::alphatab.model.Duration duration, global::alphatab.rendering.utils.BeamDirection direction, bool isGrace) : base(global::haxe.lang.EmptyObject.EMPTY)
 {
     unchecked
     {
         global::alphatab.rendering.glyphs.BeamGlyph.__hx_ctor_alphatab_rendering_glyphs_BeamGlyph(this, x, y, duration, direction, isGrace);
     }
 }
Example #24
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 834174833:
					{
						this.@value = ((global::alphatab.model.Duration) (@value) );
						return @value;
					}
					
					
					case 438479229:
					{
						this.tupletNumerator = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1310257562:
					{
						this.tupletDenominator = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1114502602:
					{
						this.dots = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}
Example #25
0
 public static void __hx_ctor_alphatab_rendering_glyphs_BeamGlyph(global::alphatab.rendering.glyphs.BeamGlyph __temp_me129, global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, global::alphatab.model.Duration duration, global::alphatab.rendering.utils.BeamDirection direction, bool isGrace)
 {
     unchecked
     {
         int __temp_y128 = ((global::haxe.lang.Runtime.eq((y).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (y.@value));
         int __temp_x127 = ((global::haxe.lang.Runtime.eq((x).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (x.@value));
         global::alphatab.rendering.glyphs.SvgGlyph.__hx_ctor_alphatab_rendering_glyphs_SvgGlyph(__temp_me129, new global::haxe.lang.Null <int>(__temp_x127, true), new global::haxe.lang.Null <int>(__temp_y128, true), __temp_me129.getRestSvg(duration, direction, isGrace), ((isGrace) ? (0.7) : (((double)(1)))), __temp_me129.getSvgScale(duration, direction, isGrace));
     }
 }
Example #26
0
        public override void doLayout()
        {
            unchecked
            {
                global::haxe.root.Array <object> _g = new global::haxe.root.Array <object>(new object[] { this });
                if (!(this.container.beat.isEmpty))
                {
                    if (!(this.container.beat.isRest()))
                    {
                        this.noteHeads               = new global::alphatab.rendering.glyphs.ScoreNoteChordGlyph(((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))));
                        this.noteHeads.beat          = this.container.beat;
                        this.noteHeads.beamingHelper = this.beamingHelper;
                        this.noteLoop(new global::alphatab.rendering.glyphs.ScoreBeatGlyph_doLayout_80__Fun(((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(_g)))))));
                        this.addGlyph(this.noteHeads);
                        {
                            int _g1 = 0;
                            int _g2 = this.container.beat.dots;
                            while ((_g1 < _g2))
                            {
                                int i = _g1++;
                                global::haxe.root.Array <object> @group = new global::haxe.root.Array <object>(new object[] { new global::alphatab.rendering.glyphs.GlyphGroup(((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(default(global::haxe.root.Array <object>))))))) });
                                this.noteLoop(new global::alphatab.rendering.glyphs.ScoreBeatGlyph_doLayout_91__Fun(((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(_g))))), ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@group)))))));
                                this.addGlyph(((global::alphatab.rendering.glyphs.GlyphGroup)(@group[0])));
                            }
                        }
                    }
                    else
                    {
                        int line   = 0;
                        int offset = 0;
                        {
                            global::alphatab.model.Duration _g3 = this.container.beat.duration;
                            switch (global::haxe.root.Type.enumIndex(_g3))
                            {
                            case 0:
                            {
                                line = 4;
                                break;
                            }


                            case 1:
                            {
                                line = 5;
                                break;
                            }


                            case 2:
                            {
                                line   = 7;
                                offset = -2;
                                break;
                            }


                            case 3:
                            {
                                line = 8;
                                break;
                            }


                            case 4:
                            {
                                line = 8;
                                break;
                            }


                            case 5:
                            {
                                line = 8;
                                break;
                            }


                            case 6:
                            {
                                line = 8;
                                break;
                            }
                            }
                        }

                        global::alphatab.rendering.ScoreBarRenderer sr = default(global::alphatab.rendering.ScoreBarRenderer);
                        sr = ((global::alphatab.rendering.ScoreBarRenderer)(this.renderer));
                        int y = sr.getScoreY(line, new global::haxe.lang.Null <int>(offset, true));
                        this.addGlyph(new global::alphatab.rendering.glyphs.RestGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(y, true), ((global::alphatab.model.Duration)(this.container.beat.duration))));
                    }
                }

                base.doLayout();
                if ((this.noteHeads != default(global::alphatab.rendering.glyphs.ScoreNoteChordGlyph)))
                {
                    this.noteHeads.updateBeamingHelper(this.x);
                }
            }
        }
Example #27
0
 public static void __hx_ctor_alphatab_rendering_glyphs_RestGlyph(global::alphatab.rendering.glyphs.RestGlyph __temp_me186, global::haxe.lang.Null <int> x, global::haxe.lang.Null <int> y, global::alphatab.model.Duration duration)
 {
     unchecked
     {
         int __temp_y185 = ((global::haxe.lang.Runtime.eq((y).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (y.@value));
         int __temp_x184 = ((global::haxe.lang.Runtime.eq((x).toDynamic(), (default(global::haxe.lang.Null <int>)).toDynamic())) ? (((int)(0))) : (x.@value));
         global::alphatab.rendering.glyphs.SvgGlyph.__hx_ctor_alphatab_rendering_glyphs_SvgGlyph(__temp_me186, new global::haxe.lang.Null <int>(__temp_x184, true), new global::haxe.lang.Null <int>(__temp_y185, true), __temp_me186.getRestSvg(duration), ((double)(1)), ((double)(1)));
     }
 }
Example #28
0
		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);
					}
					
				}
				
			}
		}