Пример #1
0
 public static void __hx_ctor_alphatab_model_Note(global::alphatab.model.Note __temp_me81)
 {
     unchecked
     {
         __temp_me81.bendPoints              = new global::haxe.root.Array <object>();
         __temp_me81.dynamicValue            = global::alphatab.model.DynamicValue.F;
         __temp_me81.accentuated             = global::alphatab.model.AccentuationType.None;
         __temp_me81.fret                    = -1;
         __temp_me81.isGhost                 = false;
         __temp_me81.@string                 = 0;
         __temp_me81.isHammerPullDestination = false;
         __temp_me81.isHammerPullOrigin      = false;
         __temp_me81.harmonicValue           = ((double)(0));
         __temp_me81.harmonicType            = global::alphatab.model.HarmonicType.None;
         __temp_me81.isLetRing               = false;
         __temp_me81.isPalmMute              = false;
         __temp_me81.isDead                  = false;
         __temp_me81.slideType               = global::alphatab.model.SlideType.None;
         __temp_me81.vibrato                 = global::alphatab.model.VibratoType.None;
         __temp_me81.isStaccato              = false;
         __temp_me81.isTieOrigin             = false;
         __temp_me81.isTieDestination        = false;
         __temp_me81.leftHandFinger          = -1;
         __temp_me81.rightHandFinger         = -1;
         __temp_me81.isFingering             = false;
         __temp_me81.swapAccidentals         = false;
         __temp_me81.trillValue              = -1;
         __temp_me81.trillSpeed              = global::alphatab.model.Duration.ThirtySecond;
         __temp_me81.durationPercent         = ((double)(1));
         __temp_me81.octave                  = -1;
     }
 }
Пример #2
0
 public ScoreTieGlyph(global::alphatab.model.Note startNote, global::alphatab.model.Note endNote, global::alphatab.rendering.Glyph parent) : base(global::haxe.lang.EmptyObject.EMPTY)
 {
     unchecked
     {
         global::alphatab.rendering.glyphs.ScoreTieGlyph.__hx_ctor_alphatab_rendering_glyphs_ScoreTieGlyph(this, startNote, endNote, parent);
     }
 }
Пример #3
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 1542788809:
                {
                    this._parent = ((global::alphatab.rendering.Glyph)(@value));
                    return(@value);
                }


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


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


                default:
                {
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
        }
        public override void createTies(global::alphatab.model.Note n)
        {
            unchecked
            {
                if ((n.isTieDestination && (n.tieOrigin != default(global::alphatab.model.Note))))
                {
                    global::alphatab.rendering.glyphs.ScoreTieGlyph tie = new global::alphatab.rendering.glyphs.ScoreTieGlyph(((global::alphatab.model.Note)(n.tieOrigin)), ((global::alphatab.model.Note)(n)), ((global::alphatab.rendering.Glyph)(this)));
                    this.ties.push(tie);
                }
                else
                {
                    if (n.isHammerPullDestination)
                    {
                        global::alphatab.rendering.glyphs.ScoreTieGlyph tie1 = new global::alphatab.rendering.glyphs.ScoreTieGlyph(((global::alphatab.model.Note)(n.hammerPullOrigin)), ((global::alphatab.model.Note)(n)), ((global::alphatab.rendering.Glyph)(this)));
                        this.ties.push(tie1);
                    }
                    else
                    {
                        if ((n.slideType == global::alphatab.model.SlideType.Legato))
                        {
                            global::alphatab.rendering.glyphs.ScoreTieGlyph tie2 = new global::alphatab.rendering.glyphs.ScoreTieGlyph(((global::alphatab.model.Note)(n)), ((global::alphatab.model.Note)(n.slideTarget)), ((global::alphatab.rendering.Glyph)(this)));
                            this.ties.push(tie2);
                        }
                    }
                }

                if ((n.slideType != global::alphatab.model.SlideType.None))
                {
                    global::alphatab.rendering.glyphs.ScoreSlideLineGlyph l = new global::alphatab.rendering.glyphs.ScoreSlideLineGlyph(((global::alphatab.model.SlideType)(n.slideType)), ((global::alphatab.model.Note)(n)), ((global::alphatab.rendering.glyphs.BeatContainerGlyph)(this)));
                    this.ties.push(l);
                }
            }
        }
Пример #5
0
 public TabSlideLineGlyph(global::alphatab.model.SlideType type, global::alphatab.model.Note startNote, global::alphatab.rendering.glyphs.BeatContainerGlyph parent) : base(global::haxe.lang.EmptyObject.EMPTY)
 {
     unchecked
     {
         global::alphatab.rendering.glyphs.TabSlideLineGlyph.__hx_ctor_alphatab_rendering_glyphs_TabSlideLineGlyph(this, type, startNote, parent);
     }
 }
Пример #6
0
        public virtual void createNoteGlyph(global::alphatab.model.Note n)
        {
            unchecked
            {
                global::alphatab.rendering.ScoreBarRenderer sr = default(global::alphatab.rendering.ScoreBarRenderer);
                sr = ((global::alphatab.rendering.ScoreBarRenderer)(this.renderer));
                global::alphatab.rendering.Glyph noteHeadGlyph = this.createNoteHeadGlyph(n);
                int line = sr.getNoteLine(n);
                noteHeadGlyph.y = sr.getScoreY(line, new global::haxe.lang.Null <int>(-1, true));
                this.noteHeads.addNoteGlyph(noteHeadGlyph, n, line);
                if ((n.isStaccato && !(this.noteHeads.beatEffects.exists("Staccato"))))
                {
                    this.noteHeads.beatEffects.@set("Staccato", new global::alphatab.rendering.glyphs.CircleGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((double)(1.5))));
                }

                if (((n.accentuated == global::alphatab.model.AccentuationType.Normal) && !(this.noteHeads.beatEffects.exists("Accent"))))
                {
                    this.noteHeads.beatEffects.@set("Accent", new global::alphatab.rendering.glyphs.AccentuationGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.model.AccentuationType)(global::alphatab.model.AccentuationType.Normal))));
                }

                if (((n.accentuated == global::alphatab.model.AccentuationType.Heavy) && !(this.noteHeads.beatEffects.exists("HAccent"))))
                {
                    this.noteHeads.beatEffects.@set("HAccent", new global::alphatab.rendering.glyphs.AccentuationGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.model.AccentuationType)(global::alphatab.model.AccentuationType.Heavy))));
                }
            }
        }
Пример #7
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 1891834246:
                {
                    this._height = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


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


                default:
                {
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
        }
Пример #8
0
 public BendGlyph(global::alphatab.model.Note n, int width, int height) : base(global::haxe.lang.EmptyObject.EMPTY)
 {
     unchecked
     {
         global::alphatab.rendering.glyphs.BendGlyph.__hx_ctor_alphatab_rendering_glyphs_BendGlyph(this, n, width, height);
     }
 }
Пример #9
0
        public virtual void createNoteGlyphs(global::alphatab.model.Note n)
        {
            unchecked
            {
                if ((n.trillValue >= 0))
                {
                    this.addGlyph(new global::alphatab.rendering.glyphs.SpacingGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((int)((4 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))), ((global::haxe.lang.Null <bool>)(default(global::haxe.lang.Null <bool>)))));
                    global::alphatab.model.Note trillNote = new global::alphatab.model.Note();
                    trillNote.isGhost = true;
                    trillNote.fret    = (n.trillValue - n.beat.voice.bar.track.tuning[((n.beat.voice.bar.track.tuning.length - ((n.@string - 1))) - 1)]);
                    trillNote.@string = n.@string;
                    global::alphatab.rendering.TabBarRenderer tr = default(global::alphatab.rendering.TabBarRenderer);
                    tr = ((global::alphatab.rendering.TabBarRenderer)(this.renderer));
                    global::alphatab.rendering.Glyph trillNumberGlyph = new global::alphatab.rendering.glyphs.NoteNumberGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.model.Note)(trillNote)), ((bool)(true)));
                    int l = (n.beat.voice.bar.track.tuning.length - n.@string);
                    trillNumberGlyph.y = tr.getTabY(l, default(global::haxe.lang.Null <int>));
                    this.addGlyph(trillNumberGlyph);
                }

                if ((n.bendPoints.length > 1))
                {
                    int bendHeight = ((int)((60 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)));
                    this.renderer.registerOverflowTop(bendHeight);
                    int __temp_stmt599 = default(int);
                    {
                        double x = (this.getBeatDurationWidth() * this.renderer.stave.staveGroup.layout.renderer.settings.scale);
                        __temp_stmt599 = ((int)(x));
                    }

                    this.addGlyph(new global::alphatab.rendering.glyphs.BendGlyph(((global::alphatab.model.Note)(n)), ((int)(__temp_stmt599)), ((int)(bendHeight))));
                }
            }
        }
		public virtual   void createNoteGlyphs(global::alphatab.model.Note n)
		{
			unchecked 
			{
				if (( n.trillValue >= 0 )) 
				{
					this.addGlyph(new global::alphatab.rendering.glyphs.SpacingGlyph(new global::haxe.lang.Null<int>(0, true), new global::haxe.lang.Null<int>(0, true), ((int) (( 4 * this.renderer.stave.staveGroup.layout.renderer.settings.scale )) ), ((global::haxe.lang.Null<bool>) (default(global::haxe.lang.Null<bool>)) )));
					global::alphatab.model.Note trillNote = new global::alphatab.model.Note();
					trillNote.isGhost = true;
					trillNote.fret = ( n.trillValue - n.beat.voice.bar.track.tuning[( ( n.beat.voice.bar.track.tuning.length - (( n.@string - 1 )) ) - 1 )] );
					trillNote.@string = n.@string;
					global::alphatab.rendering.TabBarRenderer tr = default(global::alphatab.rendering.TabBarRenderer);
					tr = ((global::alphatab.rendering.TabBarRenderer) (this.renderer) );
					global::alphatab.rendering.Glyph trillNumberGlyph = new global::alphatab.rendering.glyphs.NoteNumberGlyph(new global::haxe.lang.Null<int>(0, true), new global::haxe.lang.Null<int>(0, true), ((global::alphatab.model.Note) (trillNote) ), ((bool) (true) ));
					int l = ( n.beat.voice.bar.track.tuning.length - n.@string );
					trillNumberGlyph.y = tr.getTabY(l, default(global::haxe.lang.Null<int>));
					this.addGlyph(trillNumberGlyph);
				}
				
				if (( n.bendPoints.length > 1 )) 
				{
					int bendHeight = ((int) (( 60 * this.renderer.stave.staveGroup.layout.renderer.settings.scale )) );
					this.renderer.registerOverflowTop(bendHeight);
					int __temp_stmt599 = default(int);
					{
						double x = ( this.getBeatDurationWidth() * this.renderer.stave.staveGroup.layout.renderer.settings.scale );
						__temp_stmt599 = ((int) (x) );
					}
					
					this.addGlyph(new global::alphatab.rendering.glyphs.BendGlyph(((global::alphatab.model.Note) (n) ), ((int) (__temp_stmt599) ), ((int) (bendHeight) )));
				}
				
			}
		}
Пример #11
0
 public virtual void addNote(global::alphatab.model.Note note)
 {
     unchecked
     {
         note.beat = this;
         this.notes.push(note);
     }
 }
Пример #12
0
 public virtual void createTies(global::alphatab.model.Note n)
 {
     unchecked
     {
         {
         }
     }
 }
Пример #13
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);
            }
        }
Пример #14
0
 public override object __hx_invoke1_o(double __fn_float1, object __fn_dyn1)
 {
     unchecked
     {
         global::alphatab.model.Note n = ((global::haxe.lang.Runtime.eq(__fn_dyn1, global::haxe.lang.Runtime.undefined)) ? (((global::alphatab.model.Note)(((object)(__fn_float1))))) : (((global::alphatab.model.Note)(__fn_dyn1))));
         ((global::alphatab.rendering.glyphs.TabBeatPostNotesGlyph)(this._g[0])).createNoteGlyphs(n);
         return(default(object));
     }
 }
Пример #15
0
 public override object __hx_invoke1_o(double __fn_float1, object __fn_dyn1)
 {
     unchecked
     {
         global::alphatab.model.Note n1 = ((global::haxe.lang.Runtime.eq(__fn_dyn1, global::haxe.lang.Runtime.undefined)) ? (((global::alphatab.model.Note)(((object)(__fn_float1))))) : (((global::alphatab.model.Note)(__fn_dyn1))));
         ((global::alphatab.rendering.glyphs.ScoreBeatGlyph)(this._g[0])).createBeatDot(n1, ((global::alphatab.rendering.glyphs.GlyphGroup)(this.@group[0])));
         return(default(object));
     }
 }
Пример #16
0
 public virtual void createBeatDot(global::alphatab.model.Note n, global::alphatab.rendering.glyphs.GlyphGroup @group)
 {
     unchecked
     {
         global::alphatab.rendering.ScoreBarRenderer sr = default(global::alphatab.rendering.ScoreBarRenderer);
         sr = ((global::alphatab.rendering.ScoreBarRenderer)(this.renderer));
         @group.addGlyph(new global::alphatab.rendering.glyphs.CircleGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(sr.getScoreY(sr.getNoteLine(n), new global::haxe.lang.Null <int>(((int)((2 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))), true)), true), ((double)((1.5 * this.renderer.stave.staveGroup.layout.renderer.settings.scale)))));
     }
 }
 public override object __hx_invoke1_o(double __fn_float1, object __fn_dyn1)
 {
     unchecked
     {
         global::alphatab.model.Note n = ((global::haxe.lang.Runtime.eq(__fn_dyn1, global::haxe.lang.Runtime.undefined)) ? (((global::alphatab.model.Note)(((object)(__fn_float1))))) : (((global::alphatab.model.Note)(__fn_dyn1))));
         ((global::alphatab.rendering.glyphs.ScoreBeatPreNotesGlyph)(this._g[0])).createAccidentalGlyph(n, ((global::alphatab.rendering.glyphs.AccidentalGroupGlyph)(this.accidentals[0])));
         return(default(object));
     }
 }
Пример #18
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));
                }
                }
            }
        }
Пример #19
0
 public virtual void addNoteGlyph(global::alphatab.rendering.glyphs.NoteNumberGlyph noteGlyph, global::alphatab.model.Note note)
 {
     unchecked
     {
         this._notes.push(noteGlyph);
         this._noteLookup.@set(note.@string, noteGlyph);
         if (((this._minNote == default(global::alphatab.model.Note)) || (note.@string < this._minNote.@string)))
         {
             this._minNote = note;
         }
     }
 }
Пример #20
0
		public virtual   int getNoteY(global::alphatab.model.Note note)
		{
			unchecked 
			{
				if (this._noteLookup.exists(note.@string)) 
				{
					return ( this.y + ((global::alphatab.rendering.Glyph) (this._noteLookup.@get(note.@string).@value) ).y );
				}
				
				return 0;
			}
		}
Пример #21
0
        public virtual int getNoteY(global::alphatab.model.Note note)
        {
            unchecked
            {
                global::alphatab.rendering.glyphs.TabBeatGlyph beat = ((global::alphatab.rendering.glyphs.TabBeatGlyph)(((global::alphatab.rendering.glyphs.BeatContainerGlyph)(this.getOrCreateVoiceContainer(note.beat.voice.index).beatGlyphs[note.beat.index])).onNotes));
                if ((beat != default(global::alphatab.rendering.glyphs.TabBeatGlyph)))
                {
                    return(beat.noteNumbers.getNoteY(note));
                }

                return(0);
            }
        }
Пример #22
0
 public virtual void createNoteGlyph(global::alphatab.model.Note n)
 {
     unchecked
     {
         bool isGrace = (this.container.beat.graceType != global::alphatab.model.GraceType.None);
         global::alphatab.rendering.TabBarRenderer tr = default(global::alphatab.rendering.TabBarRenderer);
         tr = ((global::alphatab.rendering.TabBarRenderer)(this.renderer));
         global::alphatab.rendering.glyphs.NoteNumberGlyph noteNumberGlyph = new global::alphatab.rendering.glyphs.NoteNumberGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((global::alphatab.model.Note)(n)), ((bool)(isGrace)));
         int l = ((n.beat.voice.bar.track.tuning.length - n.@string) + 1);
         noteNumberGlyph.y = tr.getTabY(l, new global::haxe.lang.Null <int>(-2, true));
         this.noteNumbers.addNoteGlyph(noteNumberGlyph, n);
     }
 }
Пример #23
0
        public virtual int getNoteX(global::alphatab.model.Note note, global::haxe.lang.Null <bool> onEnd)
        {
            unchecked
            {
                bool __temp_onEnd102 = ((global::haxe.lang.Runtime.eq((onEnd).toDynamic(), (default(global::haxe.lang.Null <bool>)).toDynamic())) ? (((bool)(true))) : (onEnd.@value));
                global::alphatab.rendering.glyphs.TabBeatGlyph beat = ((global::alphatab.rendering.glyphs.TabBeatGlyph)(((global::alphatab.rendering.glyphs.BeatContainerGlyph)(this.getOrCreateVoiceContainer(note.beat.voice.index).beatGlyphs[note.beat.index])).onNotes));
                if ((beat != default(global::alphatab.rendering.glyphs.TabBeatGlyph)))
                {
                    return((beat.container.x + beat.x) + beat.noteNumbers.getNoteX(note, new global::haxe.lang.Null <bool>(__temp_onEnd102, true)));
                }

                return(this.getPostBeatGlyphsStart());
            }
        }
Пример #24
0
 public virtual int getValue(global::alphatab.model.Note n)
 {
     unchecked
     {
         if (this._track.isPercussion)
         {
             return(global::alphatab.rendering.utils.PercussionMapper.mapValue(n));
         }
         else
         {
             return(n.fret + n.beat.voice.bar.track.tuning[((n.beat.voice.bar.track.tuning.length - ((n.@string - 1))) - 1)]);
         }
     }
 }
Пример #25
0
        public virtual void refreshNotes()
        {
            unchecked
            {
                int _g = 0;
                global::haxe.root.Array <object> _g1 = this.notes;
                while ((_g < _g1.length))
                {
                    global::alphatab.model.Note n = ((global::alphatab.model.Note)(_g1[_g]));
                    ++_g;
                    bool __temp_stmt515  = (this._minNote == default(global::alphatab.model.Note));
                    bool __temp_boolv516 = false;
                    if (!(__temp_stmt515))
                    {
                        int __temp_stmt517 = default(int);
                        {
                            global::alphatab.model.Note _this = this._minNote;
                            __temp_stmt517 = (_this.fret + _this.beat.voice.bar.track.tuning[((_this.beat.voice.bar.track.tuning.length - ((_this.@string - 1))) - 1)]);
                        }

                        __temp_boolv516 = ((n.fret + n.beat.voice.bar.track.tuning[((n.beat.voice.bar.track.tuning.length - ((n.@string - 1))) - 1)]) < __temp_stmt517);
                    }

                    bool __temp_stmt514 = (__temp_stmt515 || __temp_boolv516);
                    if (__temp_stmt514)
                    {
                        this._minNote = n;
                    }

                    bool __temp_stmt519  = (this._maxNote == default(global::alphatab.model.Note));
                    bool __temp_boolv520 = false;
                    if (!(__temp_stmt519))
                    {
                        int __temp_stmt521 = default(int);
                        {
                            global::alphatab.model.Note _this1 = this._maxNote;
                            __temp_stmt521 = (_this1.fret + _this1.beat.voice.bar.track.tuning[((_this1.beat.voice.bar.track.tuning.length - ((_this1.@string - 1))) - 1)]);
                        }

                        __temp_boolv520 = ((n.fret + n.beat.voice.bar.track.tuning[((n.beat.voice.bar.track.tuning.length - ((n.@string - 1))) - 1)]) > __temp_stmt521);
                    }

                    bool __temp_stmt518 = (__temp_stmt519 || __temp_boolv520);
                    if (__temp_stmt518)
                    {
                        this._maxNote = n;
                    }
                }
            }
        }
Пример #26
0
        public virtual global::alphatab.model.AccidentalType applyAccidental(global::alphatab.model.Note note, int noteLine)
        {
            unchecked
            {
                int noteValue = (note.fret + note.beat.voice.bar.track.tuning[((note.beat.voice.bar.track.tuning.length - ((note.@string - 1))) - 1)]);
                global::alphatab.model.MasterBar __temp_stmt608 = default(global::alphatab.model.MasterBar);
                {
                    global::alphatab.model.Bar _this = note.beat.voice.bar;
                    __temp_stmt608 = ((global::alphatab.model.MasterBar)(_this.track.score.masterBars[_this.index]));
                }

                int ks     = __temp_stmt608.keySignature;
                int ksi    = (ks + 7);
                int index  = (noteValue % 12);
                int octave = (noteValue / 12);
                global::alphatab.model.AccidentalType accidentalToSet = ((global::haxe.root.Array <global::alphatab.model.AccidentalType>)(global::haxe.root.Array <object> .__hx_cast <global::alphatab.model.AccidentalType>(((global::haxe.root.Array)(global::alphatab.rendering.utils.AccidentalHelper.AccidentalNotes[ksi])))))[index];
                bool updateAccidental = true;
                if (this._registeredAccidentals.exists(noteLine))
                {
                    global::haxe.lang.Null <global::alphatab.model.AccidentalType> registeredAccidental = this._registeredAccidentals.@get(noteLine);
                    if (global::haxe.lang.Runtime.eq((registeredAccidental).toDynamic(), accidentalToSet))
                    {
                        accidentalToSet  = global::alphatab.model.AccidentalType.None;
                        updateAccidental = false;
                    }
                    else
                    {
                        if ((accidentalToSet == global::alphatab.model.AccidentalType.None))
                        {
                            accidentalToSet = global::alphatab.model.AccidentalType.Natural;
                        }
                    }
                }

                if (updateAccidental)
                {
                    if (((accidentalToSet == global::alphatab.model.AccidentalType.None) || (accidentalToSet == global::alphatab.model.AccidentalType.Natural)))
                    {
                        this._registeredAccidentals.@remove(noteLine);
                    }
                    else
                    {
                        this._registeredAccidentals.@set(noteLine, accidentalToSet);
                    }
                }

                return(accidentalToSet);
            }
        }
Пример #27
0
		public virtual   void addNoteGlyph(global::alphatab.rendering.Glyph noteGlyph, global::alphatab.model.Note note, int noteLine)
		{
			unchecked 
			{
				object info = new global::haxe.lang.DynamicObject(new global::haxe.root.Array<int>(new int[]{369425836}), new global::haxe.root.Array<object>(new object[]{noteGlyph}), new global::haxe.root.Array<int>(new int[]{1202919412}), new global::haxe.root.Array<double>(new double[]{((double) (noteLine) )}));
				this._infos.push(info);
				this._noteLookup.@set(note.@string, noteGlyph);
				if (( global::haxe.lang.Runtime.refEq(this.minNote, default(object)) || ( global::haxe.lang.Runtime.compare(((int) (global::haxe.lang.Runtime.getField_f(this.minNote, "line", 1202919412, true)) ), ((int) (global::haxe.lang.Runtime.getField_f(info, "line", 1202919412, true)) )) > 0 ) )) 
				{
					this.minNote = info;
				}
				
				if (( global::haxe.lang.Runtime.refEq(this.maxNote, default(object)) || ( global::haxe.lang.Runtime.compare(((int) (global::haxe.lang.Runtime.getField_f(this.maxNote, "line", 1202919412, true)) ), ((int) (global::haxe.lang.Runtime.getField_f(info, "line", 1202919412, true)) )) < 0 ) )) 
				{
					this.maxNote = info;
				}
				
			}
		}
Пример #28
0
        public virtual global::alphatab.model.Note clone()
        {
            unchecked
            {
                global::alphatab.model.Note n = new global::alphatab.model.Note();
                {
                    int _g = 0;
                    global::haxe.root.Array <object> _g1 = this.bendPoints;
                    while ((_g < _g1.length))
                    {
                        global::alphatab.model.BendPoint p = ((global::alphatab.model.BendPoint)(_g1[_g]));
                        ++_g;
                        n.bendPoints.push(p.clone());
                    }
                }

                n.dynamicValue            = this.dynamicValue;
                n.accentuated             = this.accentuated;
                n.fret                    = this.fret;
                n.isGhost                 = this.isGhost;
                n.@string                 = this.@string;
                n.isHammerPullDestination = this.isHammerPullDestination;
                n.isHammerPullOrigin      = this.isHammerPullOrigin;
                n.harmonicValue           = this.harmonicValue;
                n.harmonicType            = this.harmonicType;
                n.isLetRing               = this.isLetRing;
                n.isPalmMute              = this.isPalmMute;
                n.isDead                  = this.isDead;
                n.slideType               = this.slideType;
                n.vibrato                 = this.vibrato;
                n.isStaccato              = this.isStaccato;
                n.isTieOrigin             = this.isTieOrigin;
                n.isTieDestination        = this.isTieDestination;
                n.leftHandFinger          = this.leftHandFinger;
                n.rightHandFinger         = this.rightHandFinger;
                n.isFingering             = n.isFingering;
                n.swapAccidentals         = this.swapAccidentals;
                n.trillValue              = this.trillValue;
                n.trillSpeed              = this.trillSpeed;
                n.durationPercent         = this.durationPercent;
                return(n);
            }
        }
        public virtual void createAccidentalGlyph(global::alphatab.model.Note n, global::alphatab.rendering.glyphs.AccidentalGroupGlyph accidentals)
        {
            unchecked
            {
                global::alphatab.rendering.ScoreBarRenderer sr = default(global::alphatab.rendering.ScoreBarRenderer);
                sr = ((global::alphatab.rendering.ScoreBarRenderer)(this.renderer));
                int noteLine = sr.getNoteLine(n);
                global::alphatab.model.AccidentalType accidental = sr.accidentalHelper.applyAccidental(n, noteLine);
                bool isGrace = (this.container.beat.graceType != global::alphatab.model.GraceType.None);
                switch (global::haxe.root.Type.enumIndex(accidental))
                {
                case 2:
                {
                    accidentals.addGlyph(new global::alphatab.rendering.glyphs.SharpGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(sr.getScoreY(noteLine, default(global::haxe.lang.Null <int>)), true), new global::haxe.lang.Null <bool>(isGrace, true)));
                    break;
                }


                case 3:
                {
                    accidentals.addGlyph(new global::alphatab.rendering.glyphs.FlatGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(sr.getScoreY(noteLine, default(global::haxe.lang.Null <int>)), true), new global::haxe.lang.Null <bool>(isGrace, true)));
                    break;
                }


                case 1:
                {
                    accidentals.addGlyph(new global::alphatab.rendering.glyphs.NaturalizeGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(sr.getScoreY((noteLine + 1), default(global::haxe.lang.Null <int>)), true), new global::haxe.lang.Null <bool>(isGrace, true)));
                    break;
                }


                default:
                {
                    {
                    }

                    break;
                }
                }
            }
        }
Пример #30
0
		public virtual   int getNoteX(global::alphatab.model.Note note, global::haxe.lang.Null<bool> onEnd)
		{
			unchecked 
			{
				bool __temp_onEnd195 = ( (global::haxe.lang.Runtime.eq((onEnd).toDynamic(), (default(global::haxe.lang.Null<bool>)).toDynamic())) ? (((bool) (true) )) : (onEnd.@value) );
				if (this._noteLookup.exists(note.@string)) 
				{
					global::alphatab.rendering.Glyph n = ((global::alphatab.rendering.Glyph) (this._noteLookup.@get(note.@string).@value) );
					int pos = ( this.x + n.x );
					if (__temp_onEnd195) 
					{
						pos += n.width;
					}
					
					return pos;
				}
				
				return 0;
			}
		}
Пример #31
0
        public virtual global::alphatab.model.Note getNoteOnString(int @string)
        {
            unchecked
            {
                {
                    int _g = 0;
                    global::haxe.root.Array <object> _g1 = this.notes;
                    while ((_g < _g1.length))
                    {
                        global::alphatab.model.Note n = ((global::alphatab.model.Note)(_g1[_g]));
                        ++_g;
                        if ((n.@string == @string))
                        {
                            return(n);
                        }
                    }
                }

                return(default(global::alphatab.model.Note));
            }
        }
Пример #32
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);
					}
					
				}
				
			}
		}
Пример #33
0
		public virtual   void addNoteGlyph(global::alphatab.rendering.glyphs.NoteNumberGlyph noteGlyph, global::alphatab.model.Note note)
		{
			unchecked 
			{
				this._notes.push(noteGlyph);
				this._noteLookup.@set(note.@string, noteGlyph);
				if (( ( this._minNote == default(global::alphatab.model.Note) ) || ( note.@string < this._minNote.@string ) )) 
				{
					this._minNote = note;
				}
				
			}
		}
Пример #34
0
		public virtual   void refreshNotes()
		{
			unchecked 
			{
				int _g = 0;
				global::haxe.root.Array<object> _g1 = this.notes;
				while (( _g < _g1.length ))
				{
					global::alphatab.model.Note n = ((global::alphatab.model.Note) (_g1[_g]) );
					 ++ _g;
					bool __temp_stmt515 = ( this._minNote == default(global::alphatab.model.Note) );
					bool __temp_boolv516 = false;
					if ( ! (__temp_stmt515) ) 
					{
						int __temp_stmt517 = default(int);
						{
							global::alphatab.model.Note _this = this._minNote;
							__temp_stmt517 = ( _this.fret + _this.beat.voice.bar.track.tuning[( ( _this.beat.voice.bar.track.tuning.length - (( _this.@string - 1 )) ) - 1 )] );
						}
						
						__temp_boolv516 = ( ( n.fret + n.beat.voice.bar.track.tuning[( ( n.beat.voice.bar.track.tuning.length - (( n.@string - 1 )) ) - 1 )] ) < __temp_stmt517 );
					}
					
					bool __temp_stmt514 = ( __temp_stmt515 || __temp_boolv516 );
					if (__temp_stmt514) 
					{
						this._minNote = n;
					}
					
					bool __temp_stmt519 = ( this._maxNote == default(global::alphatab.model.Note) );
					bool __temp_boolv520 = false;
					if ( ! (__temp_stmt519) ) 
					{
						int __temp_stmt521 = default(int);
						{
							global::alphatab.model.Note _this1 = this._maxNote;
							__temp_stmt521 = ( _this1.fret + _this1.beat.voice.bar.track.tuning[( ( _this1.beat.voice.bar.track.tuning.length - (( _this1.@string - 1 )) ) - 1 )] );
						}
						
						__temp_boolv520 = ( ( n.fret + n.beat.voice.bar.track.tuning[( ( n.beat.voice.bar.track.tuning.length - (( n.@string - 1 )) ) - 1 )] ) > __temp_stmt521 );
					}
					
					bool __temp_stmt518 = ( __temp_stmt519 || __temp_boolv520 );
					if (__temp_stmt518) 
					{
						this._maxNote = n;
					}
					
				}
				
			}
		}
Пример #35
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);
					}
					
				}
				
			}
		}
Пример #36
0
		public virtual   void checkNote(global::alphatab.model.Note note)
		{
			unchecked 
			{
				int @value = ( note.fret + note.beat.voice.bar.track.tuning[( ( note.beat.voice.bar.track.tuning.length - (( note.@string - 1 )) ) - 1 )] );
				if (( ( this.firstMinNote == default(global::alphatab.model.Note) ) || ( note.beat.index < this.firstMinNote.beat.index ) )) 
				{
					this.firstMinNote = note;
				}
				 else 
				{
					if (( note.beat.index == this.firstMinNote.beat.index )) 
					{
						int __temp_stmt609 = default(int);
						{
							global::alphatab.model.Note _this = this.firstMinNote;
							__temp_stmt609 = ( _this.fret + _this.beat.voice.bar.track.tuning[( ( _this.beat.voice.bar.track.tuning.length - (( _this.@string - 1 )) ) - 1 )] );
						}
						
						if (( ( note.fret + note.beat.voice.bar.track.tuning[( ( note.beat.voice.bar.track.tuning.length - (( note.@string - 1 )) ) - 1 )] ) < __temp_stmt609 )) 
						{
							this.firstMinNote = note;
						}
						
					}
					
				}
				
				if (( ( this.firstMaxNote == default(global::alphatab.model.Note) ) || ( note.beat.index < this.firstMaxNote.beat.index ) )) 
				{
					this.firstMaxNote = note;
				}
				 else 
				{
					if (( note.beat.index == this.firstMaxNote.beat.index )) 
					{
						int __temp_stmt610 = default(int);
						{
							global::alphatab.model.Note _this1 = this.firstMaxNote;
							__temp_stmt610 = ( _this1.fret + _this1.beat.voice.bar.track.tuning[( ( _this1.beat.voice.bar.track.tuning.length - (( _this1.@string - 1 )) ) - 1 )] );
						}
						
						if (( ( note.fret + note.beat.voice.bar.track.tuning[( ( note.beat.voice.bar.track.tuning.length - (( note.@string - 1 )) ) - 1 )] ) > __temp_stmt610 )) 
						{
							this.firstMaxNote = note;
						}
						
					}
					
				}
				
				if (( ( this.lastMinNote == default(global::alphatab.model.Note) ) || ( note.beat.index > this.lastMinNote.beat.index ) )) 
				{
					this.lastMinNote = note;
				}
				 else 
				{
					if (( note.beat.index == this.lastMinNote.beat.index )) 
					{
						int __temp_stmt611 = default(int);
						{
							global::alphatab.model.Note _this2 = this.lastMinNote;
							__temp_stmt611 = ( _this2.fret + _this2.beat.voice.bar.track.tuning[( ( _this2.beat.voice.bar.track.tuning.length - (( _this2.@string - 1 )) ) - 1 )] );
						}
						
						if (( ( note.fret + note.beat.voice.bar.track.tuning[( ( note.beat.voice.bar.track.tuning.length - (( note.@string - 1 )) ) - 1 )] ) < __temp_stmt611 )) 
						{
							this.lastMinNote = note;
						}
						
					}
					
				}
				
				if (( ( this.lastMaxNote == default(global::alphatab.model.Note) ) || ( note.beat.index > this.lastMaxNote.beat.index ) )) 
				{
					this.lastMaxNote = note;
				}
				 else 
				{
					if (( note.beat.index == this.lastMaxNote.beat.index )) 
					{
						int __temp_stmt612 = default(int);
						{
							global::alphatab.model.Note _this3 = this.lastMaxNote;
							__temp_stmt612 = ( _this3.fret + _this3.beat.voice.bar.track.tuning[( ( _this3.beat.voice.bar.track.tuning.length - (( _this3.@string - 1 )) ) - 1 )] );
						}
						
						if (( ( note.fret + note.beat.voice.bar.track.tuning[( ( note.beat.voice.bar.track.tuning.length - (( note.@string - 1 )) ) - 1 )] ) > __temp_stmt612 )) 
						{
							this.lastMaxNote = note;
						}
						
					}
					
				}
				
				bool __temp_stmt614 = ( this.maxNote == default(global::alphatab.model.Note) );
				bool __temp_boolv615 = false;
				if ( ! (__temp_stmt614) ) 
				{
					int __temp_stmt616 = default(int);
					{
						global::alphatab.model.Note _this4 = this.maxNote;
						__temp_stmt616 = ( _this4.fret + _this4.beat.voice.bar.track.tuning[( ( _this4.beat.voice.bar.track.tuning.length - (( _this4.@string - 1 )) ) - 1 )] );
					}
					
					__temp_boolv615 = ( @value > __temp_stmt616 );
				}
				
				bool __temp_stmt613 = ( __temp_stmt614 || __temp_boolv615 );
				if (__temp_stmt613) 
				{
					this.maxNote = note;
				}
				
				bool __temp_stmt618 = ( this.minNote == default(global::alphatab.model.Note) );
				bool __temp_boolv619 = false;
				if ( ! (__temp_stmt618) ) 
				{
					int __temp_stmt620 = default(int);
					{
						global::alphatab.model.Note _this5 = this.minNote;
						__temp_stmt620 = ( _this5.fret + _this5.beat.voice.bar.track.tuning[( ( _this5.beat.voice.bar.track.tuning.length - (( _this5.@string - 1 )) ) - 1 )] );
					}
					
					__temp_boolv619 = ( @value < __temp_stmt620 );
				}
				
				bool __temp_stmt617 = ( __temp_stmt618 || __temp_boolv619 );
				if (__temp_stmt617) 
				{
					this.minNote = note;
				}
				
			}
		}
Пример #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);
					}
					
				}
				
			}
		}
Пример #38
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 1891834246:
					{
						this._height = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 2082157521:
					{
						this._note = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}
Пример #39
0
		public virtual   global::alphatab.model.Note note(global::alphatab.model.Beat beat)
		{
			unchecked 
			{
				if (( ( this._sy != global::alphatab.importer.AlphaTexSymbols.Number ) &&  ! ((( ( this._sy == global::alphatab.importer.AlphaTexSymbols.String ) && (( string.Equals(global::Std.@string(this._syData).ToLower(), "x") || string.Equals(global::Std.@string(this._syData).ToLower(), "-") )) )))  )) 
				{
					this.error("note-fret", global::alphatab.importer.AlphaTexSymbols.Number, default(global::haxe.lang.Null<bool>));
				}
				
				bool isDead = string.Equals(global::Std.@string(this._syData).ToLower(), "x");
				bool isTie = string.Equals(global::Std.@string(this._syData).ToLower(), "-");
				int fret = default(int);
				if (( isDead || isTie )) 
				{
					fret = 0;
				}
				 else 
				{
					fret = ((int) (global::haxe.lang.Runtime.toInt(this._syData)) );
				}
				
				this.newSy();
				if (( this._sy != global::alphatab.importer.AlphaTexSymbols.Dot )) 
				{
					this.error("note", global::alphatab.importer.AlphaTexSymbols.Dot, default(global::haxe.lang.Null<bool>));
				}
				
				this.newSy();
				if (( this._sy != global::alphatab.importer.AlphaTexSymbols.Number )) 
				{
					this.error("note-string", global::alphatab.importer.AlphaTexSymbols.Number, default(global::haxe.lang.Null<bool>));
				}
				
				int @string = ((int) (global::haxe.lang.Runtime.toInt(this._syData)) );
				if (( ( @string < 1 ) || ( @string > this._track.tuning.length ) )) 
				{
					this.error("note-string", global::alphatab.importer.AlphaTexSymbols.Number, new global::haxe.lang.Null<bool>(false, true));
				}
				
				this.newSy();
				global::alphatab.model.Note note = new global::alphatab.model.Note();
				this.noteEffects(note);
				note.@string = ( this._track.tuning.length - (( @string - 1 )) );
				note.isDead = isDead;
				note.isTieDestination = isTie;
				if ( ! (isTie) ) 
				{
					note.fret = fret;
				}
				
				beat.addNote(note);
				return note;
			}
		}
Пример #40
0
		public virtual   void readNote(global::alphatab.model.Track track, global::alphatab.model.Bar bar, global::alphatab.model.Voice voice, global::alphatab.model.Beat beat, int stringIndex)
		{
			unchecked 
			{
				global::alphatab.model.Note newNote = new global::alphatab.model.Note();
				newNote.@string = ( track.tuning.length - stringIndex );
				int flags = this._data.readByte();
				if (( (( flags & 2 )) != 0 )) 
				{
					newNote.accentuated = global::alphatab.model.AccentuationType.Heavy;
				}
				 else 
				{
					if (( (( flags & 64 )) != 0 )) 
					{
						newNote.accentuated = global::alphatab.model.AccentuationType.Normal;
					}
					
				}
				
				newNote.isGhost = ( (( flags & 4 )) != 0 );
				if (( (( flags & 32 )) != 0 )) 
				{
					int noteType = this._data.readByte();
					if (( noteType == 3 )) 
					{
						newNote.isDead = true;
					}
					 else 
					{
						if (( noteType == 2 )) 
						{
							newNote.isTieDestination = true;
						}
						
					}
					
				}
				
				if (( (( flags & 16 )) != 0 )) 
				{
					int dynamicNumber = this._data.readInt8();
					newNote.dynamicValue = this.toDynamicValue(dynamicNumber);
					beat.dynamicValue = newNote.dynamicValue;
				}
				
				if (( (( flags & 32 )) != 0 )) 
				{
					newNote.fret = this._data.readInt8();
				}
				
				if (( (( flags & 128 )) != 0 )) 
				{
					newNote.leftHandFinger = this._data.readInt8();
					newNote.rightHandFinger = this._data.readInt8();
					newNote.isFingering = true;
				}
				
				if (( this._versionNumber >= 500 )) 
				{
					if (( (( flags & 1 )) != 0 )) 
					{
						newNote.durationPercent = this.readDouble();
					}
					
					int flags2 = this._data.readByte();
					newNote.swapAccidentals = ( (( flags2 & 2 )) != 0 );
				}
				
				beat.addNote(newNote);
				if (( (( flags & 8 )) != 0 )) 
				{
					this.readNoteEffects(track, voice, beat, newNote);
				}
				
			}
		}
Пример #41
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);
			}
		}
Пример #42
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);
					}
					
				}
				
			}
		}
Пример #43
0
		public virtual   global::alphatab.model.Note clone()
		{
			unchecked 
			{
				global::alphatab.model.Note n = new global::alphatab.model.Note();
				{
					int _g = 0;
					global::haxe.root.Array<object> _g1 = this.bendPoints;
					while (( _g < _g1.length ))
					{
						global::alphatab.model.BendPoint p = ((global::alphatab.model.BendPoint) (_g1[_g]) );
						 ++ _g;
						n.bendPoints.push(p.clone());
					}
					
				}
				
				n.dynamicValue = this.dynamicValue;
				n.accentuated = this.accentuated;
				n.fret = this.fret;
				n.isGhost = this.isGhost;
				n.@string = this.@string;
				n.isHammerPullDestination = this.isHammerPullDestination;
				n.isHammerPullOrigin = this.isHammerPullOrigin;
				n.harmonicValue = this.harmonicValue;
				n.harmonicType = this.harmonicType;
				n.isLetRing = this.isLetRing;
				n.isPalmMute = this.isPalmMute;
				n.isDead = this.isDead;
				n.slideType = this.slideType;
				n.vibrato = this.vibrato;
				n.isStaccato = this.isStaccato;
				n.isTieOrigin = this.isTieOrigin;
				n.isTieDestination = this.isTieDestination;
				n.leftHandFinger = this.leftHandFinger;
				n.rightHandFinger = this.rightHandFinger;
				n.isFingering = n.isFingering;
				n.swapAccidentals = this.swapAccidentals;
				n.trillValue = this.trillValue;
				n.trillSpeed = this.trillSpeed;
				n.durationPercent = this.durationPercent;
				return n;
			}
		}
Пример #44
0
		public virtual   void parseNote(global::haxe.root.Xml node)
		{
			unchecked 
			{
				global::alphatab.model.Note note = new global::alphatab.model.Note();
				string noteId = node.@get("id");
				{
					object __temp_iterator437 = node.iterator();
					while (((bool) (global::haxe.lang.Runtime.callField(__temp_iterator437, "hasNext", 407283053, default(global::haxe.root.Array))) ))
					{
						global::haxe.root.Xml c = ((global::haxe.root.Xml) (global::haxe.lang.Runtime.callField(__temp_iterator437, "next", 1224901875, default(global::haxe.root.Array))) );
						if (( c.nodeType == global::haxe.root.Xml.Element )) 
						{
							string _g = c._get_nodeName();
							switch (_g)
							{
								case "Properties":
								{
									this.parseNoteProperties(c, note, noteId);
									break;
								}
								
								
								case "AntiAccent":
								{
									if (string.Equals(this.getValue(c).ToLower(), "normal")) 
									{
										note.isGhost = true;
									}
									
									break;
								}
								
								
								case "LetRing":
								{
									note.isLetRing = true;
									break;
								}
								
								
								case "Trill":
								{
									note.trillValue = global::Std.parseInt(this.getValue(c)).@value;
									note.trillSpeed = global::alphatab.model.Duration.Sixteenth;
									break;
								}
								
								
								case "Accent":
								{
									global::haxe.lang.Null<int> accentFlags = global::Std.parseInt(this.getValue(c));
									if (( (( accentFlags.@value & 1 )) != 0 )) 
									{
										note.isStaccato = true;
									}
									
									if (( (( accentFlags.@value & 4 )) != 0 )) 
									{
										note.accentuated = global::alphatab.model.AccentuationType.Heavy;
									}
									
									if (( (( accentFlags.@value & 8 )) != 0 )) 
									{
										note.accentuated = global::alphatab.model.AccentuationType.Normal;
									}
									
									break;
								}
								
								
								case "Tie":
								{
									if (string.Equals(c.@get("origin").ToLower(), "true")) 
									{
										note.isTieOrigin = true;
									}
									
									if (string.Equals(c.@get("destination").ToLower(), "true")) 
									{
										note.isTieDestination = true;
									}
									
									break;
								}
								
								
								case "Vibrato":
								{
									string _g1 = this.getValue(c);
									switch (_g1)
									{
										case "Slight":
										{
											note.vibrato = global::alphatab.model.VibratoType.Slight;
											break;
										}
										
										
										case "Wide":
										{
											note.vibrato = global::alphatab.model.VibratoType.Wide;
											break;
										}
										
										
									}
									
									break;
								}
								
								
							}
							
						}
						
					}
					
				}
				
				this._noteById.@set(noteId, note);
			}
		}
Пример #45
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 1542788809:
					{
						this._parent = ((global::alphatab.rendering.Glyph) (@value) );
						return @value;
					}
					
					
					case 1692871406:
					{
						this._endNote = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					case 1570770229:
					{
						this._startNote = ((global::alphatab.model.Note) (@value) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}