kosua20 / MIDIVisualizer

A small MIDI visualizer tool, using OpenGL
MIT License
1.05k stars 137 forks source link

Pedal Visualization #79

Closed frink closed 3 years ago

frink commented 3 years ago

For the Sustain Pedal, Soft Pedal and Sostenuto Pedal you could show an icon on the right hand side (partially transparent above the highest octave) which highlights the pedal usage. The pedals could be highlighted with various intensity of color to show the true pumping of the pedals beyond the simple up and down (since many modern samplers do in fact have a different sound for a half down pedal...)

Likewise, the volume pedal could also be illustrated as well for organ pieces this could be quite helpful to show the expression.

I think this would be vary helpful when using this visualization for music education...

kosua20 commented 3 years ago

Hello and thank you for the feedback ! Right now the pedals can be visualized, but the effect is disabled by default (I might modify this if this is hampering discoverability). You have to enable them by checking the corresponding layer in the "Show layers..." panel. From what I've gathered of the MIDI standard specification, they are only ON/OFF signals ; if you have any documentation on how modern samplers communicate the intensity I would be very interested! For the volume pedal I didn't know the volume CC could be used for this, I'll add an option to display it too, thank you!

frink commented 3 years ago

Damper lift is communicated just like any other midi CC value 0-127 while many early synths interpreted >=64 as on and <=63 as off it has always been variable in the specification. Here are the common pedal CC mappings:

CC 7 = Volume (usually used for overall volume - not pedal) CC 11 = Expression (usually used for organ style expression swells) CC 64 = Damper (historically binary but now some synths use variable input) CC 66 = Sostenuto (historically binary but now some synths use variable input) CC 67 = Soft (historically binary but now some synths use variable input)

There are many more. MIDI is massive in scope. But these are the main pedals used...

kosua20 commented 3 years ago

Thank you for the details. MIDIVisualizer already support 64/66/67 as binary pedals, but I wasn't aware of the use of 11. If I want to add support for variable input I need to find a way to still support the historical binary interpretation. I could check the overall values used in a track, if there are only two (one < 64 and one ≥ 64) it's probably a binary signal, else display it as variable and adjust the opacity accordingly.

frink commented 3 years ago

Most older controllers send 0 or 127 so there is no gradation unless it was recorded that way.

I think Kurzweil was the first to implement half-pedaling in their hardware. Today most high-end controllers support half-pedaling because its such an expressive part of the pianist's vocabulary. I see pianists use half-pedaling on both the soft pedal and sustain pedal quite regularly... Sadly a lot of DAWs don't have a good facility to visualize this in step editing. Therefore, most modern synth music propitiates the myth that the sustain pedal is a button.

kosua20 commented 3 years ago

Thank you for these details! I've added support for the expression pedal and continuous values in the latest release v5.3. It will adjust the opacity based on the velocity stored, while still supporting the binary mode for compatibility.

frink commented 3 years ago

I'll have to take a look.