Page 1 of 1

Hack fancy soundship visualizer into hatari

Posted: Mon Feb 10, 2020 10:11 pm
by Gunstick
Hi

I always wanted to create a visualizer which nicely shows what's going on in the YM when those complex timer powered chiptunes are playing.
First I thought to use a standalone program, then to modify sc68. But when you know that not all tunes are available as sndh, it may be best to modify hatari to get an additional windows with cool animations.

Here is an example of how it could look.
https://www.youtube.com/watch?v=iDGOeyZEE5Y
But I also want to add the waveforms, and in the waveforms color which register is currently controlling the signal (volume, envelope, noise, tone ...)
An early idea was quickly hacked together here: https://www.youtube.com/watch?v=BxEgrkY22vg#t=1h2m

Is that a possible idea to have as addon or modification to hatari?

Georges

Re: Hack fancy soundship visualizer into hatari

Posted: Mon Feb 10, 2020 11:11 pm
by Eero Tamminen
SDL1 doesn't support separate windows, only SDL2 does. But maybe something that would draw to statusbar area, so that user could toggle between it and the regular statusbar with a keyboard shortcut, or command line option, would be acceptable.

Re: Hack fancy soundship visualizer into hatari

Posted: Tue Feb 11, 2020 8:58 am
by Gunstick
Oh, only 1 window? Well a command line option which sends the useful data to terminal, or a file, which then can be used by a separate program to display. Of course this will then be less synchronous compared to a direct display.

Re: Hack fancy soundship visualizer into hatari

Posted: Tue Feb 11, 2020 9:16 am
by npomarede
Hi
I add a similar idea to display the waveforms of each voices, but never really looked into it.
I never checked how to open another window with sdl2, but I guess it doesn't require so much code. Then in YM2149_DoSamples_250() one just need to send the 3 computed values of 'bt' to another function that will do the waveform display on screen.
Another idea I had about opening more windows would be to display an additional windows that would use different color line to tell which border are removed on each line, kind of a fullscreen/hardscroll debugger.

If you feel like spending a little time on this, don't hesitate to send some patches to Hatari mailing list.

Nicolas

Re: Hack fancy soundship visualizer into hatari

Posted: Tue Feb 11, 2020 3:08 pm
by Estrayk
I join the request!. Yes please!

For people who do music with the YM2149F it is not just a pretty visual effect, It is very useful to know how buzzer or SID effects are applied to the square wave when we play with the parameters.

More than once I had to move HATARI sound-output and inject to VST plugin input for check some wave to see what was happening with the wave that was changing when I create instruments.

It would be very useful!

Image
Image

Re: Hack fancy soundship visualizer into hatari

Posted: Fri Feb 14, 2020 11:30 pm
by Eero Tamminen
SDL1 support is deprecated in Hatari, so SDL2 specific code (using separate window) could also be OK, as long as it's behind appropriate ifdefs.