artrag Posted June 11, 2016 Share Posted June 11, 2016 (edited) This program in intybasic shows that the sole AY8910 is able to generate low quality voice on the ISR The "trick" is in the encoder, as the player merely updates the tones and the volumes once per frame The a deeper explanation on how the encoder works is here. Even if the audio is barely intelligible, the result, looking at how simple is the player, is fascinating Enjoy! intyLoFi.rar Edited June 11, 2016 by artrag 6 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted June 11, 2016 Share Posted June 11, 2016 This program in intybasic shows that the sole AY8910 is able to generate low quality voice on the ISR The "trick" is in the encoder, as the player merely updates the tones and the volumes once per frame The a deeper explanation on how the encoder works is here. Even if the audio is barely intelligible, the result, looking at how simple is the player, is fascinating Enjoy! Neat. I'm out on a family emergency, but will check it out when I return. By the way, I understand that the PSG can be employed in a similar manner to the SID, turning the volume register into essentially a fourth channel, acting as a pulse code modulator (PCM) to play low-bitrate samples. dZ. Quote Link to comment Share on other sites More sharing options...
artrag Posted June 11, 2016 Author Share Posted June 11, 2016 Yes, but this is not the case. You cannot do pcm audio at 60Hz (unless your audio signal has a bandwidth of 30Hz) The encoder is a true vocoder based on spectral analysis of the input signal that tries to approximate each audio segment of 1/60 of sec using 3 square waves 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted June 12, 2016 Author Share Posted June 12, 2016 I'm trying to use the ecs chip in intybasic but I get no sound. In there some special setting for the emulator to have ecs active? What could be wrong? Quote Link to comment Share on other sites More sharing options...
pimpmaul69 Posted June 12, 2016 Share Posted June 12, 2016 I'm trying to use the ecs chip in intybasic but I get no sound. In there some special setting for the emulator to have ecs active? What could be wrong? on the pi its -s1. Not sure if its that on other systems. Maybe --s1? Quote Link to comment Share on other sites More sharing options...
artrag Posted June 12, 2016 Author Share Posted June 12, 2016 (edited) Do you use it on the command line with jzintv? [edit] problem solved, the ECS rom was missing. thanks! Edited June 12, 2016 by artrag Quote Link to comment Share on other sites More sharing options...
decle Posted June 12, 2016 Share Posted June 12, 2016 Very cool. I like the use of higher tones in the sound to get some character into the voice. As DZ-Jay suggests it is possible to generate low quality PCM sound by setting up a low frequency sound and then banging the volume register to modulate the resulting signal. The technique is described here: http://map.grauw.nl/articles/psg_sample.php As you say it requires significantly more processing than this ISR based approach, but this does work and is correctly modelled by Jzintv. 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted June 12, 2016 Author Share Posted June 12, 2016 (edited) I know, I contributed to the math behind that web page Edited June 12, 2016 by artrag 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted June 12, 2016 Author Share Posted June 12, 2016 I succeed in using the PSG and the ECS at the same time In this demo the voice is simulated using 6 channels Does it improve ? ecsLoFi.rar Quote Link to comment Share on other sites More sharing options...
decle Posted June 12, 2016 Share Posted June 12, 2016 I know, I contributed to the math behind that web page Apologies, I did not make the connection. And thanks for that work and post. It was very useful recently when writing the sound for my SFMT emulator for the Intellivision. Quote Link to comment Share on other sites More sharing options...
artrag Posted June 12, 2016 Author Share Posted June 12, 2016 (edited) Just to be sure, is there in intybasic a way to tell if ECS is present or not? Edited June 12, 2016 by artrag Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted June 12, 2016 Share Posted June 12, 2016 Just to be sure, is there in intybasic a way to tell if ECSis present or not? Poke an 8 bit value into address 0x4000 and read it back. If you get the same value back do the same with a different 8 bit value. If you get back what you wrote then its an 8 bit ECS RAM. Don't use the values 0x00 or 0xFF. Quote Link to comment Share on other sites More sharing options...
artrag Posted June 12, 2016 Author Share Posted June 12, 2016 Thanks, now this code plays both with or without ECS If ECS is not detected, the PSG will try to play the best 3 harmonics and the rom will suggest to try to plug an ECS module If ECS is detected, all 6 channels are use for playing the sampled voice intyLoFi2.rar Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted June 13, 2016 Share Posted June 13, 2016 I know, I contributed to the math behind that web page Thanks for that, I also missed your attribution, but I see now "Arturo Ragozini" = artrag. Quote Link to comment Share on other sites More sharing options...
Arnauld Posted June 13, 2016 Share Posted June 13, 2016 By the way, I understand that the PSG can be employed in a similar manner to the SID, turning the volume register into essentially a fourth channel, acting as a pulse code modulator (PCM) to play low-bitrate samples. The so-called 'SID voice' was (is) quite popular on the Atari ST, which also includes a clone of the PSG. It implements it by setting up a high frequency timer to change the volume register many times per second. At some point, I did some SID voice experiments on the Intellivision, but without much success. We are of course lacking a programmable timer and the CP-1610 is too slow to emulate one anyway. Quote Link to comment Share on other sites More sharing options...
artrag Posted June 13, 2016 Author Share Posted June 13, 2016 (edited) Yes, for pcm audio or you do cycle accurate code (stopping anything useful while playing samples) or you have programmable timers able to trig interrupts (not on intellivision nor on msx). But for human voice things are different. You can extract some spectral features from each voice segment of 1/60 of second and play them on the audio chips getting something more or less understandable. Edited June 13, 2016 by artrag 2 Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted June 16, 2016 Share Posted June 16, 2016 (edited) I just had a chance to listen to the sampled voices and I must say I am very impressed. The "ECS" one is the most intelligible, of course, but it is very impressive. I do not know much about audio engineering, so I am not sure to what extent the algorithm could be improved. However it occurred to me that it could be slightly more intelligible if you reduce the number of harmonics simulated, and treat it closer too the classic vocoder, without getting to close to the Kraftwerk "robot voice." In any case these would do great in any game. Edited June 16, 2016 by DZ-Jay Quote Link to comment Share on other sites More sharing options...
freewheel Posted June 17, 2016 Share Posted June 17, 2016 Dude, this is stunning. Especially as you're not having to blank the screen to do it. You have actual gameplay while this speech happens. There's some high frequency whine but otherwise it's amazing speech synthesis for this kind of hardware. I've toyed with this, but I'm hand bit-banging and as you can imagine, it's damned near impossible to come up with anything good at all - and I'm not exactly what you'd call an audio engineer. I have a few sound effect types (not just voice) that I'd love to convert into this format, and try it out in full blown games. If you're willing to share, I'd love to know how you came up with the data. I see the program you linked to, but the output there seems designed for the MSX (I assume)? Is it just a different version of the program for the IntyBASIC data? 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted June 17, 2016 Author Share Posted June 17, 2016 (edited) If you want, I can release a stand alone encoder able to produce the same .bas files included in intyLOFI2.rar from any wav file. You can write your replayer by using as template ecsLOFI.bas. If will need to install some matlab libraries for windows. Edited June 17, 2016 by artrag 1 Quote Link to comment Share on other sites More sharing options...
freewheel Posted June 17, 2016 Share Posted June 17, 2016 That would be awesome, and much appreciated Quote Link to comment Share on other sites More sharing options...
+Tarzilla Posted June 18, 2016 Share Posted June 18, 2016 If you want, I can release a stand alone encoder able to produce the same .bas files included in intyLOFI2.rar from any wav file. You can write your replayer by using as template ecsLOFI.bas. If will need to install some matlab libraries for windows. Then write a tool to produce intellivoice compatible data so it can do all the work of playing the samples Quote Link to comment Share on other sites More sharing options...
+DZ-Jay Posted June 18, 2016 Share Posted June 18, 2016 If you want, I can release a stand alone encoder able to produce the same .bas files included in intyLOFI2.rar from any wav file. You can write your replayer by using as template ecsLOFI.bas. If will need to install some matlab libraries for windows. Any chance that you (or anybody else) will write a self-contained tool that just translates a WAV file into PSG data? Also, could this be turned into something like "SAM"? I mean, a pre-recorded set of allophone data that can be strung together using a simple declarative syntax to produce synthesized speech? -dZ. Quote Link to comment Share on other sites More sharing options...
artrag Posted July 2, 2016 Author Share Posted July 2, 2016 (edited) I was doing a tool to generate psg files for the voice player and I'm having problems with intybasic Can I include a .bas file that in turn includes other .bas files? It seems not allowed by the compiler.... Is this the problem? Edited July 2, 2016 by artrag Quote Link to comment Share on other sites More sharing options...
+Tarzilla Posted July 2, 2016 Share Posted July 2, 2016 I was doing a tool to generate psg files for the voice player and I'm having problems with intybasic Can I include a .bas file that in turn includes other .bas files? It seems not allowed by the compiler.... Is this the problem? Nope. Currently not a feature. Main .bas is the only file that can INCLUDE, not subs Quote Link to comment Share on other sites More sharing options...
artrag Posted July 2, 2016 Author Share Posted July 2, 2016 Another question: I'm trying to define a procedure that should process on a stream of data that changes according to an initialization step How to do that without pointers and arrays with two dimensions? I have these data frame0: include "gradiusgaiden_0000.wavfrm_inty.bas" DATA -1 frame1: include "gradiusgaiden_0001.wavfrm_inty.bas" DATA -1 frame2: include "gradiusgaiden_0002.wavfrm_inty.bas" DATA -1 and I would like to access to one of the above arrays with something like frames(n) where frames can be any of frame0, frame 1 or frame2 What is the solution ? #frames=VARPTR frame0 seems not working how should I read the data pointed by #frames ? PS Should I use peek(#frames) ? 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.