Friday, June 27, 2025

GLIDING WITH PITCH BENDS TO ADD TO THE DISCRETE NOTES

 

A smarter version of the note-merging function has been created:

Key Enhancements:

  • Monotonic frequency glides are merged into one note using pitch bends.
  • Pitch bends are calculated using semitone offset from the base MIDI note.
  • Total number of events remains fixed (merged using within-range glides only).
  • Start time, total duration, and gliding percentages are preserved.
  • A new .datagrid-compatible output note list is generated.

Would you like:

  • This to be integrated into a UI form?
  • A visual (graphical) inspection tool for the pitch bends applied?
  • A comparison between pre-merge and post-merge note timelines?

Ask ChatGPT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

// Enhanced Version: Gliding-Aware MIDI Note Combiner (Qhenomenology-Aware)

 

 

 

public static void Convert_GlidingMonotonicPitchBends_AndReducedNoteCount(string frequencyCsvPath, string outputPath)

{

    var reportLines = File.ReadAllLines(frequencyCsvPath).ToList();

    var notes = new List<SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS>();

 

    int? currentMidiNote = null;

    double currentStartMs = 0;

    double accumulatedDuration = 0;

    List<double> freqList = new List<double>();

    List<double> percentDurations = new List<double>();

    List<int> pitchBends = new List<int>();

 

    const int PITCHBEND_CENTER = 8192;

    const int BEND_RANGE_SEMITONES = 2; // ±2 semitone default

 

    for (int i = 1; i < reportLines.Count; i++) // Skip header

    {

        var parts = reportLines[i].Split(',');

        if (parts.Length < 3) continue;

        int startMs = int.Parse(parts[0]);

        int endMs = int.Parse(parts[1]);

        double freq = double.Parse(parts[2], CultureInfo.InvariantCulture);

        if (freq < 20 || freq > 2000) continue;

 

        int midiNote = GetNearestNoteMidiNumber_FromBand(freq);

        midiNote = Math.Max(0, Math.Min(127, midiNote));

        double duration = endMs - startMs;

 

        if (currentMidiNote.HasValue)

        {

            double semitoneDiff = 12 * Math.Log(freq / freqList.Last(), 2);

            bool withinGlide = Math.Abs(semitoneDiff) <= BEND_RANGE_SEMITONES;

 

            if (withinGlide)

            {

                accumulatedDuration += duration;

                freqList.Add(freq);

            }

            else

            {

                AddGlidingNote(notes, currentMidiNote.Value, currentStartMs, accumulatedDuration, freqList);

                currentMidiNote = midiNote;

                currentStartMs = startMs;

                accumulatedDuration = duration;

                freqList = new List<double> { freq };

            }

        }

        else

        {

            currentMidiNote = midiNote;

            currentStartMs = startMs;

            accumulatedDuration = duration;

            freqList.Add(freq);

        }

    }

 

    if (currentMidiNote.HasValue && freqList.Count > 0)

        AddGlidingNote(notes, currentMidiNote.Value, currentStartMs, accumulatedDuration, freqList);

 

    SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.RagaPaltas_OddEvenConcatenator.SaveNotesToFile(outputPath, notes);

}// public static void Convert_GlidingMonotonicPitchBends_AndReducedNoteCount(string frequencyCsvPath, string outputPath)

 

 

 

 

 

 

 

 

 

 

 

 

 

private static void AddGlidingNote(List<SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS> notes,

    int baseMidiNote, double startMs, double totalDuration, List<double> frequencies)

{

    if (frequencies.Count == 0) return;

    int steps = frequencies.Count;

 

    List<string> bendPercents = new List<string>();

    List<string> bendValues = new List<string>();

 

    for (int i = 0; i < steps; i++)

    {

        double percent = (i / (double)(steps - 1)) * 100.0;

        double semitoneOffset = 12 * Math.Log(frequencies[i] / GetFrequencyFromMidi(baseMidiNote), 2);

        int pitchBend = (int)(8192 + (semitoneOffset / 2.0) * 8192);

        pitchBend = Math.Max(0, Math.Min(16383, pitchBend));

 

        bendPercents.Add(percent.ToString("F0"));

        bendValues.Add(pitchBend.ToString());

    }

 

    var note = new SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

    {

        PUBLIC_STRING_THE_LYR_FOUND = "NA",

        PUBLIC_STRING_THE_INDINOTE_FOUND = "",

        INT_NOTE_NUMBER_TO_PLAY_0_TO_127 = baseMidiNote,

        DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY = totalDuration,

        INT_CURRENT_NOTES_VELOCITY_0_TO_127 = 100,

        INT_CURRENT_NOTES_PATCH_0_TO_127 = 73,

        STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS = string.Join(",", bendPercents),

        STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES = string.Join(",", bendValues),

        PUBLIC_INT_CHANNEL_NUMBER_0_TO_15 = 3,

        PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER = 3,

        PUBLIC_DOUBLE____Column_PITCHBEND_JERKS_MILLIS_GAP = 0,

        PUBLIC_INT___Column_JUERK_UP_PITCHBEND = 0,

        PUBLIC_INT___Column_JERK_DOWNS_PITCH_BEND = 0,

        PUBLIC_DOUBLE_NOTES_HERTZ_FOUND = frequencies[0],

        PUBIC_DOUBLE_ENFORCER_START_TIMES_MILLIS_FOR_DECORATIONS = startMs,

        PUBLIC_DOUBLE___Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES = 0,

        Column___ENFORCED_START_MILLIS_FOR_PUREMELODY_NOTES = startMs,

        Column___REFERENCE_CUMULATIVE_START_MILLIS_FOR_CURRENT_NOTES = startMs,

        PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20 = 6,

        PUBLIC_INT___Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT = 64

    };

    notes.Add(note);

}//

 

 

private static double GetFrequencyFromMidi(int midiNote)

{

    return 440.0 * Math.Pow(2, (midiNote - 69) / 12.0);

}// private static double GetFrequencyFromMidi(int midiNote)

 

 

 

 



 specially follow the updater functions here below

PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG

PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG

PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG

PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG

PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG

PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG












      public static void Convert_CLUBBED_DURATIONS_FrequencyReportToNoteFile(List<string> reportLines, string outputPath)

        {

            var notes = new List<SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS>();

            int? currentMidiNote = null;

            double accumulatedDuration = 0;

            double currentStartMs = 0;

            double currentFreq = 0;

            foreach (var line in reportLines.Skip(1)) // Skip header

            {

                var parts = line.Split(',');

                if (parts.Length < 3) continue;

                int startMs = int.Parse(parts[0]);

                int endMs = int.Parse(parts[1]);

                double freq = double.Parse(parts[2], CultureInfo.InvariantCulture);

               if (freq < 20 || freq > 2000) continue; // Skip unrealistic frequencies

                // int midiNote = (int)(69 + 12 * Math.Log(freq / 440.0, 2));

                int midiNote = GetNearestNoteMidiNumber_FromBand(freq);// (int)(69 + 12 * Math.Log(freq / 440.0, 2));

                midiNote = Math.Max(0, Math.Min(127, midiNote));

                double duration = endMs - startMs;

                if (currentMidiNote.HasValue && midiNote == currentMidiNote.Value)

                {

                    // Extend duration if same note

                    accumulatedDuration += duration;

                }

                else

                {

                    // Save previous note if exists

                    if (currentMidiNote.HasValue)

                    {

                        var note = new SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                        {

                            PUBLIC_STRING_THE_LYR_FOUND = "NA",

                            PUBLIC_STRING_THE_INDINOTE_FOUND = "",

                            INT_NOTE_NUMBER_TO_PLAY_0_TO_127 = currentMidiNote.Value,

                            DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY = accumulatedDuration,

                            INT_CURRENT_NOTES_VELOCITY_0_TO_127 = 100,

                            INT_CURRENT_NOTES_PATCH_0_TO_127 = 73,

                            STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS = "0,100",

                            STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES = "8192,8192",

                            PUBLIC_INT_CHANNEL_NUMBER_0_TO_15 = 3,

                            PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER = 3,

                            PUBLIC_DOUBLE____Column_PITCHBEND_JERKS_MILLIS_GAP = 0,

                            PUBLIC_INT___Column_JUERK_UP_PITCHBEND = 0,

                            PUBLIC_INT___Column_JERK_DOWNS_PITCH_BEND = 0,

                            PUBLIC_DOUBLE_NOTES_HERTZ_FOUND = currentFreq,

                            PUBIC_DOUBLE_ENFORCER_START_TIMES_MILLIS_FOR_DECORATIONS = currentStartMs,

                            PUBLIC_DOUBLE___Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES = 0,

                            Column___ENFORCED_START_MILLIS_FOR_PUREMELODY_NOTES = currentStartMs,

                            Column___REFERENCE_CUMULATIVE_START_MILLIS_FOR_CURRENT_NOTES = currentStartMs,

                            PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20 = 6,

                            PUBLIC_INT___Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT = 64

                        };

                        notes.Add(note);

                    }

                    // Start new note

                    currentMidiNote = midiNote;

                    currentFreq = freq;

                    accumulatedDuration = duration;

                    currentStartMs = startMs;

                }

            }

            string indinotes_names_found = "";

            indinotes_names_found

            = SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

            .PUBLIC_STATIC_STRING_GET_INDINOTESNAME_ONLY_LEFT_SIDES___FIRST_OCCURANCES___from_____PUBLIC_STATIC_STRING_ARRAY_FOR_36_NOTES___50_X_3____FOR_GIVENS_MIDSNOTESNUMBER

            (currentMidiNote.Value);

            // Final note flush

            if (currentMidiNote.HasValue && accumulatedDuration > 0)

            {

                var note = new SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                {

                    PUBLIC_STRING_THE_LYR_FOUND = "NA",

                    PUBLIC_STRING_THE_INDINOTE_FOUND = indinotes_names_found,

                    INT_NOTE_NUMBER_TO_PLAY_0_TO_127 = currentMidiNote.Value,

                    DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY = accumulatedDuration,

                    INT_CURRENT_NOTES_VELOCITY_0_TO_127 = 100,

                    INT_CURRENT_NOTES_PATCH_0_TO_127 = 73,

                    STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS = "0,100",

                    // this variable divides whole clubbed durations(milliseconds as percentages of whole durations at which the pitch bends are assigned strict note these are the percentages of total durations not the milliseconds)  STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS

                    STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES = "8192,8192",

                    // this variable STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES   stores the delimeted pitch bends values (within the pitch bends ranges assigned in (RPN Controlled systems for PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20) such that the array sizes of  delimeter splitted STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS data and delimeter splitted pitch bends data ahave same sizes of array sizes ... When there are gliding effects due to continuously monotonically increasing frequencies (note numbers are within the pitch bends semitones support ranges)  are (within the supporting ranges as per RPN presets) monotonically increasing notes or monotonically decreasing notes are clubbable to single note and the smoothe glidings are assignable through pitch bends , key pressures etc to get the natural effects)

                    PUBLIC_INT_CHANNEL_NUMBER_0_TO_15 = 3,

                    PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER = 3,

                    PUBLIC_DOUBLE____Column_PITCHBEND_JERKS_MILLIS_GAP = 0,

                    PUBLIC_INT___Column_JUERK_UP_PITCHBEND = 0,

                    PUBLIC_INT___Column_JERK_DOWNS_PITCH_BEND = 0,

                    PUBLIC_DOUBLE_NOTES_HERTZ_FOUND = currentFreq,

                    PUBIC_DOUBLE_ENFORCER_START_TIMES_MILLIS_FOR_DECORATIONS = currentStartMs,

                    PUBLIC_DOUBLE___Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES = 0,

                    Column___ENFORCED_START_MILLIS_FOR_PUREMELODY_NOTES = currentStartMs,

                    Column___REFERENCE_CUMULATIVE_START_MILLIS_FOR_CURRENT_NOTES = currentStartMs,

                    PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20 = 6,

                    PUBLIC_INT___Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT = 64

                };

                notes.Add(note);

            }

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                .

                RagaPaltas_OddEvenConcatenator

                .SaveNotesToFile(outputPath, notes);

        }////public static void Convert_CLUBBED_DURATIONS_FrequencyReportToNoteFile(List<string> reportLines, string outputPath)

Can you understand the comments writen here as instructions????????we need a new function which is smarter than this which will reduce total notes counts but will have same effects of note counts due to gliding of notes (Total number of events remain fixed ======> Total notes count = (Total notes count + Total pitch bends count) such that we can get the    smoother effects and we need a seperate .datagrid... file with the combined notes... it will add the durations of all the monotonically falling or rising notes (IIIIIIF the frequencies are within supported ranges of pitch bends) otherwise open new note as necessary ... Similar for monotonically rising notes ....... if there is any abrupt changes in frequency then obviously start new note according to the list ... the supplied list have all the discrete notes data ... all the total event will remain same strictly no reduction or increase of evnt count allowed... After merging the notes total duration of the output midi need to remain same(Total supplied notes durations need to remain same after merging and pitch bending done) and all the effects need to have listenable.......................       public static void Convert_CLUBBED_DURATIONS_FrequencyReportToNoteFile(List<string> reportLines, string outputPath)

        {

            var notes = new List<SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS>();

            int? currentMidiNote = null;

            double accumulatedDuration = 0;

            double currentStartMs = 0;

            double currentFreq = 0;

            foreach (var line in reportLines.Skip(1)) // Skip header

            {

                var parts = line.Split(',');

                if (parts.Length < 3) continue;

                int startMs = int.Parse(parts[0]);

                int endMs = int.Parse(parts[1]);

                double freq = double.Parse(parts[2], CultureInfo.InvariantCulture);

               if (freq < 20 || freq > 2000) continue; // Skip unrealistic frequencies

                // int midiNote = (int)(69 + 12 * Math.Log(freq / 440.0, 2));

                int midiNote = GetNearestNoteMidiNumber_FromBand(freq);// (int)(69 + 12 * Math.Log(freq / 440.0, 2));

                midiNote = Math.Max(0, Math.Min(127, midiNote));

                double duration = endMs - startMs;

                if (currentMidiNote.HasValue && midiNote == currentMidiNote.Value)

                {

                    // Extend duration if same note

                    accumulatedDuration += duration;

                }

                else

                {

                    // Save previous note if exists

                    if (currentMidiNote.HasValue)

                    {

                        var note = new SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                        {

                            PUBLIC_STRING_THE_LYR_FOUND = "NA",

                            PUBLIC_STRING_THE_INDINOTE_FOUND = "",

                            INT_NOTE_NUMBER_TO_PLAY_0_TO_127 = currentMidiNote.Value,

                            DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY = accumulatedDuration,

                            INT_CURRENT_NOTES_VELOCITY_0_TO_127 = 100,

                            INT_CURRENT_NOTES_PATCH_0_TO_127 = 73,

                            STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS = "0,100",

                            STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES = "8192,8192",

                            PUBLIC_INT_CHANNEL_NUMBER_0_TO_15 = 3,

                            PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER = 3,

                            PUBLIC_DOUBLE____Column_PITCHBEND_JERKS_MILLIS_GAP = 0,

                            PUBLIC_INT___Column_JUERK_UP_PITCHBEND = 0,

                            PUBLIC_INT___Column_JERK_DOWNS_PITCH_BEND = 0,

                            PUBLIC_DOUBLE_NOTES_HERTZ_FOUND = currentFreq,

                            PUBIC_DOUBLE_ENFORCER_START_TIMES_MILLIS_FOR_DECORATIONS = currentStartMs,

                            PUBLIC_DOUBLE___Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES = 0,

                            Column___ENFORCED_START_MILLIS_FOR_PUREMELODY_NOTES = currentStartMs,

                            Column___REFERENCE_CUMULATIVE_START_MILLIS_FOR_CURRENT_NOTES = currentStartMs,

                            PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20 = 6,

                            PUBLIC_INT___Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT = 64

                        };

                        notes.Add(note);

                    }

                    // Start new note

                    currentMidiNote = midiNote;

                    currentFreq = freq;

                    accumulatedDuration = duration;

                    currentStartMs = startMs;

                }

            }

            string indinotes_names_found = "";

            indinotes_names_found

            = SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

            .PUBLIC_STATIC_STRING_GET_INDINOTESNAME_ONLY_LEFT_SIDES___FIRST_OCCURANCES___from_____PUBLIC_STATIC_STRING_ARRAY_FOR_36_NOTES___50_X_3____FOR_GIVENS_MIDSNOTESNUMBER

            (currentMidiNote.Value);

            // Final note flush

            if (currentMidiNote.HasValue && accumulatedDuration > 0)

            {

                var note = new SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                {

                    PUBLIC_STRING_THE_LYR_FOUND = "NA",

                    PUBLIC_STRING_THE_INDINOTE_FOUND = indinotes_names_found,

                    INT_NOTE_NUMBER_TO_PLAY_0_TO_127 = currentMidiNote.Value,

                    DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY = accumulatedDuration,

                    INT_CURRENT_NOTES_VELOCITY_0_TO_127 = 100,

                    INT_CURRENT_NOTES_PATCH_0_TO_127 = 73,

                    STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS = "0,100",

                    // this variable divides whole clubbed durations(milliseconds as percentages of whole durations at which the pitch bends are assigned strict note these are the percentages of total durations not the milliseconds)  STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS

                    STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES = "8192,8192",

                    // this variable STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES   stores the delimeted pitch bends values (within the pitch bends ranges assigned in (RPN Controlled systems for PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20) such that the array sizes of  delimeter splitted STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS data and delimeter splitted pitch bends data ahave same sizes of array sizes ... When there are gliding effects due to continuously monotonically increasing frequencies (note numbers are within the pitch bends semitones support ranges)  are (within the supporting ranges as per RPN presets) monotonically increasing notes or monotonically decreasing notes are clubbable to single note and the smoothe glidings are assignable through pitch bends , key pressures etc to get the natural effects)

                    PUBLIC_INT_CHANNEL_NUMBER_0_TO_15 = 3,

                    PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER = 3,

                    PUBLIC_DOUBLE____Column_PITCHBEND_JERKS_MILLIS_GAP = 0,

                    PUBLIC_INT___Column_JUERK_UP_PITCHBEND = 0,

                    PUBLIC_INT___Column_JERK_DOWNS_PITCH_BEND = 0,

                    PUBLIC_DOUBLE_NOTES_HERTZ_FOUND = currentFreq,

                    PUBIC_DOUBLE_ENFORCER_START_TIMES_MILLIS_FOR_DECORATIONS = currentStartMs,

                    PUBLIC_DOUBLE___Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES = 0,

                    Column___ENFORCED_START_MILLIS_FOR_PUREMELODY_NOTES = currentStartMs,

                    Column___REFERENCE_CUMULATIVE_START_MILLIS_FOR_CURRENT_NOTES = currentStartMs,

                    PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20 = 6,

                    PUBLIC_INT___Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT = 64

                };

                notes.Add(note);

            }

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                .

                RagaPaltas_OddEvenConcatenator

                .SaveNotesToFile(outputPath, notes);

        }////public static void Convert_CLUBBED_DURATIONS_FrequencyReportToNoteFile(List<string> reportLines, string outputPath)

///////////////////// the working code for midi generations///////////////

    private async void button___PLAY_MIDI_STREAMS_Click(object sender, EventArgs e)

        {

            //https://demonstrations.wolfram.com/MIDIFrequencyCalculator/




            //////this part of the code looks good and now i want to make a system where i will supply the file(text file) where the columns will have the data

            //////start_millisecond, durations_in milliseconds, frequency_to_play   i will save that data in a text file where the columns are ###### separated columns in a file input_selected_files_names.flutes_melody_data and place the necessary waves samples there. if i put dash in the frequency or 0 in the frequency columns then generate pure silence there



            ////// these are three columns only   and read that text file using the below styles generate a complete mono single channel wav file 8000 samples per second 16 bit depth float(highest possible quality with 16 bit depth float(dont use short data types)  save the wav file in input_selected_files_names.flutes_melody_data_mono_8000_16pcms.wav


            StringBuilder ___strbldr_for____velocity_free______dot_no_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                = new StringBuilder();

            ___strbldr_for____velocity_free______dot_no_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                .Clear();



           StringBuilder  ___strbldr_for____with_velocity______dot_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                 = new StringBuilder();

            ___strbldr_for____with_velocity______dot_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                .Clear();






            double ______temp______________PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS = 0;





































////////////Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES

////////////Column___ENFORCED_START_MILLIS_FOR_PUREMELODY_NOTES

////////////Column___REFERENCE_CUMULATIVE_START_MILLIS_FOR_CURRENT_NOTES

////////////Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20

////////////Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT








            string ___initialsmessages_for_22_cols___SAANOWNCSVLINIERSCALEDDXFFORMIDI =

              //  "___initialsmessages_for_22_cols___SAANOWNCSVLINIERSCALEDDXFFORMIDI"+

//"\r\n ," +

"col 0   track(number categorizing like dxf layers)" +

"\r\n ,col 1   channel(9 for percussions only 0 to 15 only)" +

"\r\n ,col 2   patch_number(0 to 127)" +

"\r\n ,col 3   patch_name" +

"\r\n ,col 3+   pitch_bend_number(0 to 8190 to 16368    original note has no change frequency at 8190)" +

"\r\n ,col 3++   note_frequency_linier_y_start_data_OR_START_RADIUS(0,0,0 has zero frequency)" +

"\r\n ,col 6   note_frequency_linier_y_final_data_OR_FINAL_RADIUS(0,0,0 has zero frequency)" +

"\r\n ,col 7   note_name_FOUND_FROM_START_SIDES_FREQUENCY" +

"\r\n ,col 8   note_start_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE" +

"\r\n ,col 9   note_final_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE" +

"\r\n ,col 10   note_duration_IN_MIDITICKS_CALCULATED_FROM_THE_DEGREES_AND_TOTAL_DURATIONS_MICROSECONDS" +

"\r\n ,col 10+1   note_velocity_TRICKY_CALCULATION_OR_FROM_LAYERS" +

"\r\n ,col 10+2   grabbed_lyrics_text_FROM_LAYERS_NAMES_DATA" +

"\r\n ,col 10+3   grabbed_lyrics_Absolute_times_IN_LAYERS_DATA_FOR_TRACK_ZERO_WITH_MIDITICKS" +

"\r\n ,col 10+3+1   OPTIONAL_MILLISECONDS_DATA_FOR_START" +

"\r\n ,col 10+3+2   OPTIONAL_MILLISECONDS_DATA_FOR_FINAL" +

"\r\n ,col 10+3+3   OPTIONAL_MILLISECONDS_DATA_FOR_DURATIONS(normally 100 to 4300 to 30000 etc per notes)" +

"\r\n ,col 10+3+3 +1  OPTIONAL_NOTE_OR_OTHER_CONTROLLER_LIKE_PITCH_BEND(DECIDER_TO_PROCESS)" +

"\r\n ,col 10+3+3 +2  OPTIONAL_THE_RAW_MIDI_EVENT_COUNTER_PRESERVED_FOR_SORTING_WHILE_EXPORTING" +

"\r\n ,col 10+3+3 +3  OPTIONAL_SIN_THETA_ADJUSTED_SLOPE_FOR_VELOCITY_CONTROLLER" +

"\r\n ,col 10+3+3 +3+1  DEGREE_DIFF_TO_TRACK_BLANK_REGIONS" +

"\r\n ,col 21  DEGREE_START" +

"\r\n ,col 22  DEGREE_FINAL";


    

            

            

 


            StringBuilder LOCAL_STRINGBUILDER_FOR___22_COLS___SAANOWNCSVLINIERSCALEDDXFFORMIDI = new StringBuilder();

            LOCAL_STRINGBUILDER_FOR___22_COLS___SAANOWNCSVLINIERSCALEDDXFFORMIDI.Clear();



            string STRING_CURRENT_REPEAT_CYCLES_COUNT = this.textBox___FOR_COMPOSERS_REPEAT_CYCLES_COUNT.Text.ToString().TrimEnd().TrimStart().Trim();



            //////////////////////////////////////////////////////////////////////////////////////////////////////

            LOCAL_STRINGBUILDER_FOR___22_COLS___SAANOWNCSVLINIERSCALEDDXFFORMIDI

                .AppendLine

                (___initialsmessages_for_22_cols___SAANOWNCSVLINIERSCALEDDXFFORMIDI

                .Replace("\r\n", "")

                .Replace("___initialsmessages_for_22_cols___SAANOWNCSVLINIERSCALEDDXFFORMIDI,","")

                );

            //////////////////////////////////////////////////////////////////////////////////////////////////////

            // col 0   track(number categorizing like dxf layers) ,col 1   channel(9 for percussions only 0 to 15 only) ,col 2   patch_number(0 to 127) ,col 3   patch_name ,col 3 + pitch_bend_number(0 to 8190 to 16368    original note has no change frequency at 8190) ,col 3++   note_frequency_linier_y_start_data_OR_START_RADIUS(0, 0, 0 has zero frequency) ,col 6   note_frequency_linier_y_final_data_OR_FINAL_RADIUS(0, 0, 0 has zero frequency) ,col 7   note_name_FOUND_FROM_START_SIDES_FREQUENCY ,col 8   note_start_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE ,col 9   note_final_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE ,col 10   note_duration_IN_MIDITICKS_CALCULATED_FROM_THE_DEGREES_AND_TOTAL_DURATIONS_MICROSECONDS ,col 10 + 1   note_velocity_TRICKY_CALCULATION_OR_FROM_LAYERS ,col 10 + 2   grabbed_lyrics_text_FROM_LAYERS_NAMES_DATA ,col 10 + 3   grabbed_lyrics_Absolute_times_IN_LAYERS_DATA_FOR_TRACK_ZERO_WITH_MIDITICKS ,col 10 + 3 + 1   OPTIONAL_MILLISECONDS_DATA_FOR_START ,col 10 + 3 + 2   OPTIONAL_MILLISECONDS_DATA_FOR_FINAL ,col 10 + 3 + 3   OPTIONAL_MILLISECONDS_DATA_FOR_DURATIONS(normally 100 to 4300 to 30000 etc per notes) ,col 10 + 3 + 3 + 1  OPTIONAL_NOTE_OR_OTHER_CONTROLLER_LIKE_PITCH_BEND(DECIDER_TO_PROCESS) ,col 10 + 3 + 3 + 2  OPTIONAL_THE_RAW_MIDI_EVENT_COUNTER_PRESERVED_FOR_SORTING_WHILE_EXPORTING ,col 10 + 3 + 3 + 3  OPTIONAL_SIN_THETA_ADJUSTED_SLOPE_FOR_VELOCITY_CONTROLLER ,col 10 + 3 + 3 + 3 + 1  DEGREE_DIFF_TO_TRACK_BLANK_REGIONS ,col 21  DEGREE_START ,col 22  DEGREE_FINAL




            //////LOCAL_STRINGBUILDER_FOR___22_COLS___SAANOWNCSVLINIERSCALEDDXFFORMIDI

            //////    .AppendLine

            //////    (

            //////    // col 0   track(number categorizing like dxf layers) ,col 1   channel(9 for percussions only 0 to 15 only) ,col 2   patch_number(0 to 127) ,col 3   patch_name ,col 3 + pitch_bend_number(0 to 8190 to 16368    original note has no change frequency at 8190) ,col 3++   note_frequency_linier_y_start_data_OR_START_RADIUS(0, 0, 0 has zero frequency) ,col 6   note_frequency_linier_y_final_data_OR_FINAL_RADIUS(0, 0, 0 has zero frequency) ,col 7   note_name_FOUND_FROM_START_SIDES_FREQUENCY ,col 8   note_start_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE ,col 9   note_final_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE ,col 10   note_duration_IN_MIDITICKS_CALCULATED_FROM_THE_DEGREES_AND_TOTAL_DURATIONS_MICROSECONDS ,col 10 + 1   note_velocity_TRICKY_CALCULATION_OR_FROM_LAYERS ,col 10 + 2   grabbed_lyrics_text_FROM_LAYERS_NAMES_DATA ,col 10 + 3   grabbed_lyrics_Absolute_times_IN_LAYERS_DATA_FOR_TRACK_ZERO_WITH_MIDITICKS ,col 10 + 3 + 1   OPTIONAL_MILLISECONDS_DATA_FOR_START ,col 10 + 3 + 2   OPTIONAL_MILLISECONDS_DATA_FOR_FINAL ,col 10 + 3 + 3   OPTIONAL_MILLISECONDS_DATA_FOR_DURATIONS(normally 100 to 4300 to 30000 etc per notes) ,col 10 + 3 + 3 + 1  OPTIONAL_NOTE_OR_OTHER_CONTROLLER_LIKE_PITCH_BEND(DECIDER_TO_PROCESS) ,col 10 + 3 + 3 + 2  OPTIONAL_THE_RAW_MIDI_EVENT_COUNTER_PRESERVED_FOR_SORTING_WHILE_EXPORTING ,col 10 + 3 + 3 + 3  OPTIONAL_SIN_THETA_ADJUSTED_SLOPE_FOR_VELOCITY_CONTROLLER ,col 10 + 3 + 3 + 3 + 1  DEGREE_DIFF_TO_TRACK_BLANK_REGIONS ,col 21  DEGREE_START ,col 22  DEGREE_FINAL


            //////    );


            if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

            {


                System.Windows.Forms.MessageBox.Show(___initialsmessages_for_22_cols___SAANOWNCSVLINIERSCALEDDXFFORMIDI);



            }//if(this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper()=="CHECKED")




           

            if (STRING_CURRENT_REPEAT_CYCLES_COUNT.Length == 0)

            {

                this.textBox___FOR_COMPOSERS_REPEAT_CYCLES_COUNT.Text = "300";

                STRING_CURRENT_REPEAT_CYCLES_COUNT = this.textBox___FOR_COMPOSERS_REPEAT_CYCLES_COUNT.Text.ToString().TrimEnd().TrimStart().Trim();

            }//if(STRING_CURRENT_REPEAT_CYCLES_COUNT.Length==0)

            int INT_CURRENT_REPEAT_CYCLES_COUNT = 1;

            INT_CURRENT_REPEAT_CYCLES_COUNT = Convert.ToInt16(STRING_CURRENT_REPEAT_CYCLES_COUNT);

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Maximum = INT_CURRENT_REPEAT_CYCLES_COUNT;

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Value = 0;

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Invalidate();

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Update();//added newlys

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Refresh();

            this.button___PLAY_MIDI_STREAMS.Enabled = false;

            double THE_DOUBLE_POPULATOR_NOTES_COUNTER_FOR_EVERY_INDIVIDUAL_NOTES = 0;

            double THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS = 0;

            ///yes it looks real time updation of graphics when the   cell content is changed and the focus is shifted from the current cell of datagridsview object

            ///yes it looks real time updation of graphics when the   cell content is changed and the focus is shifted from the current cell of datagridsview object

            ///yes it looks real time updation of graphics when the   cell content is changed and the focus is shifted from the current cell of datagridsview object

            // TO LOAD THE DATA GRIDS FOR DIVISORS NON DIVISORS ALSO

            this.pictureBox_FOR_GT_DISPLAYS.Invalidate();

            ///yes it looks real time updation of graphics when the   cell content is changed and the focus is shifted from the current cell of datagridsview object

            ///yes it looks real time updation of graphics when the   cell content is changed and the focus is shifted from the current cell of datagridsview object

            ///yes it looks real time updation of graphics when the   cell content is changed and the focus is shifted from the current cell of datagridsview object

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            RECALCULATE_THE_MIDI_DATA_MICROSECONDS_NOTES_ETC();

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            ///
























































































































































            string ___dummyfilesnamesformids =

                ExcelFormulaParser_GT_PARSERSample.Program.public_static_string_GT_folder

                + (("PLAY_MIDI_STREAMS_" + INT_CURRENT_REPEAT_CYCLES_COUNT.ToString().TrimEnd().TrimStart().Trim() + "_loops_").TrimEnd().TrimStart().Trim() + System.DateTime.Now.ToString("ddmmyyyyhhmmss")).TrimEnd().TrimStart().Trim() + ".mid";


 













































            if (this.___selected_filesnames_for_inputdataGridView___COMPOSER_files.TrimEnd().TrimStart().Trim().Length>0)

            {

                ___dummyfilesnamesformids

                    =

                    ___dummyfilesnamesformids.Replace("PLAY_MIDI_STREAMS_",System.IO.Path.GetFileNameWithoutExtension(this.___selected_filesnames_for_inputdataGridView___COMPOSER_files));


                System.Windows.Forms.MessageBox.Show("CAUTION   ___dummyfilesnamesformids = " + ___dummyfilesnamesformids);





            }//if(this.___selected_filesnames_for_inputdataGridView___COMPOSER_files.TrimEnd().TrimStart().Trim().Length>0)



















            int MidiFileType = 1;// 0;//////saan changes this to 1

            int BeatsPerMinute =

                (int)this.PUBLIC_DOUBLE_BPM_VALUE_FROM___textBoxFOR_BEATS_PER_MINUTE;

            //60;

            int TicksPerQuarterNote =

               (int)this.public_double___value_from_the___textBox_TS_MIDI_TICKS_PER_BEAT_OR_TPQN_NUMBER_MULTIPLE_OF_480;

            if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

            {

                System.Windows.Forms.MessageBox.Show("TPQN_MDTKSPERBTS= " + this.public_double___value_from_the___textBox_TS_MIDI_TICKS_PER_BEAT_OR_TPQN_NUMBER_MULTIPLE_OF_480);

            }//if(this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper()=="CHECKED")

             //120;////// too important /// multiple of 480








            double ___temp_note_freq_found = 0;

            int TrackNumber = 0;

            int ChannelNumber = 1;

            //////public PatchParser()

            int Patch_number = 26;

            long abstimesinmillis = 0;

            long absoluteTime___start___midstksunits = 0;

            long absoluteTime___final___midstksunits = 0;

            //////long absoluteTime___start___millis_units = 0;

            //////long absoluteTime___final___millis_units = 0;

            ///

            double absoluteTime___start___millis_units = 0;

            double absoluteTime___final___millis_units = 0;

            int ___necessary_pitch_bend_to_put_at_start_side_of_note = 0;

            double DOUBLE_FREQUENCY_FOUND = 0;

            string STRING_NOTE_NAME_FOUND = "";





























            // var collection

            SAANAUDS.Midi.MidiEventCollection SAANSMIDSEVENTScollection

             = new

             SAANAUDS.Midi.MidiEventCollection

             (MidiFileType, TicksPerQuarterNote);


            /////////////////////////////////////////////////////////////////////////////////////////

            /////we will do this notewise

            int pitchBendRange = 12;// 1;// 3;// 12; // semitone range: -6 to +6 = total 12




            //WE WILL DO THESE CAlculations

            //////SAANSMIDSEVENTScollection

            ////// .AddEvent

            ////// (

            //////     new SAANAUDS.Midi.TextEvent

            //////     (

            //////         "Note Stream LYRICS",

            //////         SAANAUDS.Midi.MetaEventType.TextEvent

            //////         ,

            //////    // absoluteTime

            //////    (long)((absoluteTime___start___midstksunits + absoluteTime___final___midstksunits) / 6)

            //////         ),

            //////     //TrackNumber

            //////     TrackNumber

            //////     );

            /////////////////////////////// interesting styles ////////////////////

            ///

            SAANSMIDSEVENTScollection

            .AddEvent

            (

            new SAANAUDS.Midi.TextEvent

            (

            "SanjoyNathGeometrifyingTrigonometry(C)"

            ,

            SAANAUDS.Midi.MetaEventType.Copyright

            ,

            // absoluteTime

            (long)(absoluteTime___start___midstksunits)

            ),

            //TrackNumber

            // 0

            TrackNumber

            );

            THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;

            ////////////////////////////////////////////////////////////////////////////////

            ////// will do after some times

            // ++absoluteTime;

            SAANSMIDSEVENTScollection.AddEvent

            (

                new SAANAUDS.Midi.TempoEvent

            (

                Local_CalculateMicrosecondsPerQuaterNote

                (

                    BeatsPerMinute

                    ),

                   /// absoluteTime

                   absoluteTime___start___midstksunits

                ),

               // TrackNumber

               TrackNumber

                );

            THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            //////reads the data from the GTDXFMIDI TABS FIRST RECALCULATES THINGS FIRST

            //////reads the data from the GTDXFMIDI TABS FIRST RECALCULATES THINGS FIRST

            //////reads the data from the GTDXFMIDI TABS FIRST RECALCULATES THINGS FIRST            

            //i dont think it heres  RECALCULATE_THE_MIDI_DATA_MICROSECONDS_NOTES_ETC();

            //////reads the data from the GTDXFMIDI TABS FIRST RECALCULATES THINGS FIRST

            //////reads the data from the GTDXFMIDI TABS FIRST RECALCULATES THINGS FIRST

            //////reads the data from the GTDXFMIDI TABS FIRST RECALCULATES THINGS FIRST  

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            ///////////////////////////////// TOOOOO IMPORTANT CALL FOR MIDI SYSTEMS /////////////////

            //////    SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

            //////.PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

            //////.PUBLIC_STATIC_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

            //////.Clear();

            /////instead we need the proper constructions of the lists and the  clearing the data

            // this prepares the list clears the data structures first before loading the selected notes data everytime before prelistening

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                .public_static_void_prepare_notes_sequences_for_prelistening_populate_to_rows();

            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            string string_to_check_the_data_loading = "";

            /// now we ill load the data for the selected rows to the notes

            /// 

            // Iterate through selected rows and add their data to the list

            int ___temp_note_counter = 0;

            long ___current_start_ticks_to_assign_for_current_note = 0;

            double ___TEMP___DOUBLE_TOTAL_MILLISECONDS_FOR_SINGLE_PRELISTENS_CYCLES = 0;

            ______temp______________PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS = 0;

            try

            {

                if (this.dataGridView___COMPOSER.SelectedRows.Count == 0)

                {

                    if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

                    {

                        System.Windows.Forms.MessageBox.Show("Fill the note numbers and other data and select the rows first");

                    }//if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

                }//if(this.dataGridView___COMPOSER.SelectedRows.Count==0)

                foreach (DataGridViewRow row in this.dataGridView___COMPOSER.SelectedRows)

                {

                    //////if (row.Cells["Id"].Value != null && row.Cells["Name"].Value != null && row.Cells["Genre"].Value != null)

                    //////{

                    //////    selectedRowsData.Add(new ComposerData

                    //////    {

                    //////        Id = Convert.ToInt32(row.Cells["Id"].Value),

                    //////        Name = row.Cells["Name"].Value.ToString(),

                    //////        Genre = row.Cells["Genre"].Value.ToString()

                    //////    });

                    //////}//             if (row.Cells["Id"].Value != null && row.Cells["Name"].Value != null && row.Cells["Genre"].Value != null)

                    //////SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                    //////.PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                    //////.PUBLIC_STATIC_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                    ///   this.dataGridViewFOR_GT_PRESETS_DATA.Rows[6].Cells[1].Value.ToString()

                    //////if (row.Cells["Id"].Value != null && row.Cells["Name"].Value != null && row.Cells["Genre"].Value != null)

                    //////{

                    //////}

                    ///

                    //////        if (row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Value != null &&

                    //////row.Cells["Column_NOTES_DURATIONS_MILLIS"].Value != null &&

                    //////row.Cells["Column_NOTES_VELOCITY"].Value != null &&

                    //////row.Cells["Column_CURRENT_NOTES_PATCH"].Value != null &&

                    //////row.Cells["ColumnINTERMEDIATE_PITCHBEND_DURATION_SLABS_PERCENTAGES_WITHIN_CURRENT_NOTES"].Value != null &&

                    //////row.Cells["Column_WITHIN_NOTES_PITCH_BENDS_VALUES"].Value != null)

                    if (row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Value != null)

                    {

                        ___temp_note_counter++;

                        if (SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                          .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                          .PUBLIC_STATIC_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .Count > 0

                          )

                        {

                            ___current_start_ticks_to_assign_for_current_note

                                =

                           SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .Last()

                            .LONG_START_ABSOLUTE_TIME_FOR_CURRENT_NOTE

                            +

                            (long)

                            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .Last()

                            .LONG_TICKS_DURATIONS_FOR_CURRENT_NOTE;

                        }

                        //////if (SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                        //////                    .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                        //////                    .PUBLIC_STATIC_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                        //////                    .Count > 0

                        //////                    )

                        //////    SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                        //////.PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                        //////.PUBLIC_STATIC_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                       .PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                    ___temp_new_note_to_populate

                    =

                    new

                    SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                   .PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                   ();

                        string_to_check_the_data_loading = string_to_check_the_data_loading + "\r\n";

                        string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Value.ToString();

                        /////////////////////////////////////////////////////////////////////////////////

                        ___temp_new_note_to_populate

                            .INT_SERIAL_NUMBER_OF_NOTE = ___temp_note_counter;


                        ___temp_new_note_to_populate

                            .

                        INT_SERIAL_NUMBER_OF_SIMPLY___RAW_DATAGRIDS_ROW_OR_IMPORTED_NOTE_FROM_INDINOTES_OR_INDITAALS_FILES_OR_LYRS_FILES

                        = ___temp_note_counter;

                        /////////////////////////////////////////////////////////////////////////////////

                        try

                        {






















                            


                            ___temp_new_note_to_populate.PUBLIC_STRING_THE_LYR_FOUND = "";

                            















/////////////////////////////////////////////////////////////////////////////////////////////////////////

                            if(row.Cells["Column_LYRIK_SYLLABLES"].Value!=null)

                            {

                                if (row.Cells["Column_LYRIK_SYLLABLES"].Value.ToString().TrimEnd().TrimStart().Trim().Length>0)

                                {

                                    ___temp_new_note_to_populate.PUBLIC_STRING_THE_LYR_FOUND 

                                        =

                                        row.Cells["Column_LYRIK_SYLLABLES"].Value.ToString()

                                        ;

                                }//if (row.Cells["Column_LYRIK_SYLLABLES"].Value.ToString().TrimEnd().TrimStart().Trim().Length>0)

                                else

                                {

                                    ___temp_new_note_to_populate.PUBLIC_STRING_THE_LYR_FOUND = "";

                                }//end of else of if (row.Cells["Column_LYRIK_SYLLABLES"].Value.ToString().TrimEnd().TrimStart().Trim().Length>0)

                            }//if(row.Cells["Column_LYRIK_SYLLABLES"].Value!=null)

                            else

                            {

                                ___temp_new_note_to_populate.PUBLIC_STRING_THE_LYR_FOUND = "";

                            }//end of else of if(row.Cells["Column_LYRIK_SYLLABLES"].Value!=null)


                            /////////////////////////////////////////////////////////////////////////////////////////////////////////



                            ___temp_new_note_to_populate.PUBLIC_STRING_THE_INDINOTE_FOUND = "";


                            /////////////////////////////////////////////////////////////////////////////////////////////////////////

                            if (row.Cells["Column_CUSTOMIZED_INDEAN_NOTES"].Value != null)

                            {

                                if (row.Cells["Column_CUSTOMIZED_INDEAN_NOTES"].Value.ToString().TrimEnd().TrimStart().Trim().Length > 0)

                                {

                                    ___temp_new_note_to_populate.PUBLIC_STRING_THE_INDINOTE_FOUND

                                        =

                                        row.Cells["Column_CUSTOMIZED_INDEAN_NOTES"].Value.ToString()

                                        ;

                                }//if (row.Cells["Column_CUSTOMIZED_INDEAN_NOTES"].Value.ToString().TrimEnd().TrimStart().Trim().Length>0)

                                else

                                {

                                    ___temp_new_note_to_populate.PUBLIC_STRING_THE_INDINOTE_FOUND = "";

                                }//end of else of if (row.Cells["Column_CUSTOMIZED_INDEAN_NOTES"].Value.ToString().TrimEnd().TrimStart().Trim().Length>0)

                            }//if(row.Cells[""].Value!=null)

                            else

                            {

                                ___temp_new_note_to_populate.PUBLIC_STRING_THE_INDINOTE_FOUND = "";

                            }//end of else of if(row.Cells["Column_CUSTOMIZED_INDEAN_NOTES"].Value!=null)


                            /////////////////////////////////////////////////////////////////////////////////////////////////////////



















                            ___temp_new_note_to_populate

                            .INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                            = Convert.ToInt16(row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Value.ToString().TrimEnd().TrimStart().Trim());

                            row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Style.BackColor = Color.White;

                            ////// for references this.dataGridViewFOR_GT_PRESETS_DATA.Rows[371].Cells[1].Value = "76";//////"TRACK_53_GTMIDS_PATCH_52___371_WINDS_12____9TH_TO_8TH";

                            ////// for references this.dataGridViewFOR_GT_PRESETS_DATA.Rows[371].Cells[0].Style.BackColor = Color.LightGray;

                            ////// for references this.dataGridViewFOR_GT_PRESETS_DATA.Rows[371].Cells[0].Style.ForeColor = Color.Black;

                            /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                        }

                        catch (Exception _____excptoconvert)

                        {

                            ___temp_new_note_to_populate

                            .INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                            = 61;

                            row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Value = 61;

                            row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Style.BackColor = Color.PaleVioletRed;

                            ___temp_new_note_to_populate

                             .INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                             = Convert.ToInt16(row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Value.ToString().TrimEnd().TrimStart().Trim());

                        }//catch(Exception _____excptoconvert)   

                        //////////////////////////////////////////////////////////////////////////////

                        if (

                            ___temp_new_note_to_populate

                         .INT_NOTE_NUMBER_TO_PLAY_0_TO_127 < 0

                         ||

                        ___temp_new_note_to_populate

                         .INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                         > 127

                         )

                        {

                            row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Style.BackColor = Color.PaleVioletRed;

                            ___temp_new_note_to_populate

                         .INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                         = 61;

                        }

                        //////if (

                        //////    ___temp_new_note_to_populate

                        ////// .INT_NOTE_NUMBER_TO_PLAY_0_TO_127 < 0

                        ////// ||

                        //////___temp_new_note_to_populate

                        ////// .INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                        ////// > 127

                        ////// )

                        ///else

                        ///

                        {

                            //proper note numbers are filled

                            row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Style.BackColor = Color.White;

                        }//end of else cases

                        DOUBLE_FREQUENCY_FOUND = 0;

                        STRING_NOTE_NAME_FOUND = "";

                        //   INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                        STRING_NOTE_NAME_FOUND

                        =

                        //////SAANAUDS.PUBLIC_STATIC_CLASS_TO_GENERATE_CSVMIDI_LIKE_SAANDATA

                        //////.public_static_string_get_note_name_from_frequency_Hertz

                        //////(DOUBLE_FREQUENCY_FOUND);

                        ///

                        SAANAUDS.PUBLIC_STATIC_CLASS_TO_GENERATE_CSVMIDI_LIKE_SAANDATA

                    .PUBLIC_STATIC_STRING___RETURN_NOTE_NAME_FROM___1_values_up_down_not_necessary___indexes_since_my_array_is_1_to_128___NOTE_NUMBER___PUBLIC_STATIC_STRING_ARRAY_FOR_SAAN_NOTES_MAPPER

                    (___temp_new_note_to_populate.INT_NOTE_NUMBER_TO_PLAY_0_TO_127);

                        row.Cells["Column_CONVENTIONAL_NOTES_NUMBERS"].Value = STRING_NOTE_NAME_FOUND;

                        //////current_note_name_found_from_note_number = "";

                        //////current_note_name_found_from_note_number

                        //////    =

                        //////SAANAUDS.PUBLIC_STATIC_CLASS_TO_GENERATE_CSVMIDI_LIKE_SAANDATA

                        //////.PUBLIC_STATIC_STRING___RETURN_NOTE_NAME_FROM___1_values_up_down_not_necessary___indexes_since_my_array_is_1_to_128___NOTE_NUMBER___PUBLIC_STATIC_STRING_ARRAY_FOR_SAAN_NOTES_MAPPER

                        //////(note_number_found_from_the_nearest_frequency_Hertz);

                        //  DOUBLE_FREQUENCY_FOUND =

                        /////////////////////////////////////////////////////////////////////////////////

                        if (row.Cells["Column_NOTES_DURATIONS_MILLIS"].Value != null)

                        {

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_NOTES_DURATIONS_MILLIS"].Value.ToString();

                        }

                        else

                        {

                            row.Cells["Column_NOTES_DURATIONS_MILLIS"].Value = "1000";

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_NOTES_DURATIONS_MILLIS"].Value.ToString();

                        }//end of else of if(row.Cells["Column_NOTES_DURATIONS_MILLIS"].Value!=null)

                        try

                        {

                            /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                            ___temp_new_note_to_populate

                                .DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY

                                =

                                Convert.ToDouble(row.Cells["Column_NOTES_DURATIONS_MILLIS"].Value.ToString().TrimEnd().TrimStart().Trim());

                            /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                            row.Cells["Column_NOTES_DURATIONS_MILLIS"].Style.BackColor = Color.White;

                        }

                        catch (Exception _____excptoconvert)

                        {

                            ___temp_new_note_to_populate

                            .DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY

                            = 680;

                            row.Cells["Column_NOTES_DURATIONS_MILLIS"].Value = 680;

                            ___temp_new_note_to_populate

                             .DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY

                             = Convert.ToDouble(row.Cells["Column_NOTES_DURATIONS_MILLIS"].Value.ToString().TrimEnd().TrimStart().Trim());

                            row.Cells["Column_NOTES_DURATIONS_MILLIS"].Style.BackColor = Color.PaleVioletRed;

                        }//catch(Exception _____excptoconvert)        

                        ///////////////////////////////////////////////////////////////////////////////// 

                        ////////////////////////////////////////////////////////////////////////////////

                        /////// WE WILL ADD THIS WITH CYCLES COUNTERS

                        ___TEMP___DOUBLE_TOTAL_MILLISECONDS_FOR_SINGLE_PRELISTENS_CYCLES

                            =

                            ___TEMP___DOUBLE_TOTAL_MILLISECONDS_FOR_SINGLE_PRELISTENS_CYCLES

                            +

                    ___temp_new_note_to_populate

                        .DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY;

                        ///////////////////////////////////////////////////////////////////////////////////////////





































































































































                        /////////////////// CAUTION  CAUTION CAUTION WE DO THE DATA ACCUMULATIONS FIRST AND THEN WE ADD THE CUMULATIONS //////

                        ___temp_new_note_to_populate

                        .

                        PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS

                        =

                        ______temp______________PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS;

                        /////////////////// CAUTION  CAUTION CAUTION WE DO THE DATA ACCUMULATIONS FIRST AND THEN WE ADD THE CUMULATIONS //////

                        /////////////////// CAUTION  CAUTION CAUTION WE DO THE DATA ACCUMULATIONS FIRST AND THEN WE ADD THE CUMULATIONS //////

                        /////////////////// CAUTION  CAUTION CAUTION WE DO THE DATA ACCUMULATIONS FIRST AND THEN WE ADD THE CUMULATIONS //////


                        ______temp______________PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS

                                    =

                            ______temp______________PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS

                            +

                    ___temp_new_note_to_populate

                        .DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY;


                        /////////////////// CAUTION  CAUTION CAUTION WE DO THE DATA ACCUMULATIONS FIRST AND THEN WE ADD THE CUMULATIONS //////







                        /////// WE WILL ADD THIS WITH CYCLES COUNTERS

                        ////////////////////////////////////////////////////////////////////////////////                       

                        if (row.Cells["Column_NOTES_VELOCITY"].Value != null)

                        {

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_NOTES_VELOCITY"].Value.ToString();

                        }

                        else

                        {

                            row.Cells["Column_NOTES_VELOCITY"].Value = "127";

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_NOTES_VELOCITY"].Value.ToString();

                        }//end of else of if (row.Cells["Column_NOTES_VELOCITY"].Value != null)

                        /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                        try

                        {

                            ___temp_new_note_to_populate

                            .INT_CURRENT_NOTES_VELOCITY_0_TO_127

                            =

                            Convert.ToInt16(row.Cells["Column_NOTES_VELOCITY"].Value.ToString().TrimEnd().TrimStart().Trim());

                            row.Cells["Column_NOTES_VELOCITY"].Style.BackColor = Color.White;

                        }

                        catch (Exception _____excptoconvert)

                        {

                            ___temp_new_note_to_populate

                            .INT_CURRENT_NOTES_VELOCITY_0_TO_127

                            = 127;

                            row.Cells["Column_NOTES_VELOCITY"].Value = 127;

                            row.Cells["Column_NOTES_VELOCITY"].Style.BackColor = Color.PaleVioletRed;

                            ___temp_new_note_to_populate

                             .INT_CURRENT_NOTES_VELOCITY_0_TO_127

                             = Convert.ToInt16(row.Cells["Column_NOTES_VELOCITY"].Value.ToString().TrimEnd().TrimStart().Trim());

                        }//catch(Exception _____excptoconvert)        

                         /////////////////////////////////////////////////////////////////////////////////                    

                        if (

                            ___temp_new_note_to_populate

                         .INT_CURRENT_NOTES_VELOCITY_0_TO_127 < 0

                         ||

                        ___temp_new_note_to_populate

                         .INT_CURRENT_NOTES_VELOCITY_0_TO_127

                         > 127

                         )

                        {

                            //proper note numbers are filled

                            row.Cells["Column_NOTES_VELOCITY"].Style.BackColor = Color.PaleVioletRed;

                            ___temp_new_note_to_populate

                         .INT_CURRENT_NOTES_VELOCITY_0_TO_127

                         = 127;

                        }

                        //////if (

                        //////    ___temp_new_note_to_populate

                        ////// .INT_CURRENT_NOTES_VELOCITY_0_TO_127 < 0

                        ////// ||

                        //////___temp_new_note_to_populate

                        ////// .INT_CURRENT_NOTES_VELOCITY_0_TO_127

                        ////// > 127

                        ////// )

                        else

                        {

                            row.Cells["Column_NOTES_VELOCITY"].Style.BackColor = Color.White;

                        }

                        /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                        if (row.Cells["Column_CURRENT_NOTES_PATCH"].Value != null)

                        {

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_CURRENT_NOTES_PATCH"].Value.ToString();

                        }

                        else

                        {

                            row.Cells["Column_CURRENT_NOTES_PATCH"].Value = "127";

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_CURRENT_NOTES_PATCH"].Value.ToString();

                        }//end of else of if (row.Cells["Column_CURRENT_NOTES_PATCH"].Value != null)

                        try

                        {

                            /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                            ___temp_new_note_to_populate

                              .INT_CURRENT_NOTES_PATCH_0_TO_127

                              =

                              Convert.ToInt16(row.Cells["Column_CURRENT_NOTES_PATCH"].Value.ToString().TrimEnd().TrimStart().Trim());

                            /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                        }

                        catch (Exception _____excptoconvert)

                        {

                            ___temp_new_note_to_populate

                            .INT_CURRENT_NOTES_PATCH_0_TO_127

                            = 73;

                            row.Cells["Column_CURRENT_NOTES_PATCH"].Value = 73;

                            row.Cells["Column_CURRENT_NOTES_PATCH"].Style.BackColor = Color.PaleVioletRed;

                            ___temp_new_note_to_populate

                             .INT_CURRENT_NOTES_PATCH_0_TO_127

                             = Convert.ToInt16(row.Cells["Column_CURRENT_NOTES_PATCH"].Value.ToString().TrimEnd().TrimStart().Trim());

                        }//catch(Exception _____excptoconvert)        

                         ///////////////////////////////////////////////////////////////////////////////// 

                         //////////////////////////////////////////////////////////////////////////////

                        if (

                            ___temp_new_note_to_populate

                         .INT_CURRENT_NOTES_PATCH_0_TO_127 < 0

                         ||

                        ___temp_new_note_to_populate

                         .INT_CURRENT_NOTES_PATCH_0_TO_127

                         > 127

                         )

                        {

                            row.Cells["Column_CURRENT_NOTES_PATCH"].Style.BackColor = Color.PaleVioletRed;

                            ___temp_new_note_to_populate

                         .INT_CURRENT_NOTES_PATCH_0_TO_127

                         = 73;

                        }

                        //////if (

                        //////    ___temp_new_note_to_populate

                        ////// .INT_CURRENT_NOTES_PATCH_0_TO_127 < 0

                        ////// ||

                        //////___temp_new_note_to_populate

                        ////// .INT_CURRENT_NOTES_PATCH_0_TO_127

                        ////// > 127

                        ////// )

                        ///else

                        ///

                        {

                            //proper note numbers are filled

                            row.Cells["Column_CURRENT_NOTES_PATCH"].Style.BackColor = Color.White;

                        }//end of else cases

                        if (row.Cells["ColumnINTERMEDIATE_PITCHBEND_DURATION_SLABS_PERCENTAGES_WITHIN_CURRENT_NOTES"].Value != null)

                        {

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["ColumnINTERMEDIATE_PITCHBEND_DURATION_SLABS_PERCENTAGES_WITHIN_CURRENT_NOTES"].Value.ToString();


                            ___temp_new_note_to_populate

                                  .STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS

                                  = row.Cells["ColumnINTERMEDIATE_PITCHBEND_DURATION_SLABS_PERCENTAGES_WITHIN_CURRENT_NOTES"].Value.ToString().TrimEnd().TrimStart().Trim();



                        }

                        else

                        {

                            row.Cells["ColumnINTERMEDIATE_PITCHBEND_DURATION_SLABS_PERCENTAGES_WITHIN_CURRENT_NOTES"].Value = "0,100";

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["ColumnINTERMEDIATE_PITCHBEND_DURATION_SLABS_PERCENTAGES_WITHIN_CURRENT_NOTES"].Value.ToString();




                            ___temp_new_note_to_populate

                                  .STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS

                                  = row.Cells["ColumnINTERMEDIATE_PITCHBEND_DURATION_SLABS_PERCENTAGES_WITHIN_CURRENT_NOTES"].Value.ToString().TrimEnd().TrimStart().Trim();





                        }//end of else of  if (row.Cells["ColumnINTERMEDIATE_PITCHBEND_DURATION_SLABS_PERCENTAGES_WITHIN_CURRENT_NOTES"].Value != null)

                         /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                         /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                        if (row.Cells["Column_WITHIN_NOTES_PITCH_BENDS_VALUES"].Value != null)

                        {

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_WITHIN_NOTES_PITCH_BENDS_VALUES"].Value.ToString();



                            ___temp_new_note_to_populate

                                 .STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES

                                 = row.Cells["Column_WITHIN_NOTES_PITCH_BENDS_VALUES"].Value.ToString().TrimEnd().TrimStart().Trim();






                        }

                        else

                        {

                            row.Cells["Column_WITHIN_NOTES_PITCH_BENDS_VALUES"].Value = "8192,8192";

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_WITHIN_NOTES_PITCH_BENDS_VALUES"].Value.ToString();



                            ___temp_new_note_to_populate

                                  .STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES

                                  = row.Cells["Column_WITHIN_NOTES_PITCH_BENDS_VALUES"].Value.ToString().TrimEnd().TrimStart().Trim();





                        }//end of else of if (row.Cells["Column_WITHIN_NOTES_PITCH_BENDS_VALUES"].Value != null)

                        ////////////////////////////////////////////////////////////////////////////////////////////////

                        //  we have to do a lot of calculations for this

                        ////////////////////////////////////////////////////////////////////////////////////////////////

                        if (row.Cells["Column_FOR_CHANNEL"].Value != null)

                        {

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_FOR_CHANNEL"].Value.ToString();

                        }

                        else

                        {

                            row.Cells["Column_FOR_CHANNEL"].Value = "3";

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_FOR_CHANNEL"].Value.ToString();

                        }//end of else of if (row.Cells["Column_WITHIN_NOTES_PITCH_BENDS_VALUES"].Value != null)

                         /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                        try

                        {

                            ___temp_new_note_to_populate

                            .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                            = Convert.ToInt16(row.Cells["Column_FOR_CHANNEL"].Value.ToString().TrimEnd().TrimStart().Trim());

                            row.Cells["Column_FOR_CHANNEL"].Style.BackColor = Color.White;

                        }

                        catch (Exception _____excptoconvert)

                        {

                            ___temp_new_note_to_populate

                            .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                            = 3;

                            row.Cells["Column_FOR_CHANNEL"].Value = 3;

                            row.Cells["Column_FOR_CHANNEL"].Style.BackColor = Color.PaleVioletRed;

                            ___temp_new_note_to_populate

                             .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                             = Convert.ToInt16(row.Cells["Column_FOR_CHANNEL"].Value.ToString().TrimEnd().TrimStart().Trim());

                        }//catch(Exception _____excptoconvert)        

                        //////////////////////////////////////////////////////////////////////////////

                        if (

                            ___temp_new_note_to_populate

                         .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15 < 0

                         ||

                        ___temp_new_note_to_populate

                         .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                         > 15

                         )

                        {

                            row.Cells["Column_FOR_CHANNEL"].Style.BackColor = Color.PaleVioletRed;

                            ___temp_new_note_to_populate

                         .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                         = 3;

                        }

                        //////if (

                        //////    ___temp_new_note_to_populate

                        ////// .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15 < 0

                        ////// ||

                        //////___temp_new_note_to_populate

                        ////// .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                        ////// > 127

                        ////// )

                        ///else

                        ///

                        {

                            //proper  CHANNEL are filled

                            row.Cells["Column_FOR_CHANNEL"].Style.BackColor = Color.White;

                        }//end of else cases

                        /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                        if (row.Cells["Column_FOR_TRACK"].Value != null)

                        {

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_FOR_TRACK"].Value.ToString();

                        }

                        else

                        {

                            row.Cells["Column_FOR_TRACK"].Value = "3";

                            string_to_check_the_data_loading = string_to_check_the_data_loading + "   " + row.Cells["Column_FOR_TRACK"].Value.ToString();

                        }//end of else of if (row.Cells["Column_WITHIN_NOTES_PITCH_BENDS_VALUES"].Value != null)

                         /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                        try

                        {

                            ___temp_new_note_to_populate

                                .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER

                            = Convert.ToInt16(row.Cells["Column_FOR_TRACK"].Value.ToString().TrimEnd().TrimStart().Trim());

                            row.Cells["Column_FOR_TRACK"].Style.BackColor = Color.White;

                        }

                        catch (Exception _____excptoconvert)

                        {

                            ___temp_new_note_to_populate

                            .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER

                            = 3;

                            row.Cells["Column_FOR_TRACK"].Value = 3;

                            row.Cells["Column_FOR_TRACK"].Style.BackColor = Color.PaleVioletRed;

                            ___temp_new_note_to_populate

                             .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER

                             = Convert.ToInt16(row.Cells["Column_FOR_TRACK"].Value.ToString().TrimEnd().TrimStart().Trim());

                        }//catch(Exception _____excptoconvert)  























                        //Column_PITCHBEND_JERKS_MILLIS_GAP

                        ___temp_new_note_to_populate

                            .PUBLIC_DOUBLE____Column_PITCHBEND_JERKS_MILLIS_GAP = 0;//default zero

                        //if this is zero then the jerks are not there as per the updater codes

                        //saan has designed the systems of updaters in that styles

                        if (row.Cells["Column_PITCHBEND_JERKS_MILLIS_GAP"].Value != null)

                        {

                            try

                            {

                                ___temp_new_note_to_populate

                                    .PUBLIC_DOUBLE____Column_PITCHBEND_JERKS_MILLIS_GAP

                                          =

                                             Convert.ToInt16

                                            (row.Cells["Column_PITCHBEND_JERKS_MILLIS_GAP"].Value.ToString().TrimEnd().TrimStart().Trim());

                            }

                            catch (Exception _excptoconver)

                            {

                                row.Cells["Column_PITCHBEND_JERKS_MILLIS_GAP"].Value = "0";

                                ___temp_new_note_to_populate

                                    .PUBLIC_DOUBLE____Column_PITCHBEND_JERKS_MILLIS_GAP

                                    = 0;//easily recogs

                            }//catch(Exception _excptoconver)

                        }//if (selected_row.Cells["Column_PITCHBEND_JERKS_MILLIS_GAP"].Value != null)

                        else

                        {

                            row.Cells["Column_PITCHBEND_JERKS_MILLIS_GAP"].Value = 30;//on the blank data it puts this data as non zero

                            //if the user need the non jerky things then the user has to put the zero data there

                            ___temp_new_note_to_populate

                                .PUBLIC_DOUBLE____Column_PITCHBEND_JERKS_MILLIS_GAP = 30; //saan decides that user need to fill  0 deliberately for these data

                            // saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                        }//end of else of if (selected_row.Cells["Column_PITCHBEND_JERKS_MILLIS_GAP"].Value != null)




                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


                        ___temp_new_note_to_populate

                            .PUBLIC_INT___Column_JUERK_UP_PITCHBEND = 0;

                        if (row.Cells["Column_JUERK_UP_PITCHBEND"].Value != null)

                        {

                            try

                            {

                                ___temp_new_note_to_populate

                                    .PUBLIC_INT___Column_JUERK_UP_PITCHBEND

                                                                                                                 =

                                             Convert.ToInt16

                                            (row.Cells["Column_JUERK_UP_PITCHBEND"].Value.ToString().TrimEnd().TrimStart().Trim());

                            }

                            catch (Exception _excptoconver)

                            {


                                row.Cells["Column_JUERK_UP_PITCHBEND"].Value = "0";

                                ___temp_new_note_to_populate

                                    .PUBLIC_INT___Column_JUERK_UP_PITCHBEND

                                    = 0;//easily recogs

                            }//catch(Exception _excptoconver)

                        }//if (selected_row.Cells["Column_JUERK_UP_PITCHBEND"].Value != null)

                        else

                        {

                            row.Cells["Column_JUERK_UP_PITCHBEND"].Value = 60;

                            ___temp_new_note_to_populate

                                .PUBLIC_INT___Column_JUERK_UP_PITCHBEND = 60; //saan decides that user need to fill  0 deliberately for these data

                            // saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                        }//end of else of if (selected_row.Cells["Column_JUERK_UP_PITCHBEND"].Value != null)

                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                        

                        ___temp_new_note_to_populate

                            .PUBLIC_INT___Column_JERK_DOWNS_PITCH_BEND = 0;



                        if (row.Cells["Column_JERK_DOWNS_PITCH_BEND"].Value != null)

                        {

                            try

                            {

                                ___temp_new_note_to_populate

                                    .PUBLIC_INT___Column_JERK_DOWNS_PITCH_BEND

                                             =

                                             Convert.ToInt16

                                            (row.Cells["Column_JERK_DOWNS_PITCH_BEND"].Value.ToString().TrimEnd().TrimStart().Trim());

                            }

                            catch (Exception _excptoconver)

                            {

                                row.Cells["Column_JERK_DOWNS_PITCH_BEND"].Value = "0";

                                ___temp_new_note_to_populate

                                    .PUBLIC_INT___Column_JERK_DOWNS_PITCH_BEND

                                    = 0;//easily recogs  // saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                            }//catch(Exception _excptoconver)



                        }//if (selected_row.Cells["Column_JERK_DOWNS_PITCH_BEND"].Value != null)

                        else

                        {

                            //important populator

                        row.Cells["Column_JERK_DOWNS_PITCH_BEND"].Value

                        = 60;// saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                             // saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                            ___temp_new_note_to_populate

                            .PUBLIC_INT___Column_JERK_DOWNS_PITCH_BEND = 60;//saan decides that user need to enforce 0 for non disturbances with jerks

                            //saan decides that user need to fill  0 deliberately for these data


                        }//end of else of if (selected_row.Cells["Column_JERK_DOWNS_PITCH_BEND"].Value != null)












                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
























  



                        //CAUTION WE DONT GATHER DATA FROM THE CELLS FOR THESE

                        //CAUTION WE DONT GATHER DATA FROM THE CELLS FOR THESE

                        //CAUTION WE DONT GATHER DATA FROM THE CELLS FOR THESE

                        ///CAUTION STRICT NOTE THAT WE CANNOT DECORATE THE PURE MELODY NOTES

                        ///CAUTION STRICT NOTE THAT WE CANNOT DECORATE THE PURE MELODY NOTES

                        ///CAUTION STRICT NOTE THAT WE CANNOT DECORATE THE PURE MELODY NOTES


                        row.Cells["Column___ENFORCED_START_MILLIS_FOR_PUREMELODY_NOTES"].Value = "0";


                        ___temp_new_note_to_populate

                            .Column___ENFORCED_START_MILLIS_FOR_PUREMELODY_NOTES

                            =

                            ___temp_new_note_to_populate


                            .

                            PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS

                            ;



















                        row.Cells["Column___ENFORCED_START_MILLIS_FOR_PUREMELODY_NOTES"].Value 

                            =

                            ___temp_new_note_to_populate

                            .Column___ENFORCED_START_MILLIS_FOR_PUREMELODY_NOTES

                            ;



                        ///CAUTION STRICT NOTE THAT WE CANNOT DECORATE THE PURE MELODY NOTES

                        ///CAUTION STRICT NOTE THAT WE CANNOT DECORATE THE PURE MELODY NOTES

                        ///CAUTION STRICT NOTE THAT WE CANNOT DECORATE THE PURE MELODY NOTES

                        ///








                        //to do to do to do

                        ___temp_new_note_to_populate

                            .Column___REFERENCE_CUMULATIVE_START_MILLIS_FOR_CURRENT_NOTES 

                            =

                            ___temp_new_note_to_populate

                            .

                            PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS

                            ;

                        /////////////////////////////////////////////////////////////////////////////////////////

                        ///


































































                        //WE WILL CUMULATE THE MELODY NOTES AND WE WILL PUT THE OFFSETTED DATA FOR THESE DECORATIVE NOTES

                        ___temp_new_note_to_populate

                            .PUBLIC_DOUBLE___Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES

                            = 0;


                        if (

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "@"

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "|"

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "\\"

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "/"

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "~"

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "^"

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "("

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == ")"

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "{"

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "}"

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "["

                            ||

                            ___temp_new_note_to_populate

                            .PUBLIC_STRING_THE_INDINOTE_FOUND == "]"




                            )

                        {


                            ___temp_new_note_to_populate

                            .PUBLIC_DOUBLE___Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES

                            =

                             ___temp_new_note_to_populate

                                  .

                            PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS

                                    ;


                        }

                        //////if (

                        //////    ___temp_new_note_to_populate

                        //////    .PUBLIC_STRING_THE_INDINOTE_FOUND == "@"

                        //////    ||

                        //////    ___temp_new_note_to_populate

                        //////    .PUBLIC_STRING_THE_INDINOTE_FOUND == "|"

                        //////    ||

                        //////    ___temp_new_note_to_populate

                        //////    .PUBLIC_STRING_THE_INDINOTE_FOUND == "^"

                        //////    ||

                        //////    ___temp_new_note_to_populate

                        //////    .PUBLIC_STRING_THE_INDINOTE_FOUND == "("

                        //////    ||

                        //////    ___temp_new_note_to_populate

                        //////    .PUBLIC_STRING_THE_INDINOTE_FOUND == ")"

                        //////    ||

                        //////    ___temp_new_note_to_populate

                        //////    .PUBLIC_STRING_THE_INDINOTE_FOUND == "{"

                        //////    ||

                        //////    ___temp_new_note_to_populate

                        //////    .PUBLIC_STRING_THE_INDINOTE_FOUND == "}"

                        //////    ||

                        //////    ___temp_new_note_to_populate

                        //////    .PUBLIC_STRING_THE_INDINOTE_FOUND == "["

                        //////    ||

                        //////    ___temp_new_note_to_populate

                        //////    .PUBLIC_STRING_THE_INDINOTE_FOUND == "]"




                        //////    )













                        //to check soundfont https://drive.google.com/file/d/1ZFGlutBEJA6ezBAv2-z56k06LUa7sb1M/view


                        //FOR THE PERCUSSIONS CASES OR FOR THE DECORATIONS CASES WE GRAB THE DATA FROM THE CELLS

                        ///WE DONT ALLOW THE DATA GRABBING FOR THE MELODY NOTES

                        if (row.Cells["Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES"].Value != null)

                        {

                            try

                            {


                                //FOR THE PERCUSSIONS CASES OR FOR THE DECORATIONS CASES WE GRAB THE DATA FROM THE CELLS

                                ///WE DONT ALLOW THE DATA GRABBING FOR THE MELODY NOTES

                                ___temp_new_note_to_populate

                                    .PUBLIC_DOUBLE___Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES

                                             =

                                             Convert.ToInt16

                                            (row.Cells["Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES"].Value.ToString().TrimEnd().TrimStart().Trim());

                            }

                            catch (Exception _excptoconver)

                            {







                                row.Cells["Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES"].Value

                                    = "0";




                                ___temp_new_note_to_populate

                                    .PUBLIC_DOUBLE___Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES

                                    =

                            ___temp_new_note_to_populate

                            .

                            PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS

                            ;


                                ;//easily recogs  // saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                            }//catch(Exception _excptoconver)
















                        }//if (selected_row.Cells["Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES"].Value != null)

                        else

                        {


                            //FOR THE PERCUSSIONS CASES OR FOR THE DECORATIONS CASES WE GRAB THE DATA FROM THE CELLS

                            ///WE DONT ALLOW THE DATA GRABBING FOR THE MELODY NOTES

                            ////////////////////////// WE GATHER THESE DATA FIRST EVERYTIMES/////////////////////////

                            //WE  TAKE THE DATA FIRST FROM HERE FOR PERCUSSIONS CASES //////////////////////////

                            //important populator

                            row.Cells["Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES"].Value

                            =

                            ___temp_new_note_to_populate

                            .

                            PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS;


                            ;// saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                             // saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent





                            //FOR THE PERCUSSIONS CASES OR FOR THE DECORATIONS CASES WE GRAB THE DATA FROM THE CELLS

                            ///WE DONT ALLOW THE DATA GRABBING FOR THE MELODY NOTES



                            ___temp_new_note_to_populate

                            .PUBLIC_DOUBLE___Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES

                            =

                            ___temp_new_note_to_populate

                            .

                            PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS;


                            row.Cells["Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES"].Value

                                =

                            ___temp_new_note_to_populate

                            .

                            PUBLIC_DOUBLE_CUMULATIVE_MILLIS_START_TIMES_FOR_PURE_MEL_NOTES_CUMULATIONS

                            ;



                            ;//saan decides that user need to enforce 0 for non disturbances with jerks

                            //saan decides that user need to fill  0 deliberately for these data


                        }//end of else of if (selected_row.Cells["Column___ENFORCED_START_MILLIS_FOR_PERCUSSIONS_NOTES"].Value != null)







































































































                        ___temp_new_note_to_populate

                            .PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20 

                            = 6;



















                        if (row.Cells["Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20"].Value != null)

                        {

                            try

                            {

                                ___temp_new_note_to_populate

                                    .

                                    PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20

                                             =

                                             Convert.ToInt16

                                            (row.Cells["Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20"]

                                            .Value.ToString().TrimEnd().TrimStart().Trim());

                            }

                            catch (Exception _excptoconver)

                            {

                                row.Cells["Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20"].Value 

                                    = "6";

                                ___temp_new_note_to_populate

                                    .PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20

                                    = 6;//easily recogs  // saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                            }//catch(Exception _excptoconver)



                        }//if (selected_row.Cells["Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20"].Value != null)

                        else

                        {


                            //if null

                            //important populator

                            row.Cells["Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20"].Value

                            = 6;// saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                                 // saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                            ___temp_new_note_to_populate

                            .PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20

                            = 6;//saan decides that user need to enforce 0 for non disturbances with jerks

                            //saan decides that user need to fill  0 deliberately for these data


                        }//end of else of if (selected_row.Cells["Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20"].Value != null)



                        pitchBendRange

                            =

                             ___temp_new_note_to_populate

                            .PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20;





                        //////////////////////MIDI CC

                        //////////////////////10  Pan Controls the left and right balance, generally for mono patches.

                        //////////////////////0 = hard left, 64 = center, 127 = hard right    0 - 127


                        ___temp_new_note_to_populate

                            .PUBLIC_INT___Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT

                            = 64;// (int)(127/2);














                        if (row.Cells["Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT"].Value != null)

                        {

                            try

                            {

                                ___temp_new_note_to_populate

                                    .

                                    PUBLIC_INT___Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT

                                             =

                                             Convert.ToInt16

                                            (row.Cells["Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT"]

                                            .Value.ToString().TrimEnd().TrimStart().Trim());

                            }

                            catch (Exception _excptoconver)

                            {

                                row.Cells["Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT"].Value = "64";

                                ___temp_new_note_to_populate

                                    .PUBLIC_INT___Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT

                                    = 64;//easily recogs  // saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                            }//catch(Exception _excptoconver)



                        }//if (selected_row.Cells["Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT"].Value != null)

                        else

                        {


                            //if null

                            //important populator

                            row.Cells["Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT"].Value

                            = 64;// saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                                // saan has checked that tehse are important since 1 cent is 16384/400 = 40.96 pitchbend per cent

                            ___temp_new_note_to_populate

                            .PUBLIC_INT___Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT

                            = 64;//saan decides that user need to enforce 0 for non disturbances with jerks

                            //saan decides that user need to fill  0 deliberately for these data


                        }//end of else of if (selected_row.Cells["Column_NOTES_WISE_PAN_0_LEFT_TO_127_RIGHT"].Value != null)





                        ///////////////////////////////////////////

                        /////////////////////////////////////////////////////////// after crossing the checking and the validations //////

                        ////////////////////////////////////////////////// populate the list //////////////////////////


                        //////////////////////////  TO POPULATE THE LISTS OF THE DATA FOR THE PITCH BENDS DATA CONDITIONS ////////////////////

                        //////////////////////////  TO POPULATE THE LISTS OF THE DATA FOR THE PITCH BENDS DATA CONDITIONS ////////////////////

                        //////////////////////////  TO POPULATE THE LISTS OF THE DATA FOR THE PITCH BENDS DATA CONDITIONS ////////////////////                        

                        //////___temp_new_note_to_populate

                        //////    .PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG

                        //////    (

                        //////    //DONT DO IT HERE SINCE THE DATA POPULATIONS ARE REVERSE HERE

                        //////    );

                        //////////////////////////  TO POPULATE THE LISTS OF THE DATA FOR THE PITCH BENDS DATA CONDITIONS ////////////////////

                        //////////////////////////  TO POPULATE THE LISTS OF THE DATA FOR THE PITCH BENDS DATA CONDITIONS ////////////////////

                        //////////////////////////  TO POPULATE THE LISTS OF THE DATA FOR THE PITCH BENDS DATA CONDITIONS ////////////////////  


                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                         .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                     .PUBLIC_STATIC_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                     .Add

                     (

                     ___temp_new_note_to_populate

                     );

                        ////////////////////////////////////////////////// populate the list //////////////////////////

                    }//if (row.Cells["Column_NOTES_NUMBER_TO_TRYS"].Value != null)

                }//foreach (DataGridViewRow row in this.dataGridView___COMPOSER.SelectedRows)

            }

            catch (Exception _excptoloaddata)

            {

                System.Windows.Forms.MessageBox.Show("_excptoloaddata = " + _excptoloaddata.Message + "   " + _excptoloaddata.StackTrace.ToString());

            }//catch(Exception _excptoloaddata)

            System.Windows.Forms.MessageBox.Show(string_to_check_the_data_loading);

            //////private MidiOut SAANS_TEMP_midiOut;

            //////private Timer SAANS_TEMP_playTimer;

            //////private int SAANS_TEMP_currentNoteIndex = 0;

            //////private int[] SAAN_TEMPS_midiNotes = { 60, 62, 64, 65, 68, 69, 71, 72 }; // MIDI notes for C major scale

            //////private int SAANS_TEMP_duration = 500; // Duration for each note in milliseconds

            ///

            //load the list of the composer data first

            ////////private int[] SAAN_TEMPS_midiNotes = { 60, 62, 64, 65, 68, 69, 71, 72 }; // MIDI notes for C major scale // i will populate these from the data grids

            ////////private double[] SAAN_TEMPS_midiNotes_durations = { 600, 620, 640, 650, 680, 690, 710, 720 };

            Array.Clear(SAAN_TEMPS_midiNotes, 0, SAAN_TEMPS_midiNotes.Length);

            Array.Clear(SAAN_TEMPS_midiNotes_durations, 0, SAAN_TEMPS_midiNotes_durations.Length);

            //i have seen taht the data loading is getting reversed

            //so we are trying to get it re ordered again

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

             .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

             .PUBLIC_STATIC_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

             .Reverse();

            ////////////////////////////////////////////////////////////////////////

    

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

        

            














 

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            

            /////////WE HAVE STRAIGHTENED THE SEQUENCES ARRAY DATA HERE////////////////////////////

            /////////WE HAVE STRAIGHTENED THE SEQUENCES ARRAY DATA HERE////////////////////////////

            /////////WE HAVE STRAIGHTENED THE SEQUENCES ARRAY DATA HERE////////////////////////////

            /////////WE HAVE STRAIGHTENED THE SEQUENCES ARRAY DATA HERE////////////////////////////            

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                .PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS[]

            ___temp_array_of___PRELISTENERNOTES

            =

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

             .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

             .PUBLIC_STATIC_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

             .ToArray();

            //////////////////////////////////////////////////////////////////

            Array.Clear(temp_notesarray, 0, temp_notesarray.Length);

            Array.Clear(temp_durationsarray, 0, temp_durationsarray.Length);

            Array.Clear(temp_velocity_array, 0, temp_velocity_array.Length);

            Array.Clear(temp_patch_array, 0, temp_patch_array.Length);












            Array.Clear( ___TEMP___PITCHBEND_PERCENT_DURATIONS_ARRAY_OF_NOTES, 0, ___TEMP___PITCHBEND_PERCENT_DURATIONS_ARRAY_OF_NOTES.Length);

            Array.Clear(___TEMP___PITCHBEND_DATAVALUES_8192_TO_16383_ARRAY_OF_NOTES, 0, ___TEMP___PITCHBEND_DATAVALUES_8192_TO_16383_ARRAY_OF_NOTES.Length);




            temp_notesarray = new int[___temp_array_of___PRELISTENERNOTES.Length];

            temp_durationsarray = new double[___temp_array_of___PRELISTENERNOTES.Length];

            temp_velocity_array = new int[___temp_array_of___PRELISTENERNOTES.Length];

            temp_patch_array = new int[___temp_array_of___PRELISTENERNOTES.Length];

            temp_channelsarray = new int[___temp_array_of___PRELISTENERNOTES.Length];



            ___TEMP___PITCHBEND_PERCENT_DURATIONS_ARRAY_OF_NOTES = new string[___temp_array_of___PRELISTENERNOTES.Length];

            ___TEMP___PITCHBEND_DATAVALUES_8192_TO_16383_ARRAY_OF_NOTES = new string[___temp_array_of___PRELISTENERNOTES.Length];




            string ___string_to_check_array_is_loaded_properly = "";

            for (int i = 0; i < ___temp_array_of___PRELISTENERNOTES.Length; i++)

            {

                SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES.PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                    notes_element

                    =

                ___temp_array_of___PRELISTENERNOTES[i];


                ////////////////////////////////////////////////////////////////////////////////////////////////////////////

                temp_notesarray[i] = notes_element.INT_NOTE_NUMBER_TO_PLAY_0_TO_127;

                temp_durationsarray[i] = notes_element.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY;

                temp_velocity_array[i] = notes_element.INT_CURRENT_NOTES_VELOCITY_0_TO_127;

                temp_patch_array[i] = notes_element.INT_CURRENT_NOTES_PATCH_0_TO_127;

                temp_channelsarray[i] = notes_element.PUBLIC_INT_CHANNEL_NUMBER_0_TO_15;








                ___TEMP___PITCHBEND_PERCENT_DURATIONS_ARRAY_OF_NOTES[i] = notes_element.STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS;

                ___TEMP___PITCHBEND_DATAVALUES_8192_TO_16383_ARRAY_OF_NOTES[i] = notes_element.STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES;





















































































































                ___string_to_check_array_is_loaded_properly = ___string_to_check_array_is_loaded_properly + "\r\n";

                ___string_to_check_array_is_loaded_properly = ___string_to_check_array_is_loaded_properly + i + "   " + temp_notesarray[i] + "   ";

                ___string_to_check_array_is_loaded_properly = ___string_to_check_array_is_loaded_properly + temp_durationsarray[i] + "   ";

                ___string_to_check_array_is_loaded_properly = ___string_to_check_array_is_loaded_properly + temp_velocity_array[i] + "   ";

                ___string_to_check_array_is_loaded_properly = ___string_to_check_array_is_loaded_properly + temp_patch_array[i];









                ////////////////////////////////// trying to check ////////


                //saan adds this line while the conditions of the prelisten to stop

                ___temp_array_of___PRELISTENERNOTES[i]

                        .PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG

                        (

                        0

                        ,

                        1

                        //////,

                        //////30

                        //////,

                        //////60

                        //////,

                        //////30

                        );

                ////////////////////////////////// trying to check ////////


            }// for(int i=0; i< ___temp_array_of___PRELISTENERNOTES.Length; i++)

            SAAN_TEMPS_midiNotes = temp_notesarray;

            if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

            {

                System.Windows.Forms.MessageBox.Show("___string_to_check_array_is_loaded_properly\r\n" + ___string_to_check_array_is_loaded_properly);

            }// if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

            ////////////////////////////////////////////////////////////////////////////////////////////////

            //SAANSAUDSAPI_Midi_MidiOut

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS = "";

            /////////////////////////////////////////////////////////////////////////////////////////

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS = " SAANS_TEMP_SAANAUDS_Midi_MidiOut = new SAANAUDS.Midi.MidiOut(0); ";

            if (SAANS_TEMP_SAANAUDS_Midi_MidiOut != null)

            {

            }//if(SAANS_TEMP_SAANAUDS_Midi_MidiOut!=null)

            else

            {

                // the start of else of if(SAANS_TEMP_SAANAUDS_Midi_MidiOut!=null)

            }//end of else of if(SAANS_TEMP_SAANAUDS_Midi_MidiOut!=null)



            if (this.checkBox___TO_PRELISTEN_OR_NOT_WHILE_SAVING_MIDS.CheckState.ToString().ToUpper().TrimEnd().TrimStart().Trim() == "CHECKED")

            {


 

            SAANS_TEMP_SAANAUDS_Midi_MidiOut = new SAANAUDS.Midi.MidiOut(0); // Initialize MIDI output on the first available device

   

                

                

                //   SAANS_TEMP_SAANAUDS_Midi_MidiOut = new MidiOut(0); // Initialize MIDI output on the first available device

            for (int i = 0; i < temp_notesarray.Length; i++)

            {

                try

                {

                    //CAUTION DONT CONFUSE THIS IS THE SINGLE SEQUENCE PLAY NOT FOR MIDI FILES SAVING PART

                    //CAUTION DONT CONFUSE THIS IS THE SINGLE SEQUENCE PLAY NOT FOR MIDI FILES SAVING PART

                    //CAUTION DONT CONFUSE THIS IS THE SINGLE SEQUENCE PLAY NOT FOR MIDI FILES SAVING PART


                    //////SAANS_TEMP_SAANAUDS_Midi_MidiOut.Send(SAANAUDS.Midi.MidiMessage.ChangePatch(temp_patch_array[i], 1).RawData);

                    //////// Play the current note

                    //////SAANS_TEMP_SAANAUDS_Midi_MidiOut.Send(SAANAUDS.Midi.MidiMessage.StartNote(temp_notesarray[i], temp_velocity_array[i], 1).RawData);

                    //////// Wait for the duration of the note

                    //////await Task.Delay((int)temp_durationsarray[i]);

                    //////// Stop the current note

                    //////SAANS_TEMP_SAANAUDS_Midi_MidiOut.Send(SAANAUDS.Midi.MidiMessage.StopNote(temp_notesarray[i], temp_velocity_array[i], 1).RawData);







                    //NOW SAAN IS AVOIDING OTHER ARRAYS

                    //AND DIRECTLY  USING THE  OBJECTS OF NOTES ARRAYS TAKEN FROM THE SEQUENCES

                    //TO FILL THE MIDSNOTES










































                  /// single sequence single note rendering prelistens

                    SAANS_TEMP_SAANAUDS_Midi_MidiOut

                        .Send

                        (SAANAUDS.Midi.MidiMessage

                        .ChangePatch

                        (

                           // temp_patch_array[i]

                           ___temp_array_of___PRELISTENERNOTES[i].INT_CURRENT_NOTES_PATCH_0_TO_127

                        ,

                        ___temp_array_of___PRELISTENERNOTES[i].PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                        ).RawData);


                        ////////////////////////////////////////////////////////////////


















                        // Play the current note

                        SAANS_TEMP_SAANAUDS_Midi_MidiOut

                        .Send

                        (SAANAUDS.Midi.MidiMessage

                        .StartNote

                        (

                           // temp_notesarray[i]

                           ___temp_array_of___PRELISTENERNOTES[i].INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                        ,

                           // temp_velocity_array[i]

                           ___temp_array_of___PRELISTENERNOTES[i].INT_CURRENT_NOTES_VELOCITY_0_TO_127

                        ,

                           // 1

                           ___temp_array_of___PRELISTENERNOTES[i].PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                        ).RawData);



                    //since we are doing the single note to notes renditions here so we are not cumulating the milliseconds heres

                    //////for references   double START_ABSOLUTE_START_TIME_MILISECONDS

                    //////for references  ,double MILLISECONDS_TO_MIDITIKS_MULTIPLIER

                    //////for references  ,int CURRENT_NOTE_NUMBER

                    //////for references  ,int INT_MILLISECOND_TOLERANCE_FOR_RIPPLES_PITCHBENDS

                    //////for references  ,int INT_UPSIDE_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES

                    //////for references  ,int INT_DOWNSIES_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES

                    ///





                    ///YESSS WORKS OK   AFTER NOTE THAT THE TRIKS WORKED FOR THE   PITCH BENDS WITHIN NOTE ADDITIONAL PERCENTAGE OF DURATIONS POPULATED CALIBRATEDLY INSIDE PPLES POPULATOR

                    ///YESSS WORKS OK   AFTER NOTE THAT THE TRIKS WORKED FOR THE   PITCH BENDS WITHIN NOTE ADDITIONAL PERCENTAGE OF DURATIONS POPULATED CALIBRATEDLY INSIDE PPLES POPULATOR

                    ///YESSS WORKS OK   AFTER NOTE THAT THE TRIKS WORKED FOR THE   PITCH BENDS WITHIN NOTE ADDITIONAL PERCENTAGE OF DURATIONS POPULATED CALIBRATEDLY INSIDE PPLES POPULATOR

                    ///

                    ___temp_array_of___PRELISTENERNOTES[i]

                        .PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG

                        (

                        0

                        ,

                        1

                        //////,

                        //////30

                        //////,

                        //////60

                        //////,

                        //////30

                        );





                        ///PPLES ARE ADDED NOW

                        //////i = 0   ___ptch_bnd_millis = 2340   delayint = 2340   ___ptch_bnd_millis = 2340   _ptchbndsvals = 420

                        //////i = 0   ___ptch_bnd_millis = 2370   delayint = 2370   ___ptch_bnd_millis = 2370   _ptchbndsvals = 320

                        //////i = 0   ___ptch_bnd_millis = 2400   delayint = 2400   ___ptch_bnd_millis = 2400   _ptchbndsvals = 460

                        //////i = 0   ___ptch_bnd_millis = 2430   delayint = 2430   ___ptch_bnd_millis = 2430   _ptchbndsvals = 360

                        //////i = 0   ___ptch_bnd_millis = 2460   delayint = 2460   ___ptch_bnd_millis = 2460   _ptchbndsvals = 500

                        //////i = 0   ___ptch_bnd_millis = 2490   delayint = 2490   ___ptch_bnd_millis = 2490   _ptchbndsvals = 400

                        //////i = 0   ___ptch_bnd_millis = 2520   delayint = 2520   ___ptch_bnd_millis = 2520   _ptchbndsvals = 540

                        //////i = 0   ___ptch_bnd_millis = 2550   delayint = 2550   ___ptch_bnd_millis = 2550   _ptchbndsvals = 440

                        //////i = 0   ___ptch_bnd_millis = 2580   delayint = 2580   ___ptch_bnd_millis = 2580   _ptchbndsvals = 580

                        //////i = 0   ___ptch_bnd_millis = 2610   delayint = 2610   ___ptch_bnd_millis = 2610   _ptchbndsvals = 480



                        

                        this.label___CURRENTLY_PLAYING_STATUS_OF_NOTES.Text

                            =

                            (

                            i 

                            + " " +

                            ///CAUTION DONT USE TO UPPER

                            ___temp_array_of___PRELISTENERNOTES[i].PUBLIC_STRING_THE_INDINOTE_FOUND

                            +"    "+

                            ___temp_array_of___PRELISTENERNOTES[i].INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                            + "    " +

                            ___temp_array_of___PRELISTENERNOTES[i].INT_CURRENT_NOTES_VELOCITY_0_TO_127


                            ).ToString();

                        this.label___CURRENTLY_PLAYING_STATUS_OF_NOTES.Invalidate();

                        this.label___CURRENTLY_PLAYING_STATUS_OF_NOTES.Refresh();




                        for (int ptchbnditer=0

                        ;

                        ptchbnditer

                        <

                        ___temp_array_of___PRELISTENERNOTES[i]

                        .PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                        .Count

                        ;

                        ptchbnditer++

                        )

                    {






                        try

                        {


                            int ___ptch_bnd_millis = 0;

                            ___ptch_bnd_millis

                            =

                            (int)

                          ___temp_array_of___PRELISTENERNOTES[i]

                        //.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                        .PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                        .ElementAt<double>(ptchbnditer);








                        int _ptchbndsvals

                            =

                             ___temp_array_of___PRELISTENERNOTES[i]

                             .PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                             .ElementAt<int>(ptchbnditer);










                        // Wait for the duration of the note

                        //   await Task.Delay((int)temp_durationsarray[i]);


                        ///await Task.Delay((int)___ptch_bnd_millis);

                        ///









                        /////////////////////////// yessssssssssssssss it works in the pre listens also

                        ///////// </summary>

                        ///////// <param name="patch to pitch wheel saan tries">The pitch wheels number</param>

                        ///////// <param name="channel">The MIDI channel number (1-16)</param>

                        ///////// <returns>A new MidiMessageObject</returns>

                        //FOR REFERENCES AS SAAN ADDED THIS IN THE MIDIMESSAGECLASS                 //////public static MidiMessage ChangePitchWheelSAANTriesCopyingPatchChangeStyles___FOR_PRELISTENS_SEPERATE_DELAYS(int pitchwheelsvalues, int channel)

                        //FOR REFERENCES AS SAAN ADDED THIS IN THE MIDIMESSAGECLASS                 //////{

                        //FOR REFERENCES AS SAAN ADDED THIS IN THE MIDIMESSAGECLASS                 //////    int pitchBendValue = Math.Max(0, Math.Min(16383, pitchwheelsvalues));

                        //FOR REFERENCES AS SAAN ADDED THIS IN THE MIDIMESSAGECLASS                 //////    // int pitchwheelvalsadjusted = pitchwheelsvalues;

                        //FOR REFERENCES AS SAAN ADDED THIS IN THE MIDIMESSAGECLASS                 //////    return new MidiMessage((int)MidiCommandCode.PitchWheelChange + channel - 1, pitchBendValue, 0);

                        //FOR REFERENCES AS SAAN ADDED THIS IN THE MIDIMESSAGECLASS                 //////}//public static MidiMessage ChangePitchWheelSAANTriesCopyingPatchChangeStyles___FOR_PRELISTENS_SEPERATE_DELAYS(int pitchwheelsvalues, int channel)

                        /////////////////////////////// yesssssssss the effect looks like working

                        SAANS_TEMP_SAANAUDS_Midi_MidiOut.Send

                        (

                        SAANAUDS.Midi.MidiMessage

                            .ChangePitchWheelSAANTriesCopyingPatchChangeStyles___FOR_PRELISTENS_SEPERATE_DELAYS

                            (

                           // ___temp_current_pitchbends_data

                           _ptchbndsvals

                            ,

                            // ___TEMP___INT_NOTE_CHANNEL_NUMBER_FROM_SELECTED_ROW_TO_PRELISTEN

                            ___temp_array_of___PRELISTENERNOTES[i].PUBLIC_INT_CHANNEL_NUMBER_0_TO_15


                            ).RawData

                            );

                            //RawData





                            // i have seen that for the pre listens cases these are not the tiks so we need to take the delta millis only



                            int delayint = 0;// (int)(___ptch_bnd_millis);// (int)(___tempdurationsarray[i]  - ___tempdurationsarray[i-1] );

                            delayint= (int)(___ptch_bnd_millis);


                            // for the systems here it worrks like the above part

                            //when i used the below part that did not work and no sound was there


                            //////    if(ptchbnditer>1)

                            //////    {

















                            //TRICKY PERCENTAGES DURATIONS ARE ALSO ADDED IN THE PPLES COUNTER POPULATED THEN IT WORKS

                            //TRICKY PERCENTAGES DURATIONS ARE ALSO ADDED IN THE PPLES COUNTER POPULATED THEN IT WORKS

                            //TRICKY PERCENTAGES DURATIONS ARE ALSO ADDED IN THE PPLES COUNTER POPULATED THEN IT WORKS

                            ////LOOKS OK AFTER PPLES ARE ADDED 

                            ////LOOKS OK AFTER PPLES ARE ADDED 

                            //////                          ////LOOKS OK AFTER PPLES ARE ADDED 

                            //AFTER PPLES ARE ADDED I THINK IT IS NECESSARY

                            //AFTER PPLES ARE ADDED I THINK IT IS NECESSARY

                            //AFTER PPLES ARE ADDED I THINK IT IS NECESSARY

                            //////    //int delayint = (int)(___tempdurationsarray[i]  - ___tempdurationsarray[i-1] );

                            //////    //readjusted

                            ///

                        if (___temp_array_of___PRELISTENERNOTES[i]

                        //.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                        .PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                        .Count

                        >2 )

                            {





                       ___ptch_bnd_millis

                            =

                            (int)

                            (

                          ___temp_array_of___PRELISTENERNOTES[i]

                        //.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                        .PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                        .ElementAt<double>(ptchbnditer)

                        -

                            (int)

                          ___temp_array_of___PRELISTENERNOTES[i]

                        //.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                        .PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                        .ElementAt<double>(ptchbnditer - 1)


                            )

                            ;

                                delayint = ___ptch_bnd_millis; ;

                                delayint = Math.Max(3, delayint);


                            }

                            else

                            {

                                delayint = (int)___temp_array_of___PRELISTENERNOTES[i].DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY; // (int)___tempdurationsarray[i];

                                     delayint = Math.Max(3, delayint);

                            }

                            ////////end of else of

                            //////if (___temp_array_of___PRELISTENERNOTES[i]

                            ////////.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                            //////.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                            //////.Count

                            //////> 2)

                            ///}// if(ptchbnditer>1)


                           









                            delayint = Math.Max(3, delayint);

                        // await Task.Delay((int)___tempdurationsarray[i]);

                        await Task.Delay((int)(delayint));


                            Console.WriteLine(" i = " + i + "   ___ptch_bnd_millis =  " + ___ptch_bnd_millis + "   delayint = " + delayint + "   ___ptch_bnd_millis =  " + ___ptch_bnd_millis + "   _ptchbndsvals = " + _ptchbndsvals);


                    }

                  catch (Exception ___excp_to_awaits_forsequencesnotesplays)

                {

                    Console.WriteLine("sequence plays   cases   ___excp_to_awaits_forsequencesnotesplays = " + ___excp_to_awaits_forsequencesnotesplays.Message + "   " + ___excp_to_awaits_forsequencesnotesplays.StackTrace.ToString());

                }//catch(Exception ___excp_to_awaits)


















            }


                    //////for (int ptchbnditer = 0

                    //////    ;

                    //////    ptchbnditer

                    //////    <

                    //////    ___temp_array_of___PRELISTENERNOTES[i]

                    //////    .PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                    //////    .Count

                    //////    ;

                    //////    ptchbnditer++



                    //////    )




                    // Stop the current note

                    SAANS_TEMP_SAANAUDS_Midi_MidiOut

                        .Send

                        (SAANAUDS.Midi.MidiMessage

                        .StopNote

                        (

                           // temp_notesarray[i]

                           ___temp_array_of___PRELISTENERNOTES[i].INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                            ,

                           // temp_velocity_array[i]

                           ___temp_array_of___PRELISTENERNOTES[i].INT_CURRENT_NOTES_VELOCITY_0_TO_127

                           //for the on flow rendering of one notes at a time we dont put zero velocity here

                           //since we are not saving the  mids files heres

                            ,

                            //1

                            ___temp_array_of___PRELISTENERNOTES[i].PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                            ).RawData);








                    //CAUTION DONT CONFUSE THIS IS THE SINGLE SEQUENCE PLAY NOT FOR MIDI FILES SAVING PART

                    //CAUTION DONT CONFUSE THIS IS THE SINGLE SEQUENCE PLAY NOT FOR MIDI FILES SAVING PART

                    //CAUTION DONT CONFUSE THIS IS THE SINGLE SEQUENCE PLAY NOT FOR MIDI FILES SAVING PART


                }

                catch (Exception excptoPlayNote)

                {

                    if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

                    {

                        MessageBox.Show("excptoPlayNote = " + excptoPlayNote.Message + "   " + excptoPlayNote.StackTrace.ToString() + "   Note Index = " + i + "   temp_notesarray length = " + temp_notesarray.Length + "  temp_velocity_array length  =  " + temp_velocity_array.Length);

                    }// if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")


                    Console.WriteLine("excptoPlayNote = " + excptoPlayNote.Message + "   " + excptoPlayNote.StackTrace.ToString() + "   Note Index = " + i + "   temp_notesarray length = " + temp_notesarray.Length + "  temp_velocity_array length  =  " + temp_velocity_array.Length);



                    break;

                }

            }//     for (int i = 0; i < temp_notesarray.Length; i++)

            // Clean up resources

            SAANS_TEMP_SAANAUDS_Midi_MidiOut.Dispose();


            }// if(this.checkBox___TO_PRELISTEN_OR_NOT_WHILE_SAVING_MIDS.CheckState.ToString().ToUpper().TrimEnd().TrimStart().Trim()=="CHECKED")



            long abstimeslongstart = 0;

            /// long absoluteTime___start___midstksunits = 0;

            /// 

            int patchNumber = 22;

            int notenumberfromthearray = 6;

            int NoteVelocity = 122;

            int durationtoassigns = 300;// 


            //////////////////////////////////////////////////////////////////////////////////////////////////////

            ///

            double ticksPerQuarterNote =this.public_double___value_from_the___textBox_TS_MIDI_TICKS_PER_BEAT_OR_TPQN_NUMBER_MULTIPLE_OF_480;

            double millisecondsPerTick = ( ( (double)60000.0 / ((double)ticksPerQuarterNote)) * this.PUBLIC_DOUBLE_BPM_VALUE_FROM___textBoxFOR_BEATS_PER_MINUTE);

            if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

            {

                System.Windows.Forms.MessageBox.Show("Confirming this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS = " + this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS);

            }// if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

            long LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS = 0;

            double DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS = 0;

            //THIS IS ALREADY DEFINED ___temp_array_of___PRELISTENERNOTES

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                .PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS[]

                new_array_of___only_notes___of___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                =

            ___temp_array_of___PRELISTENERNOTES;

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

            .PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

            Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS = null;

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Maximum = INT_CURRENT_REPEAT_CYCLES_COUNT;

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Value = 0;

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Invalidate();

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Refresh();

            if (checkBox___TO_AUTOMATICALLY_SAVE_MIDI_FILES.CheckState.ToString().ToUpper() == "CHECKED")

            {













                ///////////////////////////// HERE WE START THE MIDI FILES SAVING AND THE LOOPCYCLESACCUMULATORS ON SEQUENCES OF NOTES //////////

                ///////////////////////////// HERE WE START THE MIDI FILES SAVING AND THE LOOPCYCLESACCUMULATORS ON SEQUENCES OF NOTES //////////

                ///////////////////////////// HERE WE START THE MIDI FILES SAVING AND THE LOOPCYCLESACCUMULATORS ON SEQUENCES OF NOTES //////////

                ///////////////////////////// HERE WE START THE MIDI FILES SAVING AND THE LOOPCYCLESACCUMULATORS ON SEQUENCES OF NOTES //////////

                ///////////////////////////// HERE WE START THE MIDI FILES SAVING AND THE LOOPCYCLESACCUMULATORS ON SEQUENCES OF NOTES //////////

                ///////////////////////////// HERE WE START THE MIDI FILES SAVING AND THE LOOPCYCLESACCUMULATORS ON SEQUENCES OF NOTES //////////

                ///



                double ___temp_double_overall_notes_count = 0;

                for (int loopcyclescounter = 0; loopcyclescounter < INT_CURRENT_REPEAT_CYCLES_COUNT; loopcyclescounter++)

                {

                    this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Maximum = INT_CURRENT_REPEAT_CYCLES_COUNT;

                    this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Value = loopcyclescounter;

                    this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Invalidate();

                    this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Refresh();

                    abstimeslongstart =

                    (long)(___TEMP___DOUBLE_TOTAL_MILLISECONDS_FOR_SINGLE_PRELISTENS_CYCLES * loopcyclescounter);

                    SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                        .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                        .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                        +=

                        "\r\nloopcyclescounter = " + loopcyclescounter;

                    ;






























                    for (int r = 0; r < temp_notesarray.Length; r++)

                    {


                        //used for bitmaps numbering

                        ___temp_double_overall_notes_count = (double)((loopcyclescounter+1) * (temp_notesarray.Length) + (r+1));

                        ////////////////////////// adding this to handle details for the pitch bends like things also for current ordered note in predefined sequences//////

                        Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            =

                        new_array_of___only_notes___of___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS[r];

                        ////////////////////////// adding this to handle details for the pitch bends like things also for current ordered note in predefined sequences//////

                        durationtoassigns = (int)temp_durationsarray[r];

                        //////LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                        //////    =

                        //////    LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                        //////    +

                        //////    (long)

                        //////    (

                        //////    ( 

                        //////    (long)(temp_durationsarray[r]))

                        //////     * ( (long)(this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS))

                        //////     );

                        abstimesinmillis

                                    =

                                abstimesinmillis

                                 +

                                   abstimeslongstart

                                   +

                                   (long)(temp_durationsarray[r]);

                        /////////////////////////////////////////////////////////////////////////////////

                        /////saan has logged the  data for these calculations and has found that there are issues for the start times calculations so saan has changed the start point calculations

                        ///with the cumulative timers calculations 

                        absoluteTime___start___midstksunits

                            =

                            abstimesinmillis

                           *

                             (long)this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS;

                        int prevs_durationtoassigns_inmiditiks = 0;

                        //saan has found that after the cycles completes there are the gaps in sounds and also the start points durations calculations are not proper

                        if (r > 0)

                        {

                            // this is for the intermediate notes in the cycles

                            prevs_durationtoassigns_inmiditiks = (int)(temp_durationsarray[r - 1] * this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS);

                        }

                        else

                        {

                            //this is for the first note in the cycles

                            //     prevs_durationtoassigns_inmiditiks = 0;// (int)(temp_durationsarray[r] * this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS);

                            prevs_durationtoassigns_inmiditiks = (int)(temp_durationsarray[temp_durationsarray.Length - 1] * this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS);

                        }//end of else of  if (r > 0)

                         // this is for the current note playing which is ok

                        int durationtoassigns_inmiditiks = (int)(temp_durationsarray[r] * this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS);

                        LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                        =

                        LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                        +

                         (long)prevs_durationtoassigns_inmiditiks;


                        //////THIS IS NECESSARY FOR THE PITCH BENDS POSITIONS CALCULATIONS

                        DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            =

                            DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            +

                            temp_durationsarray[r];

                        //////THIS IS NECESSARY FOR THE PITCH BENDS POSITIONS CALCULATIONS


      

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        

                        // (long)durationtoassigns_inmiditiks;

                        //prevs_durationtoassigns_inmiditiks is necessary

                        //////(long)

                        //////(

                        //////(

                        //////(long)(temp_durationsarray[r]))

                        ////// * ((long)(this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS))

                        ////// );

                        // int durationtoassigns_inmiditiks = (int)(temp_durationsarray[r]);// / this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS);

                        //  int durationtoassigns_inmiditiks = (int)(temp_durationsarray[r]);//

                        //////int durationtoassigns___another = (int)temp_durationsarray[r];

                        //////abstimesinmillis = abstimeslongstart + (long)(temp_durationsarray[r]);

                        //////absoluteTime___start___midstksunits = (long)(abstimesinmillis * millisecondsPerTick);

                        //////int durationtoassigns_inmiditiks___another = (int)(temp_durationsarray[r] * millisecondsPerTick);

                        patchNumber =

                            Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .INT_CURRENT_NOTES_PATCH_0_TO_127;

                            //temp_patch_array[r];

                        notenumberfromthearray =

                            Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .INT_NOTE_NUMBER_TO_PLAY_0_TO_127;

                            //temp_notesarray[r];

                        ChannelNumber =

                            Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15;

                            //Math.Max(1, r % 11);

                        TrackNumber =

                            Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER;

                            //ChannelNumber;

                        NoteVelocity = temp_velocity_array[r];




                        SAANSMIDSEVENTScollection

                            .AddEvent(

                            new

                            SAANAUDS.Midi.PatchChangeEvent

                            (

                             ///saan puts this here

                             //   absoluteTime___start___midstksunits

                             LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            ,

                             ChannelNumber

                            ,

                             patchNumber

                            )

                            , TrackNumber

                            );



                        ///////////////////////////////////////////////////////////////////////////////////////

                        ///

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /// 

                        /////////////////////////////////////////////////////////////////////////////////////////


                        SAANSMIDSEVENTScollection

                            .AddEvent

                            (new

                            ControlChangeEvent

                            (


                            LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                                ,

                            ChannelNumber

                            ,

                            MidiController

                            .MidiController_RpnMsb__SAAN___ITS___101___FOR_PITCHBENDS_RANGE_CHANGES

                            , 0

                            )

                            , 0

                            ); // 101 → MSB



                        SAANSMIDSEVENTScollection

                            .AddEvent

                            (new

                            ControlChangeEvent

                            (

                          LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            ,

                            ChannelNumber

                            ,

                            MidiController

                            .MidiController_RpnLsb__SAAN___ITS___100___FOR_PITCHBENDS_RANGE_CHANGES

                            , 0

                            )

                            ,

                            0

                            ); // 100 → LSB

                               /////////////////////////////////////////////////////////////////////////////////////////















                        SAANSMIDSEVENTScollection

                            .AddEvent

                            (new 

                            ControlChangeEvent

                            (

                                LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS


                            ,

                            ChannelNumber

                            ,

                            MidiController

                            .MidiController_RpnMsb__SAAN___ITS___101___FOR_PITCHBENDS_RANGE_CHANGES

                            ,

                            0

                            )

                            ,

                            TrackNumber

                            ); // 101 → MSB


                        //////SAANSMIDSEVENTScollection

                        //////    .

                        //////    AddEvent

                        //////    (

                        //////    new 

                        //////    ControlChangeEvent

                        //////    (

                        //////        LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                        //////        ,

                        //////        ChannelNumber

                        //////        , 

                        //////        MidiController

                        //////        .

                        //////        MidiController_RpnLsb__SAAN___FOR_PITCHBENDS_RANGE_CHANGES

                        //////        ,

                        //////        0

                        //////        )

                        //////        ,

                        //////    0

                        //////    ); // 100 → LSB

                        //////       ////////////////////////////////////////////////////////////////  

 



                        SAANSMIDSEVENTScollection

                            .

                            AddEvent

                            (new 

                            ControlChangeEvent

                            (

                                LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            ,

                                ChannelNumber

                            , 

                                MidiController

                            .MainVolume

                            

                                ,

                               //the volumes value to put 

                               // 127

                          //  Math.Max(60,  ((int)(THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS) % 127))

                          127- ((int)(THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS) % 20)

                                )

                                ,

                                TrackNumber

                                ); // 6   to change

                                   //////if (ch % 2 == 0)

                                   //////{

                                   //////    midiEventCollection.AddEvent(new ControlChangeEvent(absoluteTime, ch, MidiController.MidiController_NOT_DEFAULT_pitchbend_sensitivity_6_semitones___DataEntryMsb__SAAN___FOR_PITCHBENDS_RANGE_CHANGES, pitchBendRange), 0); // 6   to change


































                        ////////////SAANSMIDSEVENTScollection

                        ////////////.

                        ////////////AddEvent

                        ////////////(

                        ////////////new 

                        ////////////ControlChangeEvent

                        ////////////(

                        ////////////LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                        ////////////,

                        ////////////ChannelNumber

                        ////////////,

                        ////////////MidiController

                        ////////////.

                        ////////////MidiController_NOT_DEFAULT_pitchbend_sensitivity_6_semitones___DataEntryMsb__SAAN___FOR_PITCHBENDS_RANGE_CHANGES

                        ////////////,


                        ////////////// saan is trying to put everything with 6 semitones ranges for ragas

                        //////////////pitchBendRange = 6 

                        ////////////pitchBendRange

                        ////////////)

                        ////////////,

                        ////////////TrackNumber); // 6   to change when it is the non default 6 semitones







                        pitchBendRange

                            =

                             Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20;




                        SAANSMIDSEVENTScollection

                        .

                        AddEvent

                        (

                        new

                        ControlChangeEvent

                        (

                        LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                        ,

                        ChannelNumber

                        ,

                        //THE CONTROLLER VALUE TO CHANGE THE pitchBendRange IS  6  THAT IS DONE  MidiController_DataEntryMsb___is___6___HAHAHA

                        MidiController

                        .

                        MidiController_DataEntryMsb___is___6___HAHAHA

                        ,


                        // saan is trying to put everything with 6 semitones ranges for ragas

                        //pitchBendRange = 6 

                        pitchBendRange

                        )

                        ,

                        TrackNumber); // 6   to change when it is the non default 6 semitones






                        //FOR REFERENCES    midiEventCollection.AddEvent(new ControlChangeEvent(absoluteTime, ch, MidiController.MidiController_DataEntryMsb___is___6___HAHAHA, pitchBendRange), 0); // 6   to change



                        SAANSMIDSEVENTScollection

                            .

                            AddEvent

                            (new 

                            ControlChangeEvent

                            (LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            , 

                            ChannelNumber

                            ,

                            MidiController

                            .

                            MidiController_DataEntryLsb__SAAN___FOR_PITCHBENDS_RANGE____ITS__38___CHANGES

                            ,

                            0

                            )

                            ,

                            TrackNumber); 

                        // 38




   




                        ___temp_note_freq_found = 0;



                        ___temp_note_freq_found

                            =

                            SAANAUDS.PUBLIC_STATIC_CLASS_TO_GENERATE_CSVMIDI_LIKE_SAANDATA

                            .

                            // PUBLIC_STATIC_STRING___RETURN_NOTE_FREQUENCY_FROM___1_values_up_down_not_necessary___indexes_since_my_array_is_1_to_128___NOTE_NUMBER___PUBLIC_STATIC_STRING_ARRAY_FOR_SAAN_NOTES_MAPPER

                            PUBLIC_STATIC_DOUBLE___RETURN_NOTE_FREQUENCY_FROM___1_values_up_down_not_necessary___indexes_since_my_array_is_1_to_128___NOTE_NUMBER___PUBLIC_STATIC_STRING_ARRAY_FOR_SAAN_NOTES_MAPPER

                            (notenumberfromthearray)


                            ;

                        ///////////////////////////////////////////// SPECIAL LOGGER  SAANOWNCSVLINIERSCALEDDXFFORMIDI ///

                        LOCAL_STRINGBUILDER_FOR___22_COLS___SAANOWNCSVLINIERSCALEDDXFFORMIDI

                            .AppendLine

                            (

                            // col 0   track(number categorizing like dxf layers) 

                            //  ,col 1   channel(9 for percussions only 0 to 15 only) 

                            //   ,col 2   patch_number(0 to 127) 

                            //,col 3   patch_name 

                            //,col 3 + pitch_bend_number(0 to 8190 to 16368    original note has no change frequency at 8190) 

                            //,col 3++   note_frequency_linier_y_start_data_OR_START_RADIUS(0, 0, 0 has zero frequency) 

                            //,col 6   note_frequency_linier_y_final_data_OR_FINAL_RADIUS(0, 0, 0 has zero frequency) 

                            //,col 7   note_name_FOUND_FROM_START_SIDES_FREQUENCY 

                            //,col 8   note_start_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE 

                            //,col 9   note_final_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE

                            //,col 10   note_duration_IN_MIDITICKS_CALCULATED_FROM_THE_DEGREES_AND_TOTAL_DURATIONS_MICROSECONDS 

                            //,col 10 + 1   note_velocity_TRICKY_CALCULATION_OR_FROM_LAYERS 

                            //,col 10 + 2   grabbed_lyrics_text_FROM_LAYERS_NAMES_DATA 

                            //,col 10 + 3   grabbed_lyrics_Absolute_times_IN_LAYERS_DATA_FOR_TRACK_ZERO_WITH_MIDITICKS 

                            //,col 10 + 3 + 1   OPTIONAL_MILLISECONDS_DATA_FOR_START

                            //,col 10 + 3 + 2   OPTIONAL_MILLISECONDS_DATA_FOR_FINAL 

                            //,col 10 + 3 + 3   OPTIONAL_MILLISECONDS_DATA_FOR_DURATIONS(normally 100 to 4300 to 30000 etc per notes) 

                            //,col 10 + 3 + 3 + 1  OPTIONAL_NOTE_OR_OTHER_CONTROLLER_LIKE_PITCH_BEND(DECIDER_TO_PROCESS) 

                            //,col 10 + 3 + 3 + 2  OPTIONAL_THE_RAW_MIDI_EVENT_COUNTER_PRESERVED_FOR_SORTING_WHILE_EXPORTING 

                            //,col 10 + 3 + 3 + 3  OPTIONAL_SIN_THETA_ADJUSTED_SLOPE_FOR_VELOCITY_CONTROLLER 

                            //,col 10 + 3 + 3 + 3 + 1  DEGREE_DIFF_TO_TRACK_BLANK_REGIONS 

                            //,col 21  DEGREE_START

                            //,col 22  DEGREE_FINAL



                            TrackNumber

                            + "," + ChannelNumber

                            + "," + patchNumber

                            + "," + "patchname"

                            + "," + "8192"

                            + "," + ___temp_note_freq_found

                            + "," + ___temp_note_freq_found

                            + "," + "notenames"

                            + "," + LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            + "," + LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS + 0

                           + "," + 0

                           + "," + 127

                           + "," + "lyr"



                            //SINCE ALREADY CUMULATIONS STARTING DONES BEFORE HERES

                            + "," + LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                             + "," + (DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS - temp_durationsarray[r])

                            + "," + DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            + "," + temp_durationsarray[r]

                            + "," + "PATCH_CHANGE" 

                            +","+ THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS

                            +",0.00"

                            +",0.0"

                            +",0.0"

                           + ",0.0"


                            );


                        ///////////////////////////////////////////// SPECIAL LOGGER  SAANOWNCSVLINIERSCALEDDXFFORMIDI ///















                        ///////////////////////////////////////////////////////////////

                        THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;

                        SAANSMIDSEVENTScollection.AddEvent

                            (

                            new SAANAUDS.Midi.NoteOnEvent

                            (

                          //////    absoluteTime

                          // absoluteTime___start___midstksunits

                          LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            ,

                          //  ChannelNumber

                          Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                            ,

                           // note.MidiValue

                           notenumberfromthearray

                            ,

                       //    NoteVelocity

                       Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                       .INT_CURRENT_NOTES_VELOCITY_0_TO_127

                            ,

                        //////  (int)Math.Min(NoteDuration___with__midtks_units, 1)

                        // (int)Math.Max(NoteDuration___with__midtks_units, 1)

                        //durationtoassigns

                        durationtoassigns_inmiditiks

                            // durationtoassigns_inmiditiks___another

                            )

                            ,

                          //  TrackNumber

                          Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER

                            );

                        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////


                        THE_DOUBLE_POPULATOR_NOTES_COUNTER_FOR_EVERY_INDIVIDUAL_NOTES++;




















                        //////////////////////////////////////////////////////////////////

                        //////StringBuilder ___strbldr_for____velocity_free______dot_no_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                        //////    = new StringBuilder();

                        //////___strbldr_for____velocity_free______dot_no_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                        //////    .Clear();

                        ___strbldr_for____velocity_free______dot_no_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                            .AppendLine

                            (

                            LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            +"######"+

                            durationtoassigns_inmiditiks

                            +"######"+

                            ___temp_note_freq_found

                            );


                        //////StringBuilder ___strbldr_for____with_velocity______dot_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                        //////      = new StringBuilder();

                        //////___strbldr_for____with_velocity______dot_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                        //////    .Clear();



                        ___strbldr_for____with_velocity______dot_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                            .AppendLine

                            (

                            LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            + "######" +

                            durationtoassigns_inmiditiks

                            + "######" +

                            ___temp_note_freq_found

                            + "######" +

                       

                                Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                                .INT_CURRENT_NOTES_VELOCITY_0_TO_127

                                /

                                127


                            );


                        //////////////////////////////////////////////////////////////////

























































                        //////GenerateNoteBitmaps

                        //////   (

                        //////   (long)THE_DOUBLE_POPULATOR_NOTES_COUNTER_FOR_EVERY_INDIVIDUAL_NOTES

                        //////  // LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                        //////   ,

                        //////   notenumberfromthearray

                        //////   ,

                        //////   ExcelFormulaParser_GT_PARSERSample.Program.public_static_string_GT_folder

                        //////   );
























































                        if (this.checkBox___SAVE_NOTATIONS_BMP.CheckState.ToString().ToUpper().TrimEnd().TrimStart().Trim()=="CHECKED")

                            {


   

                        await Task.Run(() => GenerateNoteBitmaps(

                         //(long)THE_DOUBLE_POPULATOR_NOTES_COUNTER_FOR_EVERY_INDIVIDUAL_NOTES

                         // (long)THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS

                         // (long) ___temp_double_overall_notes_count

                         //LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                         DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            ,

                            notenumberfromthearray

                            ,

                            ExcelFormulaParser_GT_PARSERSample.Program.public_static_string_GT_folder

                        ));


                     //   Console.WriteLine("___temp_double_overall_notes_count= " + ___temp_double_overall_notes_count);


                        }// if(this.checkBox___SAVE_NOTATIONS_BMP.CheckState.ToString().ToUpper().TrimEnd().TrimStart().Trim()=="CHECKED")















                        ///////////////////////////////////////////////////////////////////////////

                        SAANSMIDSEVENTScollection

                            .AddEvent(new ControlChangeEvent

                            (

                           LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            ,




                          Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15



                            ,

                            MidiController.Pan

                       ,

                            // ((ptchbndsvals) % 122))


                            (int)((THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS) % 127))

                            ,








                          Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER


                            ); //PANNING


                        ///////////////////////////////////////////////////////////////////////////





















                        //WHEN I AM USING THIS EXPRESSIONS THEN THE MIDI FILES ARE NOT PLAYING ANY SOUNDS

                        //////// Expression (CC 11) - Crescendo and Decrescendo

                        //////for (int i = 0; i <= 127; i += 8)

                        //////{

                        //////    collection

                        //////        .AddEvent

                        //////        (new 

                        //////        ControlChangeEvent

                        //////        (

                        //////           absoluteTime___start___midstksunits+  i * 2

                        //////            ,

                        //////        ChannelNumber

                        //////        , MidiController.Expression

                        //////        , 

                        //////        i

                        //////        )

                        //////        ,

                        //////        TrackNumber

                        //////        );

                        //////}//for (int i = 0; i <= 127; i += 8)

                        //////for (int i = 127; i >= 0; i -= 8)

                        //////{

                        //////    collection

                        //////        .AddEvent

                        //////        (

                        //////        new

                        //////        ControlChangeEvent

                        //////        (

                        //////           // 256 + (127 - i) * 2

                        //////           absoluteTime___start___midstksunits+ 256 + (127 - i) * 2

                        //////            ,

                        //////            ChannelNumber

                        //////            , MidiController.Expression

                        //////            , 

                        //////            i

                        //////            )

                        //////            , 

                        //////            TrackNumber

                        //////            );

                        //////}//for (int i = 127; i >= 0; i -= 8)



                        //it was not playing even i stopped this

                        // Vibrato (CC 21) - Oscillating values

                        for (int i = 0; i < 3; i++)

                        {

                            SAANSMIDSEVENTScollection.AddEvent

                                (


                                new ControlChangeEvent

                                (

                                 //   600 + i * 120

                                 LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS + i * 120

                                , ChannelNumber

                                ,

                                // (MidiController)21            // THIS ALSO WORKS

                                MidiController.SAANS_VIBRATO

                                //THIS ALSO WORKS   MidiController.SAANS_VIBRATO 

                                , 64

                                )

                                ,

                          //TrackNumber

                          Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER

                                );















































                            //////////////////

                            SAANSMIDSEVENTScollection.AddEvent

                                (new

                                ControlChangeEvent

                                (

                                    //660 + i * 120

                                    LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS + i * 120

                                    ,

                          //ChannelNumber

                          Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                                    ,

                                    //  (MidiController)21 THIS WAS WORKING


                                    MidiController.SAANS_VIBRATO

                                    ,

                                    0

                                    )

                                    ,

                          // TrackNumber

                          Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER


                                    );

                        }// for (int i = 0; i < 3; i++)



                        //it was not playing even i stopped this

                        // Modulation (CC 1) - Sweep

                        for (int i = 0; i <= 127; i += 10)

                        {

                            SAANSMIDSEVENTScollection

                                .AddEvent

                                (new ControlChangeEvent

                                (

                                   // 1000 + i * 2

                                   LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS + i * 2


                                ,

                          // ChannelNumber

                          Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                                ,

                                MidiController.Modulation

                                ,

                                i

                                )

                                ,

                          //   TrackNumber

                          Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER


                                );

                        }//for (int i = 0; i <= 127; i += 10)






                        THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;


                        /////////////////////////////////////////////////////////////////////////////////////////////////////////

                        SAANSMIDSEVENTScollection

                                .AddEvent

                                (

                                    new SAANAUDS.Midi.TextEvent

                                    (


                                   ( Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                                    .PUBLIC_STRING_THE_LYR_FOUND

                                    +"_"+

                                    Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                                    .PUBLIC_STRING_THE_INDINOTE_FOUND

                                    ).Replace(",","_")


                                    ,

                                        SAANAUDS.Midi.MetaEventType.TextEvent

                                        ,

                                   // absoluteTime

                                   //////(long)((absoluteTime___start___midstksunits + absoluteTime___final___midstksunits) / 6)

                                   //////     )

                                   ///

                                   LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS


                                        )

                                   

                                    ,

                                    //TrackNumber

                                    0

                                    );

                        /////////////////////////////// interesting styles ////////////////////

                        ///THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;





                        ///////////////////////////////////////////// SPECIAL LOGGER  SAANOWNCSVLINIERSCALEDDXFFORMIDI ///

                        LOCAL_STRINGBUILDER_FOR___22_COLS___SAANOWNCSVLINIERSCALEDDXFFORMIDI

                            .AppendLine

                            (

                                                      // col 0   track(number categorizing like dxf layers) 

                                                      //  ,col 1   channel(9 for percussions only 0 to 15 only) 

                                                      //   ,col 2   patch_number(0 to 127) 

                                                      //,col 3   patch_name 

                                                      //,col 3 + pitch_bend_number(0 to 8190 to 16368    original note has no change frequency at 8190) 

                                                      //,col 3++   note_frequency_linier_y_start_data_OR_START_RADIUS(0, 0, 0 has zero frequency) 

                                                      //,col 6   note_frequency_linier_y_final_data_OR_FINAL_RADIUS(0, 0, 0 has zero frequency) 

                                                      //,col 7   note_name_FOUND_FROM_START_SIDES_FREQUENCY 

                                                      //,col 8   note_start_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE 

                                                      //,col 9   note_final_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE

                                                      //,col 10   note_duration_IN_MIDITICKS_CALCULATED_FROM_THE_DEGREES_AND_TOTAL_DURATIONS_MICROSECONDS 

                                                      //,col 10 + 1   note_velocity_TRICKY_CALCULATION_OR_FROM_LAYERS 

                                                      //,col 10 + 2   grabbed_lyrics_text_FROM_LAYERS_NAMES_DATA 

                                                      //,col 10 + 3   grabbed_lyrics_Absolute_times_IN_LAYERS_DATA_FOR_TRACK_ZERO_WITH_MIDITICKS 

                                                      //,col 10 + 3 + 1   OPTIONAL_MILLISECONDS_DATA_FOR_START

                                                      //,col 10 + 3 + 2   OPTIONAL_MILLISECONDS_DATA_FOR_FINAL 

                                                      //,col 10 + 3 + 3   OPTIONAL_MILLISECONDS_DATA_FOR_DURATIONS(normally 100 to 4300 to 30000 etc per notes) 

                                                      //,col 10 + 3 + 3 + 1  OPTIONAL_NOTE_OR_OTHER_CONTROLLER_LIKE_PITCH_BEND(DECIDER_TO_PROCESS) 

                                                      //,col 10 + 3 + 3 + 2  OPTIONAL_THE_RAW_MIDI_EVENT_COUNTER_PRESERVED_FOR_SORTING_WHILE_EXPORTING 

                                                      //,col 10 + 3 + 3 + 3  OPTIONAL_SIN_THETA_ADJUSTED_SLOPE_FOR_VELOCITY_CONTROLLER 

                                                      //,col 10 + 3 + 3 + 3 + 1  DEGREE_DIFF_TO_TRACK_BLANK_REGIONS 

                                                      //,col 21  DEGREE_START

                                                      //,col 22  DEGREE_FINAL



                           Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER

                            + "," + ChannelNumber

                            + "," + patchNumber

                            + "," + "patchname"

                            + "," + "8192"

                            + "," + ___temp_note_freq_found

                            + "," + ___temp_note_freq_found

                            + "," + "notenames"

                            + "," + (LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS- durationtoassigns_inmiditiks)

                            + "," + LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS 

                           + "," + durationtoassigns_inmiditiks

                           + "," +

                       Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                       .INT_CURRENT_NOTES_VELOCITY_0_TO_127


                           + "," + "lyr"



                            //SINCE ALREADY CUMULATIONS STARTING DONES BEFORE HERES

                            + "," + LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                             + "," + (DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS - temp_durationsarray[r])

                            + "," + DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            + "," + temp_durationsarray[r]

                            + "," + "NOTE_ON"

                            + "," + THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS

                            + ",0.00"

                            + ",0.0"

                            + ",0.0"

                           + ",0.0"


                            );


                        ///////////////////////////////////////////// SPECIAL LOGGER  SAANOWNCSVLINIERSCALEDDXFFORMIDI ///






                        //////////////////////////    WE WILL ADD THE PROPERLY CALCULATED PITCH BENDS DATA HERE WITH PROPER CALCULATIONS OF THE MIDITIKS //////////

                        //////////////////////////    WE WILL ADD THE PROPERLY CALCULATED PITCH BENDS DATA HERE WITH PROPER CALCULATIONS OF THE MIDITIKS //////////

                        //////////////////////////    WE WILL ADD THE PROPERLY CALCULATED PITCH BENDS DATA HERE WITH PROPER CALCULATIONS OF THE MIDITIKS //////////                        


                        //here we calculate the modified data for millisecs for the current notes start time absolute milliseconds

                        //for the start times for the    current start of the notes
























                        //FOR REFERENCES OF THE VARIABLES NAMES     //////////////////THIS IS NECESSARY FOR THE PITCH BENDS POSITIONS CALCULATIONS

                        //FOR REFERENCES OF THE VARIABLES NAMES       ////////////DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                        //FOR REFERENCES OF THE VARIABLES NAMES     ////////////    =

                        //FOR REFERENCES OF THE VARIABLES NAMES     ////////////    DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                        //FOR REFERENCES OF THE VARIABLES NAMES      ////////////    +

                        //FOR REFERENCES OF THE VARIABLES NAMES     ////////////    temp_durationsarray[r];

                        //FOR REFERENCES OF THE VARIABLES NAMES     //////////////////THIS IS NECESSARY FOR THE PITCH BENDS POSITIONS CALCULATIONS


                        //////for references   double START_ABSOLUTE_START_TIME_MILISECONDS

                        //////for references  ,double MILLISECONDS_TO_MIDITIKS_MULTIPLIER

                        //////for references  ,int CURRENT_NOTE_NUMBER

                        //////for references  ,int INT_MILLISECOND_TOLERANCE_FOR_RIPPLES_PITCHBENDS

                        //////for references  ,int INT_UPSIDE_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES

                        //////for references  ,int INT_DOWNSIES_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES










































                        double ___temp_double_millisecond_for_current_notes_start_times

                            =


                        DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS;


                        Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG

                            (

                            ___temp_double_millisecond_for_current_notes_start_times

                            - temp_durationsarray[r]

                            //i think i need to call this adjustment for pitch bends

                            ,

                            this.PUBLIC_DOUBLE___MILLISECOND_TO_MIDITKS_CONVERTER_FOR_THIS_CONTEXT___MIDITKS_PER_MILLISECONDS

                            //////,

                            //////30

                            //////,

                            //////60

                            //////,

                            //////30

                            );

















































































































































                        //BEFORE ENTERING HERE WE HAVE ALREADY PRESET THE DATA WHILE THE NOTE IS ON

                        //THE RPN DATA IS PRESET

                        /////////////////////////////////////////////////////////////////////////////////////

                        pitchBendRange

                            =

                             Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .PUBLIC_INT___Column___NOTE_WISE_PITHBENDS_RANGE_2X2_SEMITONES_DEFAULT_TO_10X2_20;


                        /////////////////////////////////////////////////////////////////////////////////////

                        













                        for

                            (

                            int ptchbntsitertotakes=0

                            ;

                            ptchbntsitertotakes

                            <

                            Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                            .Count

                            ;

                            ptchbntsitertotakes++

                            )

                        {




                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////collection.AddEvent

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////    (

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES//////////    new

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////    SAANAUDS.Midi.PitchWheelChangeEvent

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////    (

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////       (long)(absoluteTime___start___midstksunits + ((absoluteTime___final___midstksunits - absoluteTime___start___midstksunits) / ___delta___pitch___slabs_finder) * rrr)

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES  //////////        ,

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////        ChannelNumber

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////        ,

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////        /// Math.Min(16368, (int)(start_side_of_line_segments_frequency +(delta_pitch * (final_side_of_line_segments_frequency/ start_side_of_line_segments_frequency)) * 8192))

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////        //  Math.Max(16368, (int)(8190 + (rrr * delta_pitch)))

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////        //////this is new variable taken to automatically understand for  log2 cases and for linear cases

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////        /////this is rising cases

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////        pitch_bent_wheels_value_to_assign

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////       //rising freq cases

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////       )

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////        , TrackNumber

                            //TAKEN HERE FOR REFERENCES OF CALLING STYLES //////////        );






















                            //since we have already offsetted this while filling the list in the function

                            //we have taken the initial values of milliseconds from the start millisecond of the current actives notes



                            long ___absolutetimesforpitchbends

                                = 0;


                                ___absolutetimesforpitchbends

                                =

                                (long)

                                (

                                Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                                .PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                                .ElementAt<long>(ptchbntsitertotakes)

                                );




                            int ptchbndsvals = 8192;

                            ptchbndsvals =

                              Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                              .PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                              .ElementAt<int>(ptchbntsitertotakes);



                            int tempchannelnos = 0;


                            tempchannelnos

                                =

                              Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                               .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15;



                            int trknos = 0;

                                trknos

                                =

                                Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                                .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER;































































































































///////////////////////////////////////////////////////////////////////////

                            SAANSMIDSEVENTScollection

                                .AddEvent(new ControlChangeEvent

                                (

                              // LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                              ___absolutetimesforpitchbends

                                ,

                                tempchannelnos

                                ,

                                MidiController.Pan

                           ,

                                // ((ptchbndsvals) % 122))


                                // (int)((THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS) % 127))

                                (int)((THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS) % 127))

                               

                                ,

                                trknos


                                ); //PANNING


                            ///////////////////////////////////////////////////////////////////////////



                            SAANSMIDSEVENTScollection.AddEvent

                            (

                            new

                            SAANAUDS.Midi.PitchWheelChangeEvent

                            (

                                ___absolutetimesforpitchbends

                                ,

                               // ChannelNumber

                               trknos

                                ,

                              /// Math.Min(16368, (int)(start_side_of_line_segments_frequency +(delta_pitch * (final_side_of_line_segments_frequency/ start_side_of_line_segments_frequency)) * 8192))

                              //  Math.Max(16368, (int)(8190 + (rrr * delta_pitch)))

                              //////this is new variable taken to automatically understand for  log2 cases and for linear cases

                              /////this is rising cases

                              //  pitch_bent_wheels_value_to_assign

                              ptchbndsvals

                               //rising freq cases

                               )

                                ,

                                //TrackNumber

                                trknos

                                );

                            ///






if(this.checkBox___TO_INCLUDE_KEY_AFTERTOUCH_WITH_PITCH_BENDS.CheckState.ToString().ToUpper().TrimEnd().TrimStart().Trim()=="CHECKED")

                            {


















                                


                                    












if (

ptchbntsitertotakes

<

( Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

.Count -1)

)

                                {






                                    


                                    

long current___pitchbendtime = ___absolutetimesforpitchbends;

long next___pitchbendtime

=

//we have taken count -1 

(long)

(

Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

.ElementAt<long>(ptchbntsitertotakes+1)

);


long ___delay_durations_in_current_pitchbend

=

next___pitchbendtime

-

current___pitchbendtime;



                                    if(___delay_durations_in_current_pitchbend>0)

                                    {




                                        int number_of_keypressuresaftertouch 

                                            = (int)

                                            (

                                            ___delay_durations_in_current_pitchbend

                                            / 

                                            60

                                            );


                //////// Assuming you have a MidiEventCollection named 'collection' and a track number 'trackNumber'

                //////long absoluteTime = 0; // Set the appropriate absolute time

                //////int channel = 0; // MIDI channel (0-15)

                //////int note = 60; // MIDI note number (e.g., 60 for Middle C)

                //////int pressure = 64; // Pressure value (0-127)


















                                        for(int keyaftertouchiters=0; keyaftertouchiters< number_of_keypressuresaftertouch; keyaftertouchiters++)

                                        {


                                            long ___keyaftertouch_absolute_times

                                                    =

                                                    ___absolutetimesforpitchbends

                                                    +

                                                    keyaftertouchiters * 60;

                                            //////////////////////////////////////////////////

                                         // Create a Key Aftertouch event

                                            NoteEvent keyAfterTouchEvent 

                                =

                                new NoteEvent

                                    (

                             //   absoluteTime

                             //  ___absolutetimesforpitchbends+3

                             // ___absolutetimesforpitchbends

                             ___keyaftertouch_absolute_times

                                ,

                              //  channel

                              //  note

                              Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                              .PUBLIC_INT_CHANNEL_NUMBER_0_TO_15

                                ,

                                MidiCommandCode.KeyAfterTouch

                                ,

                              //  note

                              Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                              .INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                                ,

                               // pressure

                              (int)( (ptchbndsvals + keyaftertouchiters ) * (1/(16384+ number_of_keypressuresaftertouch)) * 127  )

                                );


                            // Add the event to the collection

                            SAANSMIDSEVENTScollection

                                .AddEvent

                                (

                                keyAfterTouchEvent

                                ,


                                //trackNumber

                                trknos


                                );

                                            //////Explanation of the Code

                                            ////// MidiCommandCode.KeyAfterTouch: Specifies that this is a Key Aftertouch event.

                                            ////// absoluteTime: The time at which the event occurs, in ticks.

                                            ////// channel: The MIDI channel number (0-15).

                                            ////// note: The MIDI note number(0-127).

                                            //////  pressure: The pressure value applied to the key(0-127).


                                            THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;












                                            if (this.checkBox___PAN_AND_THE_BREADTH_CONTROL_WITH_KEYPRESSURES.CheckState.ToString().ToUpper().TrimEnd().TrimStart().Trim() == "CHECKED")

                                            {


                                           

                                             ///////////////////////////////////////////////////////////////////////////

                                            SAANSMIDSEVENTScollection

                                                .AddEvent(new ControlChangeEvent

                                                (

                                              // LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                                              // ___absolutetimesforpitchbends


                                              ___keyaftertouch_absolute_times

                                                ,

                                                tempchannelnos

                                                ,

                                                MidiController.Pan

                                           ,

                                                // ((ptchbndsvals) % 122))


                                                // (int)((THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS) % 127))

                                                (int)((THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS) % 127))


                                                ,

                                                trknos


                                                ); //PANNING


                                                ///////////////////////////////////////////////////////////////////////////

                                                THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;

                                                ///////////////////////////////////////////////////////////////////////////

                                                SAANSMIDSEVENTScollection

                                                .AddEvent(new ControlChangeEvent

                                                (

                                              // LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                                              // ___absolutetimesforpitchbends


                                              ___keyaftertouch_absolute_times

                                                ,

                                                tempchannelnos

                                                ,

                                                MidiController.BreathController

                                           ,

                                                // ((ptchbndsvals) % 122))


                                                // (int)((THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS) % 127))

                                                (int)((THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS) % 127))


                                                ,

                                                trknos


                                                ); //BREADTHCONTROLLS

                                                THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;


                                                ///////////////////////////////////////////////////////////////////////////



                                            }//if (this.checkBox___PAN_AND_THE_BREADTH_CONTROL_WITH_KEYPRESSURES.CheckState.ToString().ToUpper().TrimEnd().TrimStart().Trim() == "CHECKED")




                                            THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;

                                        }//for(int keyaftertouchiters=0; keyaftertouchiters< number_of_keypressuresaftertouch; keyaftertouchiters++)





                                    }//if(___delay_durations_in_current_pitchbend>0)


                                }

                                //////if (

                                //////ptchbntsitertotakes

                                //////<

                                //////(Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                                //////.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                                //////.Count - 1)

                                //////)




                            }//if(this.checkBox___TO_INCLUDE_KEY_AFTERTOUCH_WITH_PITCH_BENDS.CheckState.ToString().ToUpper().TrimEnd().TrimStart().Trim()=="CHECKED")




                            ///////////////////////////////////////////// SPECIAL LOGGER  SAANOWNCSVLINIERSCALEDDXFFORMIDI ///

                            LOCAL_STRINGBUILDER_FOR___22_COLS___SAANOWNCSVLINIERSCALEDDXFFORMIDI

                                .AppendLine

                                (

                               // col 0   track(number categorizing like dxf layers) 

                               //  ,col 1   channel(9 for percussions only 0 to 15 only) 

                               //   ,col 2   patch_number(0 to 127) 

                               //,col 3   patch_name 

                               //,col 3 + pitch_bend_number(0 to 8190 to 16368    original note has no change frequency at 8190) 

                               //,col 3++   note_frequency_linier_y_start_data_OR_START_RADIUS(0, 0, 0 has zero frequency) 

                               //,col 6   note_frequency_linier_y_final_data_OR_FINAL_RADIUS(0, 0, 0 has zero frequency) 

                               //,col 7   note_name_FOUND_FROM_START_SIDES_FREQUENCY 

                               //,col 8   note_start_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE 

                               //,col 9   note_final_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE

                               //,col 10   note_duration_IN_MIDITICKS_CALCULATED_FROM_THE_DEGREES_AND_TOTAL_DURATIONS_MICROSECONDS 

                               //,col 10 + 1   note_velocity_TRICKY_CALCULATION_OR_FROM_LAYERS 

                               //,col 10 + 2   grabbed_lyrics_text_FROM_LAYERS_NAMES_DATA 

                               //,col 10 + 3   grabbed_lyrics_Absolute_times_IN_LAYERS_DATA_FOR_TRACK_ZERO_WITH_MIDITICKS 

                               //,col 10 + 3 + 1   OPTIONAL_MILLISECONDS_DATA_FOR_START

                               //,col 10 + 3 + 2   OPTIONAL_MILLISECONDS_DATA_FOR_FINAL 

                               //,col 10 + 3 + 3   OPTIONAL_MILLISECONDS_DATA_FOR_DURATIONS(normally 100 to 4300 to 30000 etc per notes) 

                               //,col 10 + 3 + 3 + 1  OPTIONAL_NOTE_OR_OTHER_CONTROLLER_LIKE_PITCH_BEND(DECIDER_TO_PROCESS) 

                               //,col 10 + 3 + 3 + 2  OPTIONAL_THE_RAW_MIDI_EVENT_COUNTER_PRESERVED_FOR_SORTING_WHILE_EXPORTING 

                               //,col 10 + 3 + 3 + 3  OPTIONAL_SIN_THETA_ADJUSTED_SLOPE_FOR_VELOCITY_CONTROLLER 

                               //,col 10 + 3 + 3 + 3 + 1  DEGREE_DIFF_TO_TRACK_BLANK_REGIONS 

                               //,col 21  DEGREE_START

                               //,col 22  DEGREE_FINAL



                               Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                              .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER

                                + "," + ChannelNumber

                                + "," + patchNumber

                                + "," + "patchname"

                                + "," + ptchbndsvals

                                + "," + ___temp_note_freq_found

                                + "," + ___temp_note_freq_found

                                + "," + "notenames"

                                + "," + ___absolutetimesforpitchbends

                                + "," + ___absolutetimesforpitchbends

                               + "," + 0

                               + "," +

                           Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                           .INT_CURRENT_NOTES_VELOCITY_0_TO_127


                               + "," + "lyr"



                                //SINCE ALREADY CUMULATIONS STARTING DONES BEFORE HERES

                                + "," + LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                                 + "," + (DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS - temp_durationsarray[r])

                                + "," + DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                                + "," + temp_durationsarray[r]

                                + "," + "PITCH_BEND"

                                + "," + THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS

                                + ",0.00"

                                + ",0.0"

                                + ",0.0"

                               + ",0.0"


                                );


                            ///////////////////////////////////////////// SPECIAL LOGGER  SAANOWNCSVLINIERSCALEDDXFFORMIDI ///


















                            THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;


                            Console.WriteLine("midsfilessavingspitchbends  ___absolutetimesforpitchbends = " + ___absolutetimesforpitchbends + "   ptchbndsvals  = " + ptchbndsvals + "   tempchannelnos = " + tempchannelnos + "   trknos = " + trknos);














                            //////////////// Add ripple effects

                            //////////////int rippleSteps = 5; // Number of ripple steps

                            //////////////for (int rippleStep = 1; rippleStep <= rippleSteps; rippleStep++)

                            //////////////{

                            //////////////    long rippleTime = ___absolutetimesforpitchbends + (rippleStep * 10); // Adjust the time for ripple effect

                            //////////////    int rippleValue = ptchbndsvals + (int)(Math.Sin(rippleStep * Math.PI / rippleSteps) * 2048); // Sinusoidal ripple effect

                            //////////////    SAANSMIDSEVENTScollection.AddEvent(

                            //////////////        new SAANAUDS.Midi.PitchWheelChangeEvent(

                            //////////////            rippleTime,

                            //////////////            tempchannelnos,

                            //////////////            rippleValue

                            //////////////        ),

                            //////////////        trknos

                            //////////////    );

                            //////////////    THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;

                            //////////////    Console.WriteLine("ripple effect  rippleTime = " + rippleTime + "   rippleValue  = " + rippleValue + "   tempchannelnos = " + tempchannelnos + "   trknos = " + trknos);

                            //////////////}//for (int rippleStep = 1; rippleStep <= rippleSteps; rippleStep++)








                        }

                        //////for

                        //////    (

                        //////    int ptchbntsitertotakes = 0

                        //////    ;

                        //////    ptchbntsitertotakes

                        //////    <

                        //////    Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                        //////    .PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                        //////    .Count

                        //////    ;

                        //////    ptchbntsitertotakes++

                        //////    )

                        ///




                        /////////////////////////////////// NOTE ON EVENT COMPLETES HERE AND WE WILL PUT THE PITCH BENDS AND OTHER CONTROLLERS HERE //////

                        /////////////////////////////////// NOTE ON EVENT COMPLETES HERE AND WE WILL PUT THE PITCH BENDS AND OTHER CONTROLLERS HERE //////                   

                        /////////////////////////////////// NOTE ON EVENT COMPLETES HERE AND WE WILL PUT THE PITCH BENDS AND OTHER CONTROLLERS HERE //////

                        /////////////////////////////////// NOTE ON EVENT COMPLETES HERE AND WE WILL PUT THE PITCH BENDS AND OTHER CONTROLLERS HERE //////

                        /////////////////////////////////// NOTE ON EVENT COMPLETES HERE AND WE WILL PUT THE PITCH BENDS AND OTHER CONTROLLERS HERE //////

                        /////////////////////////////////// NOTE ON EVENT COMPLETES HERE AND WE WILL PUT THE PITCH BENDS AND OTHER CONTROLLERS HERE //////

                        ////////////////////////////// THE NOTE OFF EVENT IS IMPORTANT FOR  THE SAAN AUDS SYSTEMS TO GET THE CONTROLLING OF THE REAL DURATIONS OF THE NOTES

                        ////////////////////////////// THE NOTE OFF EVENT IS IMPORTANT FOR  THE SAAN AUDS SYSTEMS TO GET THE CONTROLLING OF THE REAL DURATIONS OF THE NOTES

                        ////////////////////////////// THE NOTE OFF EVENT IS IMPORTANT FOR  THE SAAN AUDS SYSTEMS TO GET THE CONTROLLING OF THE REAL DURATIONS OF THE NOTES

                        ////////////////////////////// THE NOTE OFF EVENT IS IMPORTANT FOR  THE SAAN AUDS SYSTEMS TO GET THE CONTROLLING OF THE REAL DURATIONS OF THE NOTES

                        ////////////////////////////// THE NOTE OFF EVENT IS IMPORTANT FOR  THE SAAN AUDS SYSTEMS TO GET THE CONTROLLING OF THE REAL DURATIONS OF THE NOTES

                        ////////////////////////////// THE NOTE OFF EVENT IS IMPORTANT FOR  THE SAAN AUDS SYSTEMS TO GET THE CONTROLLING OF THE REAL DURATIONS OF THE NOTES

                        /////////////////////////////////////////////////////////////////////////////////////////

                        // the note on event with the        zero velocity is important for saanauds systems

                        // the note on event with the        zero velocity is important for saanauds systems

                        // the note on event with the        zero velocity is important for saanauds systems

                        SAANSMIDSEVENTScollection.AddEvent

                                    (

                                    new SAANAUDS.Midi.NoteOnEvent

                                    (

                                    //////    absoluteTime

                                    // absoluteTime___start___midstksunits

                                    (long)

                                    (

                                    (long)(LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS)

                                    + ((long)durationtoassigns_inmiditiks)

                                    )

                                    ,

                                    ChannelNumber

                                    ,

                                    // note.MidiValue

                                    notenumberfromthearray

                                    ,

                                    0

                                    //this is to note off events

                                    ,

                                    //saan could not find any difference with the sharp stopping times durations and the delayed stopping of the notes

                                    //////  (int)Math.Min(NoteDuration___with__midtks_units, 1)

                                    // (int)Math.Max(NoteDuration___with__midtks_units, 1)

                                    //durationtoassigns

                                    //durationtoassigns_inmiditiks

                                    // 0

                                    // to do the experiments

                                    //(int)(durationtoassigns_inmiditiks / 3)

                                    // durationtoassigns_inmiditiks___another

                                    0

                                    )

                                    ,

                                    TrackNumber

                                    );








































                        //after note stops

                        // Optional: Reset RPN (to avoid accidental edits) with cc 38   127


                        SAANSMIDSEVENTScollection.AddEvent

                            (new 

                            ControlChangeEvent

                            (

                                  (long)

                                    (

                                    (long)(LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS)

                                    + ((long)durationtoassigns_inmiditiks)

                                    )

                                ,

                                ChannelNumber

                                ,

                                MidiController

                                .MidiController_RpnMsb__SAAN___ITS___101___FOR_PITCHBENDS_RANGE_CHANGES

                                ,

                                127

                                )

                                ,

                                TrackNumber

                                );















                        //after note stops

                        // Optional: Reset RPN (to avoid accidental edits) with cc 38   127





                        SAANSMIDSEVENTScollection

                            .AddEvent

                            (new 

                            ControlChangeEvent

                            (


                                  (long)

                                    (

                                    (long)(LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS)

                                    + ((long)durationtoassigns_inmiditiks)

                                    )




                                ,

                                ChannelNumber

                                , 

                                

                                MidiController

                                .MidiController_RpnLsb__SAAN___ITS___100___FOR_PITCHBENDS_RANGE_CHANGES

                                , 127

                                

                                )

                                ,

                                TrackNumber

                                );





///////////////////////////////////////////////////////////////////////////////////////









                        THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;





























                        ///////////////////////////////////////////// SPECIAL LOGGER  SAANOWNCSVLINIERSCALEDDXFFORMIDI ///

                        LOCAL_STRINGBUILDER_FOR___22_COLS___SAANOWNCSVLINIERSCALEDDXFFORMIDI

                            .AppendLine

                            (

                           // col 0   track(number categorizing like dxf layers) 

                           //  ,col 1   channel(9 for percussions only 0 to 15 only) 

                           //   ,col 2   patch_number(0 to 127) 

                           //,col 3   patch_name 

                           //,col 3 + pitch_bend_number(0 to 8190 to 16368    original note has no change frequency at 8190) 

                           //,col 3++   note_frequency_linier_y_start_data_OR_START_RADIUS(0, 0, 0 has zero frequency) 

                           //,col 6   note_frequency_linier_y_final_data_OR_FINAL_RADIUS(0, 0, 0 has zero frequency) 

                           //,col 7   note_name_FOUND_FROM_START_SIDES_FREQUENCY 

                           //,col 8   note_start_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE 

                           //,col 9   note_final_time_from_linier_x_data_FROM_THE_DEGREES_ANTICLOCKWISE

                           //,col 10   note_duration_IN_MIDITICKS_CALCULATED_FROM_THE_DEGREES_AND_TOTAL_DURATIONS_MICROSECONDS 

                           //,col 10 + 1   note_velocity_TRICKY_CALCULATION_OR_FROM_LAYERS 

                           //,col 10 + 2   grabbed_lyrics_text_FROM_LAYERS_NAMES_DATA 

                           //,col 10 + 3   grabbed_lyrics_Absolute_times_IN_LAYERS_DATA_FOR_TRACK_ZERO_WITH_MIDITICKS 

                           //,col 10 + 3 + 1   OPTIONAL_MILLISECONDS_DATA_FOR_START

                           //,col 10 + 3 + 2   OPTIONAL_MILLISECONDS_DATA_FOR_FINAL 

                           //,col 10 + 3 + 3   OPTIONAL_MILLISECONDS_DATA_FOR_DURATIONS(normally 100 to 4300 to 30000 etc per notes) 

                           //,col 10 + 3 + 3 + 1  OPTIONAL_NOTE_OR_OTHER_CONTROLLER_LIKE_PITCH_BEND(DECIDER_TO_PROCESS) 

                           //,col 10 + 3 + 3 + 2  OPTIONAL_THE_RAW_MIDI_EVENT_COUNTER_PRESERVED_FOR_SORTING_WHILE_EXPORTING 

                           //,col 10 + 3 + 3 + 3  OPTIONAL_SIN_THETA_ADJUSTED_SLOPE_FOR_VELOCITY_CONTROLLER 

                           //,col 10 + 3 + 3 + 3 + 1  DEGREE_DIFF_TO_TRACK_BLANK_REGIONS 

                           //,col 21  DEGREE_START

                           //,col 22  DEGREE_FINAL



                           Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                          .PUBLIC_INT_TRACK_NUMBER_0_TO_ANY_NUMBER

                            + "," + ChannelNumber

                            + "," + patchNumber

                            + "," + "patchname"

                            + "," + "8192"

                            + "," + ___temp_note_freq_found

                            + "," + ___temp_note_freq_found

                            + "," + "notenames"

                            + "," + (LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS - durationtoassigns_inmiditiks)

                            + "," + LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                           + "," + durationtoassigns_inmiditiks

                           + "," +

                      // Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                     //  .INT_CURRENT_NOTES_VELOCITY_0_TO_127

                      "0"


                           + "," + "lyr"



                            //SINCE ALREADY CUMULATIONS STARTING DONES BEFORE HERES

                            + "," + LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                             + "," + (DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS - temp_durationsarray[r])

                            + "," + DOUBLE_OVERALL_CUMULATIVE_MILLISECONDS_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

                            + "," + temp_durationsarray[r]

                            + "," + "NOTE_OFF"

                            + "," + THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS

                            + ",0.00"

                            + ",0.0"

                            + ",0.0"

                           + ",0.0"


                            );


                        ///////////////////////////////////////////// SPECIAL LOGGER  SAANOWNCSVLINIERSCALEDDXFFORMIDI ///








                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                            +=

                            "\r\ninter cycle Raga notes counter r    = " + r + "\r\n";

                        ;

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                            +=

                            "OVERALL NOTES COUNTER    THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS = " + THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS + "\r\n";

                        ;

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                            +=

                            "   TrackNumber = " + TrackNumber;

                        ;

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                            +=

                            "   ChannelNumber = " + ChannelNumber;

                        ;

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                            +=

                            "   patchNumber = " + patchNumber;

                        ;

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                            +=

                            "   notenumberfromthearray = " + notenumberfromthearray;

                        ;

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                            +=

                            "   NoteVelocity = " + NoteVelocity;

                        ;

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                            +=

                            "   absoluteTime___start___midstksunits = " + absoluteTime___start___midstksunits;

                        ;

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                            +=

                            "   LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS = " + LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS;

                        ;

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                            +=

                            "   durationtoassigns_inmiditiks = " + durationtoassigns_inmiditiks;

                        ;

                        ///////////////////////////////////////////////////// TOO IMPORTANT LIST PRESERVINF THE DATA FOR ALL THE NOTES FOR ADDITIONAL  HANDLING FOR THE NOTES ////////

                        //SAAN THINKS WE NEED TO STORE THESE FOR THE PITCH BENDS CHANGES AND ALSO FOR THE CONTROLLER CHANGES CASES ALSO AND FOR THE NOTE OFF NOTE ON CASES ALSO

                        Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                        .PUBLIC_DOUBLE_CURRENT_NOTE_NUMBER = THE_DOUBLE_POPULATOR_NOTES_COUNTER_FOR_EVERY_INDIVIDUAL_NOTES;

                        Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .LONG_START_ABSOLUTE_TIME_FOR_CURRENT_NOTE

                            = LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS;

                        Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                            .PUBLIC_DOUBLE_CURRENT_EVENT_COUNTER

                            =

                            THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS;

                        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                        .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                        .PUBLIC_STATIC_PERMUTABLES_NOTES_DATA_BUT_PREPRESERVED_RAW_LIST___OF___PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                        .Add

                        (

                        Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

                        );

                        THE_DOUBLE_POPULATOR_NOTES_COUNTER_FOR_EVERY_INDIVIDUAL_NOTES++;

                        ///////////////////////////////////////////////////// TOO IMPORTANT LIST PRESERVINF THE DATA FOR ALL THE NOTES FOR ADDITIONAL  HANDLING FOR THE NOTES ////////

                    }//for (int r = 0; r < temp_notesarray.Length; r++)

                }//for(int loopcyclescounter=0; loopcyclescounter<INT_CURRENT_REPEAT_CYCLES_COUNT; loopcyclescounter++)

                 //////////////////////////////////////////////////////////////////////////////////////////////////////

            }//if(checkBox___TO_AUTOMATICALLY_SAVE_MIDI_FILES.CheckState.ToString().ToUpper()=="CHECKED")

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Maximum = INT_CURRENT_REPEAT_CYCLES_COUNT;

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Value = INT_CURRENT_REPEAT_CYCLES_COUNT;

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Invalidate();

            this.progressBar_FOR_COMPOSER_CYCLES_TRACKING.Refresh();

            //////if (temp_durationsarray.Length>0)

            //////{

            //////            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

            //////            .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

            //////            .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS +=

            //////            "\r\nSAANS_TEMP_currentNoteIndex =" + SAANS_TEMP_currentNoteIndex;

            //////    ////////////////////////////////////////////////////////////////////////////////////////////////////

            //////    if (temp_durationsarray[SAANS_TEMP_currentNoteIndex] > 0)

            //////    {

            //////        SAANS_TEMP_playTimer = new Timer

            //////        {

            //////            // Interval = SAANS_TEMP_duration // Set the timer interval to the duration of each note  /// I NEED TO collect the durations from the index of the durations array

            //////            //  Interval = Math.Max(SAANS_TEMP_duration,(int)temp_durationsarray[SAANS_TEMP_currentNoteIndex]  )  //SAANS_TEMP_duration // Set the timer interval to the duration of each note  /// I NEED TO collect the durations from the index of the durations array

            //////            Interval =  (int)temp_durationsarray[SAANS_TEMP_currentNoteIndex]

            //////        };

            //////    }

            //////    else

            //////    {

            //////        SAANS_TEMP_playTimer = new Timer

            //////        {

            //////            Interval = SAANS_TEMP_duration // Set the timer interval to the duration of each note  /// I NEED TO collect the durations from the index of the durations array

            //////            // Interval = (int)temp_durationsarray[SAANS_TEMP_currentNoteIndex]    //SAANS_TEMP_duration // Set the timer interval to the duration of each note  /// I NEED TO collect the durations from the index of the durations array

            //////        };

            //////    }//end of else of if(temp_durationsarray[SAANS_TEMP_currentNoteIndex]>0)

            //////     ////////////////////////////////////////////////////////////////////////////////////////////////////

            //////}

            //////else

            //////{

            //////    SAANS_TEMP_playTimer = new Timer

            //////    {

            //////        Interval = SAANS_TEMP_duration // Set the timer interval to the duration of each note  /// I NEED TO collect the durations from the index of the durations array

            //////        // Interval = (int)temp_durationsarray[SAANS_TEMP_currentNoteIndex]    //SAANS_TEMP_duration // Set the timer interval to the duration of each note  /// I NEED TO collect the durations from the index of the durations array

            //////    };

            //////}//end of else of  if(temp_durationsarray.Length>0)

            //////SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

            //////.PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

            //////.PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS +=

            //////"\r\nSAANS_TEMP_playTimer.Interval =" + SAANS_TEMP_playTimer.Interval;

            //////SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

            //////.PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

            //////.PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS +=

            //////"\r\nSAANS_TEMP_currentNoteIndex = " + SAANS_TEMP_currentNoteIndex;

            // Start playing the MIDI sequence

            //dont call this   SAANS_TEMP_currentNoteIndex = 0;

            //TO DO WITH THIS

            //   SAANS_TEMP_SAANAUDS_Midi_MidiOut.Volume

            //////SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

            //////.PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

            //////.PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS +=

            //////"\r\nSAANS_TEMP_playTimer.Tick += PlayNextNote; ";

            //  SAANS_TEMP_playTimer.Start();

            //   SAANS_TEMP_playTimer.Tick += PlayNextNote;

            ////// SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

            //////.PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

            //////.PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS +=

            //////" SAANS_TEMP_playTimer.Start();";

            if (SAANS_TEMP_currentNoteIndex >= SAAN_TEMPS_midiNotes.Length)

            {

                // SAANS_TEMP_midiOut.Send(MidiMessage.StopNote(midiNotes[currentNoteIndex - 1], 127).RawData);

                ///  SAANS_TEMP_midiOut.Send(SAANAUDS.Midi.MidiMessage.StopNote(SAAN_TEMPS_midiNotes[SAANS_TEMP_currentNoteIndex - 1], 127, 1).RawData);

                ///  

                SAANS_TEMP_currentNoteIndex = 0;

                // Clean up resources

                try

                {

                    SAANS_TEMP_SAANAUDS_Midi_MidiOut.Dispose();

                    SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                   .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                   .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS +=

                   "   after SAANS_TEMP_SAANAUDS_Midi_MidiOut.Dispose();";

                }

                catch (Exception ___excp)

                {

                }//catch(Exception ___excp)

            }//if (SAANS_TEMP_currentNoteIndex > 0 && SAANS_TEMP_currentNoteIndex < SAAN_TEMPS_midiNotes.Length)

            /////////////////////////////////////////////////////////////

            /////////////////////////////////////////////////////////////

            /////////////////////////////////////////////////////////////            

            save_current_composer_datagrids_state_to_files("");//default files names at saan folders

            /////////////////////////////////////////////////////////////

            /////////////////////////////////////////////////////////////

            /////////////////////////////////////////////////////////////    

            if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

            {

                System.Windows.Forms.MessageBox.Show

                    (

                     "playslogs\r\n" +

                        SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                       .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                       .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                    );

            }//if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

            System.IO.File.WriteAllText

                (

                ___dummyfilesnamesformids + "_flows_logs.txt"

                ,

            SAANS_ROUGH_BEATS_COMPOSER_FOR_ON_SELECTIONS_LOOP_CYCLES

                .PUBLIC_STATIC_CLASS_TO_PRELISTEN_HANDLING

                .PUBLIC_STATIC_STRING_TO_REPORT_PLAY_STATUS_LOGS

                );


































            ////////////////////////////////////////////////////////////////////////

            ////////////StringBuilder ___strbldr_for____velocity_free______dot_no_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

            ////////////    = new StringBuilder();

            ////////////___strbldr_for____velocity_free______dot_no_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

            ////////////    .Clear();

            //////___strbldr_for____velocity_free______dot_no_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

            //////    .AppendLine

            //////    (

            //////    LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

            //////    + "######" +

            //////    durationtoassigns_inmiditiks

            //////    + "######" +

            //////    ___temp_note_freq_found

            //////    );


            ////////////StringBuilder ___strbldr_for____with_velocity______dot_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

            ////////////      = new StringBuilder();

            ////////////___strbldr_for____with_velocity______dot_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

            ////////////    .Clear();



            //////___strbldr_for____with_velocity______dot_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

            //////    .AppendLine

            //////    (

            //////    LONG_OVERALL_CUMULATIVE_START_TIMES_ABSOLUTE_TIMER_CALCULATIONS

            //////    + "######" +

            //////    durationtoassigns_inmiditiks

            //////    + "######" +

            //////    ___temp_note_freq_found

            //////    + "######" +


            //////        Object_of_PUBLIC_CLASS_TO_LOAD_FOR_PRELISTENS_SINGLE_ROWS_NOTE_DATA_DETAILS

            //////        .INT_CURRENT_NOTES_VELOCITY_0_TO_127

            //////        /

            //////        127


            //////    );


            ////////////////////////////////////////////////////////////////////////






















































































































            ////////////////////////////////////////////////////////////

            System.IO.File.WriteAllText

                (

            this.___selected_filesnames_for_INDINOTATIONS_OR_INDITALAS

                + ".no_velocity_flutes_melody_data"

                ,

                ___strbldr_for____velocity_free______dot_no_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                .ToString()

                );

            ////////////////////////////////////////////////////////////


            ////////////////////////////////////////////////////////////

            System.IO.File.WriteAllText

                (

            this.___selected_filesnames_for_INDINOTATIONS_OR_INDITALAS

                + ".with_velocity_flutes_melody_data"

                ,

                ___strbldr_for____with_velocity______dot_velocity_flutes_melody_data___start_millis_six_hash_durations_millis_six_hash_freq_to_play

                .ToString()

                );

            ////////////////////////////////////////////////////////////  

            ///


            System.Windows.Forms.MessageBox.Show

                (

                "SPECIAL TWO FILES ARE SAVED\r\n\r\n\r\n"

                + this.___selected_filesnames_for_INDINOTATIONS_OR_INDITALAS

                + ".no_velocity_flutes_melody_data"


                + "\r\n\r\n\r\n" +


                "SPECIAL TWO FILES ARE SAVED\r\n\r\n\r\n"

                + this.___selected_filesnames_for_INDINOTATIONS_OR_INDITALAS

                + ".with_velocity_flutes_melody_data"

                );


            ////////////////////////////////////////////////////////////

            System.IO.File.WriteAllText

                        (

                        ___dummyfilesnamesformids + "_flows_logs.SAANOWNCSVLINIERSCALEDDXFFORMIDI"

                        ,

                        LOCAL_STRINGBUILDER_FOR___22_COLS___SAANOWNCSVLINIERSCALEDDXFFORMIDI

                        .ToString()

                        );

                        ////////////////////////////////////////////////////////////



            



            SAANSMIDSEVENTScollection.PrepareForExport();

            SAANAUDS.Midi.MidiFile.Export(___dummyfilesnamesformids, SAANSMIDSEVENTScollection);

            if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

            {

                System.Windows.Forms.MessageBox.Show("midi files saved at " + ___dummyfilesnamesformids);

            }//if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

            this.button___PLAY_MIDI_STREAMS.Enabled = true;

        }//private void button___PLAY_MIDI_STREAMS_Click(object sender, EventArgs e)



specially follow the function here

    public void PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG(double START_ABSOLUTE_START_TIME_MILISECONDS, double MILLISECONDS_TO_MIDITIKS_MULTIPLIER)

        //,int INT_MILLISECOND_TOLERANCE_FOR_RIPPLES_PITCHBENDS,int INT_UPSIDE_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES,int INT_DOWNSIES_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES

        {

            Console.WriteLine("public void PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG(double START_ABSOLUTE_START_TIME_MILISECONDS,double MILLISECONDS_TO_MIDITIKS_MULTIPLIER)");

            Console.WriteLine(" START_ABSOLUTE_START_TIME_MILISECONDS = " + START_ABSOLUTE_START_TIME_MILISECONDS);

            Console.WriteLine(" MILLISECONDS_TO_MIDITIKS_MULTIPLIER = " + MILLISECONDS_TO_MIDITIKS_MULTIPLIER);

            Console.WriteLine(" this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY = " + this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY);

            int INT_MILLISECOND_TOLERANCE_FOR_RIPPLES_PITCHBENDS = (int)this.PUBLIC_DOUBLE____Column_PITCHBEND_JERKS_MILLIS_GAP;

            int INT_UPSIDE_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES = this.PUBLIC_INT___Column_JUERK_UP_PITCHBEND;

            int INT_DOWNSIES_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES = this.PUBLIC_INT___Column_JERK_DOWNS_PITCH_BEND;

            Console.WriteLine("INT_MILLISECOND_TOLERANCE_FOR_RIPPLES_PITCHBENDS = " + INT_MILLISECOND_TOLERANCE_FOR_RIPPLES_PITCHBENDS);

            Console.WriteLine(" INT_UPSIDE_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES = " + INT_UPSIDE_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES);

            Console.WriteLine(" INT_DOWNSIES_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES = " + INT_DOWNSIES_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES);

            this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                            .Clear();

            this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                            .Clear();

            this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                            .Clear();

            //////for references   double START_ABSOLUTE_START_TIME_MILISECONDS

            //////for references  ,double MILLISECONDS_TO_MIDITIKS_MULTIPLIER

            //////for references  ,int CURRENT_NOTE_NUMBER

            //////for references  ,int INT_MILLISECOND_TOLERANCE_FOR_RIPPLES_PITCHBENDS

            //////for references  ,int INT_UPSIDE_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES

            //////for references  ,int INT_DOWNSIES_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES

            double ___TEMP___DOUBLE_FREQUENCY_FOUND

                        =

                        SAANAUDS.PUBLIC_STATIC_CLASS_TO_GENERATE_CSVMIDI_LIKE_SAANDATA

                        .

                        // PUBLIC_STATIC_STRING___RETURN_NOTE_FREQUENCY_FROM___1_values_up_down_not_necessary___indexes_since_my_array_is_1_to_128___NOTE_NUMBER___PUBLIC_STATIC_STRING_ARRAY_FOR_SAAN_NOTES_MAPPER

                        PUBLIC_STATIC_DOUBLE___RETURN_NOTE_FREQUENCY_FROM___1_values_up_down_not_necessary___indexes_since_my_array_is_1_to_128___NOTE_NUMBER___PUBLIC_STATIC_STRING_ARRAY_FOR_SAAN_NOTES_MAPPER

                        (

                           // CURRENT_NOTE_NUMBER

                           this.INT_NOTE_NUMBER_TO_PLAY_0_TO_127

                       )

                        ;

            double ___temp_local_double_current_notes_total_duration = this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY;

            //HERE WE WILL UPDATE THE PITCH BENDS AND OTHER DATA WITH THIS

            string ___local_raw_string_for_pitchbend_durations_before_splitters = "";

            string ___local_raw_string_for_pitchbend_data_before_splitters = "";

            string[] ___local_array_of_string_tokens_splitted_string_for_pitchbend_durations_before_splitters = { };

            string[] ___local_array_of_string_tokens_splitted_string_for_pitchbend_data_before_splitters = { };

            double[] ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters = { };

            double[] ___local_array_of_double_tokens_splitted_string_for_pitchbend_data_before_splitters = { };

            int tocountsuccessfulconvertionsofdurations = 0;

            int tocountsuccessfulconvertionsofpitchbendsdata = 0;

            //___temp_local_double_current_notes_total_duration

            ___local_raw_string_for_pitchbend_durations_before_splitters

                = this.STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_PERCENTAGES_DURATIONS;

            ___local_raw_string_for_pitchbend_data_before_splitters

                = this.STRING_COMMA_SEPERATED_WITHIN_NOTES_PITCH_BENDS_VALUES;

            Console.WriteLine(" ___local_raw_string_for_pitchbend_durations_before_splitters = " + ___local_raw_string_for_pitchbend_durations_before_splitters);

            Console.WriteLine(" ___local_raw_string_for_pitchbend_data_before_splitters = " + ___local_raw_string_for_pitchbend_data_before_splitters);

            ///////////////////////////////////////////////////////////////////////////////////////////////////////////

            if (___local_raw_string_for_pitchbend_durations_before_splitters.TrimEnd().TrimStart().Trim() == "")

            {

                ___local_raw_string_for_pitchbend_durations_before_splitters

                    = "0;100";

            }//if (___local_raw_string_for_pitchbend_durations_before_splitters.TrimEnd().TrimStart().Trim()=="")

            if (___local_raw_string_for_pitchbend_data_before_splitters.TrimEnd().TrimStart().Trim() == "")

            {

                ___local_raw_string_for_pitchbend_data_before_splitters

                    = "8192;8192";

            }// if(___local_raw_string_for_pitchbend_data_before_splitters.TrimEnd().TrimStart().Trim()=="")

            ///////////////////////////////////////////////////////////////////////////////////////////////////////////

            ___local_array_of_string_tokens_splitted_string_for_pitchbend_durations_before_splitters

               =

               ___local_raw_string_for_pitchbend_durations_before_splitters

               .Split(new string[] { ",", ";", "#" }, StringSplitOptions.RemoveEmptyEntries);

            ;

            ___local_array_of_string_tokens_splitted_string_for_pitchbend_data_before_splitters

               =

               ___local_raw_string_for_pitchbend_data_before_splitters

                .Split(new string[] { ",", ";", "#" }, StringSplitOptions.RemoveEmptyEntries);

            ;

            /////////////////////////////////////////////////////////////////////////////////////////////

            int numbersofobjectstokensindurationspercentages =

                ___local_array_of_string_tokens_splitted_string_for_pitchbend_durations_before_splitters.Length;

            Console.WriteLine(" ___local_array_of_string_tokens_splitted_string_for_pitchbend_durations_before_splitters.Length = " + ___local_array_of_string_tokens_splitted_string_for_pitchbend_durations_before_splitters.Length);

            Console.WriteLine(" ___local_array_of_string_tokens_splitted_string_for_pitchbend_data_before_splitters.Length = " + ___local_array_of_string_tokens_splitted_string_for_pitchbend_data_before_splitters.Length);

            List<double> ___temp___double_type_percentages_of_time_points = new List<double>();

            ___temp___double_type_percentages_of_time_points.Clear();

            if (

                ___local_array_of_string_tokens_splitted_string_for_pitchbend_durations_before_splitters.Length

                !=

                ___local_array_of_string_tokens_splitted_string_for_pitchbend_data_before_splitters

                .Length

                )

            {

                Console.WriteLine(" ___local_array_of_string_tokens_splitted_string_for_pitchbend_durations_before_splitters.Length = " + ___local_array_of_string_tokens_splitted_string_for_pitchbend_durations_before_splitters.Length);

                Console.WriteLine(" ___local_array_of_string_tokens_splitted_string_for_pitchbend_data_before_splitters.Length = " + ___local_array_of_string_tokens_splitted_string_for_pitchbend_data_before_splitters.Length);

                Console.WriteLine(" will return doing nothing for pitchbends array sizes dont match");

                return;

                //do nothing for such cases

            }

            else

            {

                /// here we are because both the splitted strings array are of same lengths

                /// here we are because both the splitted strings array are of same lengths

                /// here we are because both the splitted strings array are of same lengths

                ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                   = new double[numbersofobjectstokensindurationspercentages];

                ___local_array_of_double_tokens_splitted_string_for_pitchbend_data_before_splitters

                   = new double[numbersofobjectstokensindurationspercentages];

                //////////////////////////////////////////////////////////////////////////////////////////

                this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                    = new List<double>();

                this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                    .Clear();

                //////////////////////////////////////////////////////////////////////////////////////////

                this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                    = new List<int>();

                this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                    .Clear();

                //////////////////////////////////////////////////////////////////////////////////////////

                ///

                //////////////////////////////////////////////////////////////////////////////////////////

                this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                    = new List<double>();

                this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                 .Clear();

                //////////////////////////////////////////////////////////////////////////////////////////

                this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                    = new List<long>();

                this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                    .Clear();

                //////////////////////////////////////////////////////////////////////////////////////////

                //////////////////////////////////////////////////////////////////////////////////////////

                try

                {

                    //////___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                    //////   = new double[numbersofobjectstokensindurationspercentages];

                    //////___local_array_of_double_tokens_splitted_string_for_pitchbend_data_before_splitters

                    //////   = new double[numbersofobjectstokensindurationspercentages];

                    for (int populator_ptchbnd = 0; populator_ptchbnd < numbersofobjectstokensindurationspercentages; populator_ptchbnd++)

                    {

                        try

                        {

                            ////////////////////////////////////////////////////////////////////////////////////////////////////

                            ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                                [populator_ptchbnd]

                                =

                                Convert.ToDouble

                                (

                                    ___local_array_of_string_tokens_splitted_string_for_pitchbend_durations_before_splitters

                                    [populator_ptchbnd]

                                );

                            //////////////////////////////////////////// this is ade to guarantee that all the times durations percentages are in increasing order even the typing wrong //////

                            //////////////////////////////////////////// this is ade to guarantee that all the times durations percentages are in increasing order even the typing wrong //////

                            //////////////////////////////////////////// this is ade to guarantee that all the times durations percentages are in increasing order even the typing wrong //////

                            ///

                            ___temp___double_type_percentages_of_time_points

                                .Add

                                (

                             ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                                [populator_ptchbnd]

                                );

                            //////////////////////////////////////////// this is ade to guarantee that all the times durations percentages are in increasing order even the typing wrong //////

                            //////////////////////////////////////////// this is ade to guarantee that all the times durations percentages are in increasing order even the typing wrong //////

                            //////////////////////////////////////////// this is ade to guarantee that all the times durations percentages are in increasing order even the typing wrong //////

                            tocountsuccessfulconvertionsofdurations++;

                            Console.WriteLine("populating   tocountsuccessfulconvertionsofdurations = " + tocountsuccessfulconvertionsofdurations + "   " + ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters[populator_ptchbnd]);

                            ////////////////////////////////////////////////////////////////////////////////////////////////////

                        }

                        catch (Exception _convertions_of_pitchbends_data)

                        {

                            //cannot use this here since it is not in the Form class

                            //cannot use this here since it is not in the Form class

                            //cannot use this here since it is not in the Form class

                            //                        if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

                            // {

                            // }

                            //  System.Windows.Forms.MessageBox.Show("_convertions_of_pitchbends_data = " + _convertions_of_pitchbends_data.Message + "   " + _convertions_of_pitchbends_data.StackTrace.ToString());

                            Console.WriteLine("errors   _convertions_of_pitchbends_data = " + _convertions_of_pitchbends_data.Message + "   " + _convertions_of_pitchbends_data.StackTrace.ToString());

                        }//catch(Exception _convertions_of_pitchbends_data)

                        try

                        {

                            ////////////////////////////////////////////////////////////////////////////////////////////////////

                            ///// these are the pitch bends data so never sort this array nor calculate things otherwise

                            ///simply take these data  0 to 8192 to 16384 strict note this

                            ___local_array_of_double_tokens_splitted_string_for_pitchbend_data_before_splitters

                                [populator_ptchbnd]

                                =

                                Convert.ToDouble

                                (

                                   ___local_array_of_string_tokens_splitted_string_for_pitchbend_data_before_splitters

                                    [populator_ptchbnd]

                                );

                            tocountsuccessfulconvertionsofpitchbendsdata++;

                            Console.WriteLine("populating   tocountsuccessfulconvertionsofpitchbendsdata = " + tocountsuccessfulconvertionsofpitchbendsdata + "   " + ___local_array_of_double_tokens_splitted_string_for_pitchbend_data_before_splitters[populator_ptchbnd]);

                            ////////////////////////////////////////////////////////////////////////////////////////////////////

                        }

                        catch (Exception _convertions_of_pitchbends_data)

                        {

                            //cannot use this here since it is not in the Form class

                            //cannot use this here since it is not in the Form class

                            //cannot use this here since it is not in the Form class

                            //                        if (this.checkBox___ON_CLICK_SHOW_MESSAGEBOX_REPORT.CheckState.ToString().ToUpper() == "CHECKED")

                            // {

                            // }

                            //  System.Windows.Forms.MessageBox.Show("_convertions_of_pitchbends_data = " + _convertions_of_pitchbends_data.Message + "   " + _convertions_of_pitchbends_data.StackTrace.ToString());

                            Console.WriteLine("error      _convertions_of_pitchbends_data = " + _convertions_of_pitchbends_data.Message + "   " + _convertions_of_pitchbends_data.StackTrace.ToString());

                        }//catch(Exception _convertions_of_pitchbends_data)

                    }//for(int populator_ptchbnd=0; populator_ptchbnd<numbersofobjectstokensindurationspercentages; populator_ptchbnd++)

                     ///////////////////////////////////////////////////////////////////////////////////////////

                     ///////////////////////////////////////////////////////////////////////////////////////////

                     ///////////////////////////////////////////////////////////////////////////////////////////             

                }

                catch (Exception _convertions_of_pitchbends_data)

                {

                }//catch(Exception _convertions_of_pitchbends_data)

                ////////////////////////////////////////////////////////////////////////////////////////////////////////

                ////////////////////////////////////////////////////////////////////////////////////////////////////////

                ////////////////////////////////////////////////////////////////////////////////////////////////////////                

                if (tocountsuccessfulconvertionsofdurations != tocountsuccessfulconvertionsofpitchbendsdata)

                {

                    Console.WriteLine("tocountsuccessfulconvertionsofdurations = " + tocountsuccessfulconvertionsofdurations + "\r\ntocountsuccessfulconvertionsofpitchbendsdata = " + tocountsuccessfulconvertionsofpitchbendsdata);

                    return;

                    Console.WriteLine("the convertions of two data are not of same sizes");

                }

                else

                {

                    // here we enter when all the convertions are properly done

                    //SINCE BOTH THE CONVERTIONS ARE SUCCESSFUL SO WE WILL POPULATE THE LISTS HERE

                    //for references    this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                    //for references      = new List<double>();

                    //for references  this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                    //for references      .Clear();

                    //for references

                    //for references this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                    //for references   = new List<int>();

                    //for references this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                    //for references    .Clear();

                    ////////////////////////////////////////////////////////////////////////////////////////////////

                    //for references this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                    //for references   = new List<long>();

                    //for references this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                    //for references    .Clear();

                    Array.Clear

                        (

                        ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                        ,

                        0

                        ,

                        ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                        .Length

                        );

                    ///////////////////////////////////////////////////////// these guarantees that the time percentages of points are always sorte ascending

                    ___temp___double_type_percentages_of_time_points

                        .Sort();

                    ///////////////////////////////////////////////////////// these guarantees that the time percentages of points are always sorte ascending

                    ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                        =

                        ___temp___double_type_percentages_of_time_points

                        .ToArray<double>();

                    ///////////////////////////////////////////////////////// these guarantees that the time percentages of points are always sorte ascending

                    /////////////// pre conditioning the lists initial sides of the note//////////////////////////////////////////////

                    /////////////// pre conditioning the lists initial sides of the note//////////////////////////////////////////////

                    /////////////// pre conditioning the lists initial sides of the note//////////////////////////////////////////////                    

                    ////////////////////////////////////////////////////////////////////////////////////////

                    if (

                    ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                       [0] != 0

                        )

                    {

                        ////////////////////////////////////////////////////////////////////////////////////////

                        this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                            .Add

                            (

                                     0.00

                            );

                        ////////////////////////////////////////////////////////////////////////////////////////

                        this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                            .Add

                            (

                            START_ABSOLUTE_START_TIME_MILISECONDS

                            );

                        ////////////////////////////////////////////////////////////////////////////////////////

                        this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                          .Add

                            (

                            8192

                            );

                        ////////////////////////////////////////////////////////////////////////////////////////

                        /////////////////////////////////////////////////////////////////////////////////////////////////////

                        this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                            .Add

                            (

                            (long)

                            (

                             //////caution these miliseconds data are double types

                             (START_ABSOLUTE_START_TIME_MILISECONDS * MILLISECONDS_TO_MIDITIKS_MULTIPLIER)

                             +

                             /////////////////////////// since the data here are percentages of total durations //////////////

                             //////___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                             //////    [0]

                             0

                                * (0.01)

                                * this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY

                                * MILLISECONDS_TO_MIDITIKS_MULTIPLIER

                              )

                            );

                    }

                    //////if (

                    ////// ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                    //////    [0] != 0

                    //////     )

                    ////////////////////////////////////////////////////////////////////////////////////////

                    /// CAUTION  we will do the end sides at the end of this for loop ////////////////

                    /// CAUTION  we will do the end sides at the end of this for loop ////////////////

                    /// CAUTION  we will do the end sides at the end of this for loop ////////////////

                    //trying to add the ripples

                    //   if(numbersofobjectstokensindurationspercentages>2)

                    if (numbersofobjectstokensindurationspercentages >= 2)

                    {

                        //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                        ///we have to assign the intermediate ripples forward sides only

                        try

                        {

                            //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                            ///we have to assign the intermediate ripples forward sides only

                            //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                            ///we have to assign the intermediate ripples forward sides only

                            //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                            ///we have to assign the intermediate ripples forward sides only                            

                            //  for (int SUCCESSFUL_populator_ptchbnd = 0; SUCCESSFUL_populator_ptchbnd < numbersofobjectstokensindurationspercentages; SUCCESSFUL_populator_ptchbnd++)

                            //  for (int SUCCESSFUL_populator_ptchbnd = 1; SUCCESSFUL_populator_ptchbnd < (numbersofobjectstokensindurationspercentages-1); SUCCESSFUL_populator_ptchbnd++)

                            for (int SUCCESSFUL_populator_ptchbnd = 0; SUCCESSFUL_populator_ptchbnd < (numbersofobjectstokensindurationspercentages - 1); SUCCESSFUL_populator_ptchbnd++)

                            {

                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                ///we have to assign the intermediate ripples forward sides only

                                Console.WriteLine("SUCCESSFUL_populator_ptchbnd = " + SUCCESSFUL_populator_ptchbnd);

                                Console.WriteLine("SUCCESSFUL_populator_ptchbnd = " + SUCCESSFUL_populator_ptchbnd + "   ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters[SUCCESSFUL_populator_ptchbnd] = " + ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters[SUCCESSFUL_populator_ptchbnd]);

                                //FOR REFERENCES FOR THE RIPPLE EFFECTS

                                //FOR REFERENCES FOR THE RIPPLE EFFECTS

                                //FOR REFERENCES FOR THE RIPPLE EFFECTS

                                //////////////// Add ripple effects

                                //////////////int rippleSteps = 5; // Number of ripple steps

                                //////////////for (int rippleStep = 1; rippleStep <= rippleSteps; rippleStep++)

                                //////////////{

                                //////////////    long rippleTime = ___absolutetimesforpitchbends + (rippleStep * 10); // Adjust the time for ripple effect

                                //////////////    int rippleValue = ptchbndsvals + (int)(Math.Sin(rippleStep * Math.PI / rippleSteps) * 2048); // Sinusoidal ripple effect

                                //////////////    SAANSMIDSEVENTScollection.AddEvent(

                                //////////////        new SAANAUDS.Midi.PitchWheelChangeEvent(

                                //////////////            rippleTime,

                                //////////////            tempchannelnos,

                                //////////////            rippleValue

                                //////////////        ),

                                //////////////        trknos

                                //////////////    );

                                //////////////    THE_DOUBLE_EVENT_COUNTER_TO_TRACK_ALL_INTERMEDIATE_EVENTS_IN_GLOBAL_LISTS++;

                                //////////////    Console.WriteLine("ripple effect  rippleTime = " + rippleTime + "   rippleValue  = " + rippleValue + "   tempchannelnos = " + tempchannelnos + "   trknos = " + trknos);

                                //////////////}//for (int rippleStep = 1; rippleStep <= rippleSteps; rippleStep++)

                                //we will now do the forced ripples intermediates within the points //////

                                //we will now do the forced ripples intermediates within the points //////

                                //we will now do the forced ripples intermediates within the points //////

                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                ///we have to assign the intermediate ripples forward sides only

                                ///

                                /// 

                                /// 

                                /// 

                                /// 

                                /// 

                                /////////////////////////////////////////////////////////////////////////////////////////////////////

                                //////cautions note that  int SUCCESSFUL_populator_ptchbnd = 0; SUCCESSFUL_populator_ptchbnd < (numbersofobjectstokensindurationspercentages-1); SUCCESSFUL_populator_ptchbnd++

                                /// SUCCESSFUL_populator_ptchbnd   = 0 to 

                                /// SUCCESSFUL_populator_ptchbnd  < (numbersofobjectstokensindurationspercentages-1)

                                /////////////////////////////////////////////////////////////////////////////////////////////////////

                                this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                            .Add

                            (

                            ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                                [SUCCESSFUL_populator_ptchbnd]

                            );

                                Console.WriteLine("Adding to   this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS.Last = " + this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS.Last().ToString());

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////                                

                                this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                                      .Sort();

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA ////////////// 

                                ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

                                this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                                  .Add

                                  (

                                   //////caution these miliseconds data are double types

                                   START_ABSOLUTE_START_TIME_MILISECONDS

                             ///no i tried to do jugad its wrong    * (SUCCESSFUL_populator_ptchbnd - 1)

                             +

                                 /////////////////////////// since the data here are percentages of total durations //////////////

                                 (___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                                      [SUCCESSFUL_populator_ptchbnd]

                                      * (0.01)

                                      * (this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY)

                                      )

                                  // +

                                  //  3

                                  // to avoid the pitch bends starts before notes are started 

                                  );

                                Console.WriteLine("Adding to   this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS.Last = " + this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS.Last().ToString());

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////                                

                                this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                                      .Sort();

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA ////////////// 

                                Console.WriteLine("checking (START_ABSOLUTE_START_TIME_MILISECONDS * MILLISECONDS_TO_MIDITIKS_MULTIPLIER) = " + (START_ABSOLUTE_START_TIME_MILISECONDS * MILLISECONDS_TO_MIDITIKS_MULTIPLIER));

                                Console.WriteLine("checking___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters [ " + SUCCESSFUL_populator_ptchbnd + " ] = " + ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters[SUCCESSFUL_populator_ptchbnd]);

                                Console.WriteLine("checking___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters [ " + SUCCESSFUL_populator_ptchbnd + " ]* (0.01) = " + ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters[SUCCESSFUL_populator_ptchbnd] * (0.01));

                                Console.WriteLine("all multiplications output = " + ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters[SUCCESSFUL_populator_ptchbnd] * (0.01) * (START_ABSOLUTE_START_TIME_MILISECONDS * MILLISECONDS_TO_MIDITIKS_MULTIPLIER));

                                //saan finds this is very large data 

                                //this is for the long type miditks data types converting the millis to midits and then populating these

                                //this is for the long type miditks data types converting the millis to midits and then populating these

                                //this is for the long type miditks data types converting the millis to midits and then populating these

                                /////////////////////////////////////////////////////////////////////////////////////////////////////

                                this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                                    .Add

                                    (

                                    (long)

                                    (

                                     //////caution these miliseconds data are double types

                                     (START_ABSOLUTE_START_TIME_MILISECONDS * MILLISECONDS_TO_MIDITIKS_MULTIPLIER)

                                     ///no i tried to do jugad its wrong  *(SUCCESSFUL_populator_ptchbnd-1)

                                     +

                                   /////////////////////////// since the data here are percentages of total durations //////////////

                                   (

                                   (___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                                        [SUCCESSFUL_populator_ptchbnd]

                                        * (0.01)

                                        )

                                        * this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY

                                        * MILLISECONDS_TO_MIDITIKS_MULTIPLIER)

                                      //  +

                                      // 3

                                      // to avoid the pitch bends starts before notes are started 

                                      )

                                    );

                                /////////////////////////////////////////////////////////////////////////////////////////////////////

                                ///

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////                                

                                this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                                      .Sort();

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA ////////////// 

                                Console.WriteLine("MILLISECONDS_TO_MIDITIKS_MULTIPLIER = " + MILLISECONDS_TO_MIDITIKS_MULTIPLIER + "   this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY = " + this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY + "   SUCCESSFUL_populator_ptchbnd = " + SUCCESSFUL_populator_ptchbnd + " ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters[ " + SUCCESSFUL_populator_ptchbnd + "]  = " + ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters[SUCCESSFUL_populator_ptchbnd] + "     Adding to    this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE.Last = " + this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE.Last().ToString());

                                /////////////////////////////////////////////////////////////////////////////////////////////////////

                                /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                /////////////////////////////////////////////////////////////////////////////////////////////////////

                                this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                            .Add

                            (

                           /// these are the pitch bends data  not the percentages

                           (int)

                            ___local_array_of_double_tokens_splitted_string_for_pitchbend_data_before_splitters

                                [SUCCESSFUL_populator_ptchbnd]

                            );

                                /////////////////////////////////////////////////////////////////////////////////////////////////////

                                /////////////////////////////////////////////////////////////////////////////////////////////////////

                                /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                ////////////////////////////////////////////////////////////////////////////////////////////////////////

                                Console.WriteLine("Adding to    this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS.Last = " + this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS.Last().ToString());

                                ///////////////////////////////////////////////// the values are already populated an now we will put the intermediate ripple effects for the ata ///////////////////////

                                ///////////////////////////////////////////////// the values are already populated an now we will put the intermediate ripple effects for the ata ///////////////////////

                                ///////////////////////////////////////////////// the values are already populated an now we will put the intermediate ripple effects for the ata ///////////////////////

                                ///references    int SUCCESSFUL_populator_ptchbnd = 0; SUCCESSFUL_populator_ptchbnd < (numbersofobjectstokensindurationspercentages - 1);

                                ///references      double START_ABSOLUTE_START_TIME_MILISECONDS

                                //////references   ,double MILLISECONDS_TO_MIDITIKS_MULTIPLIER

                                //////references   ,int INT_MILLISECOND_TOLERANCE_FOR_RIPPLES_PITCHBENDS

                                //////references   ,int INT_UPSIDE_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES

                                //////references   ,int INT_DOWNSIES_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES

                                //REFERENCES  this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                                //REFERENCES  this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                                //REFERENCES   this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                                //we are already inside  for (int SUCCESSFUL_populator_ptchbnd = 0; SUCCESSFUL_populator_ptchbnd < (numbersofobjectstokensindurationspercentages - 1); SUCCESSFUL_populator_ptchbnd++)

                                // upto now we have populated the data to the lists

                                //SUCCESSFUL_populator_ptchbnd starts at 0

                                //SUCCESSFUL_populator_ptchbnd < (numbersofobjectstokensindurationspercentages - 1)

                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                ///we have to assign the intermediate ripples forward sides only

                                ///

                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                ///we have to assign the intermediate ripples forward sides only

                                ///

                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                ///we have to assign the intermediate ripples forward sides only

                                ///

                                //double ensuring the conditions to apply the ripples to the pitch bends

                                //double ensuring the conditions to apply the ripples to the pitch bends

                                //double ensuring the conditions to apply the ripples to the pitch bends

                                if (SUCCESSFUL_populator_ptchbnd >= 0 && SUCCESSFUL_populator_ptchbnd < (numbersofobjectstokensindurationspercentages - 1))

                                {

                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                    ///we have to assign the intermediate ripples forward sides only

                                    try

                                    {

                                        //CAUTION  we have to do from start OF PITCH BEND POINT   TIME to next  PITCH BEND POINT TIME

                                        //CAUTION  we have to do from start OF PITCH BEND POINT   TIME to next  PITCH BEND POINT TIME

                                        //CAUTION  we have to do from start OF PITCH BEND POINT   TIME to next  PITCH BEND POINT TIME

                                        double ___temp_ripple_time_millis_starts = 0;//flushing data

                                        double ___temp_ripple_time_millis_completes = 0;//flushing data

                                        double ___total_millis_for_this_start_to_final_of_pitchbends_points = 0;//flushing data

                                        double ___temp_each_ripple_time_millis_gap_input = 0;//flushing data

                                        int ___previous_is_current_pitch_bends_data___within_0_8192_16384_range = 0;//flushing data

                                        int ___next_pitch_bends_data___within_0_8192_16384_range = 0;//flushing data

                                        double ___temp_double_types_pitchbend_differences_from___orevs_as_current_to_next = 0;//flushing data

                                        int ___temp_current_notes_ripples_up_jumper_number_input = 0;//flushing data

                                        int ___temp_current_notes_ripples_down_jumper_number_input = 0;//flushing data

                                        // THIS IS TO CALCULATE THE TIME FOR THE RIPPLES POINTS

                                        double ___temp_double_FOR_R_TH___RIPPLES_POINT___CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple = 0;//flushing data

                                        double ___temp_double_calculated_current______millisecond_for_____to_assign_for_current_ripple = 0;//flushing data

                                        double ___temp_long_calculated_current______miditiks_for_____to_assign_for_current_ripple = 0;//flushing data

                                        int ___temp_int_calculated_CENTER_TREND_LINES____VALUES_OF_PITCHBEND___current______pitchbend_data_for_____to_assign_for_current_ripple = 0;//flushing data

                                        int ___temp_actual_pitch_bend_assigned_for_current_ripple = 8092;

                                        int number_of_ripples_calculated___within_splitted_slabs = 0;//flushing data

                                        double ___double_type_slope_found___negative_or_positive_tan_theta = 0;//flushing data

                                        //we assume that the times are always increasing since we have already sorted the lists of the times

                                        //caution never sort the 

                                        //references   int pitchBend1 = 8192; // Pitch bend value at t1 (center position)

                                        //references    int pitchBend2 = 16384; // Pitch bend value at t2 (maximum pitch bend

                                        //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                        ///we have to assign the intermediate ripples forward sides only

                                        ___temp_ripple_time_millis_starts

                                        =

                                        //CAUTION  cannot get from here   this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                                        //CAUTION  cannot get from here    .Last();

                                        //////caution these miliseconds data are double types

                                        START_ABSOLUTE_START_TIME_MILISECONDS

                                        +

                                        /////////////////////////// since the data here are percentages of total durations //////////////

                                        ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                                        [SUCCESSFUL_populator_ptchbnd]

                                        * (0.01)

                                        * (this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY);

                                        //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                        ///we have to assign the intermediate ripples forward sides only

                                        ///////////////////////////// CAUTION THE TRICKS IS HERE  ////////////////////////////

                                        ___temp_ripple_time_millis_completes

                                        =

                                        //CAUTION  cannot get from here   this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                                        //CAUTION  cannot get from here    .Last();

                                        //////caution these miliseconds data are double types

                                        ///

                                        //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                        ///we have to assign the intermediate ripples forward sides only

                                        ///

                                      (START_ABSOLUTE_START_TIME_MILISECONDS

                                        +

                                        /////////////////////////// since the data here are percentages of total durations //////////////

                                        ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                                        [SUCCESSFUL_populator_ptchbnd + 1]

                                        * (0.01)

                                        * (this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY)

                                        )

                                        ;

                                        //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                        ///we have to assign the intermediate ripples forward sides only

                                        //////////////////////////////////////////////////////////////////////////////////////////////////////

                                        ___total_millis_for_this_start_to_final_of_pitchbends_points

                                            =

                                             (___temp_ripple_time_millis_completes - ___temp_ripple_time_millis_starts);

                                        //////////////////////////////////////////////////////////////////////////////////////////////////////

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        ___temp_double_FOR_R_TH___RIPPLES_POINT___CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple

                                          =

                                         // ___temp_ripple_time_millis_starts;

                                         0;

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////CAUTION CAUTION CAUTION

                                        //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                        ///we have to assign the intermediate ripples forward sides only                                      

                                        ___temp_each_ripple_time_millis_gap_input

                                            =

                                            (double)INT_MILLISECOND_TOLERANCE_FOR_RIPPLES_PITCHBENDS;

                                        //////////////////////////////////////////////////////////////////////////////////////////////////////

                                        //for additional safesides

                                        //for additional safesides

                                        //for additional safesides

                                        //this is necessary to stop the small changes for the notes

                                        //this is necessary to stop the small changes for the notes

                                        //this is necessary to stop the small changes for the notes

                                        if (___temp_each_ripple_time_millis_gap_input > 0)

                                        {

                                            if (___total_millis_for_this_start_to_final_of_pitchbends_points > ___temp_each_ripple_time_millis_gap_input)

                                            {

                                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                ///we have to assign the intermediate ripples forward sides only

                                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                ///we have to assign the intermediate ripples forward sides only

                                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                ///we have to assign the intermediate ripples forward sides only

                                                //CAUTION

                                                //NEVER FLUSH  ___temp_double_CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                //CAUTION

                                                //NEVER FLUSH  ___temp_double_CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                //CAUTION

                                                //NEVER FLUSH  ___temp_double_CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                //DOUBLE  / DOUBLE

                                                number_of_ripples_calculated___within_splitted_slabs

                                                =

                                                (int)

                                                (

                                                ___total_millis_for_this_start_to_final_of_pitchbends_points

                                                / ___temp_each_ripple_time_millis_gap_input

                                                );

                                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                ///we have to assign the intermediate ripples forward sides only

                                                ///

                                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                ///we have to assign the intermediate ripples forward sides only

                                                ///

                                                //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                ///we have to assign the intermediate ripples forward sides only

                                                //////////////////////////////////////////////////////////////////////////////////////////////////////

                                                //additional checks dones

                                                //additional checks dones

                                                //additional checks dones

                                                if (number_of_ripples_calculated___within_splitted_slabs >= 2)

                                                {

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ///

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ///

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ///

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ///

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ///

                                                    ___previous_is_current_pitch_bends_data___within_0_8192_16384_range

                                                    =

                                                    (int)

                                                    ___local_array_of_double_tokens_splitted_string_for_pitchbend_data_before_splitters

                                                    [SUCCESSFUL_populator_ptchbnd];

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ///

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ///

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ///

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ___next_pitch_bends_data___within_0_8192_16384_range

                                                     =

                                                     (int)

                                                    ___local_array_of_double_tokens_splitted_string_for_pitchbend_data_before_splitters

                                                    [SUCCESSFUL_populator_ptchbnd + 1];

                                                    ////////////////////////////////////////////////////////////////////////////////////

                                                    ___temp_double_types_pitchbend_differences_from___orevs_as_current_to_next

                                                        =

                                                       ((double)___next_pitch_bends_data___within_0_8192_16384_range)

                                                        -

                                                        ((double)___previous_is_current_pitch_bends_data___within_0_8192_16384_range)

                                                        ;

                                                    ////////////////////////////////////////////////////////////////////////////////////

                                                    /// these are assigned at this stage since assigning these are not necessary if the previous conditions are not fulfilled

                                                    /// these are assigned at this stage since assigning these are not necessary if the previous conditions are not fulfilled

                                                    /// these are assigned at this stage since assigning these are not necessary if the previous conditions are not fulfilled

                                                    //////////////////////////////////////////////////////////////////////////////////////////////////////

                                                    ___temp_current_notes_ripples_up_jumper_number_input

                                                    =

                                                INT_UPSIDE_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES;

                                                    //////////////////////////////////////////////////////////////////////////////////////////////////////

                                                    ___temp_current_notes_ripples_down_jumper_number_input

                                                    =

                                                  INT_DOWNSIES_RIPPLES_AMPLITUDES_FOR_PITCHBENDS_SCALES;

                                                    //////////////////////////////////////////////////////////////////////////////////////////////////////

                                                    //////////////////    additional checks are dones /////////

                                                    //////////////////    additional checks are dones /////////

                                                    //////////////////    additional checks are dones /////////                                                

                                                    if (___total_millis_for_this_start_to_final_of_pitchbends_points > 0)

                                                    {

                                                        ///double divides double

                                                        ___double_type_slope_found___negative_or_positive_tan_theta

                                                            =

                                                            ___temp_double_types_pitchbend_differences_from___orevs_as_current_to_next

                                                            /

                                                            ___total_millis_for_this_start_to_final_of_pitchbends_points

                                                            ;

                                                        for (int ripples_counter = 0; ripples_counter < number_of_ripples_calculated___within_splitted_slabs; ripples_counter++)

                                                        {

                                                            ___temp_double_FOR_R_TH___RIPPLES_POINT___CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                            =

                                                            ___temp_double_FOR_R_TH___RIPPLES_POINT___CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                            +

                                                            //CAUTION DONT MULTIPLY

                                                            //CAUTION  //////ripples_counter

                                                            //CAUTION  //////*

                                                            ___temp_each_ripple_time_millis_gap_input

                                                            ;

                                                            ////// we flush first

                                                            ////// we flush first

                                                            ////// we flush first        

                                                            ///

                                                            ___temp_double_calculated_current______millisecond_for_____to_assign_for_current_ripple = 0;//flushing data

                                                            ___temp_long_calculated_current______miditiks_for_____to_assign_for_current_ripple = 0;//flushing data

                                                            ___temp_int_calculated_CENTER_TREND_LINES____VALUES_OF_PITCHBEND___current______pitchbend_data_for_____to_assign_for_current_ripple = 0;//flushing data

                                                            ////// we flush first

                                                            ////// we flush first

                                                            ////// we flush first   

                                                            //have doubts ??????

                                                            //////___temp_double_calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                            //////  =

                                                            //////  ___temp_ripple_time_millis_starts

                                                            //////  +

                                                            //////  ___temp_double_FOR_R_TH___RIPPLES_POINT___CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple;

                                                            ___temp_double_calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                              =

                                                           ___temp_ripple_time_millis_starts

                                                              +

                                                              ___temp_double_FOR_R_TH___RIPPLES_POINT___CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple;

                                                            //THE ERROR WAS HERE

                                                            /// DID SILLY MISTAKE AND USED //////* (this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY);

                                                            //INSTEAD OF THIS  * MILLISECONDS_TO_MIDITIKS_MULTIPLIER;

                                                            // THIS CONVERTIONS ARE NECESSARY FOR THE ASSIGNING OF THE MIDS EVENTS AT THE PROPER LOCATIONS

                                                            ___temp_long_calculated_current______miditiks_for_____to_assign_for_current_ripple

                                                            =

                                                            ___temp_double_calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                            //CAUTION   CAUTION     CAUTION    DONT DO THIS SINCE WE ARE NOT TAKING DATA FROM THE PERCENTAGES NOW   * (0.01)

                                                            //////* (this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY);

                                                            * MILLISECONDS_TO_MIDITIKS_MULTIPLIER;

                                                            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                                                            //SAAN HAS TO CHECK THIS

                                                            ___temp_double_FOR_R_TH___RIPPLES_POINT___CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                                =

                                                                ripples_counter

                                                                *

                                                                ___temp_each_ripple_time_millis_gap_input;

                                                            /// WE WILL CALIBRATE AN CALCULATE THE NECESSARY PITCH BENDS FOR CURRENT RIPPLES OD AND THE EVEN CASES

                                                            /// WE WILL CALIBRATE AN CALCULATE THE NECESSARY PITCH BENDS FOR CURRENT RIPPLES OD AND THE EVEN CASES

                                                            /// WE WILL CALIBRATE AN CALCULATE THE NECESSARY PITCH BENDS FOR CURRENT RIPPLES OD AND THE EVEN CASES                                                        

                                                            //CAUTION we are inside two pitch bends points

                                                            //SO WE WILL USE   ___temp_double_FOR_R_TH___RIPPLES_POINT___CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                            ___temp_int_calculated_CENTER_TREND_LINES____VALUES_OF_PITCHBEND___current______pitchbend_data_for_____to_assign_for_current_ripple

                                                                =

                                                                //THIS    was not there so abrupt jumps were there 

                                                                ___previous_is_current_pitch_bends_data___within_0_8192_16384_range

                                                                +

                                                                (int)

                                                                (

                                                              ___double_type_slope_found___negative_or_positive_tan_theta

                                                              *

                                                              ___temp_double_FOR_R_TH___RIPPLES_POINT___CAUTION___CUMULATIVE_AFTER_LAST_PITCH_BEND_POINT_STARTS___calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                                )

                                                              ;

                                                            ///

                                                            //for safe sides

                                                            ___temp_actual_pitch_bend_assigned_for_current_ripple

                                                                = ___previous_is_current_pitch_bends_data___within_0_8192_16384_range;// 8192;

                                                                                                                                      //references  ___temp_current_notes_ripples_up_jumper_number_input

                                                                                                                                      //references ___temp_current_notes_ripples_down_jumper_number_input

                                                                                                                                      //OD AN THE EVEN CALCULATIONS ARE DONE HERES

                                                            if (ripples_counter % 2 == 0)

                                                            {

                                                                ___temp_actual_pitch_bend_assigned_for_current_ripple

                                                                //evens upwards

                                                                =

                                                                ___temp_int_calculated_CENTER_TREND_LINES____VALUES_OF_PITCHBEND___current______pitchbend_data_for_____to_assign_for_current_ripple

                                                                +

                                                                 ___temp_current_notes_ripples_up_jumper_number_input;

                                                                //end of  of if( ripples_counter % 2==0)

                                                            }

                                                            else

                                                            {

                                                                //start of else of  if( ripples_counter % 2==0)

                                                                ___temp_actual_pitch_bend_assigned_for_current_ripple

                                                                    //evens upwards

                                                                    =

                                                                    ___temp_int_calculated_CENTER_TREND_LINES____VALUES_OF_PITCHBEND___current______pitchbend_data_for_____to_assign_for_current_ripple

                                                                   -

                                                                      ___temp_current_notes_ripples_down_jumper_number_input;

                                                            }//end of else of if( ripples_counter % 2==0)

                                                            if (___temp_long_calculated_current______miditiks_for_____to_assign_for_current_ripple > this.LONG_START_ABSOLUTE_TIME_FOR_CURRENT_NOTE)

                                                            {

                                                                Console.WriteLine("CAUTION THIS CHECK IS NECESSARY FOR      SHORT PITCH BENDS JUMPS ASSIGNING  SMALL PTCHBNDS TIKS = " + ___temp_long_calculated_current______miditiks_for_____to_assign_for_current_ripple + "  >      NOTES START TIKS =  " + this.LONG_START_ABSOLUTE_TIME_FOR_CURRENT_NOTE);

                                                                if (___temp_actual_pitch_bend_assigned_for_current_ripple >= 0 && ___temp_actual_pitch_bend_assigned_for_current_ripple <= 16384)

                                                                {

                                                                    ///YESSS WORKS OK   AFTER NOTE THAT THE TRIKS WORKED FOR THE   PITCH BENDS WITHIN NOTE ADDITIONAL PERCENTAGE OF DURATIONS POPULATED CALIBRATEDLY INSIDE PPLES POPULATOR

                                                                    ///YESSS WORKS OK   AFTER NOTE THAT THE TRIKS WORKED FOR THE   PITCH BENDS WITHIN NOTE ADDITIONAL PERCENTAGE OF DURATIONS POPULATED CALIBRATEDLY INSIDE PPLES POPULATOR

                                                                    ///YESSS WORKS OK   AFTER NOTE THAT THE TRIKS WORKED FOR THE   PITCH BENDS WITHIN NOTE ADDITIONAL PERCENTAGE OF DURATIONS POPULATED CALIBRATEDLY INSIDE PPLES POPULATOR

                                                                    ////////NEED TO TEST AND THINK

                                                                    //CAUTION      CAUTION  CAUTION  THE PERCENTAGES OF THE SLABS NEED NOT CHANGE WITHIN RIPPLES GENERATORS

                                                                    //CAUTION      CAUTION  CAUTION  THE PERCENTAGES OF THE SLABS NEED NOT CHANGE WITHIN RIPPLES GENERATORS

                                                                    //CAUTION      CAUTION  CAUTION  THE PERCENTAGES OF THE SLABS NEED NOT CHANGE WITHIN RIPPLES GENERATORS

                                                                    //CAUTION      CAUTION  CAUTION  THE PERCENTAGES OF THE SLABS NEED NOT CHANGE WITHIN RIPPLES GENERATORS

                                                                    //CAUTION      CAUTION  CAUTION  THE PERCENTAGES OF THE SLABS NEED NOT CHANGE WITHIN RIPPLES GENERATORS

                                                                    //CAUTION      CAUTION  CAUTION  THE PERCENTAGES OF THE SLABS NEED NOT CHANGE WITHIN RIPPLES GENERATORS

                                                                    //CAUTION      CAUTION  CAUTION  THE PERCENTAGES OF THE SLABS NEED NOT CHANGE WITHIN RIPPLES GENERATORS

                                                                    //CAUTION      CAUTION  CAUTION  THE PERCENTAGES OF THE SLABS NEED NOT CHANGE WITHIN RIPPLES GENERATORS

                                                                    //CAUTION      CAUTION  CAUTION  THE PERCENTAGES OF THE SLABS NEED NOT CHANGE WITHIN RIPPLES GENERATORS

                                                                    ///////// WE WILL CALIBRATE AN CALCULATE THE NECESSARY PITCH BENDS FOR CURRENT RIPPLES OD AND THE EVEN CASES

                                                                    ///////// WE WILL CALIBRATE AN CALCULATE THE NECESSARY PITCH BENDS FOR CURRENT RIPPLES OD AND THE EVEN CASES

                                                                    ///////// WE WILL CALIBRATE AN CALCULATE THE NECESSARY PITCH BENDS FOR CURRENT RIPPLES OD AND THE EVEN CASES   

                                                                    ////////we will now do the forced ripples intermediates within the points //////

                                                                    ////////we will now do the forced ripples intermediates within the points //////

                                                                    ////////we will now do the forced ripples intermediates within the points //////

                                                                    ///////////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                    ////////////cautions note that  int SUCCESSFUL_populator_ptchbnd = 0; SUCCESSFUL_populator_ptchbnd < (numbersofobjectstokensindurationspercentages-1); SUCCESSFUL_populator_ptchbnd++

                                                                    ///////// SUCCESSFUL_populator_ptchbnd   = 0 to 

                                                                    ///////// SUCCESSFUL_populator_ptchbnd  < (numbersofobjectstokensindurationspercentages-1)

                                                                    ///////////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                    if (this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS.Last() <= 100)

                                                                    {

                                                                        // LOOKS LIKE IT WORKS AFTER ADDING THIS TRIKS 

                                                                        ////////SIMPLY TO TEST

                                                                        this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                                                                        .Add

                                                                        (

                                                                            (

                                                                            (

                                                                            ___temp_double_calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                                            -

                                                                        ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                                                                            [SUCCESSFUL_populator_ptchbnd]

                                                                            )

                                                                            /

                                                                             this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY

                                                                            )

                                                                           * 100

                                                                        // +

                                                                        // 0.003   //to avoid the pitchbends starts before the note starts

                                                                        );

                                                                        Console.WriteLine("WITHIN RIPPLES ripples_counter = " + ripples_counter + "   YESSS LOOKS IT Adding to   this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS.Last = " + this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS.Last().ToString());

                                                                        ///////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        /////////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        /////////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////                                

                                                                        ///   this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                                                                        ///         .Sort();

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        ///////////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        ///////////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA ////////////// 

                                                                        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                        this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                                                                                                      .Add

                                                                                                      (

                                                                                                        ___temp_double_calculated_current______millisecond_for_____to_assign_for_current_ripple

                                                                                                      //   +1      //to avoid the pitchbends to start before the note starts

                                                                                                      );

                                                                        Console.WriteLine("WITHIN RIPPLES ripples_counter = " + ripples_counter + "   Adding to   this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS.Last = " + this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS.Last().ToString());

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////                                

                                                                        //I THINK WE NEED NOT SORT THIS WITHIN THE RIPPLES GENERATORS

                                                                        //////// this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                                                                        ////////       .Sort();

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA ////////////// 

                                                                        //this is for the long type miditks data types converting the millis to midits and then populating these

                                                                        //this is for the long type miditks data types converting the millis to midits and then populating these

                                                                        //this is for the long type miditks data types converting the millis to midits and then populating these

                                                                        /////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                        this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                                                                            .Add

                                                                            (

                                                                            (long)

                                                                            (

                                                                            ___temp_long_calculated_current______miditiks_for_____to_assign_for_current_ripple

                                                                              //  +3          //to avoid the pitch bends starts before notes starts

                                                                              )

                                                                            );

                                                                        /////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                        ///

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////                                

                                                                        //WITHIN THE  PPLES GENERATOR  this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                                                                        //////       .Sort();

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA //////////////

                                                                        /////////////////////////      ALWAYS SORT THIS SINCE IT IS MILISECONDS DATA ////////////// 

                                                                        Console.WriteLine("WITHIN RIPPLES ripples_counter = " + ripples_counter + "   Adding to    this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE.Last = " + this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE.Last().ToString());

                                                                        /////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                        /////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                        /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                                                        /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                                                        /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                                                        /////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                        this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                                                                        .Add

                                                                        (

                                                                        /////////////////////////// since the data here are percentages of total durations //////////////

                                                                        ___temp_actual_pitch_bend_assigned_for_current_ripple

                                                                        );

                                                                        /////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                        /////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                        /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                                                        /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                                                        /// CAUTION NEVER SORT THIS LIST AT ANY STAGE      THESE ARE THE PITCH BENS DATA

                                                                        ////////////////////////////////////////////////////////////////////////////////////////////////////////

                                                                        Console.WriteLine("WITHIN RIPPLES ripples_counter = " + ripples_counter + "   Adding to    this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS.Last = " + this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS.Last().ToString());

                                                                    }//if(this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS.Last()<=100)

                                                                }//if (___temp_actual_pitch_bend_assigned_for_current_ripple>=0  && ___temp_actual_pitch_bend_assigned_for_current_ripple <= 16384)

                                                            }// if(___temp_long_calculated_current______miditiks_for_____to_assign_for_current_ripple> this.LONG_START_ABSOLUTE_TIME_FOR_CURRENT_NOTE)

                                                        }//for(int ripples_counter=0; ripples_counter<number_of_ripples_calculated___within_splitted_slabs; ripples_counter++)

                                                         //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                         ///we have to assign the intermediate ripples forward sides only

                                                        //////////////////    additional checks are dones /////////

                                                        //////////////////    additional checks are dones /////////

                                                        //////////////////    additional checks are dones /////////   

                                                    }// if(___total_millis_for_this_start_to_final_of_pitchbends_points>0)

                                                     //////////////////    additional checks are dones /////////

                                                     //////////////////    additional checks are dones /////////

                                                     //////////////////    additional checks are dones /////////   

                                                     ///CAUTION   refer never sort this since these are pitch bends data     this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ///

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                    ///

                                                    //////////////////tricks are here   we cannot assign the things after the pitchbends slab completes

                                                    ///we have to assign the intermediate ripples forward sides only

                                                }//if(number_of_ripples_calculated___within_splitted_slabs>=2)

                                                 //additional checks dones

                                                 //additional checks dones

                                                 //additional checks dones

                                                 ///////////////////////////////////////////////// the values are already populated an now we will put the intermediate ripple effects for the ata ///////////////////////

                                                 ///////////////////////////////////////////////// the values are already populated an now we will put the intermediate ripple effects for the ata ///////////////////////

                                                 ///////////////////////////////////////////////// the values are already populated an now we will put the intermediate ripple effects for the ata ///////////////////////

                                            }// if (___total_millis_for_this_start_to_final_of_pitchbends_points > ___temp_each_ripple_time_millis_gap_input)

                                        }// if(___temp_each_ripple_time_millis_gap_input>0)

                                    }

                                    catch (Exception ___excptoputripples)

                                    {

                                    }//catch(Exception ___excptoputripples)

                                }// if(SUCCESSFUL_populator_ptchbnd>=0      &&  SUCCESSFUL_populator_ptchbnd < (numbersofobjectstokensindurationspercentages - 1) )

                                //double ensuring the conditions to apply the ripples to the pitch bends

                                //double ensuring the conditions to apply the ripples to the pitch bends

                                //double ensuring the conditions to apply the ripples to the pitch bends

                            }// for (int SUCCESSFUL_populator_ptchbnd = 0; SUCCESSFUL_populator_ptchbnd < (numbersofobjectstokensindurationspercentages - 1); SUCCESSFUL_populator_ptchbnd++)

                            // for (int SUCCESSFUL_populator_ptchbnd = 0; SUCCESSFUL_populator_ptchbnd < numbersofobjectstokensindurationspercentages; SUCCESSFUL_populator_ptchbnd++)

                        }

                        catch (Exception ___Excptoaddtheripplespopulatingtointermediatesdurations)

                        {

                            Console.WriteLine("___Excptoaddtheripplespopulatingtointermediatesdurations" + ___Excptoaddtheripplespopulatingtointermediatesdurations.Message + "   " + ___Excptoaddtheripplespopulatingtointermediatesdurations.StackTrace.ToString());

                        }//catch(Exception ___Excptoaddtheripplespopulatingtointermediatesdurations)

                    }// if(numbersofobjectstokensindurationspercentages>2)

                    //////////////////////// after the notes populations    are done for whole things ///////////////////////////////

                    //////////////////////// after the notes populations    are done for whole things ///////////////////////////////

                    //////////////////////// after the notes populations    are done for whole things ///////////////////////////////

                    //////////////////////// after the notes populations    are done for whole things ///////////////////////////////

                    //////////////////////// after the notes populations    are done for whole things ///////////////////////////////

                    //////////////////////// after the notes populations    are done for whole things ///////////////////////////////

                    ///

                    /// 

                    /// 

                    /// 

                    /////////////// pre conditioning the lists initial sides of the note//////////////////////////////////////////////

                    /////////////// pre conditioning the lists initial sides of the note//////////////////////////////////////////////

                    /////////////// pre conditioning the lists initial sides of the note//////////////////////////////////////////////                    

                    ////////////////////////////////////////////////////////////////////////////////////////

                    if (

                    ___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                       [(numbersofobjectstokensindurationspercentages - 1)] != 100

                        )

                    {

                        ////////////////////////////////////////////////////////////////////////////////////////

                        this.PUBLIC_LIST_OF_DOUBLE____PERCENTAGES____OF_DURATIONS_OF_CURRENT_NOTE______MILLISECONDS_WITHIN_NOTE_PITCH_BEND_POSITIONS

                            .Add

                            (

                                     100

                            );

                        ////////////////////////////////////////////////////////////////////////////////////////

                        this.PUBLIC_LIST_OF_DOUBLE_MILISECONDS____CALCULATED_FROM___PERCENTAGES_OF_MILISECONDS_DURATION___WITHIN_NOTE_PITCH_BEND_POSITIONS

                            .Add

                            (

                            this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY

                            );

                        ////////////////////////////////////////////////////////////////////////////////////////

                        this.PUBLIC_LIST_OF_INT_0_TO_8192_16368_PRECALIBRATED_POPULATED_AS_PER_NOTES_CONDITIONS

                          .Add

                            (

                            8192

                            );

                        ////////////////////////////////////////////////////////////////////////////////////////

                        /////////////////////////////////////////////////////////////////////////////////////////////////////

                        this.PUBLIC_LIST_OF_REAL_OF_LONG_ABSOLUTE_START_POINT_OF_THE_EVENT_FOR_CURRENT_PITCH_BEND_IN_WHOLE_SEQUENCE

                            .Add

                            (

                            (long)

                            (

                             //////caution these miliseconds data are double types

                             (START_ABSOLUTE_START_TIME_MILISECONDS * MILLISECONDS_TO_MIDITIKS_MULTIPLIER)

                             +

                             /////////////////////////// since the data here are percentages of total durations //////////////

                             //////___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                             //////    [0]

                             100

                                * (0.01)

                                * this.DOUBLE_MILLISECOND_DURATION_FOR_THE_NOTE_TO_PLAY

                                * MILLISECONDS_TO_MIDITIKS_MULTIPLIER

                              )

                            );

                    }

                    //////if (

                    //////___local_array_of_double_tokens_splitted_string_for_pitchbend_durations_before_splitters

                    //////   [(numbersofobjectstokensindurationspercentages - 1)] != 100

                    //////    )

                    ////////////////////////////////////////////////////////////////////////////////////////

                }// end of else of if( tocountsuccessfulconvertionsofdurations != tocountsuccessfulconvertionsofpitchbendsdata)

                ////////////////////////////////////////////////////////////////////////////////////////////////////////

                ////////////////////////////////////////////////////////////////////////////////////////////////////////

                ////////////////////////////////////////////////////////////////////////////////////////////////////////   

                /// here we are because both the splitted strings array are of same lengths

                /// here we are because both the splitted strings array are of same lengths

                /// here we are because both the splitted strings array are of same lengths

            }//end of else of non equal durations strings 

        }//  public void PUBLIC_NONSTATIC_VOID_UPDATE_CURRENT_NOTE_TO_UPDATE_PITCHBENDS_AND_OTHER_EFFECTS_FOR_CURRENT_NOTES_WITH_CURRENT_STARTING_ABSOLUTE_TIME_LONG(double START_ABSOLUTE_START_TIME_MILISECONDS,double MILLISECONDS_TO_MIDITIKS_MULTIPLIER)

    

No comments:

Post a Comment