Jump to content

Speakjet - A PIC ready sound chip?


herr_prof
 Share

Recommended Posts

uups, I totally forgot about MSA, I've been so keen on SCP  :-[

Guess that's my problem: always two steps (too far) ahead  :-\

I can talk to the Speakjet by RS232 now (was my buggy Mac USB-Serial Adaptor; switched to my old PC)  :D yipee ! :D

...but still struggeling with the PIC16:

To continue debugging, you could do the following: don't connect the SpeakJet Rx line to the PIC16F88 Tx output, but just connect the PIC with your RS232 interface

I tried that (only connected to my PC and powered from the IIC line of my core module and removed the MAX232):

the PIC16 constantly sends these values:

[tt]0x1c 0x1c 0x00 [/tt]

followed by a BREAK notification "led-flash" in my current terminal program (RealTerm.exe)

And nothing happens when I try to send values (neither via RS232 nor via IIC),

The errorneous audio example below matches the timing...

(I already tried another PIC16, no difference)

Hmmm, this could be a constant resetting of the PiC16 and/or an error in the slave-ID-determination of the IIC-line, or something about the baud-setup, I guess...

Measuring the IIC port again shows me, the poles Vd to Vs of the IIC connector are slightly conductive (if I measure Vd with the COM pin of my Multimeter)... but are not conductive from + to GND...

As it's the same on the Core Module, I think this is okay ... (god, I hope there's no wire hair hanging somewhere... or even worse: a wrong wired elko... this would be really embarassing  :-[ )

Thanks for your input so far -

I'll keep you updated!

Michael

I updated my breadboard plan to reflect the current board-situation:

http://www.audiocommander.de/downloads/midibox/mbhp_iic_speakjet_10.board.pdf

I also uploaded recordings of this behavior (of course with the SJ mounted):

http://www.audiocommander.de/downloads/midibox/SpeakJet_ErrorWithPIC16.mp3

If anyone interested to hear, this is the 'normal' Demo-Mode, with M0 ungrounded, without the PIC :)

http://www.audiocommander.de/downloads/midibox/SpeakJet_Demo_Ready.mp3

Link to comment
Share on other sites

  • Replies 345
  • Created
  • Last Reply

Top Posters In This Topic

the PIC16 constantly sends these values:

0x1c 0x1c 0x00

it looks like a 0x55 with wrong baudrate - did you setup your RS232 interface correctly?

Hmmm, this could be a constant resetting of the PiC16 and/or an error in the slave-ID-determination of the IIC-line, or something about the baud-setup, I guess...

baud rate: the PIC always sends with 19200 baud. It sends a 0x55 for autobaud detection after startup

Resets: there are two cases where this can happen: 1) the 1k pull-up is not connected to the IIC SC(K) like, or 2) MIOS_IIC_Stop() hasn't been executed from the Init() function

I guess that you've considered both (I just checked your code again, you have a call to SPEAKJET_Init, which propably contains MIOS_IIC_Stop()

Have you ever accessed an IIC device (e.g. BankStick) from this core module? Is the cable between PIC Pin #28 and J4:SC connected?

Yesterday, my girlfriend passed the door and I heard her singing: READY - READY - READIYYAAJIII

;-)

Best Regards, Thorsten.

Link to comment
Share on other sites

Is the cable between PIC Pin #28 and J4:SC connected?

whoosh! so near and yet so far from my thoughts (and eyes)!!

this core is the third one I've soldered and because I soldered it some time ago (and tested with programs not involving IIC) I've been totally convinced that it's working properly!! And now I see, that I've put this bridge cable in the hole of Mike's Board (there's just a hole with no connections) instead of connecting it to pin#28 (which I did with the other two modules). And because it's the third one, which I soldered some time ago, I focussed only on the speakJet board...

:-[ :-[ :-[ (triple embarrasment)

Thank you so much for pointing me to the right direction :D

Cheers,

Michael

(btw: that also explains what killed the backlight from my LCD... buhuu, the nice blue one :'( THAT was an expensive and painful learning lesson ::)

but I'm a lot more happy that it runs now! NO MORE READY!!! ;D

and pps:

my breadboard is okay, 've put it to the Wiki!

Link to comment
Share on other sites

That chip is fantastic!

I just wanted to point to the Wiki, I am currently adding lots of resources and tutorials (as promised)...

So if anyone here is building it's own SpeakJet IIC module, you might want to look there before :)

I'm also working on a first MSA/SCP class to control the module by CC's and NOTE_ONs, so keep an eye on it ;)

Cheers,

Michael

Link to comment
Share on other sites

Hello again,

I just stumbled about a slight programming problem with MIOS:

I want to control Speakjets Frequencies by SCP. A value between 0 - 3999 (11bit, manual p.10) is expected.

For example: "\0 1J 2500N X" would set the frequency of OSC1 (1J) to 2500Hz (2500N)...

but as far as I can see, [tt]MIOS_IIC_ByteSend(unsigned char b)[/tt] - called by [tt]IIC_SPEAKJET_TransmitByte()[/tt] - just sends 8bit, whereas the SpeakJet receives up to 16bits.

It's no problem from the PC, so I wonder if there's a method to transmit an 11bit value by IIC so that it's automatically received in the right way?

Otherwise I would have to change the PIC16-Firmware and write kind of a MSB/LSB merging function...

Cheers,

Michael

Link to comment
Share on other sites

Hi Michael,

The values you want to send are the ASCII bytes for the number, not the number itself, so for the phrase

"\0 1J 2500N X" the code would be:

IIC_SPEAKJET_TransmitByte('\');

IIC_SPEAKJET_TransmitByte('0');

IIC_SPEAKJET_TransmitByte(' ');

IIC_SPEAKJET_TransmitByte('1');

IIC_SPEAKJET_TransmitByte('J');

IIC_SPEAKJET_TransmitByte(' ');

IIC_SPEAKJET_TransmitByte('2');

IIC_SPEAKJET_TransmitByte('5');

IIC_SPEAKJET_TransmitByte('0');

IIC_SPEAKJET_TransmitByte('0');

IIC_SPEAKJET_TransmitByte('N');

IIC_SPEAKJET_TransmitByte(' ');

IIC_SPEAKJET_TransmitByte('X');

Or at least, something similiar :).

Cheers,

Tom

Link to comment
Share on other sites

Hey, I just got my speakjet all breadboarded up and running! It doesn't sound great-because I am just running the output straight in to the mixer (no low pass circuit yet) - but it works! I've got it responding to the midi keys as in the example code. Time to play with those c definition files Michael created. Thanks TK - this is going to be fun!

Justin

p.s. I just soldered up my first new SmashTV core design - I have to say it is phenomenal! Thanks a lot SmashTV! I can only imagine the effort you put into it's desig and construction.

Link to comment
Share on other sites

Hi Justin,

nice to hear that you're in, too :D

if you can wait a few days, you get even more... currently I can mix MSA (pitch, bend, speed, allophones, soundfx, phrases, pauses...) and SCP controls (ENV/OSC), convert 12bit values to single char string patterns and it works really well...

I just want to implement a rough phrase storage. I need this thing in a first version by the end of next week, so you can be sure I am putting some code to the wiki until then :)

That's by far not all that I want to do (hrm, maybe it's got to do with frequencies & harmonics?  :-X), but enough for a first version and quick pre-release...

Promised!

Cheers,

Michael

ps: the lowPass filter has one side-effect: it makes the whole thing very silent. I am trying to get a fully battery operated speakJet along with a soundbug (http://www.soundbug.biz/) and had to solder an additional output that bypasses the low-pass section. Now I can choose wether to take the silent hi-quality or the loud low-quality pin :)

Link to comment
Share on other sites

Hey, quick question to any who have the speakjet up and running:

I have mine saying the phrase "Can I Get Some Bootie?" - with each word on a different midi note.

Most of the time it works fine but sometimes it stops in the middle of a word. For instance it will say "ge" instead of "get", leaving off the "t". I also tried to have it say "Booootie", with a bunch of the o sounds in the middle, but this exagerates the problem and it almost never says the "tie" portion. Has anyone else seen(heard) this behaviour?

I am sending a TransmitStart and Stop before and after each byte - is this correct?  I thought I could send it before and after each set of bytes, but it doesn't seem to work with out this.

Thanks,

Justin

Link to comment
Share on other sites

I am sending a TransmitStart and Stop before and after each byte - is this correct?  I thought I could send it before and after each set of bytes, but it doesn't seem to work with out this.

No, you should be able to transmit more than one byte between these calls.

(although I noticed some unexpected sounds from time to time if I fill the buffer too fast; ...you know that you can store your phrase to the SJ's EEPROM? should work better than just calling allophones; if I understood that right)

have you checked on a rs232 terminal what is actually sent?

(the pic16 forwards the serial data to the max232)

best regards,

Michael

ps: I'm still struggeling with the BCD conversion, might take another week or two until I release something...

(but I'm making progress... slowly but steady ;)

Link to comment
Share on other sites

Thanks Michael - I thought I should be able to do that - but it doesn't seem to work for me. I am still just playing with the code though. I haven't had enough time to do much yet. I haven't gotten to the phrase storage yet. I should have some more time tommorow to mess with it. I saw your post on the BCD function - I'll see what results I get from using it tommorow.

Justin

Link to comment
Share on other sites

Thank you all :)

(I was starting to think that you were all in open-air swimming pools to party the summer... – and maybe stryd_one partying the winter with snowballs in the ice pool ;D )

In the meanwhile I've been typing my fingers bloody and just wrote a MIDI-Note to Freq handler that does it all manually... and is maybe of more use than just a simple OSC-Slider :D

... so no stress, although I'd be still interested why I couldn't get the HLP_Dec2BCD to work  :-\

I'll be away for two weeks from Monday on, I hope I can get it to a state where I can release a preliminary zip-file for interested mates here, but I won't get it to the wiki until then...

Cheers, :) Michael

Link to comment
Share on other sites

Hey thanks for the tips Michael - I got the phrase thing working. It seems weird that the address is in decimal and the data needs to be hex - that threw me off. But it definately works better. I also set up the mod wheel to change the speech pitch - that sounds cool...  I'm wondering - it doesn't seem possible to control words with note on and note off events i.e.

keypress and hold -> "heeeeeeeeeeeeeeeeee" keyrelease -> "llo"

I was thinking a sustain while you are holding the key down would be cool, but I don't see how that could be accomplished - unless you looped sending the allophones. I think that would require timing so that the buffer wouldn't overflow? Just brainstorming...

Justin

Link to comment
Share on other sites

Hi Justin,

that's right, the allophones have a predetermined length, so you cannot hold them, except if you're using SCP (that's what's working with my version already :D )

MSA commands go straight into the 64byte MSA-input buffer and will be processed fifo (first in first out) while SCP commands have their own 16byte SCP-input buffer and will be processed at once, ignoring any scheduled MSA commands. That means you can alter the MSA sounds while they're playing by SCP (and therefore stretch and glitch).

Maybe you also want to take a look at the MSA-controls, because you can also stretch the length with the speed setting from veeeeeeery slooooowww to vry-qwik :)

In general, all MSP commands have to be sent as hex (decimal numbers, 8bit max) and all SCP commands have to be sent in hex (single ASCII chars, so 1 would be '1' or 0x31).

My version is working quite well, there are just three things I want to work on / fix before releasing something:

- the 14bit to single ASCII char function (I think I found the problem with HLP_Dec2BCD, but can't fix it by myself, see that thread)

- the Envelope Control (controls the mixers)

- phrase storage (the step record with preview and undo step works quite well, but I haven't implemented storage on the EEPROM yet...

Cheers,

Michael

ps: I uploaded an mp3 file here:

recorded it yesterday, not an artistic file, but shows what is possible with the current state of my app;

you can hear how I control the five oscillators and later on mix it with MSA allophones (all from my Korg microKONTROL, so this should be easily controllable by any other midibox 8)

http://www.audiocommander.de/downloads/midibox/SpeakJet_AdvancedPossibilities.mp3 (3.1 MB, 32kHz, 80kbps, lowQuality encoding!)

Link to comment
Share on other sites

That is a great example Michael! - I was happy to get mine to sing "Mary had a little lamb" - you are quite ahead of me.

I am still a bit confused - when I load the first allophone into the phrase storage eeprom at address 16, I have to send '1' and then '6', but when I want to put the allophone 171 into that space, I have to send 'A' and then 'B'. This seems odd to me. I would think it would be decimal or hex.

I just got the max232 in the mail, so now I can use the software to play some more with the speech stuff.

Justin

Link to comment
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...
 Share


×
×
  • Create New...