コード例 #1
0
        public override void AddMidiEvents(ref SSEQMidiResult Result)
        {
            MidiEvent midiEvent = MidiEvent.FromRawMessage(MidiMessage.ChangeControl(84, (int)this.Portamento, Result.TrackID + 1).RawData);

            midiEvent.AbsoluteTime = (long)Result.CurrentTime;
            Result.MidiTrack.Add(midiEvent);
        }
コード例 #2
0
        public override void AddMidiEvents(ref SSEQMidiResult Result)
        {
            MidiEvent midiEvent = MidiEvent.FromRawMessage(MidiMessage.ChangeControl(78, 64 + (int)this.ModulationDelay / 2, Result.TrackID + 1).RawData);

            midiEvent.AbsoluteTime = (long)Result.CurrentTime;
            Result.MidiTrack.Add(midiEvent);
        }
コード例 #3
0
        public override void AddMidiEvents(ref SSEQMidiResult Result)
        {
            short num = (short)(((int)this.Pitch + 128) * 64);

            if (num < (short)0 || num > (short)16384)
            {
                throw new Exception("Pitch isn't in a range between 0 and 0x4000.");
            }
            Result.MidiTrack.Add((MidiEvent) new PitchWheelChangeEvent((long)Result.CurrentTime, Result.TrackID + 1, (int)num));
        }
コード例 #4
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     if (this.VarID > (byte)15)
     {
         Result.GlobalVariables[(int)this.VarID - 16] *= this.Value;
     }
     else
     {
         Result.LocalVariables[(int)this.VarID] *= this.Value;
     }
 }
コード例 #5
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.MidiTrack.Add((MidiEvent) new SequencerSpecificEvent(new byte[8]
     {
         (byte)240,
         (byte)127,
         (byte)127,
         (byte)4,
         (byte)1,
         (byte)0,
         this.MasterVolume,
         (byte)247
     }, (long)Result.CurrentTime));
 }
コード例 #6
0
        public override void AddMidiEvents(ref SSEQMidiResult Result)
        {
            MidiEvent midiEvent1 = MidiEvent.FromRawMessage(MidiMessage.ChangeControl(101, 0, Result.TrackID + 1).RawData);

            midiEvent1.AbsoluteTime = (long)Result.CurrentTime;
            Result.MidiTrack.Add(midiEvent1);
            MidiEvent midiEvent2 = MidiEvent.FromRawMessage(MidiMessage.ChangeControl(100, 0, Result.TrackID + 1).RawData);

            midiEvent2.AbsoluteTime = (long)Result.CurrentTime;
            Result.MidiTrack.Add(midiEvent2);
            MidiEvent midiEvent3 = MidiEvent.FromRawMessage(MidiMessage.ChangeControl(6, (int)this.PitchRange, Result.TrackID + 1).RawData);

            midiEvent3.AbsoluteTime = (long)Result.CurrentTime;
            Result.MidiTrack.Add(midiEvent3);
        }
コード例 #7
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.MidiTrack.Add((MidiEvent) new NoteEvent((long)Result.CurrentTime, Result.TrackID + 1, MidiCommandCode.NoteOn, (int)this.EventID, this.Clamp((int)this.Velocity, 0, (int)sbyte.MaxValue)));
     if (this.Duration != 0)
     {
         Result.MidiTrack.Add((MidiEvent) new NoteEvent((long)(Result.CurrentTime + this.Duration), Result.TrackID + 1, MidiCommandCode.NoteOff, (int)this.EventID, 64));
     }
     else
     {
         Result.MidiTrack.Add((MidiEvent) new NoteEvent((long)(Result.CurrentTime + 5000), Result.TrackID + 1, MidiCommandCode.NoteOff, (int)this.EventID, 64));
     }
     if (!Result.NoteWait)
     {
         return;
     }
     Result.CurrentTime += this.Duration;
 }
コード例 #8
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     if (this.Value < (short)0)
     {
         if (this.VarID > (byte)15)
         {
             Result.GlobalVariables[(int)this.VarID - 16] >>= (int)-this.Value;
         }
         else
         {
             Result.LocalVariables[(int)this.VarID] >>= (int)-this.Value;
         }
     }
     else if (this.VarID > (byte)15)
     {
         Result.GlobalVariables[(int)this.VarID - 16] <<= (int)this.Value;
     }
     else
     {
         Result.LocalVariables[(int)this.VarID] <<= (int)this.Value;
     }
 }
コード例 #9
0
        public override void AddMidiEvents(ref SSEQMidiResult Result)
        {
            int       patchNumber = this.RealProgram % 128;
            int       num         = this.RealProgram / 128 & 15;
            MidiEvent midiEvent1  = MidiEvent.FromRawMessage(MidiMessage.ChangeControl(0, this.RealProgram / 128 / 128 & 15, Result.TrackID + 1).RawData);

            midiEvent1.AbsoluteTime = (long)Result.CurrentTime;
            Result.MidiTrack.Add(midiEvent1);
            MidiEvent midiEvent2 = MidiEvent.FromRawMessage(MidiMessage.ChangeControl(32, num, Result.TrackID + 1).RawData);

            midiEvent2.AbsoluteTime = (long)Result.CurrentTime;
            Result.MidiTrack.Add(midiEvent2);
            Result.MidiTrack.Add((MidiEvent) new PatchChangeEvent((long)Result.CurrentTime, Result.TrackID + 1, patchNumber));
            if (patchNumber != (int)sbyte.MaxValue)
            {
                return;
            }
            Result.TrackID = 9;
            foreach (MidiEvent midiEvent3 in (IEnumerable <MidiEvent>)Result.MidiTrack)
            {
                midiEvent3.Channel = 10;
            }
        }
コード例 #10
0
        public override void AddMidiEvents(ref SSEQMidiResult Result)
        {
            Random random = new Random((int)DateTime.Now.Ticks);

            if (this.Value < (short)0)
            {
                if (this.VarID > (byte)15)
                {
                    Result.GlobalVariables[(int)this.VarID - 16] = (short)random.Next((int)this.Value, 0);
                }
                else
                {
                    Result.LocalVariables[(int)this.VarID] = (short)random.Next((int)this.Value, 0);
                }
            }
            else if (this.VarID > (byte)15)
            {
                Result.GlobalVariables[(int)this.VarID - 16] = (short)random.Next(0, (int)this.Value);
            }
            else
            {
                Result.LocalVariables[(int)this.VarID] = (short)random.Next(0, (int)this.Value);
            }
        }
コード例 #11
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.NoteWait = this.Mode == (byte)1;
 }
コード例 #12
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.CurrentTime += this.Delay;
 }
コード例 #13
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
 }
コード例 #14
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.Goto       = true;
     Result.GotoOffset = this.Offset;
 }
コード例 #15
0
 public virtual void AddMidiEvents(ref SSEQMidiResult Result)
 {
 }
コード例 #16
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.If = true;
 }
コード例 #17
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.Tie = this.Tie == (byte)1;
 }
コード例 #18
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.MidiTrack.Add((MidiEvent) new TempoEvent((int)(60000000.0 / (double)this.Tempo), (long)Result.CurrentTime));
 }
コード例 #19
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.MidiTrack.Add((MidiEvent) new TextEvent("loopStart", MetaEventType.Marker, (long)Result.CurrentTime));
 }
コード例 #20
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.MidiTrack.Add((MidiEvent) new ControlChangeEvent((long)Result.CurrentTime, Result.TrackID + 1, MidiController.MainVolume, (int)this.Volume));
 }
コード例 #21
0
 public override void AddMidiEvents(ref SSEQMidiResult Result)
 {
     Result.MidiTrack.Add((MidiEvent) new MetaEvent(MetaEventType.EndTrack, 0, (long)Result.CurrentTime));
 }