public virtual int getNoteX(global::alphatab.model.Note note, global::haxe.lang.Null <bool> onEnd)
        {
            unchecked
            {
                bool __temp_onEnd217 = ((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.glyphs.NoteNumberGlyph n = ((global::alphatab.rendering.glyphs.NoteNumberGlyph)(this._noteLookup.@get(note.@string).@value));
                    int pos = ((this.x + n.x) + ((int)((0 * this.renderer.stave.staveGroup.layout.renderer.settings.scale))));
                    if (__temp_onEnd217)
                    {
                        n.calculateWidth();
                        pos += n.width;
                    }

                    return(pos);
                }

                return(0);
            }
        }