예제 #1
0
        public void PushAnew(Int32 key, String instrument)
        {
            ITimedWave16 toAdd = InstrumentMap[instrument].GetTimedWave(key, KeyMap);
            Extract16    xtr   = new Extract16(toAdd, TactTime);

            Channels[key].Add(xtr);
        }
예제 #2
0
        public void Push(Int32 key, String instrument)
        {
            Double initDelay;

            if (Channels[key].Count == 0)
            {
                initDelay = 0.0;
            }
            else if (Channels[key][Channels[key].Count - 1].Blank)
            {
                initDelay = 0.0;
            }
            else
            {
                initDelay = Channels[key][Channels[key].Count - 1].BeginningOffset + TactTime;
            }

            ITimedWave16 toAdd = InstrumentMap[instrument].GetTimedWave(key, KeyMap);
            Extract16    xtr   = new Extract16(toAdd, TactTime, initDelay);

            Channels[key].Add(xtr);
        }
예제 #3
0
        public void Export(Sequencer16 sq16)
        {
            Snap();
            sq16.Snap();
            Int32 l = Length;

            for (int i = 0; i < l; i++)
            {
                List <Extract16> lst = new List <Extract16>();

                for (int x = 0; x < KeyMap.Length; x++)
                {
                    Extract16 ex = Channels[x][i];
                    if (!ex.Blank)
                    {
                        lst.Add(ex);
                    }
                }

                if (lst.Count == 0)
                {
                    sq16.Skip(TactTime);
                    continue;
                }

                Polyphony16 ph = new Polyphony16(lst[0], (UInt16)(lst.Count * 8));

                for (int h = 1; h < lst.Count; h++)
                {
                    ph += lst[h];
                }

                Mixer16 mx = new Mixer16(ph);

                sq16.Push(mx, TactTime);
            }
        }