Build a function that deletes a note that is of consecutive equal note

berane9's icon

I have group of data representing 3 values: a time measure number, a note and time in ms (its value is (* 0.001)).

The active value is listed as “time measure, the note and time in ms”,

The operation needed is to eliminate one of the 2 consecutive equal notes. These repeated values are caused by Max software due to false or law alert of loudness issue (markers or partials).

The result should be to create an alert blink on one button note that have same value. This alert button will enable the user to manually decide to delete the repeated note.

The system should consider also to add new set of data (time-measure, note and time in ms) in case it was ignored by the system due to law value in loudness.

After the process of adding or deleting issue, the system should collect the 3 values in the order list: time-measure, note and time in ms. And finally, this group should be collected into the “coll” object.

10 20 37.64 12 17 37.78 16 17 37.96 11 17 38.08 10 18 38.2 10 19 38.31 31 19 38.68 11 19 38.8 10 18 38.92 58 18 39.61 10 19 39.73 47 19 40.29 11 17 40.4 10 15 40.52 14 15 40.68 11 15 40.8 10 16 40.91 16 16 41.1 10 17 41.21 11 17 41.33 10 18 41.45

Source Audio's icon

you could insert the list into textedit ,

then manually edit whatever you want and finally dump it into coll.

it is not clear if the list goes as one line into coll, or something else.

anything else is out of question because you don´t define process of

outputting/analysing that list, and why should one note be considered as unwanted

repetition. is it not allowed to repeat a note ?

in that list you posted one would remove 10 notes if a rule is

no consecutive same notes are allowed.

then - what is active value ?

how should that "system" add non existing data ?

upon what criteria ?

that´s why I suggest: do it manually in text edit.

berane9's icon

The 1st part of your statement is not coming on my screen according to your site.

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

I don´t know what you mean with that.

original posted list had 63 items, the last one you posted has 123 items.

original list had 10 repeated notes, last one has 20 repeated notes.

here you can see new list in full length at the left,

thinned one at the right and printed removed indexes from coll

but anyway, I am not suggesting anything here.

you as usuall talk unclear.

now you mention lyrics ???

And that´s why I can´t really help you.

Just one suggestion - if what you call

"time measure" is delta time between note start points (in whatever units,

your ones make no sense, are too short to be ms, and too long to be beats)

you should rather convert that to absolute time.

then there would be no need to correct anything if one deletes a note.

And at the end , if I understand correctly that you want to present some sort of notation to your users, having notes and lyrics, where they can edit "mistakes", then look into notation software.

not in some "Alert Buttons"

berane9's icon

here is a sample I formulated. Please, correct it with your vision, as you always creatively construct it. Thanks

eliminate-the-repeating-note.maxpat
Max Patch

berane9's icon

Dear Source Audio, I had good inspiration from your feedback in Max activities. I am dealing with an ancient music art 1500 years of age. The result might be not clear to you, as it is also to me. However, my interest is to find a solution so anyone can listen and get familiar with it by using. So I am preparing few info to play that with modern music instruments. Thanks for the instructions I had before from you and this forum.