Just for fun: SAY plugin

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#2
I think it is cute but do not like the "Say plugin v0.50.1 loaded." message
at all.

Thanks for sharing.

On Mon, Jun 7, 2010 at 3:02 PM, Charles Dye <> wrote:


> No, I have no idea what it could be useful for. Voice prompts? Error
> messages? @EXECSTR silliness in your PROMPT? It's fun to play with,
> anyway.
>
> http://www.unm.edu/~cdye/plugins/say.html
>
>
>
>
>


--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
#4
On Wed, 09 Jun 2010 11:22:52 -0400, Jim Cook <> wrote:

|I think it is cute

While were being cute ...

DO FOREVER
SET K=0
INKEY /X /W0 %%K
ECHOS %K
SWITCH %K
CASE Z
BEEP 220
CASE S
BEEP 233
CASE X
BEEP 247
CASE D
BEEP 262
CASE C
BEEP 277
CASE V
BEEP 294
CASE G
BEEP 311
CASE B
BEEP 330
CASE H
BEEP 349
CASE N
BEEP 370
CASE J
BEEP 392
CASE M
BEEP 415
CASE ,
BEEP 440
ENDSWITCH
ENDDO

I put the ECHOSs in there so you can redirect to a file. If you've composed a a
great tune, you could write a batch file to play it back. :-)

If one octave isn't enough here are more frequencies, starting at A-110.

for /L %i in (0,1,50) echos %@eval[110 * (2 ** (1/12)) ** %i=0]` `

110 117 123 131 139 147 156 165 175 185 196 208 220 233 247 262 277 294 311 330
349 370 392 415 440 466 494 523 554 587 622 659 698 740 784 831 880 932 988 1047
1109 1175 1245 1319 1397 1480 1568 1661 1760 1865 1976
--
- Vince
 
#5
I think "noloadmsg" is much too generic a name and doesn't imply anything,
let alone a SAY plugin for TCC.

Can a plugin be sensitive to its own name at load time? What if say.dll
displayed a banner, but sayquiet.dll did not, or something like that.

On Wed, Jun 9, 2010 at 8:39 AM, Charles Dye <> wrote:


> ---Quote (Originally by Jim Cook)---
> I think it is cute but do not like the "Say plugin v0.50.1 loaded." message
> at all.
> ---End Quote---
>
> Code:
> ---------
> set /e /u noloadmsg=1
> ---------
>
>
>
>


--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,410
40
Albuquerque, NM
prospero.unm.edu
#6
I think "noloadmsg" is much too generic a name and doesn't imply anything, let alone a SAY plugin for TCC.
It's deliberately generic; the same variable works in all of my plugins. I can't imagine why you would want to disable the startup message in one, but not in another. (Actually, I can't imagine why you'd want to disable it at all, but apparently some folks do.)

Can a plugin be sensitive to its own name at load time? What if say.dll displayed a banner, but sayquiet.dll did not, or something like that.
It could, but that would involve adding code. Checking an environment variable was a zero-line fix, since I'm doing an ExpandVariables() there anyway.
 
#8
When I load TCC, there are at least 60 different .dll files that get loaded,
and I don't want to know about any of them. Of those files, only Say.dll
announces itself. Your plugin very nicely responds to @VERINFO[Say.dll] if I
want to know what version it is. (BTW: None of my other plugin .dll files do
respond to that.)

This is of course my opinion only. Beggars can't be choosers, but I wanted
to at least express my opinion about the interface. Still, I stand by the
opinion that using a system wide environment variable of that generic a name
is inappropriate. I've been stung too many times myself by poor name choice
and am now sensitive to it.

On Wed, Jun 9, 2010 at 9:29 AM, Charles Dye <> wrote:


> ---Quote (Originally by Jim Cook)---
> I think "noloadmsg" is much too generic a name and doesn't imply anything,
> let alone a SAY plugin for TCC.
> ---End Quote---
> It's deliberately generic; the same variable works in all of my plugins. I
> can't imagine why you would want to disable the startup message in one, but
> not in another. (Actually, I can't imagine why you'd want to disable it at
> all, but apparently some folks do.)
>
>
> ---Quote---
> Can a plugin be sensitive to its own name at load time? What if say.dll
> displayed a banner, but sayquiet.dll did not, or something like that.
> ---End Quote---
> It could, but that would involve adding code. Checking an environment
> variable was a zero-line fix, since I'm doing an ExpandVariables() there
> anyway.
>
>
>
>
>


--
Jim Cook
2010 Sundays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Monday.
 
#9
On Wed, 09 Jun 2010 12:40:57 -0400, Charles Dye <> wrote:

|A well-tempered qwertychord?

It took a while to get it. You spotted the equal-tempering, eh?
--
- Vince
 
#11
On Wed, 09 Jun 2010 16:36:44 -0400, vefatica <> wrote:

|On Wed, 09 Jun 2010 12:40:57 -0400, Charles Dye <> wrote:
|
||A well-tempered qwertychord?
|
|It took a while to get it. You spotted the equal-tempering, eh?

A natural scale sounds so much better! Here's one; the frequencies are exact.
Alternate notes with the tonic (240) a lot and you'll hear how nice they go
together (it'd be even better if you could play chords!). The ratios are: 1,
16/15, 9/8, 6/5, 5/4, 4/3, 7/5, 3/2, 8/5, 5/3, 7/4, 15/8, 2. The equal-tempered
frequencies, starting at 240 would be: 240 254 269 285 302 320 339 360 381 404
428 453 480

DO FOREVER
SET K=0
INKEY /X /W0 %%K
ECHOS %K
SWITCH %K
CASE Z
BEEP 240
CASE S
BEEP 256
CASE X
BEEP 270
CASE D
BEEP 288
CASE C
BEEP 300
CASE V
BEEP 320
CASE G
BEEP 336
CASE B
BEEP 360
CASE H
BEEP 384
CASE N
BEEP 400
CASE J
BEEP 420
CASE M
BEEP 450
CASE ,
BEEP 480
ENDSWITCH
ENDDO
--
- Vince
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,410
40
Albuquerque, NM
prospero.unm.edu
#12
When I load TCC, there are at least 60 different .dll files that get loaded
60 plugins -- really? That doesn't cause problems for you? I autoload maybe two at startup, small ones. Useful ones (to me anyway), and SAY is a toy.

Of those files, only Say.dll announces itself. Your plugin very nicely responds to @VERINFO[Say.dll] if I want to know what version it is. (BTW: None of my other plugin .dll files do respond to that.)
@PLUGINVER should work with any valid plugin. I only put the version resource in there for Explorer's benefit.

Beggars can't be choosers, but I wanted to at least express my opinion about the interface. Still, I stand by the opinion that using a system wide environment variable of that generic a name is inappropriate.
I don't imagine for a moment that anyone is begging for this thing; it's a hack I made just for the fun of doing it.

I don't really understand the issue -- you can delete the environment variable as soon as the plugin is loaded -- but do you think a registry key would be a better approach?
 
#13
On Wed, 09 Jun 2010 12:29:25 -0400, Charles Dye <>
was claimed to have wrote:


>I can't imagine why you would want to disable the startup message in one,
>but not in another. (Actually, I can't imagine why you'd want to disable
>it at all, but apparently some folks do.)
I can't imagine why I'd ever want it.

Imagine if every command told me a little story before it ran, do I want
to see credits on "DIR" or %@exec?

That being said, I'm not using this particular plugin anyway so the
point is fairly moot, I'm just attempting to provide perspective.