Jump to content
artrag

Voice without intellivoice

Recommended Posts

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 by artrag
  • Like 6

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

  • Like 1

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Do you use it on the command line with jzintv?

 

[edit]

problem solved, the ECS rom was missing.

thanks!

Edited by artrag

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

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. :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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. :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by artrag
  • Like 2

Share this post


Link to post
Share on other sites

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. :) :thumbsup:

Edited by DZ-Jay

Share this post


Link to post
Share on other sites

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?

  • Like 1

Share this post


Link to post
Share on other sites

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 by artrag
  • Like 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by artrag

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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) ?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...