示例#1
0
        public virtual bool shouldCreateGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat)
        {
            unchecked
            {
                bool __temp_boolv487 = (beat.index == 0);
                bool __temp_boolv486 = false;
                if (__temp_boolv487)
                {
                    global::alphatab.model.MasterBar __temp_stmt490 = default(global::alphatab.model.MasterBar);
                    {
                        global::alphatab.model.Bar _this = beat.voice.bar;
                        __temp_stmt490 = ((global::alphatab.model.MasterBar)(_this.track.score.masterBars[_this.index]));
                    }

                    bool __temp_stmt489  = (__temp_stmt490.tempoAutomation != default(global::alphatab.model.Automation));
                    bool __temp_boolv491 = false;
                    if (!(__temp_stmt489))
                    {
                        __temp_boolv491 = (beat.voice.bar.index == 0);
                    }

                    bool __temp_stmt488 = (__temp_stmt489 || __temp_boolv491);
                    __temp_boolv486 = (__temp_stmt488);
                }

                bool __temp_stmt485 = (__temp_boolv487 && __temp_boolv486);
                return(__temp_stmt485);
            }
        }
示例#2
0
        public virtual void addMasterBar(global::alphatab.model.MasterBar masterBar)
        {
            unchecked
            {
                if ((this.openings.length == 0))
                {
                    this.openings.push(masterBar);
                }

                this.masterBars.push(masterBar);
                masterBar.repeatGroup = this;
                if ((masterBar.repeatCount > 0))
                {
                    this.closings.push(masterBar);
                    this.isClosed = true;
                }
                else
                {
                    if (this.isClosed)
                    {
                        this.isClosed = false;
                        this.openings.push(masterBar);
                    }
                }
            }
        }
示例#3
0
        public virtual global::alphatab.rendering.Glyph createNewGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat)
        {
            unchecked
            {
                int tempo = default(int);
                global::alphatab.model.MasterBar __temp_stmt492 = default(global::alphatab.model.MasterBar);
                {
                    global::alphatab.model.Bar _this = beat.voice.bar;
                    __temp_stmt492 = ((global::alphatab.model.MasterBar)(_this.track.score.masterBars[_this.index]));
                }

                if ((__temp_stmt492.tempoAutomation != default(global::alphatab.model.Automation)))
                {
                    global::alphatab.model.MasterBar __temp_stmt493 = default(global::alphatab.model.MasterBar);
                    {
                        global::alphatab.model.Bar _this1 = beat.voice.bar;
                        __temp_stmt493 = ((global::alphatab.model.MasterBar)(_this1.track.score.masterBars[_this1.index]));
                    }

                    tempo = ((int)(__temp_stmt493.tempoAutomation.@value));
                }
                else
                {
                    tempo = beat.voice.bar.track.score.tempo;
                }

                return(new global::alphatab.rendering.glyphs.effects.TempoGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((int)(tempo))));
            }
        }
示例#4
0
        public override void createPreBeatGlyphs()
        {
            unchecked
            {
                global::alphatab.model.MasterBar __temp_stmt567 = default(global::alphatab.model.MasterBar);
                {
                    global::alphatab.model.Bar _this = this._bar;
                    __temp_stmt567 = ((global::alphatab.model.MasterBar)(_this.track.score.masterBars[_this.index]));
                }

                if (__temp_stmt567.isRepeatStart)
                {
                    this.addPreBeatGlyph(new global::alphatab.rendering.glyphs.RepeatOpenGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((double)(1.5)), ((int)(3))));
                }

                if ((this.index == 0))
                {
                    this.addPreBeatGlyph(new global::alphatab.rendering.glyphs.TabClefGlyph());
                }

                this.addPreBeatGlyph(new global::alphatab.rendering.glyphs.BarNumberGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(this.getTabY(-1, new global::haxe.lang.Null <int>(-3, true)), true), ((int)((this._bar.index + 1))), new global::haxe.lang.Null <bool>(!(this.stave.isFirstInAccolade), true)));
                if (this._bar.isEmpty())
                {
                    this.addPreBeatGlyph(new global::alphatab.rendering.glyphs.SpacingGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((int)((30 * this.stave.staveGroup.layout.renderer.settings.scale))), new global::haxe.lang.Null <bool>(false, true)));
                }
            }
        }
示例#5
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))));
            }
        }
        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);
            }
        }
示例#7
0
 public static void __hx_ctor_alphatab_model_MasterBar(global::alphatab.model.MasterBar __temp_me79)
 {
     unchecked
     {
         __temp_me79.alternateEndings         = 0;
         __temp_me79.repeatCount              = 0;
         __temp_me79.index                    = 0;
         __temp_me79.keySignature             = 0;
         __temp_me79.isDoubleBar              = false;
         __temp_me79.isRepeatStart            = false;
         __temp_me79.repeatCount              = 0;
         __temp_me79.timeSignatureDenominator = 4;
         __temp_me79.timeSignatureNumerator   = 4;
         __temp_me79.tripletFeel              = global::alphatab.model.TripletFeel.NoTripletFeel;
         __temp_me79.start                    = 0;
     }
 }
示例#8
0
        public virtual bool shouldCreateGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat)
        {
            unchecked
            {
                bool __temp_boolv482 = (beat.index == 0);
                bool __temp_boolv481 = false;
                if (__temp_boolv482)
                {
                    global::alphatab.model.MasterBar __temp_stmt483 = default(global::alphatab.model.MasterBar);
                    {
                        global::alphatab.model.Bar _this = beat.voice.bar;
                        __temp_stmt483 = ((global::alphatab.model.MasterBar)(_this.track.score.masterBars[_this.index]));
                    }

                    __temp_boolv481 = (__temp_stmt483.section != default(global::alphatab.model.Section));
                }

                bool __temp_stmt480 = (__temp_boolv482 && __temp_boolv481);
                return(__temp_stmt480);
            }
        }
示例#9
0
        public virtual void addMasterBar(global::alphatab.model.MasterBar bar)
        {
            unchecked
            {
                bar.score = this;
                bar.index = this.masterBars.length;
                if ((this.masterBars.length != 0))
                {
                    bar.previousMasterBar = ((global::alphatab.model.MasterBar)(this.masterBars[(this.masterBars.length - 1)]));
                    bar.previousMasterBar.nextMasterBar = bar;
                    bar.start = (bar.previousMasterBar.start + bar.previousMasterBar.calculateDuration());
                }

                if ((bar.isRepeatStart || (this._currentRepeatGroup.isClosed && (bar.alternateEndings <= 0))))
                {
                    this._currentRepeatGroup = new global::alphatab.model.RepeatGroup();
                }

                this._currentRepeatGroup.addMasterBar(bar);
                this.masterBars.push(bar);
            }
        }
示例#10
0
		public override   object __hx_setField(string field, int hash, object @value, bool handleProperties)
		{
			unchecked 
			{
				switch (hash)
				{
					case 67859554:
					{
						this.start = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 2027516754:
					{
						this.score = ((global::alphatab.model.Score) (@value) );
						return @value;
					}
					
					
					case 726713937:
					{
						this.volumeAutomation = ((global::alphatab.model.Automation) (@value) );
						return @value;
					}
					
					
					case 288700050:
					{
						this.tempoAutomation = ((global::alphatab.model.Automation) (@value) );
						return @value;
					}
					
					
					case 1574438373:
					{
						this.section = ((global::alphatab.model.Section) (@value) );
						return @value;
					}
					
					
					case 1999551132:
					{
						this.tripletFeel = ((global::alphatab.model.TripletFeel) (@value) );
						return @value;
					}
					
					
					case 1324324830:
					{
						this.timeSignatureNumerator = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 46594619:
					{
						this.timeSignatureDenominator = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1796997604:
					{
						this.repeatGroup = ((global::alphatab.model.RepeatGroup) (@value) );
						return @value;
					}
					
					
					case 462066548:
					{
						this.repeatCount = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1582764861:
					{
						this.isRepeatStart = ((bool) (@value) );
						return @value;
					}
					
					
					case 875656696:
					{
						this.isDoubleBar = ((bool) (@value) );
						return @value;
					}
					
					
					case 1832144217:
					{
						this.keySignature = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 1041537810:
					{
						this.index = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					case 127983386:
					{
						this.previousMasterBar = ((global::alphatab.model.MasterBar) (@value) );
						return @value;
					}
					
					
					case 344334046:
					{
						this.nextMasterBar = ((global::alphatab.model.MasterBar) (@value) );
						return @value;
					}
					
					
					case 1116545170:
					{
						this.alternateEndings = ((int) (global::haxe.lang.Runtime.toInt(@value)) );
						return @value;
					}
					
					
					default:
					{
						return base.__hx_setField(field, hash, @value, handleProperties);
					}
					
				}
				
			}
		}
示例#11
0
        public override object __hx_setField(string field, int hash, object @value, bool handleProperties)
        {
            unchecked
            {
                switch (hash)
                {
                case 67859554:
                {
                    this.start = ((int)(global::haxe.lang.Runtime.toInt(@value)));
                    return(@value);
                }


                case 2027516754:
                {
                    this.score = ((global::alphatab.model.Score)(@value));
                    return(@value);
                }


                case 726713937:
                {
                    this.volumeAutomation = ((global::alphatab.model.Automation)(@value));
                    return(@value);
                }


                case 288700050:
                {
                    this.tempoAutomation = ((global::alphatab.model.Automation)(@value));
                    return(@value);
                }


                case 1574438373:
                {
                    this.section = ((global::alphatab.model.Section)(@value));
                    return(@value);
                }


                case 1999551132:
                {
                    this.tripletFeel = ((global::alphatab.model.TripletFeel)(@value));
                    return(@value);
                }


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


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


                case 1796997604:
                {
                    this.repeatGroup = ((global::alphatab.model.RepeatGroup)(@value));
                    return(@value);
                }


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


                case 1582764861:
                {
                    this.isRepeatStart = ((bool)(@value));
                    return(@value);
                }


                case 875656696:
                {
                    this.isDoubleBar = ((bool)(@value));
                    return(@value);
                }


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


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


                case 127983386:
                {
                    this.previousMasterBar = ((global::alphatab.model.MasterBar)(@value));
                    return(@value);
                }


                case 344334046:
                {
                    this.nextMasterBar = ((global::alphatab.model.MasterBar)(@value));
                    return(@value);
                }


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


                default:
                {
                    return(base.__hx_setField(field, hash, @value, handleProperties));
                }
                }
            }
        }
示例#12
0
		public virtual   void parseMasterBar(global::haxe.root.Xml node)
		{
			unchecked 
			{
				global::alphatab.model.MasterBar masterBar = new global::alphatab.model.MasterBar();
				{
					object __temp_iterator428 = node.iterator();
					while (((bool) (global::haxe.lang.Runtime.callField(__temp_iterator428, "hasNext", 407283053, default(global::haxe.root.Array))) ))
					{
						global::haxe.root.Xml c = ((global::haxe.root.Xml) (global::haxe.lang.Runtime.callField(__temp_iterator428, "next", 1224901875, default(global::haxe.root.Array))) );
						if (( c.nodeType == global::haxe.root.Xml.Element )) 
						{
							string _g = c._get_nodeName();
							switch (_g)
							{
								case "Time":
								{
									global::haxe.root.Array<object> timeParts = global::haxe.lang.StringExt.split(this.getValue(c), "/");
									masterBar.timeSignatureNumerator = global::Std.parseInt(global::haxe.lang.Runtime.toString(timeParts[0])).@value;
									masterBar.timeSignatureDenominator = global::Std.parseInt(global::haxe.lang.Runtime.toString(timeParts[1])).@value;
									break;
								}
								
								
								case "DoubleBar":
								{
									masterBar.isDoubleBar = true;
									break;
								}
								
								
								case "Section":
								{
									masterBar.section = new global::alphatab.model.Section();
									masterBar.section.marker = this.getValue(this.findChildElement(c, "Letter"));
									masterBar.section.text = this.getValue(this.findChildElement(c, "Text"));
									break;
								}
								
								
								case "Repeat":
								{
									if (string.Equals(c.@get("start").ToLower(), "true")) 
									{
										masterBar.isRepeatStart = true;
									}
									
									if (( string.Equals(c.@get("end").ToLower(), "true") &&  ! (string.Equals(c.@get("count"), default(string)))  )) 
									{
										masterBar.repeatCount = global::Std.parseInt(c.@get("count")).@value;
									}
									
									break;
								}
								
								
								case "AlternateEndings":
								{
									global::haxe.root.Array<object> alternateEndings = global::haxe.lang.StringExt.split(this.getValue(c), " ");
									int i = 0;
									{
										int _g2 = 0;
										int _g1 = alternateEndings.length;
										while (( _g2 < _g1 ))
										{
											int k = _g2++;
											i |= ( 1 << ( -1 + global::Std.parseInt(global::haxe.lang.Runtime.toString(alternateEndings[i])).@value ) );
										}
										
									}
									
									masterBar.alternateEndings = i;
									break;
								}
								
								
								case "Bars":
								{
									this._barsOfMasterBar.push(global::haxe.lang.StringExt.split(this.getValue(c), " "));
									break;
								}
								
								
								case "TripletFeel":
								{
									string _g11 = this.getValue(c);
									switch (_g11)
									{
										case "NoTripletFeel":
										{
											masterBar.tripletFeel = global::alphatab.model.TripletFeel.NoTripletFeel;
											break;
										}
										
										
										case "Triplet8th":
										{
											masterBar.tripletFeel = global::alphatab.model.TripletFeel.Triplet8th;
											break;
										}
										
										
										case "Triplet16th":
										{
											masterBar.tripletFeel = global::alphatab.model.TripletFeel.Triplet16th;
											break;
										}
										
										
										case "Dotted8th":
										{
											masterBar.tripletFeel = global::alphatab.model.TripletFeel.Dotted8th;
											break;
										}
										
										
										case "Dotted16th":
										{
											masterBar.tripletFeel = global::alphatab.model.TripletFeel.Dotted16th;
											break;
										}
										
										
										case "Scottish8th":
										{
											masterBar.tripletFeel = global::alphatab.model.TripletFeel.Scottish8th;
											break;
										}
										
										
										case "Scottish16th":
										{
											masterBar.tripletFeel = global::alphatab.model.TripletFeel.Scottish16th;
											break;
										}
										
										
									}
									
									break;
								}
								
								
							}
							
						}
						
					}
					
				}
				
				this._masterBars.push(masterBar);
			}
		}
示例#13
0
		public virtual   void readMasterBar()
		{
			unchecked 
			{
				global::alphatab.model.MasterBar previousMasterBar = default(global::alphatab.model.MasterBar);
				if (( this._score.masterBars.length > 0 )) 
				{
					previousMasterBar = ((global::alphatab.model.MasterBar) (this._score.masterBars[( this._score.masterBars.length - 1 )]) );
				}
				
				global::alphatab.model.MasterBar newMasterBar = new global::alphatab.model.MasterBar();
				int flags = this._data.readByte();
				if (( (( flags & 1 )) != 0 )) 
				{
					newMasterBar.timeSignatureNumerator = this._data.readByte();
				}
				 else 
				{
					if (( previousMasterBar != default(global::alphatab.model.MasterBar) )) 
					{
						newMasterBar.timeSignatureNumerator = previousMasterBar.timeSignatureNumerator;
					}
					
				}
				
				if (( (( flags & 2 )) != 0 )) 
				{
					newMasterBar.timeSignatureDenominator = this._data.readByte();
				}
				 else 
				{
					if (( previousMasterBar != default(global::alphatab.model.MasterBar) )) 
					{
						newMasterBar.timeSignatureDenominator = previousMasterBar.timeSignatureDenominator;
					}
					
				}
				
				newMasterBar.isRepeatStart = ( (( flags & 4 )) != 0 );
				if (( (( flags & 8 )) != 0 )) 
				{
					if (( this._versionNumber >= 500 )) 
					{
						newMasterBar.repeatCount = this._data.readByte();
					}
					 else 
					{
						newMasterBar.repeatCount = 1;
					}
					
				}
				
				if (( (( flags & 32 )) != 0 )) 
				{
					global::alphatab.model.Section section = new global::alphatab.model.Section();
					section.text = this.readStringIntByte();
					section.marker = "";
					this.readColor();
					newMasterBar.section = section;
				}
				
				if (( (( flags & 16 )) != 0 )) 
				{
					if (( this._versionNumber < 500 )) 
					{
						global::alphatab.model.MasterBar currentMasterBar = previousMasterBar;
						int existentAlternatives = 0;
						while (( currentMasterBar != default(global::alphatab.model.MasterBar) ))
						{
							if (( ( currentMasterBar.repeatCount > 0 ) && ( currentMasterBar != previousMasterBar ) )) 
							{
								break;
							}
							
							if (currentMasterBar.isRepeatStart) 
							{
								break;
							}
							
							existentAlternatives |= currentMasterBar.alternateEndings;
						}
						
						int repeatAlternative = 0;
						int repeatMask = this._data.readByte();
						{
							int _g = 0;
							while (( _g < 8 ))
							{
								int i = _g++;
								int repeating = ( 1 << i );
								if (( ( repeatMask > i ) && ( (( existentAlternatives & repeating )) == 0 ) )) 
								{
									repeatAlternative |= repeating;
								}
								
							}
							
						}
						
						newMasterBar.alternateEndings = repeatAlternative;
					}
					 else 
					{
						newMasterBar.alternateEndings = this._data.readByte();
					}
					
				}
				
				if (( (( flags & 64 )) != 0 )) 
				{
					newMasterBar.keySignature = this._data.readInt8();
					this._data.readByte();
				}
				 else 
				{
					if (( previousMasterBar != default(global::alphatab.model.MasterBar) )) 
					{
						newMasterBar.keySignature = previousMasterBar.keySignature;
					}
					
				}
				
				if (( ( this._versionNumber >= 500 ) && ( (( flags & 3 )) != 0 ) )) 
				{
					this._data.read(4);
				}
				
				if (( ( this._versionNumber >= 500 ) && ( (( flags & 16 )) == 0 ) )) 
				{
					newMasterBar.alternateEndings = this._data.readByte();
				}
				
				if (( this._versionNumber >= 500 )) 
				{
					int tripletFeel = this._data.readByte();
					switch (tripletFeel)
					{
						case 1:
						{
							newMasterBar.tripletFeel = global::alphatab.model.TripletFeel.Triplet8th;
							break;
						}
						
						
						case 2:
						{
							newMasterBar.tripletFeel = global::alphatab.model.TripletFeel.Triplet16th;
							break;
						}
						
						
					}
					
					this._data.readByte();
				}
				 else 
				{
					newMasterBar.tripletFeel = this._globalTripletFeel;
				}
				
				newMasterBar.isDoubleBar = ( (( flags & 128 )) != 0 );
				this._score.addMasterBar(newMasterBar);
			}
		}
		public virtual   void bar()
		{
			unchecked 
			{
				global::alphatab.model.MasterBar master = new global::alphatab.model.MasterBar();
				this._score.addMasterBar(master);
				global::alphatab.model.Bar bar = new global::alphatab.model.Bar();
				this._track.addBar(bar);
				if (( master.index > 0 )) 
				{
					master.keySignature = master.previousMasterBar.keySignature;
					master.timeSignatureDenominator = master.previousMasterBar.timeSignatureDenominator;
					master.timeSignatureNumerator = master.previousMasterBar.timeSignatureNumerator;
					bar.clef = bar.previousBar.clef;
				}
				
				this.barMeta(bar);
				global::alphatab.model.Voice voice = new global::alphatab.model.Voice();
				bar.addVoice(voice);
				while (( ( this._sy != global::alphatab.importer.AlphaTexSymbols.Pipe ) && ( this._sy != global::alphatab.importer.AlphaTexSymbols.Eof ) ))
				{
					this.beat(voice);
				}
				
			}
		}
        public virtual bool shouldCreateGlyph(global::alphatab.rendering.EffectBarRenderer renderer, global::alphatab.model.Beat beat)
        {
            unchecked
            {
                bool __temp_boolv580 = (beat.index == 0);
                bool __temp_boolv579 = false;
                if (__temp_boolv580)
                {
                    global::alphatab.model.MasterBar __temp_stmt584 = default(global::alphatab.model.MasterBar);
                    {
                        global::alphatab.model.Bar _this = beat.voice.bar;
                        __temp_stmt584 = ((global::alphatab.model.MasterBar)(_this.track.score.masterBars[_this.index]));
                    }

                    bool __temp_boolv583 = (__temp_stmt584.index == 0);
                    bool __temp_boolv582 = false;
                    if (__temp_boolv583)
                    {
                        global::alphatab.model.MasterBar __temp_stmt585 = default(global::alphatab.model.MasterBar);
                        {
                            global::alphatab.model.Bar _this1 = beat.voice.bar;
                            __temp_stmt585 = ((global::alphatab.model.MasterBar)(_this1.track.score.masterBars[_this1.index]));
                        }

                        __temp_boolv582 = (__temp_stmt585.tripletFeel != global::alphatab.model.TripletFeel.NoTripletFeel);
                    }

                    bool __temp_stmt581 = (__temp_boolv583 && __temp_boolv582);
                    __temp_boolv579 = (__temp_stmt581);
                }

                bool __temp_stmt578  = (__temp_boolv580 && __temp_boolv579);
                bool __temp_boolv586 = false;
                if (!(__temp_stmt578))
                {
                    global::alphatab.model.MasterBar __temp_stmt589 = default(global::alphatab.model.MasterBar);
                    {
                        global::alphatab.model.Bar _this2 = beat.voice.bar;
                        __temp_stmt589 = ((global::alphatab.model.MasterBar)(_this2.track.score.masterBars[_this2.index]));
                    }

                    bool __temp_boolv588 = (__temp_stmt589.index > 0);
                    bool __temp_boolv587 = false;
                    if (__temp_boolv588)
                    {
                        global::alphatab.model.MasterBar __temp_stmt590 = default(global::alphatab.model.MasterBar);
                        {
                            global::alphatab.model.Bar _this3 = beat.voice.bar;
                            __temp_stmt590 = ((global::alphatab.model.MasterBar)(_this3.track.score.masterBars[_this3.index]));
                        }

                        global::alphatab.model.MasterBar __temp_stmt591 = default(global::alphatab.model.MasterBar);
                        {
                            global::alphatab.model.Bar _this4 = beat.voice.bar;
                            __temp_stmt591 = ((global::alphatab.model.MasterBar)(_this4.track.score.masterBars[_this4.index]));
                        }

                        __temp_boolv587 = (__temp_stmt590.tripletFeel != __temp_stmt591.previousMasterBar.tripletFeel);
                    }

                    __temp_boolv586 = (__temp_boolv588 && __temp_boolv587);
                }

                bool __temp_stmt577 = (__temp_stmt578 || __temp_boolv586);
                return(__temp_stmt577);
            }
        }
示例#16
0
        public override void createPostBeatGlyphs()
        {
            unchecked
            {
                global::alphatab.model.MasterBar __temp_stmt568 = default(global::alphatab.model.MasterBar);
                {
                    global::alphatab.model.Bar _this = this._bar;
                    __temp_stmt568 = ((global::alphatab.model.MasterBar)(_this.track.score.masterBars[_this.index]));
                }

                if ((__temp_stmt568.repeatCount > 0))
                {
                    this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.RepeatCloseGlyph(new global::haxe.lang.Null <int>(this.x, true), new global::haxe.lang.Null <int>(0, true)));
                    global::alphatab.model.MasterBar __temp_stmt574 = default(global::alphatab.model.MasterBar);
                    {
                        global::alphatab.model.Bar _this1 = this._bar;
                        __temp_stmt574 = ((global::alphatab.model.MasterBar)(_this1.track.score.masterBars[_this1.index]));
                    }

                    if ((__temp_stmt574.repeatCount > 2))
                    {
                        int line = default(int);
                        if (((this._bar.index == (this._bar.track.bars.length - 1)) || (this.index == (this.stave.barRenderers.length - 1))))
                        {
                            line = -1;
                        }
                        else
                        {
                            line = -4;
                        }

                        global::haxe.lang.Null <int>     __temp_stmt575 = new global::haxe.lang.Null <int>(this.getTabY(line, new global::haxe.lang.Null <int>(-3, true)), true);
                        global::alphatab.model.MasterBar __temp_stmt576 = default(global::alphatab.model.MasterBar);
                        {
                            global::alphatab.model.Bar _this2 = this._bar;
                            __temp_stmt576 = ((global::alphatab.model.MasterBar)(_this2.track.score.masterBars[_this2.index]));
                        }

                        this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.RepeatCountGlyph(new global::haxe.lang.Null <int>(0, true), __temp_stmt575, ((int)(__temp_stmt576.repeatCount))));
                    }
                }
                else
                {
                    global::alphatab.model.MasterBar __temp_stmt569 = default(global::alphatab.model.MasterBar);
                    {
                        global::alphatab.model.Bar _this3 = this._bar;
                        __temp_stmt569 = ((global::alphatab.model.MasterBar)(_this3.track.score.masterBars[_this3.index]));
                    }

                    if (__temp_stmt569.isDoubleBar)
                    {
                        this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.BarSeperatorGlyph(((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <bool>)(default(global::haxe.lang.Null <bool>)))));
                        this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.SpacingGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), ((int)((3 * this.stave.staveGroup.layout.renderer.settings.scale))), new global::haxe.lang.Null <bool>(false, true)));
                        this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.BarSeperatorGlyph(((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <int>)(default(global::haxe.lang.Null <int>))), ((global::haxe.lang.Null <bool>)(default(global::haxe.lang.Null <bool>)))));
                    }
                    else
                    {
                        bool __temp_stmt571  = (this._bar.nextBar == default(global::alphatab.model.Bar));
                        bool __temp_boolv572 = false;
                        if (!(__temp_stmt571))
                        {
                            global::alphatab.model.MasterBar __temp_stmt573 = default(global::alphatab.model.MasterBar);
                            {
                                global::alphatab.model.Bar _this4 = this._bar.nextBar;
                                __temp_stmt573 = ((global::alphatab.model.MasterBar)(_this4.track.score.masterBars[_this4.index]));
                            }

                            __temp_boolv572 = !(__temp_stmt573.isRepeatStart);
                        }

                        bool __temp_stmt570 = (__temp_stmt571 || __temp_boolv572);
                        if (__temp_stmt570)
                        {
                            this.addPostBeatGlyph(new global::alphatab.rendering.glyphs.BarSeperatorGlyph(new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <int>(0, true), new global::haxe.lang.Null <bool>((this._bar.index == (this._bar.track.bars.length - 1)), true)));
                        }
                    }
                }
            }
        }