How to play only the highest note of a chain?

Hello

I try to configure a layer with one of the chains playing only the highest (priority=upper) note, but I don’t find how to do that.

Google talks about a “MIDI Note Monophonic”, but it seems to be an hallucination, as I don’t find such a plugin on the x42 website.

Do you know how to do that ?

Thanks you

See if you can compile these, there’s a “Slimmer” plugin that claims to do what you’re after.

I’ve no idea about the quality of these.

Compiling this single plugin may work like this (from a suitable directory, maybe in your home directory and look at dependencies):

git clone https://github.com/danja/flues.git
cd flues
cmake -S lv2/slimmer -B lv2/slimmer/build
cmake --build lv2/slimmer/build
cmake --install lv2/slimmer/build --prefix ~/.lv2

Then update your engine database.

Thanks you for your answer.

This plugin seems to do exactly what I’d like to do.

I will search if I could compile slimmer, but at this point, I have absolutely no idea where to begin, as I’m newbie with Zynthian.

See above if you feel confident.

I compiled the “slimmer” plugin (easy, following the instructions on the github page) but I think it is suboptimal or flawed. If you play 2 notes then release the sounding note, it does not retrigger the previous note, even with the “retrigger” parameter asserted. This is a minimal requirement for me. You may as well just play one note at a time otherwise, and indeed, the behaviour for single note playing is suboptimal with the plugin inline. Maybe this is just a bug that needs reporting but I don’t have time right now to investigate what the expected behaviour is.

The only reliable alternative I know are JSFX scripts for which we do not have support.

Unbeliveable, even a knewbie like me succedded to compile, install and use slimmer. Thanks you very much for your help !

For my usage, it works as expected, except for sustain. For examle, if I play a C, then a D, then a E without releaising the keys, the track play solo C-D-E (good). But if I press the sustain pedal, your hear polyphonic C+D+E together (bad)

But anyway, it’s an imperfect but acceptable solution.

To help you to understand what I try, I recorded a example:

I play on tracks together (on the same MIDI channel), but with Slimmer, you have a kind of “monophonic oboe melody” (and we clearly ear the sustain trouble at the end)

Anymay, I’m so pleased to have find a solution

Again, thanks you very much

5 Likes

Great you got a partial solution.

I mean, I lately really had an AI blues seeing plugins popping up everywhere with people putting no effort whatsoever but putting a big fat :copyright: below.

But: I’m pretty sure if you ask Claude for a compile ready lv2 plugin that does your midi filtering while also taking the sustain pedal into account I’m sure it will deliver within a couple of rounds. Not my cup of tea, but may work.

P.S. In fact I just did exactly this.

poly2mono.zip (16.4 KB)

1 Like

Someone may have created a monophonic plugin during their lunch break… It still has some bugs but may appear in a zynthian near you in the near future!

1 Like

I messed around with the concept a bit.

1 Like

You are a champion :clap:

It’s too late for today, but I can’t wait to test this module

Thank again :clinking_beer_mugs:

Please consider taking @riban’s definitely more robust and clean approach whenever it will occur. I actually wholeheartedly hate AI, but it’s unfortunately a good tool when you just want a specific idea quickly fixed when it comes up…

But well, I had some ideas.

poly2mono_v9.zip (26.5 KB)

1 Like

I have added “monophonic” plugin to my LV2 plugin suite. Description is in the README. This works how I would expect such a plugin to work. It has priority modes for low, high, first and last as well as a bypass and it handles sustain / hold pedal properly. It handles all MIDI channels separately. I could add a MIDI channel selector parameter but that isn’t necessarily required for zynthian so I will wait to see if anyone outside this community asks for it.

I have passed this to @jofemodo to add to vangelis so hopefully we should see it available soon. The plugin is quite simple but getting the (2 line) sustain/hold pedal logic right proved to be a challenge. I avoided asking Claude for help though. This dusty old brain still has some mileage!

1 Like

Great, I’ll happily delete the AI garbage again as soon as this is available. But could you imagine adding a “n-th” (“-highest/lowest”) parameter to this? For me personally the most fun of these kind of plugins are to play harmonies with different sounds (think any quartet).

2 Likes

Well done mate! I just added this to the vangelis branch, so please, update and test!

Regards

2 Likes

Add a feature request. I don’t understand so please describe the requirements in as much detail as you can.

I did some rapid tests.

To be honest, it doesn’t work according to my needs. The algorithm seems to reinitialize its state on every note on/note off, ignoring the sustain state.

For exemple, if I press the sustain pedal and play a Em chord (E-G-B), the chain plays a B. I then release keys but not the the pedal. The B continues to play. And now I play a C chord (C-E-G). The chain so changes and play the G note. I expected it to continue to play the B note as it is higher, until I release the sustain pedal (and only at this moment the chain should play the G note, as it is the new highest playing note)

I have a Dexibell piano which has this capability.

But anyway, I’m convinced your job will be useful for other people

Thank you very much for taking the time to respond to my request

Hi @jhashe.

There are many solutions mentioned here. Assuming you are referring to the new “Monophonic” MIDI effect (from riban-lv2-plugins package) then I don’t recognise this behaviour. There is a single parameter which defines mode. You expect high-note priority so “Highest” should be selected. (This is the default setting.) When any keys are pressed, the highest will be sent. Releasing the highest key will send its note-off and the new highest key’s note-on is sent. With the hold (sustain) pedal pressed, the behaviour should be similar except there is no note-off message sent when the last key is released. If this behaviour is not occuring, it sounds like a bug which could be reported upstream.

Your description of the issue is a little ambiguous because you don’t say what register each chord is played but I think the issue is simplified to:

  • Set mode=Highest
  • Press and hold sustain pedal
  • Press and release a key
  • Press a lower key
  • Expect higher key to sustain

I didn’t design for this workflow. With sustain pressed, you can only ever add higher notes but… I can see the logic. Maybe others might want to chime in here. (The logic that I think you describe would probably have been much simpler to implement because once the hold pedal is pressed, we ignore all chords and only remember the highest key until the pedal is released. My logic took the most time of all development to implement") My logic is that monophonic works on the current chord, holding the last key of the chord then, as you say, kinda resets when the next chord arrives. I am not sure of the benefit of having a hold that ignores all subsequent chords… but you may convince me otherwise.

I’m not fluent in English (I’m French), so I can easily understand I’m not always very clear :sweat_smile:

I’m not at home today, but regarding you explanations, the behaviour should be what I search.

My piano has a progressive sustain pedal. Maybe it could explain the difference?

I don’t think it is the progressive pedal (although my plugin does depend on CC value > 63 representing a sustain on, as per MIDI spec). It is more a case of understanding the workflow and what benefit it has. It would be great if you could describe an actual playing sequence that you would use that demonstrates the advantage of the continuously holding highest note rather than the reset when all notes released.

I have already started to code this as an optional mode but ran out of time on the commute. Maybe the feature will arrive soon…