set notes to "28,30,32,35,32,37,35,40,39,42,40,44,40,45,40,45,40,37,45,40,37,45,40,37,45,45,45,45,44,40,44,45,47,47,47,47,45,44,45,45,45,45,45,45,45,44,40"
set durations to "8,8,8,4,8,4,8,4,8,4,4,2,8,2,4,8,8,8,4,4,8,8,8,8,4,8,4,8,4,2,8,8,4,8,8,4,8,8,4,8,8,4,8,8,4,4,2,16,16,16,16,16"
step i from 1 to itemcount(notes)
get SetVoiceNote(1,item 1 of notes,item 1 of durations,0)
Click, or hold down the Undo button to undo notes.
When you're recording, the longer you hold down the mousebutton on a key, the longer that note will play when the tune is played back.
You can click the displayed notes to make them longer or shorter.
You can also drag them by Shift+Clicking them and dragging them to new positions.
Choose "Copy Link DLL Statements" from the Clipboard menu to copy the sound driver linkDLL statements . Paste this into your book script.
Choose "Copy Tune Statements" from the Clipboard menu to copy the statements that will play the tune you're viewing to the clipboard. Paste this into any object's script.
rLabel
buttonup
buttonup
library
e"CopyTuneStatements"
DeleteThisTune
"Sorry,
only tune
"Are you sure
want
delete" && \
& "?"
f"OK"
"Cancel"
- 3) \
"index"
enterbackground
leavebackground
DeleteThisTune
enterbackground
CopyTuneStatements
leavebackground
CopyTuneStatements
DeleteThisTune
Sorry, this is only tune in the book.
Are you sure you want to delete
Cancel
Cancel
index
clear
index
buttonup
buttonup
textfrompoint
Close Encounters
Deb's Song
Happy Birthday
Jingle Bells
Life Of Illusion
Lost In Space
Lost In Space 2
No Man
NPR Jingle
Perilous
Pop Goes the Weasel
Roll On Columbia
Silent Night
Why Can't I?
Wizard of Oz
A Library of Tunes
A Library of Tunes
title
Title:
Title:
rLabel
Edit / Edit
4svNoteNum
"tune"
) + 1
~, 4200
display
FALSE
buttonup
buttonup
oLBdisplay
svNoteNum
rLabel
Delete This Tune
deleteThisTune
buttonup
buttonup
deleteThisTune
Delete
rLabel
Play / Edit
Znotes
initsound
"tune"
durations
SetVoiceNote(1,
StartSound()
buttonup
buttonup
initsound
SetVoiceNote
StartSound
durations
notes
Frequency and
Duration Values
Frequency and
Duration Valuesss
Index
Indexssssssss Duration Values
rLabel
Keyboard
"tune"
buttonup
buttonup
Keyboard
buttondown
buttonstilldown
buttondown
buttonstilldown
buttondown
buttondown
buttonstilldown
buttondown
buttonstilldown
buttondown
Sound DriverThe Sound Driver
"lesson"
buttonup
buttonup
lesson
Sound Driver
dummy
tunescript
to handle buttonup
local notes, durations
get setVoiceQueueSize(1, 1000)
set notes to x
set durations to x
step i from 1 to itemcount(notes)
get SetVoiceNote(1,item 1 of notes,item 1 of durations,0)
set notes to "32,32,32,32,32,32,32,35,28,30,32,33,33,33,33,33,32,32,32,32,30,30,32,30,35,32,32,32,32,32,32,32,35,28,30,32,33,33,33,33,33,32,32,32,32,35,35,37,39,40,32,28"
set durations to "8,8,4,8,8,4,8,8,4,16,2,8,8,4,16,8,8,8,16,4,8,8,8,4,4,8,8,4,8,8,4,8,8,4,16,2,8,8,4,16,8,8,8,16,16,8,8,8,8,8,8,8"
step i from 1 to itemcount(notes)
get SetVoiceNote(1,item 1 of notes,item 1 of durations,0)
clear item 1 of notes
clear item 1 of durations
end
get StartSound()
get StopSound
library
Deb's Song
Jingle Bells
dummy
lesson
PLAY pitch,duration
setVoiceNote(1,ABS(80-
startSound()
setVoiceNote
startSound
duration
pitch
$f&T( *J0
setVoiceNote( 1, , , 0)
Pitch
(0-83)
Duration
(2-200)..)6)
Single Note Test
initSound
setVoiceNote(1,
"pitch",
"Duration",0)
startSound()
buttonup
buttonup
initSound
pitch
Duration
setVoiceNote
startSound
Single Note Test
Scale Test
initSound
setVoiceNote(1,i,
"Duration",0)
startSound()
buttonup
buttonup
initSound
Duration
setVoiceNote
startSound
Scale Test
To:m:
From:
FALSE
c"."
"Please enter a positive integer."
"Cancel"
leaveField
leaveField
Please enter a positive integer.
Cancel
pitch
Duration
"pitch"
buttondown
buttonstilldown
buttondown
pitch
buttonstilldown
buttonstilldown
pitch
pitch
"pitch"
< 83
buttondown
buttonstilldown
buttondown
pitch
buttonstilldown
buttonstilldown
pitch
pitch
"duration"
! > 1
buttondown
buttonstilldown
buttondown
duration
buttonstilldown
buttonstilldown
duration
duration
"duration"
buttondown
buttonstilldown
buttondown
duration
buttonstilldown
buttonstilldown
duration
The Sound Driver
The Sound Driver
Library
/"library"
buttonup
buttonup
library
Library
rLabel
Keyboard
"tune"
buttonup
buttonup
Keyboard
The that makes the actual notes is called setVoiceNote(). It takes 4 arguments, but the second and third are the only ones that have any effect. Try different values in the fields below and then click the Test buttons. The up and down arrows increment and decrement the values in their neighboring fields.
The that makes the actual notes is called setVoiceNote(). It takes 4 arguments, but the second and third are the only ones that have any effect. Try different values in the fields below and then click the Test buttons. The up and down arrows increment and decrement the values in their neighboring fields.the relevant functions in the sound driver, and lets you test different parameters. The final section is a library of tunes that you can browse. Tunes in the library can be played and edited again.nd edited.ited.
" > 0
buttondown
buttonstilldown
buttondown
buttonstilldown
buttonstilldown
" < 83
buttondown
buttonstilldown
buttondown
buttonstilldown
buttonstilldown
" > 0
buttondown
buttonstilldown
buttondown
buttonstilldown
buttonstilldown
" < 83
buttondown
buttonstilldown
buttondown
buttonstilldown
buttonstilldown
function
"dll"
buttonup
buttonup
function
dllText
leavefield
leavefield
to handle enterbook
linkdll "sound.drv"
int CloseSound( )
int OpenSound( )
int SetVoiceNote( int, int, int, int )
int SetVoiceQueueSize( int, int )
int StartSound( )
int StopSound( )
end linkdll
get opensound()
to handle leavebook
get closeSound()
to handle enterbook
linkdll "sound.drv"
int CloseSound( )
int OpenSound( )
int SetVoiceNote( int, int, int, int )
int SetVoiceQueueSize( int, int )
int StartSound( )
int StopSound( )
end linkdll
get opensound()
to handle leavebook
get closeSound()
to handle leavebook
get closeSound()
restore system
restore menubar at reader
$*O@/
rLabel
buttonup
buttonup
Stop Play
StopSound()
buttonup
buttonup
StopSound
Stop Play
Adding Music To Your Books
Adding Music To Your Books
This book will enable you to add music to your ToolBook applications.
About The Sound Driverrrrrrr
"lesson"
buttonup
buttonup
lesson
About The Sound Driver
Keyboard
"tune"
buttonup
buttonup
Keyboard
Visit The Tune Library
/"Library"
buttonup
buttonup
Library
Visit The Tune Library
This book lets you to add music to your ToolBook applications. It uses the Microsoft sound driver (sound.drv) that comes with Windows, so no additional software is needed. One section of this book contains a piano keyboard that you can play with your mouse. You can record and edit your songs. Another section describes the relevant functions in the sound driver, and lets you test different parameters. The final section is a library of tunes that you can browse. Tunes in the library can be played and edited again................
This book lets you to add music to your ToolBook applications. It uses the Microsoft sound driver (sound.drv) that comes with Windows, so no additional software is needed. One section of this book contains a piano keyboard that you can play with your mouse. You can record and edit your songs. Another section describes the relevant functions in the sound driver, and lets you test different parameters. The final section is a library of tunes that you can browse. Tunes in the library can be played and edited again.nd edited.ited.
A Small Warning...
"warning"
buttonup
buttonup
warning
A Small Warning...
warning
dllText
leavefield
leavefield
This sound driver is less that 100% stable and may crash. Save or exit other work before using this book.
A note to programmers:
There's a good possibility that this instability has something to do with the second parameter passed to to the setVoiceQueueSize() call. The rule of thumb is that you need 6 bytes for every note played in the voice queue. ed in the voice queue.
Warning: Editing scripts or altering objects may disable this book.
Continue
Cancel
continue
enterbook
initialize
Warning: Editing scripts or altering objects may disable this book.
Continue
Reader
continue
leavebook
togglestatus
initialize
sizetopage
tinitmenu
quiktour.dll
inPixels
bringWindowToTop
synchronized
barcharts
lockscreen
barcharts
speed
barcharts
barcharts
barcharts
barcharts
synchronized
lockscreen
initMenu
Paste
Clear
SelectAll
SaveAs
Import
Export
PrintReport
Boo&kshelf
&Topics
&Title Page
Topics
&Flipping Pages
Topics
&Object Stacks
Topics
&Bar Charts
Topics
&Line Charts
Topics
&Pie Charts
Topics
Fun &Stuff
Topics
default
Bookshelf
send sizetopage
bookshlf.tbk
sysWindowHandle
toolbook
bookshlf.tbk
bringwindowtotop
bookshlf.tbk
bookshlf.tbk
bookmark
bookshlf.tbk
The Bookshelf was not found. Please copy bookshlf.tbk to your current working directory.
default
ToolBook
BUTTONDOUBLECLICK
pShowHide
BUTTONUP
pShowHide
TITLEPAGE
TitlePage
FLIPPINGPAGES
FlippingPages
OBJECTSTACKS
Stacks
BARCHARTS
BARCHARTS
LINECHARTS
LineCharts
PIECHARTS
PieCharts
funStuff
funstuff
duckjibepos
4svRecording, svTime
c"Page"
e"Import"
e"Export"
e"PrintReport"
c"&Edit"
"&Author" &
9& "F3"
c"&Clipboard"
"Copy &LinkDLL Statements"
'Tune
deActivate
"CopyTuneStatements"
c"Help"
"About This Book..."
X"sound.drv"
CloseSound( )
OpenSound( )
SetVoiceNote(
SetVoiceQueueSize(
StartSound( )
StopSound( )
opensound()
FALSE
B"recording"
/"tune"
0,50.1875,0
closeSound()
initSound
setVoiceQueueSize(1, 500)
loc, isShift
saveATune tuneText
ZnewTitle, title, titles, newPageNum
"You haven't stopped
yet."
("What
P should
"Cancel"
) > 32
"Please limit your
-omit quotes
"index"
/"library"
"Overwrite existing" &&
& "?"
f"Yes"
& CRLF
- 1)
CopyLinkDLLStatements
"dlltext"
"lesson"
"dummy"
"tuneScript"
need
itSound
rightbuttonup
leavebook
keyDown
saveATune
enterbook
CopyLinkDLLStatements
initSound
CopyTuneStatements
enterbook
sizetopage
seconds
Import
Export
PrintReport
&Edit
&Author
&Clipboard
Copy &LinkDLL Statements
Clipboard
Copy &Tune Statements
Clipboard
CopyTuneStatements
About This Book...
sound.drv
CloseSound
OpenSound
SetVoiceNote
SetVoiceQueueSize
StartSound
StopSound
opensound
recording
recording
svRecording
svTime
leavebook
closeSound
initSound
setVoiceQueueSize
rightbuttonup
isShift
keyDown
saveATune
You haven't stopped recording yet.
What title should this tune have?
Cancel
Please limit your title to 32 characters.
Please omit quotes from your title.
index
library
Overwrite existing
library
y5newpage
title
library
index
library
index
library
newTitle
title
titles
newPageNum
svRecording
tuneText
CopyLinkDLLStatements
dlltext
lesson
dummy
dummy
CopyTuneStatements
library
tuneScript
library
dummy
dummy
dummy
You first need to record a tune on this page.
tuneScript
library
dummy
dummy
dummy
dummy
dummy
dummy
in.dll
screenfrompage
Can't find tbkwin.dll. Please copy this file to a directory that's in your path, or change your path to include tbkwin.dll's directory, and open this book again.
bringWindowToTop
Bookshelf
send sizetopage
bookshlf.tbk
sysWindowHandle
toolbook
bookshlf.tbk
bringwindowtotop
bookshlf.tbk
bookshlf.tbk
bookmark
bookshlf.tbk
The Bookshelf was not found. Please copy bookshlf.tbk to your current working directory.