Exemplo n.º 1
0
 public void ExecuteMidiEventSeek(MetaStatus aMetaStatus, MidiSynthesizer aMidiSynthesizer, int aDivision, int aDelta)
 {
     for (int i = 0; i < aDelta; i++)
     {
         if (midiEventAffecterListDictionary.ContainsKey(i))
         {
             for (int j = 0; j < midiEventAffecterListDictionary[i].Count; j++)
             {
                 if (midiEventAffecterListDictionary[i][j].GetType().ToString() != "LayerMiddle.Sound.Controller.Midi.Affecter.MidiEventAffecterNoteOn")
                 {
                     midiEventAffecterListDictionary[i][j].Execute(aMidiSynthesizer, aDivision, aMetaStatus.GetBpm());
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
        private void Caching()
        {
            MidiSynthesizer lMidiSynthesizer = new MidiSynthesizer();
            MetaStatus      lMetaStatus      = new MetaStatus();

            for (int i = 0; i < music.deltaMax; i++)
            {
                lMetaStatus.SetDelta(i);

                for (int j = 0; j < music.tracks; j++)
                {
                    sequenceTrackArray[j].ExecuteMetaEventOneDelta(lMetaStatus);

                    sequenceTrackArray[j].ExecuteMidiEventOneDelta(lMetaStatus, lMidiSynthesizer, music.division);
                }
            }
        }
Exemplo n.º 3
0
        public MidiSequencer(MusicMidi aMusicMidi, MidiSynthesizer aMidiSynthesizer)
        {
            music       = aMusicMidi;
            synthesizer = aMidiSynthesizer;

            metaStatus         = new MetaStatus();
            sequenceTrackArray = new MidiSequenceTrack[music.tracks];

            for (int i = 0; i < music.tracks; i++)
            {
                sequenceTrackArray[i] = new MidiSequenceTrack(music.mtrkChunkArray[i]);
            }

            deltaPosition  = 0;
            samplePosition = 0;

            bufferArray = new float[2];

            Caching();
        }
Exemplo n.º 4
0
 public override void Execute(MetaStatus aMetaStatus)
 {
 }
 public override void Execute(MetaStatus aMetaStatus)
 {
     //MidiSequencer.SetNumerator( metaMessageArray[index].nn );
     //MidiSequencer.SetDenominator( metaMessageArray[index].dd );
 }
        public override void Execute(MetaStatus aMetaStatus)
        {
            MetaEventTempo lTempoEvent = ( MetaEventTempo )metaEvent;

            aMetaStatus.SetTempo(lTempoEvent.GetTempo());
        }
 public abstract void Execute(MetaStatus aMetaStatus);