[futurebasic] Re: [FB] Dumb Dee Dum

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : July 2009 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Thu, 30 Jul 2009 13:30:54 -0400
Thanke Ken and AP.

I am recalling a program that used to be available for OS 9 or OS X,  
which sang your written or MIDI lyrics for your tunes....

I am guessing that one would have to find a way to set the pitch for  
every syllable or something do to that?

The pitch changes here are 'global'...they don't effect the  
individual syllables, such as when singing?

Robert

On Jul 30, 2009, at 1:26 PM, andy@... wrote:

>
> Hi rc,
>
> How's things? :-)
>
> Based on RP's (non-unix) example of voice mnagement, I produced  
> this demo
> which changes pitch and rate. It's better in Leopard.
>
>
>
> '-------------
> include "Tlbx SpeechSynthesis.incl"
>
> dim as SpeechChannel @ myChan
> dim as VoiceSpec voiceSpec
> dim as VoiceDescription description
> dim as Str255 s
> dim as OSErr err
> dim as short j, alexVoice, @ nVoices
> dim as Fixed @ rate
>
> s = "Volunteers are needed for a special mission"
>
> fn CountVoices( @nVoices )
> alexVoice = 0
> for j = 1 to nVoices
> fn GetIndVoice( j, @voiceSpec )
> fn GetVoiceDescription( voiceSpec, @description,  sizeof 
> ( VoiceDescription
> ) )
> if ( description.name == "Alex" ) then alexVoice = j
> next j
>
> fn GetIndVoice( alexVoice, @voiceSpec )
> fn NewSpeechChannel( voiceSpec, @myChan )
> fn SpeakText( myChan, @s + 1, s[0] )
> while ( fn SpeechBusy() )
> delay 60
> wend
> fn DisposeSpeechChannel( myChan )
>
> s = "This is not a simple job. Watch out!"
> fn NewSpeechChannel( voiceSpec, @myChan )
> fn GetSpeechRate( myChan, @rate )
> fn SetSpeechRate( myChan, rate*0.7 )
> fn GetSpeechPitch( myChan, @rate )
> fn SetSpeechPitch( myChan, rate*0.9 )
> fn SpeakText( myChan, @s + 1, s[0] )
> while ( fn SpeechBusy() )
> delay 60
> wend
> fn DisposeSpeechChannel( myChan )
>
> s = "Okay Bob"
> fn NewSpeechChannel( voiceSpec, @myChan )
> fn GetSpeechPitch( myChan, @rate )
> fn SetSpeechPitch( myChan, rate*1.1 )
> fn SpeakText( myChan, @s + 1, s[0] )
> while ( fn SpeechBusy() )
> delay 60
> wend
> fn DisposeSpeechChannel( myChan )
>
>
> s = "I don't know what I'm doing here?"
>
> fn CountVoices( @nVoices )
> alexVoice = 0
> for j = 1 to nVoices
> fn GetIndVoice( j, @voiceSpec )
> fn GetVoiceDescription( voiceSpec, @description,  sizeof 
> ( VoiceDescription
> ) )
> if ( description.name == "Alex" ) then alexVoice = j
> next j
>
> fn GetIndVoice( alexVoice, @voiceSpec )
> fn NewSpeechChannel( voiceSpec, @myChan )
> fn GetSpeechRate( myChan, @rate )
> fn SetSpeechRate( myChan, rate*1.1 )
>
> fn GetSpeechPitch( myChan, @rate )
> fn SetSpeechPitch( myChan, rate*0.5 )
>
> fn SpeakText( myChan, @s + 1, s[0] )
> while ( fn SpeechBusy() )
> delay 60
> wend
> fn DisposeSpeechChannel( myChan )
>
> s = "How did I get mixed up in this??"
>
> fn CountVoices( @nVoices )
> alexVoice = 0
> for j = 1 to nVoices
> fn GetIndVoice( j, @voiceSpec )
> fn GetVoiceDescription( voiceSpec, @description,  sizeof 
> ( VoiceDescription
> ) )
> if ( description.name == "Victoria" ) then alexVoice = j
> next j
>
> fn GetIndVoice( alexVoice, @voiceSpec )
> fn NewSpeechChannel( voiceSpec, @myChan )
> fn GetSpeechRate( myChan, @rate )
> fn SetSpeechRate( myChan, rate*0.99 )
> fn GetSpeechPitch( myChan, @rate )
> fn SetSpeechPitch( myChan, rate*0.95 )
>
> fn SpeakText( myChan, @s + 1, s[0] )
> while ( fn SpeechBusy() )
> delay 60
> wend
> fn DisposeSpeechChannel( myChan )
>
> s = "This is a simple operation"
>
> fn CountVoices( @nVoices )
> alexVoice = 0
> for j = 1 to nVoices
> fn GetIndVoice( j, @voiceSpec )
> fn GetVoiceDescription( voiceSpec, @description,  sizeof 
> ( VoiceDescription
> ) )
> if ( description.name == "Bruce" ) then alexVoice = j
> next j
>
> fn GetIndVoice( alexVoice, @voiceSpec )
> fn NewSpeechChannel( voiceSpec, @myChan )
> fn GetSpeechRate( myChan, @rate )
> fn SetSpeechRate( myChan, rate*0.99 )
> fn GetSpeechPitch( myChan, @rate )
> fn SetSpeechPitch( myChan, rate*0.95 )
>
> fn SpeakText( myChan, @s + 1, s[0] )
> while ( fn SpeechBusy() )
> delay 60
> wend
> fn DisposeSpeechChannel( myChan )
>
> stop
>
>
>
>
>
>> Mr Ken, is it possible to set these voices to particular note values/
>> pitches, manually, as they speak some weirds, er, words?
>>
>> rc
>>
>> On Jul 30, 2009, at 1:52 AM, Ken Shmidheiser wrote:
>>
>>> This has been floating around, but not in FB as far as I know:
>>>
>>> dim as Str255 s
>>>
>>> s  = "say -v Cellos "
>>> s += "Dum dee dum dee dum dum dum dee dee dee "
>>> s += "lah lah lo fa lah lah lah lah lah lah "
>>> s += "fa lah dee doo dee doo"
>>> s += "  " + mid$( s, 14 ) + "oo > /dev/null &2>1"
>>>
>>> open "Unix", 2, s : close 2 : end
>>>
>>> do
>>> HandleEvents
>>> until gFBQuit
>>>
>>> --
>>> To unsubscribe, send ANY message to: futurebasic-
>>> unsubscribe@...
>>>
>>
>> --
>> To unsubscribe, send ANY message to: futurebasic- 
>> unsubscribe@...
>>
>>
>
> --
> To unsubscribe, send ANY message to: futurebasic- 
> unsubscribe@...
>