Have decided to start on the first SuperBASIC assembler extension, have chosen the Speech synthesis module as it gives the best feedback on whether it's working as planned
I was wondering if anyone has any comments/suggestions/etc. on my proposed new keywords, or anything else, please?
When extension loads?
Check &40 responds on i2c bus
i2c_say_init Just sends $AA
Also call at load?
i2c_say("text")
Options below can specified in string e.g. "[v9][s2]Hello"
i2c_say_stop Stop current speech
i2c_say_pause Pause current speech
i2c_say_resume Resume paused speech
r=i2c_say_status() Check chip status
returns $41 - frame received ok
$4E - chip busy
$4F - chip idle
i2c_say_reset [d] & set defaults below
i2c_say_volume(0 to 9) [v4]
i2c_say_speed(0 to 10) [s5]
i2c_say_tone(0 to 10) [t5]
i2c_say_delay(ms) [p0]
i2c_say_lang(0,1,2) [g2]
I2c_say_how(0,1,2) [h2]
i2c_say_mode(0 to 6) [e0]
I was wondering, as they can all be incorporated into the "text" at any point anyway, whether to just scrap all the option keywords (like volume, tone, etc.) and just have an i2c_say_help command that lists all the options (and valid values)?
As i2c_ and say_ appear in *every* command it seems either one or the other is redundant. Is the i2c aspect important to the functionality? I'd personally drop the i2c_ part for clarity, if only because there are no other BASIC keywords with numbers in them, and I can't think of any off the top of my head that have two underscores in them. It just seems overworked.
Dave wrote: Fri Sep 12, 2025 6:18 pm
As i2c_ and say_ appear in *every* command it seems either one or the other is redundant. Is the i2c aspect important to the functionality? I'd personally drop the i2c_ part for clarity, if only because there are no other BASIC keywords with numbers in them, and I can't think of any off the top of my head that have two underscores in them. It just seems overworked.
There's I2C_IO, so I thought "I2C_" was a good way to prefix all my own extensions to make it clear they are i2c only and ensure no clash with anything else that might exist?
The "say" was because this is the Text-to-Speech extension e.g. i2c_say("Hello World")
I could go with I2C_SAYINIT I guess for the others to keep the amount of underscores down to 1
I'm really not sure as I hadn't even considered multiple underscores would be seen as an issue