L

LambdaSpeak Speech Synthesizer, Sample Player, RTC, MP3, Serial Interface, MIDI

Started by LambdaMikel, 08:56, 01 May 17

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

GUNHED

Well, maybe it would be better to have an external mixer for better quality. Because mixing up all sound hardware in one line can't work out well. Some card will always be too silent or too loud. It would work with 2 cards in the same line but not with all what we usually have on our CPCs. So yes, use an external mixer board for this.

Just to remember what we got:
- CPC sound port
- LambdaSpeak
- PlayCity
- Digiblaster
- other exotic stuff like MP3 players etc. I don't even want to count

http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Bryce

There is an adjustment on the PCB to balance the Speech output level with the Aux input (designed for the CPC Audio output signal), but what you plug into the Aux-in is up to you the user (Line level only). The output can then be fed to a mixer if you really needed to mix further sources. My Digiblaster version also had this. I don't intend to accomodate ever single possible other CPC expansion. None of the other examples you gave do that either.

Bryce.

LambdaMikel

Quote from: Bryce on 08:59, 14 February 18Amdrum: The PCB already has everything it needs to emulate the Amdrum, you'd just need to feed a PWM pin from the AVR to the audio amplifier and write lots more code :)

Right, conceptually, that sounds like 5 to 10 lines of code, extremely trivial. IF - and that is a big IF - the  Atmega will be fast enough to do this while reading values from the port in parallel. It just is a tight loop, with one variable being assigned the current sample value, which then gets PWModulated over OC0B (PB4). Will know soon if that'll work!

Bryce

It will mean adding a few more passive components too I think. I'd need a lowpass filter on the PWM line before it goes to the amplifier.

Let's concentrate on the Speech functionality first before we start heading off on a tangent.

Bryce.

GUNHED

Quote from: Bryce on 15:29, 14 February 18
... None of the other examples you gave do that either.

Bryce.


Exactly, so why to bother with it? Leave it to the user to get an mixer / equalizer external if needed. Some will only use one device others will use 3 or 4 Devices.

http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Bryce

Because that's how it was done on the SSA-1 and DKTronics Speech Synths and that's what we're emulating.

Bryce.

LambdaMikel

#156
Figured out how to do PCM sample playing on OC0B (PB4):

https://youtu.be/tPkwgQiW3GE
If the bytes arrive fast enough from Amdrum, then this might work.
Will try over the weekend. 

The extra loudspeaker is attached using a simple RC (R = 470 Ohms, C = 100 nF) to PB4.
Timer0 has 8 Bit resolution; samples at 8 kHz.
The PCM test is invoked using control byte &C2.

Bryce

Sounds better than I was expecting.

Bryce.

LambdaMikel

Quote from: Bryce on 08:59, 16 February 18Sounds better than I was expecting.

Yes, surprising, right?
Well, it is a decent littler speaker (Harman/Kardon)  ;)

LambdaMikel

There is one problem, though:
whereas sample playing from PROGMEM works fine (see video above), and is stable, I am having a problem when reading PCM databytes from the CPC.
I did a simple test in BASIC

10 a=round(rnd(1)*255)
20 out &ff00,a
30 goto 10

and I simply expected to hear some static random in the speaker. Indeed, this worked, but it is not stable - after 5 seconds of "random PCM noise" the ATMega 644 resets or freezes. Not sure why or what that is!

Can that be a "brown out" or similar? Maybe it wouldn't happen with real PCM samples? This also doesn't happen when I fix the value, I have "10 a = 20" instead of random.

Any idea, anyone?

LambdaMikel

PS Amdrum is kind of unwieldy to test with (and I don't have the drum set DSKs... tape is aweful).


Does anybody have a piece of MC code that sends a small PCM sample to &FFxx?

LambdaMikel

Here is one more idea for the final version. Regardless of the Amdrum mode (if it will work we don't know yet), I will be adding a LambdaDrum mode. That will work as follows:


       
  • have 8 to 16 drums sampled in PROGMEM
  • have 3 PCM channels that get "mixed" on the fly -> OC0B / PB4 (so only one physical PCM output of course)
  • trigger the individual drums per channel with <x>, using &FBEE,<x>, with drum = <x> % 16, channel = <x> / 16
  • not sure if we could add even more virtual PCM channels together, I guess 3 is good enough for a drum computer
  • then, there would even be some <x> control bytes left, ... maybe some of these could even be used to trigger the speech synthesizer in parallel, or to define patterns etc. there could be a simple pattern sequence "on chip"  :)
@Bryce, that's also a good scenario for the update facility... people might want to flash it with different drum kits, and we only have space for, probably, 8 to 16 drums on chip left.

Bryce

If you code it, I'll adapt the hardware for it.

Bryce.

LambdaMikel

Quote from: Bryce on 22:00, 16 February 18If you code it, I'll adapt the hardware for it.

Great; yes, for LambdaDrum it only needs PB4 and the RC to audio.

For Amdrum, which I am not sure yet because of the PCM byte transmission issue, I had added one more output wire from the ATmega (PC2) to the CPLD. When Amdrum mode gets enabled, the ATmega sets that wire to 1, and this enables decoding of &FFxx on the CPLD side. Then, every IOREQ WRITE on &FFxx triggers the signal for "request recognized" for the ATmega. Not sure yet though if we will need this, as I said, it might not work at all.

Bryce

Have you still two further pins free for the USB?

Bryce.

LambdaMikel

Quote from: Bryce on 22:14, 16 February 18Have you still two further pins free for the USB?


We have PC3, PC4 left... that's it  ;D

Bryce


LambdaMikel


LambdaMikel

First steps towards Amdrum emulation -

https://youtu.be/5C2N-bqMDOw

Sound quality is still low, unfortunately. Not sure it can be improved.

LambdaMikel

#169
Quote from: LambdaMikel on 11:02, 17 February 18
Sound quality is still low, unfortunately. Not sure it can be improved.

Allright, I figured it out! Sound quality *rocks* now - listen here:

https://youtu.be/upVayBKlnow

@Bryce, we should definitly add this as feature. And thanks a lot to

Quote from: zhulien on 19:09, 13 February 18
for me, as an M4 card with SSA-1 and Dk'Tronics and 'if possible' Amdrum capability I'd love to buy at least 1... I recommend a jumper to wire it to the CPC sound pin as some people likely won't want it - but then others will - it will be mono but automatically blend with the CPC audio.

for suggesting to add Amdrum emulation! That will definitely help to get more people interested.

Actually, the sound quality is so good that I am questioning now whether I should still add LambdaDrum mode (which would have Samples stored in the ATmega).

robcfg

Amazing!


It's a lot of work but the results are indeed worth it  8)

zhulien

wow you guys are good, and FAST, you both put me to shame with my projects as far as getting stuff done... 


I'm actually glad AMDRUM support is there too, it is a piece of hardware although simple, I suspect wasn't very popular.  The software provided with AMDRUM was not great but then when i look at more recent sequencing software and those even built into the MIDI drum machine hardware, they are in fact not that much better.  With AMDRUM support, it will even give 'the option' of having digidrums through that in sync with CPC soundchip or the dual AY board for the MX4, but leave those things for future software developers.  The hardware is cool as it is, and given there is 'some software' usable now for it, opens even more to the World of CPC users.

zhulien

Quote from: LambdaMikel on 18:10, 16 February 18
Does anybody have a piece of MC code that sends a small PCM sample to &FFxx?


err...


something like


ld b,#ff
loop:
ld c,(hl)

out (c),c
inc hl
jr loop



from memory you need nothing more than that to play any sample with the AMDRUM, of course a loop counter... and optional delay

zhulien

are you taking orders / pre-orders yet?


And it sounds DAMN GOOD!!!



https://www.youtube.com/watch?v=pBuBxT3YEuI

zhulien

Quote from: LambdaMikel on 18:10, 16 February 18
PS Amdrum is kind of unwieldy to test with (and I don't have the drum set DSKs... tape is aweful).


Does anybody have a piece of MC code that sends a small PCM sample to &FFxx?


Surely you aren't loading it from tape are you?  It works on DISK unmodified if you use transmat or similar.  Just... you have to remember the drum track names and drumkit names as it doesn't list a disc directory.

Powered by SMFPacks Menu Editor Mod