About digitized speech - Sinclair

This is a discussion on About digitized speech - Sinclair ; The 48K Spectrum can only record about 5 seconds of digitized speech. But I know samples can be smaller and sound clearer if recorded on a PC, transferred to the Spectrum and played via the AY chip. Is there anyone ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: About digitized speech

  1. About digitized speech

    The 48K Spectrum can only record about 5 seconds of digitized speech.
    But I know samples can be smaller and sound clearer if recorded on a
    PC, transferred to the Spectrum and played via the AY chip. Is there
    anyone here who could help me? I don't know M.C. yet, only Basic. This
    is what I would like to be able to do:

    1-Have two routines in M.C. to record/play samples directly on the
    Spectrum. I know there are several sound samplers available for
    download, but I would like to be able to call the routines using
    Randomize usr. Settings like address and lenght could be set using
    Pokes.
    2-Have a program in M.C. to play samples by using the beeper or the AY
    chip. Again, such program would be called by using randomize and
    settings would be set by using Pokes.
    3 (the one I consider the most important, and the one I've always
    dreamed about) - A PC program that would allow me to convert WAV, RAW,
    (maybe even MP3?) files to a binary file with a bitrate and file
    lenght small enough to be imported into an emulator, thus allowing me
    to use program #1 or #2 to play it.

    Gasman told me he used some dos program to downgrade his digitized
    speech for one of his demos (Oldskool, I think), and then a script
    (written by him) was used to downgrade it even more. I asked for more
    information, but I've been unable to contact him again.

    If someone could help me, even if it's just with some quick assembler
    listing, it would be greatly appreciated.

    The reason I started thinking about this was because of high-quality
    speech samples, such as the ones used in Chase HQ and Robocop, and
    digitized music, which can be found in many russian games.

    Thanks


  2. Re: About digitized speech

    On 23 May 2007 20:10:49 -0700 da kidz on comp.sys.sinclair were rappin'
    to MC zxbruno:

    > The 48K Spectrum can only record about 5 seconds of digitized speech.
    > But I know samples can be smaller and sound clearer if recorded on a
    > PC, transferred to the Spectrum and played via the AY chip. Is there
    > anyone here who could help me? I don't know M.C. yet, only Basic. This
    > is what I would like to be able to do:


    Take a look at this for starters:
    ftp://ftp.nvg.ntnu.no/pub/sinclair/u.../WAVPlayer.zip

    Chris


    --
    +-------------------------------------------+
    | Unsatisfactory Software - "because it is" |
    | http://www.unsatisfactorysoftware.co.uk |
    | Your Sinclair: A Celebration |
    +- http://www.yoursinclair.co.uk -----------+

    DISCLAIMER: I may be making all this stuff up again.

  3. Re: About digitized speech

    zxbruno did eloquently scribble:
    > The 48K Spectrum can only record about 5 seconds of digitized speech.
    > But I know samples can be smaller and sound clearer if recorded on a
    > PC, transferred to the Spectrum and played via the AY chip. Is there
    > anyone here who could help me? I don't know M.C. yet, only Basic. This
    > is what I would like to be able to do:


    > 1-Have two routines in M.C. to record/play samples directly on the
    > Spectrum. I know there are several sound samplers available for
    > download, but I would like to be able to call the routines using
    > Randomize usr. Settings like address and lenght could be set using
    > Pokes.
    > 2-Have a program in M.C. to play samples by using the beeper or the AY
    > chip. Again, such program would be called by using randomize and
    > settings would be set by using Pokes.


    You have a problem there for a start.
    Using the AY chip to play a speccy sampled sound is not going to improve its
    quality. The speccy has an audio in port, yes. But it's for tape loading and
    thus, is only a 1 bit port. 1 bit sound sampling is truly terrible. Play
    meteor storm by quiksilva for an example of just how bad.

    > The reason I started thinking about this was because of high-quality
    > speech samples, such as the ones used in Chase HQ and Robocop, and
    > digitized music, which can be found in many russian games.


    OI! Don't forget starglider!

    --
    -----------------------------------------------------------------------------
    | spike1@freenet.co.uk | Windows95 (noun): 32 bit extensions and a |
    | | graphical shell for a 16 bit patch to an 8 bit |
    |Andrew Halliwell BSc(hons)| operating system originally coded for a 4 bit |
    | in |microprocessor, written by a 2 bit company, that|
    | Computer Science | can't stand 1 bit of competition. |
    -----------------------------------------------------------------------------

  4. Re: About digitized speech

    > Take a look at this for starters:
    > ftp://ftp.nvg.ntnu.no/pub/sinclair/u.../WAVPlayer.zip
    >
    > Chris


    I know about the WAV player, but it's very limited.

    > You have a problem there for a start.
    > Using the AY chip to play a speccy sampled sound is not going to improve its
    > quality. The speccy has an audio in port, yes. But it's for tape loading and
    > thus, is only a 1 bit port.


    I understand. But I'm not trying to digitize the sound using the
    speccy's audio-in port. I would like to be able to convert, let's say,
    MP3 of WAV files to binary files that can be played on the speccy.

    I know there are 4-bit sampled instrument trackers, but no samplers. I
    know it has to be done on the PC first. Some people use Sox to
    downgrade the quality, but it's too complicated for me.

    I was able to figure out how to use the 'Sample Tracker'. You could
    load the demos and play the digitized sound via the beeper or AY chip
    (your choice). This is almost what I need, and the quality is nice!

    http://tcg.speccy.cz/index.php?pg=tools-en

    Quote from the person who sent the link to me:

    "Run it in USR0 mode. There are a few songs at the end of the tap.
    After loading, just open up your tape browser and point at "MATASONG
    3", then choose "LOAD SONG" with QAOP and SPACE and then load up the
    instrument samples by selecting "LOAD SAMPLES" (note: LOAD SAMPLES is
    not the same as LOAD SAMPLE; obviously a bit of a user-interface error
    there ). Then select PLAY to hear the AY chip rendition, which is
    clearly a 4-bit jobbee. There is also a PWM player for the beeper --
    just click on OUT to change to SPEAKER and hit PLAY again. I do not
    believe this is how it actually sounds on a real Spectrum -- I expect
    the high frequency noise is filtered out by the speaker and the driver
    circuitry which acts like a low pass filter, which I don't think is
    emulated by anyone now.

    As for what the msx folks have been up to, here are actual recordings
    from a Philips machine and AY chip playing 8-bit sampled audio encoded
    by the viterbi encoder:

    http://www.bluemsx.com/vg8020psg.mp3
    http://www.bluemsx.com/psgenc/royksopp.mp3

    And original thread to read up on the details:

    http://www.msx.org/forumtopic5686.html

    I've toyed a bit with writing a MOD player, after gasman provided a
    stolen volume table from the ATARI ST that supplied 7-bit audio on the
    AY chip, but only toyed. You can probably find the thread in here with
    MOD in the title. One thing is clear: the speccy's z80 is not fast
    enough to implement all the MOD features 100% with 7-bit audio, but it
    might be possible to do something interesting.

    Quote:
    Do you know of any game or demo or someone who tried it on the speccy?

    7- or 8-bit audio, no. But there are 4-bit audio sampled tunes in
    several demos. The 8-bit example from the msx folks is as close as we
    have for real hardware. I suppose someone could go through the
    formality of actually assembling stuff to run on a real 128 so we can
    say it was running on it

    Quote:
    The popular sound editors won't let me resample audio to those low
    levels. And gasman told me about Sox, but he too had to write a custom
    script to downgrade the raw sample until he reached the desired level.

    Hmm, okay I thought the windows sound editors included quantizing
    controls. A long, long time ago I also used SOX and converted audio
    formats to raw, then hacked together a small program to requantize it,
    then used SOX again to convert to whatever the destination format was.
    I wrote a simple 4-bit player with audio stored on disk so there was
    only a 1 second or so pause while the next part of the sample loaded.
    I played these on my 2068 and the audio quality was quite good -- I
    managed to fill up a few disks with various TV theme songs that I
    missed since a website full of them had just appeared at that time.
    But storing raw samples is very, very memory intensive and is not
    practical unless you have a ****load of memory available from
    something like a SD or compactflash card attached to your speccy.

    Better are trackers like the 4-bit one above or possibly a MOD-like
    player that plays sampled instruments at varying pitch. This way the
    number of samples (number of instruments) are finite and their lengths
    short.

    Quote:
    At the time when Robocop and Chase HQ came out, they didn't had all
    the tools we have today, and they were able to make the Speccy 'talk'
    with better quality. They had to prepare the sample somewhere and then
    transfer it to the spectrum. I wonder how they did it.
    ADCs were around and could be bought for the spectrum. But more than
    likely the samples came from a PC with appropriate sampling hardware
    that came with a sound card.

    Quote:
    I'm also looking for a simple hybrid program (basic+m.c.) that would
    allow me to play the sampled data on ram. The BASIC program should ask
    for the address and lenght values, use POKE to set the m.c. player
    settings, and calling the player by using RANDOMIZE USR. Any ideas?

    The samples will usually be played at 8kHz (8000 samples per second).
    If they're 4bit and you pack two four-bit samples in a byte, this
    means all of 5 seconds of audio in 40K. It's not too practical
    unfortunately.

    Much better would be to work with a compactflash system or work on
    some kind of tracker/mod player. I would do it myself but as I have
    limited time, I have to be careful what speccy-related projects I take
    on or else nothing gets done, and as I've just signed up for one of
    aowen's projects that takes me out for a while."

    "http://www.geocities.com/aralbrec/tidbits/bsynth.zip

    The zip file contains a simple program sampleconv.exe I wrote a few
    years ago that converts a raw audio sample into another raw audio
    sample at any lower bit resolution. It uses the minimum and maximum
    sample value to determine the range before applying the quantization.
    If the sample has some loud spikes this won't be very good (the
    majority of the sample will be quiet and will not take advantage of
    the full dynamic range) -- a better version would probably look for
    these spikes, reduce the range and clip them.

    Anyway it also contains some PWM beeper dac code, with the tap
    included playing a short 4.7-bit equivalent guitar riff on the beeper.
    The carrier frequency is at 16kHz, that's why it sounds much better
    than the Sample Tracker beeper output. Some emulators don't emulate
    the beeper well enough to get a clear sample, but Spectaculator (and
    probably other recent emulators) will."

    Some other info from Gasman that got me thinking:

    "Chase HQ used the AY chip, which gives you 4-bit audio quality (sort
    of). Combining video and good quality audio on a Spectrum (emulated or
    otherwise) is an unsolved problem though... with an IDE interface
    you're limited by the speed of the Spectrum's data bus - my routine on
    the DivIDE was only playing at 5.5KHz IIRC."

    Still sounds pretty incredible to me!!

    /On-topic:

    Besides the demos that come with the Sample tracker, there are also
    russian games which include digitized music, and it seems to play for
    more than 5 seconds. I have no idea how they do this. One of those
    games is recent, 'Kolo-something' (forgot the name).

    I have experience with Sound Forge and Goldwave. It would be great if
    we could open any audio file in our favorite audio editor and convert
    it to be ready to play on the Speccy in a few easy steps.



  5. Re: About digitized speech

    Gasman has released (just a few minutes ago) what I was looking for!

    >http://www.zxdemo.org/extra/src/samplepack-20070527.zip
    >Instructions are included in the zip file. Enjoy!
    >Gasman.


    Thank you so much!


  6. Re: About digitized speech

    On 27 May 2007 15:19:50 -0700 da kidz on comp.sys.sinclair were rappin'
    to MC zxbruno:

    > Gasman has released (just a few minutes ago) what I was looking for!


    That is utterly fantastic. The only problem is that I'm now going to
    be over-run with CGC entries boasting fantastic quality digitised
    speech.

    Chris


    --
    +-------------------------------------------+
    | Unsatisfactory Software - "because it is" |
    | http://www.unsatisfactorysoftware.co.uk |
    | Your Sinclair: A Celebration |
    +- http://www.yoursinclair.co.uk -----------+

    DISCLAIMER: I may be making all this stuff up again.

  7. Re: About digitized speech

    On May 27, 11:46 pm, "Chris Young"
    wrote:
    > On 27 May 2007 15:19:50 -0700 da kidz on comp.sys.sinclair were rappin'
    > to MC zxbruno:
    >
    > > Gasman has released (just a few minutes ago) what I was looking for!

    >
    > That is utterly fantastic. The only problem is that I'm now going to
    > be over-run with CGC entries boasting fantastic quality digitised
    > speech.


    Do you realise that the literal meaning of "fantastic" is "pertaining
    to fantasy", hence by extension it means "absurd, ridiculous"? Just
    the thing for the CGC. :-)


+ Reply to Thread