Feature: Single Channel Audio waveform Display
-
Currently the Audiowaveform component creates paths for all channels of the audio file.
I'd like to have the option to display a single channel. Whether this be the left channel, or summed representation, or the mid channel.
I'd appreciate any of the above as an option for the audio waveform component / Laf, as it's troublesome to get around this. For many applications it's not necessary to visualise all channels.
That being said, I recognise it's possible to draw waveforms from scratch in both c++ and in hisescript using paint routines. However this strikes me as something that makes sense to have integrated into hise? Especially when all the groundwork has already been laid.
-
@griffinboy I think several people have asked for this before. The workaround is to create an audio waveform inside a panel. Both should have the same width, but the audio waveform should be twice as height. I've been using it this way for a while, and it works well :)
Still, it would be nice to have a channel selector.
-
@griffinboy you can just draw the path across a larger area and so only get one channel. Set y to negative to show the second channel.
Fo a summed representation, you could have them overlap though that's not exactly a 100% correct representation.
-
Thanks maybe you're right
Maybe it's just my optimization OCD, but I don't like the idea of creating and drawing paths that are larger than needed. But perhaps it's negligible.
I guess checking the number of channels upon import and doing unique scaling based on the number of channels would work...
-
@griffinboy you can probably cull the path, check the Path class. But even if not, you're just telling it what area to draw on. If you provide height*2 in the area argument, it's not actually gonna draw the lower half.
-
Thanks indeed I'll look into this.
I'll keep this here as a feature request because I still think it's something that should be built in.
-
@griffinboy i suspect that implementation will just be a stretching of the path across a different area, haha.
For multiple channels, you'll probably find it easier to do using the new Rectangle() object.