示例#1
0
 private static string getVolumeEffectString(byte volumeEffect)
 {
     if (volumeEffect >= 0x00 && volumeEffect <= 0x0F)
     {
         return("...");  // do nothing
     }
     if (volumeEffect >= 0x10 && volumeEffect <= 0x4F)
     {
         return("V" + ModuleUtils.GetAsDec(volumeEffect - 0x10, 2));  // v 0..63
     }
     if (volumeEffect == 0x50)
     {
         return("V64");  // v 64
     }
     if (volumeEffect >= 0x51 && volumeEffect <= 0x5F)
     {
         return("...");  // undefined
     }
     if (volumeEffect >= 0x60 && volumeEffect <= 0x6F)
     {
         return("D" + ModuleUtils.GetAsDec(volumeEffect - 0x60, 2));  // volumeEffect slide down
     }
     if (volumeEffect >= 0x70 && volumeEffect <= 0x7F)
     {
         return("C" + ModuleUtils.GetAsDec(volumeEffect - 0x70, 2));  // volumeEffect slide up
     }
     if (volumeEffect >= 0x80 && volumeEffect <= 0x8F)
     {
         return("B" + ModuleUtils.GetAsDec(volumeEffect - 0x80, 2));  // Fine volumeEffect down
     }
     if (volumeEffect >= 0x90 && volumeEffect <= 0x9F)
     {
         return("A" + ModuleUtils.GetAsDec(volumeEffect - 0x90, 2));  // Fine volumeEffect up
     }
     if (volumeEffect >= 0xA0 && volumeEffect <= 0xAF)
     {
         return("U" + ModuleUtils.GetAsDec(volumeEffect - 0xA0, 2));  // Vibrato speed
     }
     if (volumeEffect >= 0xB0 && volumeEffect <= 0xBF)
     {
         return("H" + ModuleUtils.GetAsDec(volumeEffect - 0xB0, 2));  // Vibrato deph
     }
     if (volumeEffect >= 0xC0 && volumeEffect <= 0xCF)
     {
         return("P" + ModuleUtils.GetAsDec((volumeEffect - 0xC0) * 4 + 2, 2));  // Set panning (2,6,10,14..62)
     }
     if (volumeEffect >= 0xD0 && volumeEffect <= 0xDF)
     {
         return("L" + ModuleUtils.GetAsDec(volumeEffect - 0xD0, 2));  // Pan slide left
     }
     if (volumeEffect >= 0xE0 && volumeEffect <= 0xEF)
     {
         return("R" + ModuleUtils.GetAsDec(volumeEffect - 0xE0, 2));  // Pan slide right
     }
     if (volumeEffect >= 0xF0 && volumeEffect <= 0xFF)
     {
         return("G" + ModuleUtils.GetAsDec(volumeEffect - 0xF0, 2));  // Tone portamento
     }
     return("...");
 }
示例#2
0
        public override string ToString()
        {
            string res = GetNoteNameToIndex(noteIndex);

            //res += ((period == 0 && noteIndex != 0) || (period != 0 && noteIndex == 0)) ? "!" : " ";
            res += " " + ((instrumentIndex != 0) ? ModuleUtils.GetAsDec(instrumentIndex, 2) : "..");
            res += " " + getVolumeEffectString(volumeEffect) + " ";
            res += ((effekt != 0) && (effekt < 34)) ? effectStrings[effekt] + ModuleUtils.GetAsHex(effektOp, 2) : "...";
            return(res);
        }
示例#3
0
        public string InstrumentsToString()
        {
            string res = "Instruments info : \n";
            uint   i   = 1;

            foreach (XM_Instrument inst in Instruments.List)
            {
                res += ModuleUtils.GetAsDec((int)i++, 3) + " : " + inst.ToString().Trim() + "\n";
            }
            return(res);
        }
示例#4
0
        public string SamplesToString()
        {
            string res = "Samples info : \n";
            uint   i   = 1;

            foreach (XM_Instrument inst in Instruments.List)
            {
                foreach (XM_Sample sample in inst.samples)
                {
                    res += ModuleUtils.GetAsDec((int)i++, 3) + " : " + sample.ToString().Trim() + "\n";
                }
            }
            return(res);
        }