Exemplo n.º 1
0
 public static void calculateDivision(global::alphatab.model.Beat b, int l)
 {
     unchecked
     {
         int start = 0;
     }
 }
Exemplo n.º 2
0
 public virtual void registerBeatLineX(global::alphatab.model.Beat beat, int up, int down)
 {
     unchecked
     {
         this._beatLineXPositions.@set(beat.index, new global::haxe.lang.DynamicObject(new global::haxe.root.Array <int>(new int[] {}), new global::haxe.root.Array <object>(new object[] {}), new global::haxe.root.Array <int>(new int[] { 26203, 1114503266 }), new global::haxe.root.Array <double>(new double[] { ((double)(up)), ((double)(down)) })));
     }
 }
Exemplo n.º 3
0
 public BeatContainerGlyph(global::alphatab.model.Beat beat) : base(global::haxe.lang.EmptyObject.EMPTY)
 {
     unchecked
     {
         global::alphatab.rendering.glyphs.BeatContainerGlyph.__hx_ctor_alphatab_rendering_glyphs_BeatContainerGlyph(this, beat);
     }
 }
Exemplo n.º 4
0
 public virtual void expandedTo(global::alphatab.model.Beat beat)
 {
     unchecked
     {
         this._isExpanded = true;
     }
 }
Exemplo n.º 5
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 1542788809:
                {
                    this._parent = ((global::alphatab.rendering.glyphs.BeatContainerGlyph)(@value));
                    return(@value);
                }


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


                default:
                {
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
        }
Exemplo n.º 6
0
        public virtual global::alphatab.model.Beat clone()
        {
            unchecked
            {
                global::alphatab.model.Beat beat = new global::alphatab.model.Beat();
                {
                    int _g = 0;
                    global::haxe.root.Array <object> _g1 = this.whammyBarPoints;
                    while ((_g < _g1.length))
                    {
                        global::alphatab.model.BendPoint b = ((global::alphatab.model.BendPoint)(_g1[_g]));
                        ++_g;
                        beat.whammyBarPoints.push(b.clone());
                    }
                }

                {
                    int _g2 = 0;
                    global::haxe.root.Array <object> _g11 = this.notes;
                    while ((_g2 < _g11.length))
                    {
                        global::alphatab.model.Note n = ((global::alphatab.model.Note)(_g11[_g2]));
                        ++_g2;
                        beat.addNote(n.clone());
                    }
                }

                beat.chordId      = this.chordId;
                beat.brushType    = this.brushType;
                beat.vibrato      = this.vibrato;
                beat.graceType    = this.graceType;
                beat.pickStroke   = this.pickStroke;
                beat.duration     = this.duration;
                beat.tremoloSpeed = new global::haxe.lang.Null <global::alphatab.model.Duration>(this.tremoloSpeed.@value, true);
                beat.text         = this.text;
                beat.fadeIn       = this.fadeIn;
                beat.tap          = this.tap;
                beat.slap         = this.slap;
                beat.pop          = this.pop;
                {
                    int _g3 = 0;
                    global::haxe.root.Array <object> _g12 = this.automations;
                    while ((_g3 < _g12.length))
                    {
                        global::alphatab.model.Automation a = ((global::alphatab.model.Automation)(_g12[_g3]));
                        ++_g3;
                        beat.automations.push(a.clone());
                    }
                }

                beat.start             = this.start;
                beat.tupletDenominator = this.tupletDenominator;
                beat.tupletNumerator   = this.tupletNumerator;
                beat.dynamicValue      = this.dynamicValue;
                beat.crescendo         = this.crescendo;
                return(beat);
            }
        }
Exemplo n.º 7
0
 public virtual void addBeat(global::alphatab.model.Beat beat)
 {
     unchecked
     {
         beat.voice = this;
         beat.index = this.beats.length;
         this.beats.push(beat);
     }
 }
Exemplo n.º 8
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 108520940:
                {
                    this.beatEffects = ((global::haxe.ds.StringMap <object>)(global::haxe.ds.StringMap <object> .__hx_cast <object>(((global::haxe.ds.StringMap)(@value)))));
                    return(@value);
                }


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


                case 1881669935:
                {
                    this._isGrace = ((bool)(@value));
                    return(@value);
                }


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


                case 1381203243:
                {
                    this._noteLookup = ((global::haxe.ds.IntMap <object>)(global::haxe.ds.IntMap <object> .__hx_cast <object>(((global::haxe.ds.IntMap)(@value)))));
                    return(@value);
                }


                case 464659330:
                {
                    this._notes = ((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));
                }
                }
            }
        }
Exemplo n.º 9
0
        public virtual int getBeatX(global::alphatab.model.Beat beat)
        {
            unchecked
            {
                global::alphatab.rendering.glyphs.TabBeatGlyph bg = ((global::alphatab.rendering.glyphs.TabBeatGlyph)(((global::alphatab.rendering.glyphs.BeatContainerGlyph)(this.getOrCreateVoiceContainer(beat.voice.index).beatGlyphs[beat.index])).preNotes));
                if ((bg != default(global::alphatab.rendering.glyphs.TabBeatGlyph)))
                {
                    return(bg.container.x + bg.x);
                }

                return(0);
            }
        }
Exemplo n.º 10
0
        public virtual void addGraceBeat(global::alphatab.model.Beat beat)
        {
            unchecked
            {
                if ((this.beats.length == 0))
                {
                    this.addBeat(beat);
                    return;
                }

                global::alphatab.model.Beat lastBeat = ((global::alphatab.model.Beat)(this.beats.splice((this.beats.length - 1), 1)[0]));
                this.addBeat(beat);
                this.addBeat(lastBeat);
            }
        }
Exemplo n.º 11
0
        public static bool canJoin(global::alphatab.model.Beat b1, global::alphatab.model.Beat b2)
        {
            unchecked
            {
                if (((((b1 == default(global::alphatab.model.Beat)) || (b2 == default(global::alphatab.model.Beat))) || b1.isRest()) || b2.isRest()))
                {
                    return(false);
                }

                global::alphatab.model.Bar m1 = b1.voice.bar;
                global::alphatab.model.Bar m2 = b1.voice.bar;
                if ((m1 != m2))
                {
                    return(false);
                }

                int start1 = b1.start;
                int start2 = b2.start;
                if ((!(global::alphatab.rendering.utils.BeamingHelper.canJoinDuration(b1.duration)) || !(global::alphatab.rendering.utils.BeamingHelper.canJoinDuration(b2.duration))))
                {
                    return(start1 == start2);
                }

                int divisionLength = 960;
                {
                    int _g = ((global::alphatab.model.MasterBar)(m1.track.score.masterBars[m1.index])).timeSignatureDenominator;
                    switch (_g)
                    {
                    case 8:
                    {
                        if (((((global::alphatab.model.MasterBar)(m1.track.score.masterBars[m1.index])).timeSignatureNumerator % 3) == 0))
                        {
                            {
                                double x = global::System.Math.Floor(((double)(480.0)));
                                divisionLength += ((int)(x));
                            }
                        }

                        break;
                    }
                    }
                }

                int division1 = (((divisionLength + start1)) / divisionLength);
                int division2 = (((divisionLength + start2)) / divisionLength);
                return(division1 == division2);
            }
        }
Exemplo n.º 12
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 1291633955:
                {
                    this.ties = ((global::haxe.root.Array <object>)(global::haxe.root.Array <object> .__hx_cast <object>(((global::haxe.root.Array)(@value)))));
                    return(@value);
                }


                case 1493167041:
                {
                    this.postNotes = ((global::alphatab.rendering.glyphs.BeatGlyphBase)(@value));
                    return(@value);
                }


                case 906525346:
                {
                    this.onNotes = ((global::alphatab.rendering.glyphs.BeatGlyphBase)(@value));
                    return(@value);
                }


                case 530877726:
                {
                    this.preNotes = ((global::alphatab.rendering.glyphs.BeatGlyphBase)(@value));
                    return(@value);
                }


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


                default:
                {
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
        }
Exemplo n.º 13
0
 public virtual void createVoiceGlyphs(global::alphatab.model.Voice v)
 {
     unchecked
     {
         int _g = 0;
         global::haxe.root.Array <object> _g1 = v.beats;
         while ((_g < _g1.length))
         {
             global::alphatab.model.Beat b = ((global::alphatab.model.Beat)(_g1[_g]));
             ++_g;
             global::alphatab.rendering.glyphs.TabBeatContainerGlyph container = new global::alphatab.rendering.glyphs.TabBeatContainerGlyph(((global::alphatab.model.Beat)(b)));
             container.preNotes  = new global::alphatab.rendering.glyphs.TabBeatPreNotesGlyph();
             container.onNotes   = new global::alphatab.rendering.glyphs.TabBeatGlyph();
             container.postNotes = new global::alphatab.rendering.glyphs.TabBeatPostNotesGlyph();
             this.addBeatGlyph(container);
         }
     }
 }
Exemplo n.º 14
0
        public virtual int getBeatLineX(global::alphatab.model.Beat beat)
        {
            unchecked
            {
                if (this._beatLineXPositions.exists(beat.index))
                {
                    if ((this.getDirection() == global::alphatab.rendering.utils.BeamDirection.Up))
                    {
                        return((int)(global::haxe.lang.Runtime.getField_f((this._beatLineXPositions.@get(beat.index)).toDynamic(), "up", 26203, true)));
                    }
                    else
                    {
                        return((int)(global::haxe.lang.Runtime.getField_f((this._beatLineXPositions.@get(beat.index)).toDynamic(), "down", 1114503266, true)));
                    }
                }

                return(0);
            }
        }
Exemplo n.º 15
0
 public static void __hx_ctor_alphatab_model_Beat(global::alphatab.model.Beat __temp_me74)
 {
     unchecked
     {
         __temp_me74.whammyBarPoints   = new global::haxe.root.Array <object>();
         __temp_me74.notes             = new global::haxe.root.Array <object>();
         __temp_me74.brushType         = global::alphatab.model.BrushType.None;
         __temp_me74.vibrato           = global::alphatab.model.VibratoType.None;
         __temp_me74.graceType         = global::alphatab.model.GraceType.None;
         __temp_me74.pickStroke        = global::alphatab.model.PickStrokeType.None;
         __temp_me74.duration          = global::alphatab.model.Duration.Quarter;
         __temp_me74.tremoloSpeed      = new global::haxe.lang.Null <global::alphatab.model.Duration>(default(global::haxe.lang.Null <global::alphatab.model.Duration>).@value, true);
         __temp_me74.automations       = new global::haxe.root.Array <object>();
         __temp_me74.start             = 0;
         __temp_me74.tupletDenominator = -1;
         __temp_me74.tupletNumerator   = -1;
         __temp_me74.dynamicValue      = global::alphatab.model.DynamicValue.F;
         __temp_me74.crescendo         = global::alphatab.rendering.glyphs.CrescendoType.None;
     }
 }
Exemplo n.º 16
0
        public virtual bool check(global::alphatab.model.Beat beat)
        {
            unchecked
            {
                if ((this.beats.length == 0))
                {
                    this.tuplet = beat.tupletNumerator;
                }
                else
                {
                    if (((((beat.voice.index != this.voiceIndex) || (beat.tupletNumerator != this.tuplet)) || (this.beats.length == this.tuplet)) || this._isFinished))
                    {
                        return(false);
                    }
                }

                this.beats.push(beat);
                return(true);
            }
        }
Exemplo n.º 17
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 468906571:
                {
                    this._lastBeat = ((global::alphatab.model.Beat)(@value));
                    return(@value);
                }


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


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


                case 2026656845:
                {
                    this._info = ((global::alphatab.rendering.IEffectBarRendererInfo)(@value));
                    return(@value);
                }


                default:
                {
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
        }
Exemplo n.º 18
0
        public virtual global::alphatab.model.Note nextNoteOnSameLine(global::alphatab.model.Note note)
        {
            unchecked
            {
                global::alphatab.model.Beat nextBeat = note.beat.nextBeat;
                while (((nextBeat != default(global::alphatab.model.Beat)) && (nextBeat.voice.bar.index <= (note.beat.voice.bar.index + 3))))
                {
                    global::alphatab.model.Note noteOnString = nextBeat.getNoteOnString(note.@string);
                    if ((noteOnString != default(global::alphatab.model.Note)))
                    {
                        return(noteOnString);
                    }
                    else
                    {
                        nextBeat = nextBeat.nextBeat;
                    }
                }

                return(default(global::alphatab.model.Note));
            }
        }
Exemplo n.º 19
0
        public virtual global::alphatab.model.Note previousNoteOnSameLine(global::alphatab.model.Note note)
        {
            unchecked
            {
                global::alphatab.model.Beat previousBeat = note.beat.previousBeat;
                while (((previousBeat != default(global::alphatab.model.Beat)) && (previousBeat.voice.bar.index >= (note.beat.voice.bar.index - 3))))
                {
                    global::alphatab.model.Note noteOnString = previousBeat.getNoteOnString(note.@string);
                    if ((noteOnString != default(global::alphatab.model.Note)))
                    {
                        return(noteOnString);
                    }
                    else
                    {
                        previousBeat = previousBeat.previousBeat;
                    }
                }

                return(default(global::alphatab.model.Note));
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 21
0
        public virtual void createVoiceGlyphs(global::alphatab.model.Voice v)
        {
            unchecked
            {
                int _g = 0;
                global::haxe.root.Array <object> _g1 = v.beats;
                while ((_g < _g1.length))
                {
                    global::alphatab.model.Beat b = ((global::alphatab.model.Beat)(_g1[_g]));
                    ++_g;
                    global::alphatab.rendering.glyphs.BeatContainerGlyph container = new global::alphatab.rendering.glyphs.BeatContainerGlyph(((global::alphatab.model.Beat)(b)));
                    container.preNotes  = new global::alphatab.rendering.glyphs.BeatGlyphBase();
                    container.onNotes   = new global::alphatab.rendering.glyphs.BeatGlyphBase();
                    container.postNotes = new global::alphatab.rendering.glyphs.BeatGlyphBase();
                    this.addBeatGlyph(container);
                    if (this._info.shouldCreateGlyph(this, b))
                    {
                        this.createOrResizeGlyph(this._info.getSizingMode(), b);
                    }

                    this._lastBeat = b;
                }
            }
        }
Exemplo n.º 22
0
        public virtual bool shouldCreateGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat)
        {
            unchecked
            {
                this._lastCreateInfo = new global::haxe.root.Array <object>();
                {
                    int _g = 0;
                    global::haxe.root.Array <object> _g1 = beat.notes;
                    while ((_g < _g1.length))
                    {
                        global::alphatab.model.Note n = ((global::alphatab.model.Note)(_g1[_g]));
                        ++_g;
                        if (this.shouldCreateGlyphForNote(renderer, n))
                        {
                            this._lastCreateInfo.push(n);
                        }
                    }
                }

                return(this._lastCreateInfo.length > 0);
            }
        }
Exemplo n.º 23
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 1692978337:
					{
						this.beamingHelper = ((global::alphatab.rendering.utils.BeamingHelper) (@value) );
						return @value;
					}
					
					
					case 1091821942:
					{
						this.beat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					case 108520940:
					{
						this.beatEffects = ((global::haxe.ds.StringMap<object>) (global::haxe.ds.StringMap<object>.__hx_cast<object>(((global::haxe.ds.StringMap) (@value) ))) );
						return @value;
					}
					
					
					case 186102306:
					{
						this.downLineX = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1366752649:
					{
						this.upLineX = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1464822705:
					{
						this.spacingChanged = ((global::haxe.lang.Function) (@value) );
						return @value;
					}
					
					
					case 1228566710:
					{
						this.maxNote = ((object) (@value) );
						return @value;
					}
					
					
					case 974358180:
					{
						this.minNote = ((object) (@value) );
						return @value;
					}
					
					
					case 1270934932:
					{
						this._tremoloPicking = ((global::alphatab.rendering.Glyph) (@value) );
						return @value;
					}
					
					
					case 1381203243:
					{
						this._noteLookup = ((global::haxe.ds.IntMap<object>) (global::haxe.ds.IntMap<object>.__hx_cast<object>(((global::haxe.ds.IntMap) (@value) ))) );
						return @value;
					}
					
					
					case 972910470:
					{
						this._infos = ((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);
					}
					
				}
				
			}
		}
Exemplo n.º 24
0
        public virtual global::alphatab.rendering.Glyph createNewGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat)
        {
            unchecked
            {
                global::alphatab.model.MasterBar __temp_stmt484 = default(global::alphatab.model.MasterBar);
                {
                    global::alphatab.model.Bar _this = beat.voice.bar;
                    __temp_stmt484 = ((global::alphatab.model.MasterBar)(_this.track.score.masterBars[_this.index]));
                }

                return(new global::alphatab.rendering.glyphs.effects.TextGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), global::haxe.lang.Runtime.toString(__temp_stmt484.section.text), ((global::alphatab.platform.model.Font)(renderer.stave.staveGroup.layout.renderer.renderingResources.markerFont))));
            }
        }
Exemplo n.º 25
0
 public virtual global::alphatab.rendering.Glyph createNewGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat)
 {
     unchecked
     {
         return(default(global::alphatab.rendering.Glyph));
     }
 }
Exemplo n.º 26
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 108520940:
					{
						this.beatEffects = ((global::haxe.ds.StringMap<object>) (global::haxe.ds.StringMap<object>.__hx_cast<object>(((global::haxe.ds.StringMap) (@value) ))) );
						return @value;
					}
					
					
					case 1091821942:
					{
						this.beat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					case 1881669935:
					{
						this._isGrace = ((bool) (@value) );
						return @value;
					}
					
					
					case 1942741029:
					{
						this._minNote = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					case 1381203243:
					{
						this._noteLookup = ((global::haxe.ds.IntMap<object>) (global::haxe.ds.IntMap<object>.__hx_cast<object>(((global::haxe.ds.IntMap) (@value) ))) );
						return @value;
					}
					
					
					case 464659330:
					{
						this._notes = ((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);
					}
					
				}
				
			}
		}
Exemplo n.º 27
0
		public virtual   void readGrace(global::alphatab.model.Voice voice, global::alphatab.model.Note note)
		{
			unchecked 
			{
				global::alphatab.model.Beat graceBeat = new global::alphatab.model.Beat();
				global::alphatab.model.Note graceNote = new global::alphatab.model.Note();
				graceNote.@string = note.@string;
				graceNote.fret = this._data.readInt8();
				graceBeat.duration = global::alphatab.model.Duration.ThirtySecond;
				graceBeat.dynamicValue = this.toDynamicValue(this._data.readInt8());
				int transition = this._data.readInt8();
				switch (transition)
				{
					case 0:
					{
						{
						}
						
						break;
					}
					
					
					case 1:
					{
						graceNote.slideType = global::alphatab.model.SlideType.Legato;
						graceNote.slideTarget = note;
						break;
					}
					
					
					case 2:
					{
						{
						}
						
						break;
					}
					
					
					case 3:
					{
						graceNote.isHammerPullOrigin = true;
						note.isHammerPullDestination = true;
						note.hammerPullOrigin = graceNote;
						break;
					}
					
					
				}
				
				graceNote.dynamicValue = graceBeat.dynamicValue;
				this._data.read(1);
				if (( this._versionNumber < 500 )) 
				{
					graceBeat.graceType = global::alphatab.model.GraceType.BeforeBeat;
				}
				 else 
				{
					int flags = this._data.readByte();
					graceNote.isDead = ( (( flags & 1 )) != 0 );
					if (( (( flags & 2 )) != 0 )) 
					{
						graceBeat.graceType = global::alphatab.model.GraceType.OnBeat;
					}
					 else 
					{
						graceBeat.graceType = global::alphatab.model.GraceType.BeforeBeat;
					}
					
				}
				
				graceBeat.addNote(graceNote);
				voice.addGraceBeat(graceBeat);
			}
		}
Exemplo n.º 28
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 468906571:
					{
						this._lastBeat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					case 1537678743:
					{
						this._effectGlyphs = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 1100006280:
					{
						this._uniqueEffectGlyphs = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 2026656845:
					{
						this._info = ((global::alphatab.rendering.IEffectBarRendererInfo) (@value) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}
Exemplo n.º 29
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;
			}
		}
Exemplo n.º 30
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);
					}
					
				}
				
			}
		}
Exemplo n.º 31
0
		public virtual   global::alphatab.model.Beat clone()
		{
			unchecked 
			{
				global::alphatab.model.Beat beat = new global::alphatab.model.Beat();
				{
					int _g = 0;
					global::haxe.root.Array<object> _g1 = this.whammyBarPoints;
					while (( _g < _g1.length ))
					{
						global::alphatab.model.BendPoint b = ((global::alphatab.model.BendPoint) (_g1[_g]) );
						 ++ _g;
						beat.whammyBarPoints.push(b.clone());
					}
					
				}
				
				{
					int _g2 = 0;
					global::haxe.root.Array<object> _g11 = this.notes;
					while (( _g2 < _g11.length ))
					{
						global::alphatab.model.Note n = ((global::alphatab.model.Note) (_g11[_g2]) );
						 ++ _g2;
						beat.addNote(n.clone());
					}
					
				}
				
				beat.chordId = this.chordId;
				beat.brushType = this.brushType;
				beat.vibrato = this.vibrato;
				beat.graceType = this.graceType;
				beat.pickStroke = this.pickStroke;
				beat.duration = this.duration;
				beat.tremoloSpeed = new global::haxe.lang.Null<global::alphatab.model.Duration>(this.tremoloSpeed.@value, true);
				beat.text = this.text;
				beat.fadeIn = this.fadeIn;
				beat.tap = this.tap;
				beat.slap = this.slap;
				beat.pop = this.pop;
				{
					int _g3 = 0;
					global::haxe.root.Array<object> _g12 = this.automations;
					while (( _g3 < _g12.length ))
					{
						global::alphatab.model.Automation a = ((global::alphatab.model.Automation) (_g12[_g3]) );
						 ++ _g3;
						beat.automations.push(a.clone());
					}
					
				}
				
				beat.start = this.start;
				beat.tupletDenominator = this.tupletDenominator;
				beat.tupletNumerator = this.tupletNumerator;
				beat.dynamicValue = this.dynamicValue;
				beat.crescendo = this.crescendo;
				return beat;
			}
		}
Exemplo n.º 32
0
		public virtual   void readBeat(global::alphatab.model.Track track, global::alphatab.model.Bar bar, global::alphatab.model.Voice voice)
		{
			unchecked 
			{
				global::alphatab.model.Beat newBeat = new global::alphatab.model.Beat();
				int flags = this._data.readByte();
				if (( (( flags & 1 )) != 0 )) 
				{
					newBeat.dots = 1;
				}
				
				if (( (( flags & 64 )) != 0 )) 
				{
					int type = this._data.readByte();
					newBeat.isEmpty = ( (( type & 2 )) == 0 );
				}
				
				voice.addBeat(newBeat);
				int duration = this._data.readInt8();
				switch (duration)
				{
					case -2:
					{
						newBeat.duration = global::alphatab.model.Duration.Whole;
						break;
					}
					
					
					case -1:
					{
						newBeat.duration = global::alphatab.model.Duration.Half;
						break;
					}
					
					
					case 0:
					{
						newBeat.duration = global::alphatab.model.Duration.Quarter;
						break;
					}
					
					
					case 1:
					{
						newBeat.duration = global::alphatab.model.Duration.Eighth;
						break;
					}
					
					
					case 2:
					{
						newBeat.duration = global::alphatab.model.Duration.Sixteenth;
						break;
					}
					
					
					case 3:
					{
						newBeat.duration = global::alphatab.model.Duration.ThirtySecond;
						break;
					}
					
					
					case 4:
					{
						newBeat.duration = global::alphatab.model.Duration.SixtyFourth;
						break;
					}
					
					
					default:
					{
						newBeat.duration = global::alphatab.model.Duration.Quarter;
						break;
					}
					
				}
				
				if (( (( flags & 32 )) != 0 )) 
				{
					newBeat.tupletNumerator = this.readInt32();
					{
						int _g = newBeat.tupletNumerator;
						switch (_g)
						{
							case 1:
							{
								newBeat.tupletDenominator = 1;
								break;
							}
							
							
							case 3:
							{
								newBeat.tupletDenominator = 2;
								break;
							}
							
							
							case 5:case 6:case 7:
							{
								newBeat.tupletDenominator = 4;
								break;
							}
							
							
							case 9:case 10:case 11:case 12:case 13:
							{
								newBeat.tupletDenominator = 8;
								break;
							}
							
							
							case 2:case 4:case 8:
							{
								{
								}
								
								break;
							}
							
							
							default:
							{
								newBeat.tupletNumerator = 1;
								newBeat.tupletDenominator = 1;
								break;
							}
							
						}
						
					}
					
				}
				
				if (( (( flags & 2 )) != 0 )) 
				{
					this.readChord(newBeat);
				}
				
				if (( (( flags & 4 )) != 0 )) 
				{
					newBeat.text = this.readStringIntUnused();
				}
				
				if (( (( flags & 8 )) != 0 )) 
				{
					this.readBeatEffects(newBeat);
				}
				
				if (( (( flags & 16 )) != 0 )) 
				{
					this.readMixTableChange(newBeat);
				}
				
				int stringFlags = this._data.readByte();
				int i = 6;
				while (( i >= 0 ))
				{
					if (( ( (( stringFlags & ( 1 << i ) )) != 0 ) && ( ( 6 - i ) < track.tuning.length ) )) 
					{
						this.readNote(track, bar, voice, newBeat, ( 6 - i ));
					}
					
					i--;
				}
				
				if (( this._versionNumber >= 500 )) 
				{
					this._data.readByte();
					int flag = this._data.readByte();
					if (( (( flag & 8 )) != 0 )) 
					{
						this._data.readByte();
					}
					
				}
				
			}
		}
Exemplo n.º 33
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 1542788809:
					{
						this._parent = ((global::alphatab.rendering.glyphs.BeatContainerGlyph) (@value) );
						return @value;
					}
					
					
					case 1948581205:
					{
						this._beat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}
Exemplo n.º 34
0
		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());
					}
					
				}
				
			}
		}
Exemplo n.º 35
0
 public virtual bool shouldCreateGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat)
 {
     unchecked
     {
         return((beat.slap || beat.pop) || beat.tap);
     }
 }
Exemplo n.º 36
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 1291633955:
					{
						this.ties = ((global::haxe.root.Array<object>) (global::haxe.root.Array<object>.__hx_cast<object>(((global::haxe.root.Array) (@value) ))) );
						return @value;
					}
					
					
					case 1493167041:
					{
						this.postNotes = ((global::alphatab.rendering.glyphs.BeatGlyphBase) (@value) );
						return @value;
					}
					
					
					case 906525346:
					{
						this.onNotes = ((global::alphatab.rendering.glyphs.BeatGlyphBase) (@value) );
						return @value;
					}
					
					
					case 530877726:
					{
						this.preNotes = ((global::alphatab.rendering.glyphs.BeatGlyphBase) (@value) );
						return @value;
					}
					
					
					case 1091821942:
					{
						this.beat = ((global::alphatab.model.Beat) (@value) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}
Exemplo n.º 37
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);
					}
					
				}
				
			}
		}
Exemplo n.º 38
0
 public virtual bool canExpand(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat @from, global::alphatab.model.Beat to)
 {
     unchecked
     {
         return(true);
     }
 }
Exemplo n.º 39
0
 public static void __hx_ctor_alphatab_rendering_glyphs_BeatContainerGlyph(global::alphatab.rendering.glyphs.BeatContainerGlyph __temp_me130, global::alphatab.model.Beat beat)
 {
     unchecked
     {
         global::alphatab.rendering.Glyph.__hx_ctor_alphatab_rendering_Glyph(__temp_me130, new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true));
         __temp_me130.beat = beat;
         __temp_me130.ties = new global::haxe.root.Array <object>();
     }
 }
Exemplo n.º 40
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);
					}
					
				}
				
			}
		}
Exemplo n.º 41
0
 public virtual bool shouldCreateGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat)
 {
     unchecked
     {
         return(!(string.Equals(beat.text, default(string))) && (beat.text.Trim().Length > 0));
     }
 }
Exemplo n.º 42
0
		public virtual   void parseBeat(global::haxe.root.Xml node)
		{
			unchecked 
			{
				global::alphatab.model.Beat beat = new global::alphatab.model.Beat();
				string beatId = node.@get("id");
				{
					object __temp_iterator434 = node.iterator();
					while (((bool) (global::haxe.lang.Runtime.callField(__temp_iterator434, "hasNext", 407283053, default(global::haxe.root.Array))) ))
					{
						global::haxe.root.Xml c = ((global::haxe.root.Xml) (global::haxe.lang.Runtime.callField(__temp_iterator434, "next", 1224901875, default(global::haxe.root.Array))) );
						if (( c.nodeType == global::haxe.root.Xml.Element )) 
						{
							string _g = c._get_nodeName();
							switch (_g)
							{
								case "Notes":
								{
									this._notesOfBeat.@set(beatId, global::haxe.lang.StringExt.split(this.getValue(c), " "));
									break;
								}
								
								
								case "Rhythm":
								{
									this._rhythmOfBeat.@set(beatId, c.@get("ref"));
									break;
								}
								
								
								case "Fadding":
								{
									if (string.Equals(this.getValue(c), "FadeIn")) 
									{
										beat.fadeIn = true;
									}
									
									break;
								}
								
								
								case "Tremolo":
								{
									string _g1 = this.getValue(c);
									switch (_g1)
									{
										case "1/2":
										{
											beat.tremoloSpeed = new global::haxe.lang.Null<global::alphatab.model.Duration>(new global::haxe.lang.Null<global::alphatab.model.Duration>(global::alphatab.model.Duration.Eighth, true).@value, true);
											break;
										}
										
										
										case "1/4":
										{
											beat.tremoloSpeed = new global::haxe.lang.Null<global::alphatab.model.Duration>(new global::haxe.lang.Null<global::alphatab.model.Duration>(global::alphatab.model.Duration.Sixteenth, true).@value, true);
											break;
										}
										
										
										case "1/8":
										{
											beat.tremoloSpeed = new global::haxe.lang.Null<global::alphatab.model.Duration>(new global::haxe.lang.Null<global::alphatab.model.Duration>(global::alphatab.model.Duration.ThirtySecond, true).@value, true);
											break;
										}
										
										
									}
									
									break;
								}
								
								
								case "Chord":
								{
									beat.chordId = this.getValue(c);
									break;
								}
								
								
								case "Hairpin":
								{
									string _g11 = this.getValue(c);
									switch (_g11)
									{
										case "Crescendo":
										{
											beat.crescendo = global::alphatab.rendering.glyphs.CrescendoType.Crescendo;
											break;
										}
										
										
										case "Decrescendo":
										{
											beat.crescendo = global::alphatab.rendering.glyphs.CrescendoType.Decrescendo;
											break;
										}
										
										
									}
									
									break;
								}
								
								
								case "Arpeggio":
								{
									if (string.Equals(this.getValue(c), "Up")) 
									{
										beat.brushType = global::alphatab.model.BrushType.ArpeggioUp;
									}
									 else 
									{
										beat.brushType = global::alphatab.model.BrushType.ArpeggioDown;
									}
									
									break;
								}
								
								
								case "Properties":
								{
									this.parseBeatProperties(c, beat);
									break;
								}
								
								
								case "FreeText":
								{
									beat.text = this.getValue(c);
									break;
								}
								
								
								case "Dynamic":
								{
									string _g12 = this.getValue(c);
									switch (_g12)
									{
										case "PPP":
										{
											beat.dynamicValue = global::alphatab.model.DynamicValue.PPP;
											break;
										}
										
										
										case "PP":
										{
											beat.dynamicValue = global::alphatab.model.DynamicValue.PP;
											break;
										}
										
										
										case "P":
										{
											beat.dynamicValue = global::alphatab.model.DynamicValue.P;
											break;
										}
										
										
										case "MP":
										{
											beat.dynamicValue = global::alphatab.model.DynamicValue.MP;
											break;
										}
										
										
										case "MF":
										{
											beat.dynamicValue = global::alphatab.model.DynamicValue.MF;
											break;
										}
										
										
										case "F":
										{
											beat.dynamicValue = global::alphatab.model.DynamicValue.F;
											break;
										}
										
										
										case "FF":
										{
											beat.dynamicValue = global::alphatab.model.DynamicValue.FF;
											break;
										}
										
										
										case "FFF":
										{
											beat.dynamicValue = global::alphatab.model.DynamicValue.FFF;
											break;
										}
										
										
									}
									
									break;
								}
								
								
								case "GraceNotes":
								{
									string _g13 = this.getValue(c);
									switch (_g13)
									{
										case "OnBeat":
										{
											beat.graceType = global::alphatab.model.GraceType.OnBeat;
											break;
										}
										
										
										case "BeforeBeat":
										{
											beat.graceType = global::alphatab.model.GraceType.BeforeBeat;
											break;
										}
										
										
									}
									
									break;
								}
								
								
							}
							
						}
						
					}
					
				}
				
				this._beatById.@set(beatId, beat);
			}
		}
Exemplo n.º 43
0
 public virtual global::alphatab.rendering.Glyph createNewGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat)
 {
     unchecked
     {
         return(new global::alphatab.rendering.glyphs.effects.TextGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), global::haxe.lang.Runtime.toString(beat.text), ((global::alphatab.platform.model.Font)(renderer.stave.staveGroup.layout.renderer.renderingResources.effectFont))));
     }
 }
Exemplo n.º 44
0
		public virtual   void createVoiceGlyphs(global::alphatab.model.Voice v)
		{
			unchecked 
			{
				int _g = 0;
				global::haxe.root.Array<object> _g1 = v.beats;
				while (( _g < _g1.length ))
				{
					global::alphatab.model.Beat b = ((global::alphatab.model.Beat) (_g1[_g]) );
					 ++ _g;
					global::alphatab.rendering.glyphs.BeatContainerGlyph container = new global::alphatab.rendering.glyphs.BeatContainerGlyph(((global::alphatab.model.Beat) (b) ));
					container.preNotes = new global::alphatab.rendering.glyphs.BeatGlyphBase();
					container.onNotes = new global::alphatab.rendering.glyphs.BeatGlyphBase();
					container.postNotes = new global::alphatab.rendering.glyphs.BeatGlyphBase();
					this.addBeatGlyph(container);
					if (this._info.shouldCreateGlyph(this, b)) 
					{
						this.createOrResizeGlyph(this._info.getSizingMode(), b);
					}
					
					this._lastBeat = b;
				}
				
			}
		}