Speech for the VIC WITHOUT special hardware

Discuss anything related to the VIC
PhilRanger
Vic 20 Hobbyist
Posts: 143
Joined: Thu Aug 25, 2011 10:04 am

Speech for the VIC WITHOUT special hardware

Post by PhilRanger »

Anybody ever looked at this? Looks like it could work on a VIC. Anybody has a list of the frequencies produced by the 3 oscillators (36874,75,76) instead of notes?

http://www.haskins.yale.edu/featured/sws/tonecombo.html#
Phil Ranger
-------------
"Don't eat the trees 2" for the VIC 20 : http://www.box.net/shared/u398kj0nr0lkauzm1k67
on line: http://www.mdawson.net/vic20chrome/vic2 ... otrees.prg
matsondawson
The Most Noble Order of Denial
Posts: 343
Joined: Fri May 01, 2009 4:44 pm

Post by matsondawson »

That's pretty cool, of course there's already the Robotic Warrior/Liberation demos. I wonder if they works similarly.

http://www.youtube.com/watch?v=BiN2F1o2qwY
Vic20-Ian
Vic 20 Scientist
Posts: 1216
Joined: Sun Aug 24, 2008 1:58 pm

Post by Vic20-Ian »

Isn't there speech in Berzerk MMX?
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
Kananga
Vic 20 Afficionado
Posts: 317
Joined: Mon Mar 08, 2010 2:11 pm

Re: Speech for the VIC WITHOUT special hardware

Post by Kananga »

PhilRanger wrote:Anybody ever looked at this? Looks like it could work on a VIC. Anybody has a list of the frequencies produced by the 3 oscillators (36874,75,76) instead of notes?
http://www.haskins.yale.edu/featured/sws/tonecombo.html#
Although it is always valuable to try things in different ways, my first shot at synthesizing speech on the VIC would be to use samples for allophones.
E.g. the SPO256 used in many speech modules uses 59 allophones stored in an internal ROM. Playing back 4-bit samples at 4kHz should be enough for speech, but I doubt enough samples fit into the RAM of the unexpanded VIC. A challenge? ;)

Composing the audio signal from different frequencies (using the oscillators of the VIC chip), should it be possible, doesn't help here.
If I read the referenced article correctly, you have to modulate the frequencies over time, which is just another form of sample, e.g. information to store somewhere.

*) Just found this:
"Speech! uses about 8K of memory for player and sample data. The samples are stored as packed 4-bit values to send to the AY"
Buy the new Bug-Wizard, the first 100 bugs are free!
16KVIC20
Vic 20 Nerd
Posts: 510
Joined: Tue Apr 06, 2010 5:02 am

Post by 16KVIC20 »

Vic20-Ian wrote:Isn't there speech in Berzerk MMX?
There is indeed. I was quite amazed.
PhilRanger
Vic 20 Hobbyist
Posts: 143
Joined: Thu Aug 25, 2011 10:04 am

Post by PhilRanger »

I reversed engineered berzek and I'm toying with my own sampler. Crude example: Vic plays the intro to "Walk this way" from aerosmith (8k expansion).

http://www.box.net/files#/files/0/f/112 ... _938218722

I think I can do better, quality wise and size wize, this was just a quick "proof of concept". MP3 files go to frequency domain to reduce the quantity of information without too much damage (remember, we're talking 8 bits here!). Delta encoding might help too. Using the oscillators can act like vocoders from cell phones as well.
Phil Ranger
-------------
"Don't eat the trees 2" for the VIC 20 : http://www.box.net/shared/u398kj0nr0lkauzm1k67
on line: http://www.mdawson.net/vic20chrome/vic2 ... otrees.prg
PhilRanger
Vic 20 Hobbyist
Posts: 143
Joined: Thu Aug 25, 2011 10:04 am

Post by PhilRanger »

Zero downloads? I just realized 2 things:

1-

I think my link wasn't good:

http://www.box.net/shared/ayctsv3kl5dxgv4885gk

Shouldn't ask a passwork (please let me know if this doesn't work)

2- It's not just cutes pokes to 36874-75-76, we're talking sampling from the original recording.
Phil Ranger
-------------
"Don't eat the trees 2" for the VIC 20 : http://www.box.net/shared/u398kj0nr0lkauzm1k67
on line: http://www.mdawson.net/vic20chrome/vic2 ... otrees.prg
User avatar
orion70
VICtalian
Posts: 4343
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Post by orion70 »

Well, one download more :) . This can be an interesting new field for VIC development Phil, but I don't get how the sampling is done, nor if also speech can be sampled (only 2 seconds of music in the prg you posted). Sorry for my poor knowledge in this matter.
User avatar
TLovskog
Vic 20 Enthusiast
Posts: 194
Joined: Fri Mar 25, 2011 3:16 pm
Location: Kävlinge, Sweden

Post by TLovskog »

Downloaded ok and worked like a charm. Really cool stuff.
BR
Thomas Lövskog
Vic20-Ian
Vic 20 Scientist
Posts: 1216
Joined: Sun Aug 24, 2008 1:58 pm

Sampling

Post by Vic20-Ian »

Back in the days when I had a plus/4 I remember a type in that allowed Analogue to Digital conversion via the tape deck.

You placed an audio tape into the cassette deck and sampled to memory then could play back with basic effects by pressing the function keys.

It was pretty impressive for a type in.

I am sure the Vic could replicate it with enough ram expansion e.g. FE3. Could be a good use of Kananga's ram disk mode?

I can't remember the magazine or type in name but it was possibly Commodore User or Your Computer around 1985/7.

Any Plus/4 users remember this one?
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
PhilRanger
Vic 20 Hobbyist
Posts: 143
Joined: Thu Aug 25, 2011 10:04 am

Post by PhilRanger »

The main limitations are

A- Memory! 2 ways to look at it: (supposing memory in all blocks, keeping 200 bytes for overhead)
1- Max time = (39200 bytes free).(8 bits per byte) / ( (number of bits per samples).(sampling rate))
example: 39200*8/(4*2000)=39.2 seconds

2- Max sampling frequency = 39200*8 / (nb bits per sample*time)
example: my file is 10 seconds and I'll encode it at 4 bits per sample
sampling frequency=39200*8/(4*40)=7840 samples per second.

B- Only 4 bits on the volume (poke 36878,0-15), but can be extended by using PWM (but this lowers the sampling rate). I'm working on this now, but I'm still unsure if more bits sounds better than higher sampling rate

The "Walk this way" demo used only 7 KB, not the full memory

I transferred a mp3 file to CBM prg STudio through cool edit, wordpad and excel
Phil Ranger
-------------
"Don't eat the trees 2" for the VIC 20 : http://www.box.net/shared/u398kj0nr0lkauzm1k67
on line: http://www.mdawson.net/vic20chrome/vic2 ... otrees.prg
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

I have a couple of old sample demos here:
http://user.tninet.se/~pug510w/datormus ... ml#samples
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
PhilRanger
Vic 20 Hobbyist
Posts: 143
Joined: Thu Aug 25, 2011 10:04 am

Post by PhilRanger »

Boray wrote:I have a couple of old sample demos here:
http://user.tninet.se/~pug510w/datormus ... ml#samples
What sample rate/depth did you use?
Phil Ranger
-------------
"Don't eat the trees 2" for the VIC 20 : http://www.box.net/shared/u398kj0nr0lkauzm1k67
on line: http://www.mdawson.net/vic20chrome/vic2 ... otrees.prg
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Re: Sampling

Post by Boray »

Vic20-Ian wrote:Back in the days when I had a plus/4 I remember a type in that allowed Analogue to Digital conversion via the tape deck.

You placed an audio tape into the cassette deck and sampled to memory then could play back with basic effects by pressing the function keys.

It was pretty impressive for a type in.

I am sure the Vic could replicate it with enough ram expansion e.g. FE3. Could be a good use of Kananga's ram disk mode?

I can't remember the magazine or type in name but it was possibly Commodore User or Your Computer around 1985/7.

Any Plus/4 users remember this one?
No, but I modified a c64-tape player once to record and playback. I have it somewhere. It used 1-bit samples so you could store pretty long samples but it sounded terrible. (8 samples per byte).
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

Here, uploaded it for you:
http://user.tninet.se/~pug510w/datormus ... ampler.zip

It's two .d64 files.
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Post Reply