示例#1
0
 public static void __hx_ctor_alphatab_model_Automation(global::alphatab.model.Automation __temp_me72)
 {
     unchecked
     {
         {
         }
     }
 }
示例#2
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);
            }
        }
示例#3
0
 public virtual global::alphatab.model.Automation clone()
 {
     unchecked
     {
         global::alphatab.model.Automation a = new global::alphatab.model.Automation();
         a.isLinear = this.isLinear;
         a.type     = this.type;
         a.@value   = this.@value;
         return(a);
     }
 }
示例#4
0
		public static   global::alphatab.model.Automation builtTempoAutomation(bool isLinear, double ratioPosition, double @value, int reference)
		{
			unchecked 
			{
				if (( ( reference < 1 ) || ( reference > 5 ) )) 
				{
					reference = 2;
				}
				
				global::haxe.root.Array<double> references = new global::haxe.root.Array<double>(new double[]{1.0, 0.5, 1.0, 1.5, 2.0, 3.0});
				global::alphatab.model.Automation automation = new global::alphatab.model.Automation();
				automation.type = global::alphatab.model.AutomationType.Tempo;
				automation.isLinear = isLinear;
				automation.ratioPosition = ratioPosition;
				double realValue = ( @value * references[reference] );
				automation.@value = realValue;
				return automation;
			}
		}
示例#5
0
        public static global::alphatab.model.Automation builtTempoAutomation(bool isLinear, double ratioPosition, double @value, int reference)
        {
            unchecked
            {
                if (((reference < 1) || (reference > 5)))
                {
                    reference = 2;
                }

                global::haxe.root.Array <double>  references = new global::haxe.root.Array <double>(new double[] { 1.0, 0.5, 1.0, 1.5, 2.0, 3.0 });
                global::alphatab.model.Automation automation = new global::alphatab.model.Automation();
                automation.type          = global::alphatab.model.AutomationType.Tempo;
                automation.isLinear      = isLinear;
                automation.ratioPosition = ratioPosition;
                double realValue = (@value * references[reference]);
                automation.@value = realValue;
                return(automation);
            }
        }
示例#6
0
        public virtual global::alphatab.model.Automation getAutomation(global::alphatab.model.AutomationType type)
        {
            unchecked
            {
                {
                    int _g = 0;
                    global::haxe.root.Array <object> _g1 = this.automations;
                    while ((_g < _g1.length))
                    {
                        global::alphatab.model.Automation a = ((global::alphatab.model.Automation)(_g1[_g]));
                        ++_g;
                        if ((a.type == type))
                        {
                            return(a);
                        }
                    }
                }

                return(default(global::alphatab.model.Automation));
            }
        }
示例#7
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);
					}
					
				}
				
			}
		}
示例#8
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));
                }
                }
            }
        }
		public virtual   void readMixTableChange(global::alphatab.model.Beat beat)
		{
			unchecked 
			{
				global::alphatab.importer.MixTableChange tableChange = new global::alphatab.importer.MixTableChange();
				tableChange.instrument = this._data.readInt8();
				if (( this._versionNumber >= 500 )) 
				{
					this._data.read(16);
				}
				
				tableChange.volume = this._data.readInt8();
				tableChange.balance = this._data.readInt8();
				int chorus = this._data.readInt8();
				int reverb = this._data.readInt8();
				int phaser = this._data.readInt8();
				int tremolo = this._data.readInt8();
				if (( this._versionNumber >= 500 )) 
				{
					tableChange.tempoName = this.readStringIntByte();
				}
				
				tableChange.tempo = this.readInt32();
				if (( tableChange.volume >= 0 )) 
				{
					this._data.readByte();
				}
				
				if (( tableChange.balance >= 0 )) 
				{
					this._data.readByte();
				}
				
				if (( chorus >= 0 )) 
				{
					this._data.readByte();
				}
				
				if (( reverb >= 0 )) 
				{
					this._data.readByte();
				}
				
				if (( phaser >= 0 )) 
				{
					this._data.readByte();
				}
				
				if (( tremolo >= 0 )) 
				{
					this._data.readByte();
				}
				
				if (( tableChange.tempo >= 0 )) 
				{
					tableChange.duration = this._data.readInt8();
					if (( this._versionNumber >= 510 )) 
					{
						this._data.readByte();
					}
					
				}
				
				if (( this._versionNumber >= 400 )) 
				{
					this._data.readByte();
				}
				
				if (( this._versionNumber >= 500 )) 
				{
					this._data.readByte();
				}
				
				if (( this._versionNumber >= 510 )) 
				{
					this.readStringIntByte();
					this.readStringIntByte();
				}
				
				if (( tableChange.volume >= 0 )) 
				{
					global::alphatab.model.Automation volumeAutomation = new global::alphatab.model.Automation();
					volumeAutomation.isLinear = true;
					volumeAutomation.type = global::alphatab.model.AutomationType.Volume;
					volumeAutomation.@value = ((double) (tableChange.volume) );
					beat.automations.push(volumeAutomation);
				}
				
				if (( tableChange.balance >= 0 )) 
				{
					global::alphatab.model.Automation balanceAutomation = new global::alphatab.model.Automation();
					balanceAutomation.isLinear = true;
					balanceAutomation.type = global::alphatab.model.AutomationType.Balance;
					balanceAutomation.@value = ((double) (tableChange.balance) );
					beat.automations.push(balanceAutomation);
				}
				
				if (( tableChange.instrument >= 0 )) 
				{
					global::alphatab.model.Automation instrumentAutomation = new global::alphatab.model.Automation();
					instrumentAutomation.isLinear = true;
					instrumentAutomation.type = global::alphatab.model.AutomationType.Instrument;
					instrumentAutomation.@value = ((double) (tableChange.instrument) );
					beat.automations.push(instrumentAutomation);
				}
				
				if (( tableChange.tempo >= 0 )) 
				{
					global::alphatab.model.Automation tempoAutomation = new global::alphatab.model.Automation();
					tempoAutomation.isLinear = true;
					tempoAutomation.type = global::alphatab.model.AutomationType.Tempo;
					tempoAutomation.@value = ((double) (tableChange.tempo) );
					beat.automations.push(tempoAutomation);
					global::alphatab.model.MasterBar __temp_stmt503 = default(global::alphatab.model.MasterBar);
					{
						global::alphatab.model.Bar _this = beat.voice.bar;
						__temp_stmt503 = ((global::alphatab.model.MasterBar) (_this.track.score.masterBars[_this.index]) );
					}
					
					__temp_stmt503.tempoAutomation = tempoAutomation;
				}
				
			}
		}
示例#10
0
		public virtual   global::alphatab.model.Automation clone()
		{
			unchecked 
			{
				global::alphatab.model.Automation a = new global::alphatab.model.Automation();
				a.isLinear = this.isLinear;
				a.type = this.type;
				a.@value = this.@value;
				return a;
			}
		}