diff --git a/MIDI/MIDI_To_Items/Zly_MIDI_To_Items.lua b/MIDI/MIDI_To_Items/Zly_MIDI_To_Items.lua index 0b751a2..b428055 100644 --- a/MIDI/MIDI_To_Items/Zly_MIDI_To_Items.lua +++ b/MIDI/MIDI_To_Items/Zly_MIDI_To_Items.lua @@ -456,7 +456,7 @@ function M2I:ProcessMIDI(midi_take) local current_chords_list local current_chord - if current_note == nil then goto skip end + if current_note == nil then goto skip_filtered_note end current_channel = self.chords_channels[current_note.channel] current_chords_list = current_channel.chords @@ -519,9 +519,9 @@ function M2I:ProcessMIDI(midi_take) ::skip:: self.widget.midi_notes_read = self.widget.midi_notes_read + 1 + ::skip_filtered_note:: end - -- Sort chords and assign base pitch for channel_index, chords_channel in pairs(self.chords_channels) do if #chords_channel.chords == 0 then goto skip_sort_for_empty end @@ -557,7 +557,7 @@ function M2I:ProcessMIDI(midi_take) --[[============================================]]-- --[[============================================]]-- - ---[=[ + -- Search for a free spot in tracks for each Note Item self.n_channels = 0 for channel_index, chords_channel in pairs(self.chords_channels) do -- [1, 16] @@ -646,7 +646,6 @@ function M2I:ProcessMIDI(midi_take) end end end - return true end @@ -871,7 +870,12 @@ function M2I:LoadSelectedMIDI() local item_count = reaper.CountSelectedMediaItems() if item_count == 0 then - reaper.MB("No MIDI was selected", "Error", 0) + reaper.MB("No MIDI Item was selected on the timeline!", "Error", 0) + return nil + end + + if item_count > 1 then + reaper.MB("Select only one Item!", "Error", 0) return nil end @@ -879,7 +883,7 @@ function M2I:LoadSelectedMIDI() local midi_take = reaper.GetActiveTake(midi_item) if not reaper.TakeIsMIDI(midi_take) then - reaper.MB("The selected Item is not a MIDI", "Error", 0) + reaper.MB("The selected Item is not a MIDI Item.", "Error", 0) return nil end diff --git a/MIDI/meta_MIDI_To_Items.lua b/MIDI/meta_MIDI_To_Items.lua index fa3e9e2..3b0e3df 100644 --- a/MIDI/meta_MIDI_To_Items.lua +++ b/MIDI/meta_MIDI_To_Items.lua @@ -2,7 +2,7 @@ @metapackage @description MIDI To Items Converter @author Zly -@version 2.4.1 +@version 2.4.2 @provides [main] .\MIDI_To_Items\Zly_MIDI_To_Items.lua @about @@ -24,5 +24,5 @@ @donation Donate https://boosty.to/zly @changelog - - Forgot to add the redirection to the ReaPack's Website if the user doesn't have one lol. + - Made the MIDI error message more obvious. --]] \ No newline at end of file