Rybags Posted March 24, 2006 Share Posted March 24, 2006 Here's another little demo program "DEMOWAVT.XEX" demowavt.zip It plays 2 voices of wavetable sound (digitized) without screen blanking. It uses the VCOUNT wait technique similar to the 1-bit and 2-bit sound demos I posted before. The way the program is setup, wave tables up to 256 bytes in length can be used. 512 individual frequencies are available, although that could be increased fairly easily. To use the program, Load Exe from the emulator, or binary-load from DOS on a real machine. Use joystick 1 up/down to change the pitch - hold the button to do the other voice pitch. The waveforms can be selected from 9 that I've included. Just press the number or <shift> number to do the second voice. Note that key assignments mean you have to press the corresponding key if using the emulator (e.g. SHIFT-2 actually generates SHIFT-8 on Atari800Win). Waveforms: 1 - triangle, lower frequencies 2 - triangle, higher frequencies 3 - sawtooth, lower frequencies 4 - sawtooth, higher frequencies 5,6 - noise (high and low volume) 7,8 - short and long pulse-waves 9 - square wave (much the same as normal Atari "pure" sounds) 0 - Mute Mac/65 source code included. It can easily be modified to include customised waveforms. Note that the first byte in each wave table is the length (-1) of the waveform. Due to the way the program works, it should be 1,3,7,15,31,63,127,255. This program could easily be used in conjunction with conventional a conventional music player, provided it has reasonably tight coding. Quote Link to comment Share on other sites More sharing options...
twh/f2 Posted March 24, 2006 Share Posted March 24, 2006 This program could easily be used in conjunction with conventional a conventional music player, provided it has reasonably tight coding. great news. But I think Raster already included something like this in his great RMT. What is the difference? \twh Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 24, 2006 Author Share Posted March 24, 2006 I'm fairly sure RMT "volume only" does it at the Vblank level, so only allowing 50 Hz tones. My routine does it at just under 8,000 samples / second, which allows complex waveforms. Quote Link to comment Share on other sites More sharing options...
emkay Posted March 24, 2006 Share Posted March 24, 2006 This program could easily be used in conjunction with conventional a conventional music player, provided it has reasonably tight coding. great news. But I think Raster already included something like this in his great RMT. What is the difference? \twh If it was, I would have used it already Quote Link to comment Share on other sites More sharing options...
danwinslow Posted March 24, 2006 Share Posted March 24, 2006 Rybags, this is cool as hell. And I'd like to thank you for the source code, studying good stuff is what I need to do a lot of when it comes to asm. Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 24, 2006 Author Share Posted March 24, 2006 I reckon it could be incorporated into RMT. Different translation tables for the frequencies would have to be generated, and the RMT player would need a slight rewrite to spread the load (ie- not do all processing in 1 block of scanlines). Since RMT nicely keeps shadow copies of the sound registers, the program could be adapted to only generate its waveforms under certain conditions. Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 24, 2006 Author Share Posted March 24, 2006 deltatst.zip OK. The popular "Delta" music .XEX file, hacked with my routine added to replace the normal bass sound which plays on channel 2, with a triangle waveform. Sure, it sounds crap because the frequency is rather out (translation tables need work), and it's playing a triangle wave where a guitar sound would be more appropriate, plus there's no ADSR (but that could be worked in with little trouble). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.