Exemple #1
0
 /// <summary>
 ///
 /// </summary>
 private void RecallDrumPatterns()
 {
     DrumPatterns = new ClipBoardPatches();
     if (MemoryDrumPatterns != null)
     {
         foreach (var patch in MemoryDrumPatterns.CopiedPatches)
         {
             DrumPatterns.CopiedPatches.Add(patch);
             patch.OriginalLocation = patch.PasteDestination;
             patch.PasteDestination = null;
         }
     }
 }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 private void RecallWaveSequences()
 {
     WaveSequences = new ClipBoardPatches();
     if (MemoryWaveSequences != null)
     {
         foreach (var patch in MemoryWaveSequences.CopiedPatches)
         {
             WaveSequences.CopiedPatches.Add(patch);
             patch.OriginalLocation = patch.PasteDestination;
             patch.PasteDestination = null;
         }
     }
 }
Exemple #3
0
 /// <summary>
 ///
 /// </summary>
 private void RecallSetListSlots()
 {
     SetListSlots = new ClipBoardPatches();
     if (MemorySetListSlots != null)
     {
         foreach (var patch in MemorySetListSlots.CopiedPatches)
         {
             SetListSlots.CopiedPatches.Add(patch);
             patch.OriginalLocation = patch.PasteDestination;
             patch.PasteDestination = null;
         }
     }
 }
Exemple #4
0
 /// <summary>
 ///
 /// </summary>
 private void RecallCombis()
 {
     Combis = new ClipBoardPatches();
     if (MemoryCombis != null)
     {
         foreach (var patch in MemoryCombis.CopiedPatches)
         {
             Combis.CopiedPatches.Add(patch);
             patch.OriginalLocation = patch.PasteDestination;
             patch.PasteDestination = null;
         }
     }
 }
Exemple #5
0
 /// <summary>
 ///
 /// </summary>
 private void RecallPrograms()
 {
     for (var index = 0; index < (int)ProgramBank.SynthesisType.Last; index++)
     {
         Programs[index] = new ClipBoardPatches();
         if (MemoryPrograms != null)
         {
             foreach (var patch in MemoryPrograms[index].CopiedPatches)
             {
                 Programs[index].CopiedPatches.Add(patch);
                 patch.OriginalLocation = patch.PasteDestination;
                 patch.PasteDestination = null;
             }
         }
     }
 }
Exemple #6
0
        /// <summary>
        ///
        /// </summary>
        public void Memorize()
        {
            MemoryPrograms = new List <IClipBoardPatches>();

            for (var index = 0; index < (int)ProgramBank.SynthesisType.Last; index++)
            {
                MemoryPrograms.Add(new ClipBoardPatches());
                MemoryPrograms[index] = new ClipBoardPatches();
                foreach (var patch in Programs[index].CopiedPatches)
                {
                    MemoryPrograms[index].CopiedPatches.Add(patch);
                }
            }

            MemoryCombis = new ClipBoardPatches();
            foreach (var patch in Combis.CopiedPatches)
            {
                MemoryCombis.CopiedPatches.Add(patch);
            }

            MemorySetListSlots = new ClipBoardPatches();
            foreach (var patch in SetListSlots.CopiedPatches)
            {
                MemorySetListSlots.CopiedPatches.Add(patch);
            }

            MemoryDrumKits = new ClipBoardPatches();
            foreach (var patch in DrumKits.CopiedPatches)
            {
                MemoryDrumKits.CopiedPatches.Add(patch);
            }

            MemoryDrumPatterns = new ClipBoardPatches();
            foreach (var patch in DrumPatterns.CopiedPatches)
            {
                MemoryDrumPatterns.CopiedPatches.Add(patch);
            }

            MemoryWaveSequences = new ClipBoardPatches();
            foreach (var patch in WaveSequences.CopiedPatches)
            {
                MemoryWaveSequences.CopiedPatches.Add(patch);
            }


            ProtectedPatches = new ObservableCollection <IPatch>();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="program"></param>
        public ClipBoardProgram(IProgram program) : base(program.Root.Content, program.ByteOffset, program.ByteLength)
        {
            OriginalLocation        = program;
            ReferencedDrumKits      = new ClipBoardPatches();
            ReferencedWaveSequences = new ClipBoardPatches();

            KronosOs1516Content = new byte[KronosProgramBanks.ParametersInPbk2Chunk];
            if ((program.Root is KronosPcgMemory memory) && (memory.PcgRoot.Model.OsVersion == Models.EOsVersion.Kronos15_16))
            // PRG2 content
            {
                for (int parameter = 0; parameter < KronosProgramBanks.ParametersInPbk2Chunk; parameter++)
                {
                    int patchParameterOffset =
                        ((KronosProgramBank)(program.Parent)).GetParameterOffsetInPbk2(program.Index, parameter);
                    KronosOs1516Content[parameter] = program.Root.Content[patchParameterOffset];
                }
            }
        }
Exemple #8
0
        /// <summary>
        ///
        /// </summary>
        public PcgClipBoard()
        {
            Programs       = new List <IClipBoardPatches>();
            MemoryPrograms = new List <IClipBoardPatches>();

            for (var index = 0; index < (int)ProgramBank.SynthesisType.Last; index++)
            {
                Programs.Add(new ClipBoardPatches());
                MemoryPrograms.Add(new ClipBoardPatches());
            }

            Combis        = new ClipBoardPatches();
            SetListSlots  = new ClipBoardPatches();
            DrumKits      = new ClipBoardPatches();
            DrumPatterns  = new ClipBoardPatches();
            WaveSequences = new ClipBoardPatches();

            ProtectedPatches = new ObservableCollection <IPatch>();
        }