Nicht eingeloggt.
Passwort vergessen?

News

28
Aug

VUEngine now has full sound support

In these past years, VUEngine has improved so much and become better and better in all areas imaginable... well, except a single one: music. As one of the oldest parts of the software, the engine's sound manager has been seriously lagging behind, supporting only single track music and lacking any tools to actually produce any music, or convert some into the engine's format.

But that's history from now on! We have finally filled in the missing puzzle piece and rewritten the entirety of the engine's sound code. From now on, it is possible to play either PCM, converted from WAV files, or MIDIs, converted to a special format readable by the music player. You can use all 6 tracks, which are automatically allocated and released, and there are fading effects and spatial positioning of audio sources, allowing you to locate the source of a sound thanks to the Virtual Boy's stereo speakers. You can also modify sound while it is played, and for instance speed it up. See below for a full list of features that are already implemented, as well as possible future additions.

Of course we also added another tool to the existing range of debug tools to accompany the updated sound support. Build your project in tools or debug mode and press LR+RT+RDown in-game to bring up the Sound Test.

You can find a standalone version of the Sound Test tool attached to the post on our Patreon page, including a selection of sample songs and sound effects.

Features

Implemented
  • PCM or MIDI playback
  • Multi-track, stereo playback
  • Dynamic allocation and release of sound channels
  • Support for noise channel
  • Playback events to facilitate the synchronization of playback state with game events
  • Fade in and fade out effects
  • Spatial positioning of audio sources
  • Real time speed control
  • Sound test accessible through the debugging tools

TODO
  • Playback priority
  • Pause and resume playback based on priorities
  • Support for sweep and modulation
  • Compressed PCM playback (not very likely due to the strain on the CPU)
  • Compressed MIDI playback (may happen but as of now it is not necessary and will hit the performance)

Thanks!

All of this wouldn't have been possible without the help of various individuals. Thank you! To name a few:
  • thunderstruck, for sharing his music converter and playback code; we are using a modified version of the converter for MIDI conversion
  • Frostgiant, whose WAV converter we are using to convert PCM music
  • DanB, for sharing his MIDI player
  • Guy Perfect, for all his valuable work documenting the VSU, among other things

Coming up

Now that a much sought-after feature, according to our December poll, can be crossed off the list, we'll go back to the highest priority task, according to that poll, and work towards another Formula V demo. This time, though, other than the first two demos, we plan to release a demo for all of our backers. Also including sound this time, of course. :-)

In parallel, we'll keep on working on the de-facto successor to VBDE, VUEngine Studio, a Visual Studio Code extension for Nintendo Virtual Boy game development using VUEngine. Next on the TODO list will be to extend the toolchain to fully support the new sound code and allow for on-the-fly music conversion.

To stay updated, keep an eye on our Twitter, where we plan to (or hope to find the time to) more regularly post some in-development updates about our various projects, or catch us on Discord.




Kommentare

Die hier veröffentlichten Artikel und Kommentare stehen uneingeschränkt im alleinigen Verantwortungsbereich des jeweiligen Autors.

StinkerB06
 Re: gine now has full sound sup
Geschrieben am: 29.08.2019 4:40, Aktualisiert: 29.08.2019 4:40
1. Do you have a ROM with the music for me to test in an emulator?
2. Does the engine allow all 8 waveforms on the noise channel?

By the way, awesome work so far! This could potentially hold us off from waiting for VB Music Tracker to come out.

jorgeche
 Re: gine now has full sound sup
Geschrieben am: 29.08.2019 6:01, Aktualisiert: 29.08.2019 6:01
Hi

1) The ROM is available for everybody at the end of the Patreon post:

https://www.patreon.com/posts/29465160

2) Yes, it is possible to use any of the 8 tap locations for noises. Although there is no support to change the tap location per "note" yet. That means that for the time being, each a track that uses the noise channel must set the tap location ahead of being played and cannot change it during playback. Making it so isn't hard, but I don't know enough about music to figure out by myself if that is even useful.

Thanks.

StinkerB06
 Re: gine now has full sound sup
Geschrieben am: 29.08.2019 19:47, Aktualisiert: 29.08.2019 20:40
The tap locations 4...7 have a very short sequence length, which means they're great for melodic uses. One such use is playing notes below D#2 (as anything below that note on the first 5 channels will be capped to ~76.294Hz).

Now, lets look at the SN76489, the PSG chip that was responsible for the Sega Master System's sound. This chip has 3 square channels that can go as low as A-2, and a noise channel.

As SN7 enthusiasts knew better, they realized that the noise channel can play low-frequency pulse bass notes, well, not at the same time as percussion. So they quickly alternate between a frame or two of drum noise, and then the pulse-bass note they desired to play. The same thing can be said with the VSU's noise channel by quickly changing the tap location.

EDIT: Here's a Lua script I made that generates the eight waveforms:
https://www.dropbox.com/s/wkwoosjb8ajc87y/VSU%20Noise.lua?dl=0

jorgeche
 Re: gine now has full sound sup
Geschrieben am: 29.08.2019 22:09, Aktualisiert: 29.08.2019 22:09
Fair enough!

As per your suggestion, support has been added to change the tap location on a per note basis when a track uses the noise channel.

StinkerB06
 Re: gine now has full sound sup
Geschrieben am: 29.08.2019 22:38, Aktualisiert: 29.08.2019 22:38
This guy has made a few SN76489 covers that rely heavily on the trick I'm talking about :
https://www.youtube.com/channel/UC5Yh9LZaiTYk3F8x1WjiOoQ

jorgeche
 Re: gine now has full sound sup
Geschrieben am: 31.08.2019 20:32, Aktualisiert: 31.08.2019 20:33
Those sound really good!

If you have a MIDI file that applies that trick, I may try to include it in the sound test.

Or you can try it yourself by writing the track by hand, the sound test's source code is public:

https://bitbucket.org/vuengine/vuengine-sound-test/src

Explosion sounds