0% found this document useful (0 votes)
18 views

Introduction to Computing and Programming in Python a Multimedia Approach Mark J. Guzdial download

The document provides links to download various ebooks and textbooks related to computing and programming, particularly in Python. It highlights titles such as 'Introduction to Computing and Programming in Python' by Mark J. Guzdial and others. Additionally, it includes a detailed table of contents for the book, outlining topics covered in media computation and programming.

Uploaded by

outibeunk96
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Introduction to Computing and Programming in Python a Multimedia Approach Mark J. Guzdial download

The document provides links to download various ebooks and textbooks related to computing and programming, particularly in Python. It highlights titles such as 'Introduction to Computing and Programming in Python' by Mark J. Guzdial and others. Additionally, it includes a detailed table of contents for the book, outlining topics covered in media computation and programming.

Uploaded by

outibeunk96
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Download the full version and explore a variety of ebooks

or textbooks at https://ebookultra.com

Introduction to Computing and Programming in


Python a Multimedia Approach Mark J. Guzdial

_____ Tap the link below to start your download _____

https://ebookultra.com/download/introduction-to-computing-
and-programming-in-python-a-multimedia-approach-mark-j-
guzdial/

Find ebooks or textbooks at ebookultra.com today!


We have selected some products that you may be interested in
Click the link to download now or visit ebookultra.com
for more options!.

Python Programming An Introduction to Computer Science


John M. Zelle

https://ebookultra.com/download/python-programming-an-introduction-to-
computer-science-john-m-zelle/

Principles of Soft Computing Using Python Programming 1st


Edition Gypsy Nandi

https://ebookultra.com/download/principles-of-soft-computing-using-
python-programming-1st-edition-gypsy-nandi/

Introduction to Python for Science and Engineering Second


Edition David J. Pine

https://ebookultra.com/download/introduction-to-python-for-science-
and-engineering-second-edition-david-j-pine/

An introduction to programming in emacs lisp 2nd Edition


Robert J. Chassell

https://ebookultra.com/download/an-introduction-to-programming-in-
emacs-lisp-2nd-edition-robert-j-chassell/
Flow based Programming A New Approach To Application
Development 2nd Edition J. Paul Morrison

https://ebookultra.com/download/flow-based-programming-a-new-approach-
to-application-development-2nd-edition-j-paul-morrison/

Ubiquitous multimedia computing 1st Edition Qing Li

https://ebookultra.com/download/ubiquitous-multimedia-computing-1st-
edition-qing-li/

Basic Computation and Principles of Computer Programming


An Introduction to Computing WBUT 2015 4th Edition E.
Balagurusamy
https://ebookultra.com/download/basic-computation-and-principles-of-
computer-programming-an-introduction-to-computing-wbut-2015-4th-
edition-e-balagurusamy/

Functional programming in Python 1st Edition David Mertz

https://ebookultra.com/download/functional-programming-in-python-1st-
edition-david-mertz/

Data Mining Multimedia Soft Computing and Bioinformatics


1st Edition Sushmita Mitra

https://ebookultra.com/download/data-mining-multimedia-soft-computing-
and-bioinformatics-1st-edition-sushmita-mitra/
Introduction to Computing and Programming in Python a
Multimedia Approach Mark J. Guzdial Digital Instant
Download
Author(s): Mark J. Guzdial
ISBN(s): 9780131176553, 0131176552
Edition: Pap/Cdr
File Details: PDF, 4.61 MB
Year: 2005
Language: english
Introduction to Media Computation:
A Multimedia Cookbook in Python

Mark Guzdial

December 16, 2002


ii
Contents

I Introduction 5

1 Introduction to Media Computation 7


1.1 What is computer science about? . . . . . . . . . . . . . . . . 7
1.2 What Computers Understand . . . . . . . . . . . . . . . . . . 11
1.3 Media Computation: Why digitize media? . . . . . . . . . . . 14
1.4 Computer Science for Non-Computer Scientists . . . . . . . . 15
1.4.1 It’s about communication . . . . . . . . . . . . . . . . 16
1.4.2 It’s about process . . . . . . . . . . . . . . . . . . . . . 16

2 Introduction to Programming 19
2.1 Programming is about Naming . . . . . . . . . . . . . . . . . 19
2.1.1 Files and their Names . . . . . . . . . . . . . . . . . . 21
2.2 Programming in Python . . . . . . . . . . . . . . . . . . . . . 22
2.2.1 Programming in JES . . . . . . . . . . . . . . . . . . . 23
2.2.2 Media Computation in JES . . . . . . . . . . . . . . . 23
2.2.3 Making a Recipe . . . . . . . . . . . . . . . . . . . . . 32

II Sounds 43

3 Encoding and Manipulating Sounds 45


3.1 How Sound is Encoded . . . . . . . . . . . . . . . . . . . . . . 45
3.1.1 The Physics of Sound . . . . . . . . . . . . . . . . . . 45
3.1.2 Encoding the Sound . . . . . . . . . . . . . . . . . . . 52
3.1.3 Using MediaTools for looking at captured sounds . . . 58
3.2 Manipulating sounds . . . . . . . . . . . . . . . . . . . . . . . 60
3.2.1 Open sounds and manipulating samples . . . . . . . . 60
3.2.2 Introducing the loop . . . . . . . . . . . . . . . . . . . 63
3.2.3 Changing the volume of sounds . . . . . . . . . . . . . 67

iii
iv CONTENTS

3.2.4 Manipulating different sections of the sound differently 77


3.2.5 Splicing sounds . . . . . . . . . . . . . . . . . . . . . . 81
3.2.6 Backwards sounds . . . . . . . . . . . . . . . . . . . . 85
3.2.7 Changing the frequency of sounds . . . . . . . . . . . 87

4 Creating Sounds 97
4.1 Creating an Echo . . . . . . . . . . . . . . . . . . . . . . . . . 98
4.1.1 Creating Multiple Echoes . . . . . . . . . . . . . . . . 99
4.1.2 Additive Synthesis . . . . . . . . . . . . . . . . . . . . 100

III Pictures 113

5 Encoding and Manipulating Pictures 115


5.1 How Pictures are Encoded . . . . . . . . . . . . . . . . . . . . 115
5.2 Manipulating Pictures . . . . . . . . . . . . . . . . . . . . . . 119
5.2.1 Exploring pictures . . . . . . . . . . . . . . . . . . . . 126
5.2.2 Changing color values . . . . . . . . . . . . . . . . . . 127
5.2.3 Copying pixels . . . . . . . . . . . . . . . . . . . . . . 134
5.2.4 Replacing Colors . . . . . . . . . . . . . . . . . . . . . 145
5.2.5 Combining pixels . . . . . . . . . . . . . . . . . . . . . 152
5.3 Color Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

6 Creating Pictures 165


6.1 Drawing on images with pixels . . . . . . . . . . . . . . . . . 165
6.2 Drawing with drawing commands . . . . . . . . . . . . . . . . 166

IV Meta-Issues: How we do what we do 169

7 Design and Debugging 171


7.1 Designing programs . . . . . . . . . . . . . . . . . . . . . . . 171
7.1.1 Top-down . . . . . . . . . . . . . . . . . . . . . . . . . 171
7.1.2 Bottom-up . . . . . . . . . . . . . . . . . . . . . . . . 171
7.2 Techniques of Debugging . . . . . . . . . . . . . . . . . . . . . 172

V Files 175

8 Encoding, Creating, and Manipulating Files 177


8.1 How to walk through a directory . . . . . . . . . . . . . . . . 177
CONTENTS v

8.2 Copying files . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

VI Text 181

9 Encoding and Manipulation of Text 183


9.1 A recipe to generate HTML . . . . . . . . . . . . . . . . . . . 183
9.2 Converting from sound to text to graphics . . . . . . . . . . . 185

VII Movies 187

10 Encoding, Manipulation and Creating Movies 189


10.1 Manipulating movies . . . . . . . . . . . . . . . . . . . . . . . 189
10.2 Compositing to create new movies . . . . . . . . . . . . . . . 191
10.3 Animation: Creating movies from scratch . . . . . . . . . . . 192

11 Storing Media 195

VIII Isn’t there a better way? 197

12 How fast can we get? 199


12.1 Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
12.2 Speed limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
12.3 Native code versus interpreted code . . . . . . . . . . . . . . . 200

IX Programming and Design 201

13 Functional Decomposition 203


13.1 Using map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

14 Recursion 205

15 Objects 207

X Other Languages 209

16 Java 211
16.1 Java examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
vi CONTENTS
List of Figures

1.1 Eight wires with a pattern of voltages is a byte, which gets


interpreted as a pattern of eight 0’s and 1’s, which gets inter-
preted as a decimal number. . . . . . . . . . . . . . . . . . . . 12
1.2 Alan Perlis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2.1 JES running on MacOS X (with annotations) . . . . . . . . . 24


2.2 JES running on Windows . . . . . . . . . . . . . . . . . . . . 25
2.3 The File Picker . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.4 File picker with media types identified . . . . . . . . . . . . . 29
2.5 Picking, making, and showing a picture . . . . . . . . . . . . 30
2.6 Defining and executing pickAndShow . . . . . . . . . . . . . . 34

3.1 Raindrops causing ripples in the surface of the water, just as


sound causes ripples in the air . . . . . . . . . . . . . . . . . . 46
3.2 One cycle of the simplest sound, a sine wave . . . . . . . . . . 46
3.3 The distance between peaks in ripples in a pond are not
constant—some gaps are longer, some shorter . . . . . . . . . 48
3.4 The note A above middle C is 440 Hz . . . . . . . . . . . . . 49
3.5 Some synthesizers using triangular (or sawtooth) or square
waves. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.6 Sound editor main tool . . . . . . . . . . . . . . . . . . . . . . 50
3.7 Viewing the sound signal as it comes in . . . . . . . . . . . . 51
3.8 Viewing the sound in a spectrum view . . . . . . . . . . . . . 52
3.9 Viewing a sound in spectrum view with multiple “spikes” . . 53
3.10 Viewing the sound signal in a sonogram view . . . . . . . . . 54
3.11 Area under a curve estimated with rectangles . . . . . . . . . 55
3.12 A depiction of the first five elements in a real sound array . . 57
3.13 A sound recording graphed in the MediaTools . . . . . . . . . 57
3.14 The sound editor open menu . . . . . . . . . . . . . . . . . . 58

vii
viii LIST OF FIGURES

3.15 MediaTools open file dialog . . . . . . . . . . . . . . . . . . . 58


3.16 A sound opened in the editor . . . . . . . . . . . . . . . . . . 59
3.17 Exploring the sound in the editor . . . . . . . . . . . . . . . . 59
3.18 Comparing the graphs of the original sound (top) and the
louder one (bottom) . . . . . . . . . . . . . . . . . . . . . . . 69
3.19 Comparing specific samples in the original sound (top) and
the louder one (bottom) . . . . . . . . . . . . . . . . . . . . . 70
3.20 Comparing the original sound (top) to the spliced sound (bot-
tom) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

4.1 The top and middle waves are added together to create the
bottom wave . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
4.2 The raw 440 Hz signal on top, then the 440+880+1320 Hz
signal on the bottom . . . . . . . . . . . . . . . . . . . . . . . 110
4.3 FFT of the 440 Hz sound . . . . . . . . . . . . . . . . . . . . 110
4.4 FFT of the combined sound . . . . . . . . . . . . . . . . . . . 110
4.5 The 440 Hz square wave (top) and additive combination of
square waves (bottom) . . . . . . . . . . . . . . . . . . . . . . 111
4.6 FFT’s of the 440 Hz square wave (top) and additive combi-
nation of square waves (bottom) . . . . . . . . . . . . . . . . 111

5.1 An example matrix . . . . . . . . . . . . . . . . . . . . . . . . 116


5.2 Cursor and icon at regular magnification on top, and close-up
views of the cursor (left) and the line below the cursor (right) 117
5.3 Merging red, green, and blue to make new colors . . . . . . . 118
5.4 The Macintosh OS X RGB color picker . . . . . . . . . . . . 118
5.5 Picking a color using RGB sliders from JES . . . . . . . . . . 119
5.6 RGB triplets in a matrix representation . . . . . . . . . . . . 120
5.7 Directly modifying the pixel colors via commands: Note the
small yellow line on the left . . . . . . . . . . . . . . . . . . . 125
5.8 Using the MediaTools image exploration tools . . . . . . . . . 126
5.9 The original picture (left) and red-reduced version (right) . . 128
5.10 Overly blue (left) and red increased by 20% (right) . . . . . . 129
5.11 Original (left) and blue erased (right) . . . . . . . . . . . . . 130
5.12 Lightening and darkening of original picture . . . . . . . . . . 131
5.13 Negative of the image . . . . . . . . . . . . . . . . . . . . . . 132
5.14 Color picture converted to greyscale . . . . . . . . . . . . . . 134
5.15 Once we pick a mirrorpoint, we can just walk x halfway and
subtract/add to mirrorpoint . . . . . . . . . . . . . . . . . . . 136
LIST OF FIGURES ix

5.16 Original picture (left) and mirrored along the vertical axis
(right) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
5.17 Flowers in the mediasources folder . . . . . . . . . . . . . . 141
5.18 Collage of flowers . . . . . . . . . . . . . . . . . . . . . . . . . 142
5.19 Increasing reds in the browns . . . . . . . . . . . . . . . . . . 147
5.20 Increasing reds in the browns, within a certain range . . . . . 148
5.21 A picture of a child (Katie), and her background without her 149
5.22 A new background, the moon . . . . . . . . . . . . . . . . . . 149
5.23 Katie on the moon . . . . . . . . . . . . . . . . . . . . . . . . 150
5.24 Mark in front of a blue sheet . . . . . . . . . . . . . . . . . . 150
5.25 Mark on the moon . . . . . . . . . . . . . . . . . . . . . . . . 151
5.26 Mark in the jungle . . . . . . . . . . . . . . . . . . . . . . . . 152
5.27 Color: RGB triplets in a matrix representation . . . . . . . . 159
5.28 Color: The original picture (left) and red-reduced version (right)160
5.29 Color: Overly blue (left) and red increased by 20% (right) . . 160
5.30 Color: Original (left) and blue erased (right) . . . . . . . . . 161
5.31 Color: Lightening and darkening of original picture . . . . . . 161
5.32 Color: Negative of the image . . . . . . . . . . . . . . . . . . 162
5.33 Color: Color picture converted to greyscale . . . . . . . . . . 162
5.34 Color: Increasing reds in the browns . . . . . . . . . . . . . . 163
5.35 Color: Increasing reds in the browns, within a certain range . 164

6.1 A very small, drawn picture . . . . . . . . . . . . . . . . . . . 166


6.2 A very small, drawn picture . . . . . . . . . . . . . . . . . . . 167

7.1 Seeing the variables using showVars() . . . . . . . . . . . . . 173

10.1 Movie tools in MediaTools . . . . . . . . . . . . . . . . . . . . 189


10.2 Dark starting frame number 9 . . . . . . . . . . . . . . . . . . 190
10.3 Somewhat lighter starting frame number 9 . . . . . . . . . . . 190
x LIST OF FIGURES
Preface

This book is based on the proposition that very few people actually want to
learn to program. However, most educated people want to use a computer,
and the task that they most want to do with a computer is communicate.
Alan Perlis first made the claim in 1961 that computer science, and program-
ming explicitly, should be part of a liberal education [Greenberger, 1962].
However, what we’ve learned since then is that one doesn’t just “learn to
program.” One learns to program something [Adelson and Soloway, 1985,
Harel and Papert, 1990], and the motivation to do that something can make
the difference between learning to program or not [Bruckman, 2000].
The philosophies which drive the structure of this book include:

• People learn concrete to abstract, driven by need. Teaching structure


before content is painful and results in brittle knowledge that can’t be
used elsewhere [Bruer, 1993]. Certainly, one can introduce structure
(and theory and design), but students won’t really understand the
structure until they have the content to fill it with – and a reason to
need the structure. Thus, this book doesn’t introduce debugging or
design (or complexity or most of computer science) until the students
are doing complex enough software to make it worthwhile learning.

• Repetition is good. Variety is good. Marvin Minsky once said, “If you
know something only one way, you don’t know it at all.” The same
ideas come back frequently in this book. The same idea is framed in
multiple ways. I will use metaphor, visualizations, mathematics, and
even computer science to express ideas in enough different ways that
one of the ways will ring true for the individual student.

• The computer is the most amazingly creative device that humans have
ever conceived of. It is literally completely made up of mind-stuff. As
the movie says, “Don’t just dream it, be it.” If you can imagine it,

1
2 LIST OF FIGURES

you can make it “real” on the computer. Playing with programming


can be and should be enormous fun.

Typographical notations
Examples of Python code look like this: x = x + 1. Longer examples look
look like this:

def helloWorld():
print "Hello, world!"

When showing something that the user types in with Python’s response,
it will have a similar font and style, but the user’s typing will appear after
a Python prompt (>>>):

>>> print 3 + 4
7

User interface components of JES (Jython Environment for Students)


will be specified using a smallcaps font, like save menu item and the Load
button.
There are several special kinds of sidebars that you’ll find in the book.

Recipe 1: An Example Recipe

Recipes (programs) appear like this:

def helloWorld():
print "Hello, world!"

End of Recipe 1

Computer Science Idea: An Example Idea


Key computer science concepts appear like this.
LIST OF FIGURES 3
 
Common Bug: An Example Common Bug
Common things that can cause your recipe to fail ap-
pear like this.

 

Debugging Tip: An Example Debugging Tip


If there’s a good way to keep those bugs from creeping
into your recipes in the first place, they’re highlighted
here.

 
Making it Work Tip: An Example How To
Make It Work
Best practices or techniques that really help are high-
lighted like this.
 

Acknowledgements
Our sincere thanks go out to · · ·
• Jason Ergle, Claire Bailey, David Raines, and Joshua Sklare who made
JES a reality with amazing quality for such a short amount of time.
Jason and David took JES the next steps, improving installation, de-
bugging, and process support.

• Adam Wilson built the MediaTools that are so useful for exploring
sounds and images and processing video.

• Andrea Forte, Mark Richman, Matt Wallace, Alisa Bandlow, and


David Rennie who helped build the course materials. Mark and Matt
built a great many of the example programs.

• Jeff Pierce for reviewing and advising us on the design of the media
language used in the book.

• Bob McMath, Vice-Provost at Georgia Tech, and Jim Foley, Associate


Dean for Education in the College of Computing, for investing in this
effort early on.

• Kurt Eiselt who worked hard to make this effort real, convincing others
to take it seriously.
4 LIST OF FIGURES

• Janet Kolodner and Aaron Bobick who were excited and encouraging
about the idea of media computation for students new to computer
science.

• Joan Morton, Chrissy Hendricks, and all the staff of the GVU Center
who made sure that we had what we needed and that the paperwork
was done to make this class come together.

• Picture of Alan Perlis from http://www.cs.cmu.edu/afs/cs.cmu.


edu/Web/csd/perlis.html. Picture of Alan Turing from http://
www.dromo.com/fusionanomaly/applecomputer.html. Picture of Grace
Hopper from http://www.autodesk.com/dyf/ginvolved/december.
html. Most of the clip art is used with permission from the Art Ex-
plosion package by Nova Development.

• Finally but most importantly, Barbara Ericson, and Matthew, Kather-


ine, and Jennifer Guzdial, who allowed themselves to be photographed
and recorded for Daddy’s media project and were supportive and ex-
cited about the class.
Exploring the Variety of Random
Documents with Different Content
being no back to the seat, and lay on his back incapable of sitting
up.
“Ich bin toldt!” he groaned, “ich denke dat my bones are broke in
two.”
“Oh, no, mein herr,” said Tom. “They are too well covered for that.
Don’t you be alarmed, I’ll help you up,” and he sprung to the side of
his prostrate fellow-traveler, and tried to help him to his feet. But
Herr Johann Schmidt weighed two hundred and sixty pounds, and
though Tom succeeded in raising his head about six inches from the
floor of the wagon, he could do no more. In fact, as bad luck would
have it, it fell back with a whack, and caused the poor Dutchman to
redouble his groans.
“You have killed me once more,” he said dolefully.
“Excuse me, mein herr,” said Tom. “I didn’t know you were so
heavy. Mr. Gates, won’t you help me?”
But before Gates could come to his help there was another fearful
jolt, causing the prostrate body to give an upward bound and fall
back with several additional bruises.
“Stop the horse!” roared the incumbent Teuton. “Stop him all at
once, or I shall be murdered.”
The horse was stopped, and by the united help of the other three,
Herr Johann Schmidt was replaced on his seat.
“I wish I had not come out here,” he bewailed to himself. “Why
could I not stay zu home in my lager bier saloon, where I was make
much money. I shall not never go back once more, and what will
meine Frau do?”
“Oh, don’t mind about her,” said Gates mischievously. “She’ll marry
another man, and he’ll take care of the children.”
“Was!” roared the Teuton, his small eyes lighted up with anger.
“Mein frau marry another man! Den I will not die at all!”
“That’s where your head’s level,” said Tom, who had picked up the
phrase in San Francisco. “I wouldn’t peg out it I were you.”
“And my Katrine be another man’s frau!” continued the German, in
a tone of disgust.
“You couldn’t blame her, you know,” said Gates, in a mischievous
spirit. “Of course she couldn’t manage the children alone. I’m not
married, and I might be willing to take her myself, that is, if anything
happened to you.”
“You marry my Katrine!” exclaimed Herr Schmidt, almost
speechless with indignation.
“I suppose you would prefer that a friend like me should marry
her to a stranger, wouldn’t you, Herr Schmidt?”
“But I am not dead! I will not die!” roared Johann. “You shall not
have her!”
“Oh, of course if you are not going to die, that makes a difference.
You said you were, you know.”
“I have change my mind—I will go home to mein Katrine myself.
She shall have no other husband.”
“Good for you! I like your pluck,” said Gates. “Give me your hand.”
But Herr Schmidt was offended.
“I will nicht give my hand to dem man who will wish to marry
meine Katrine,” he said obstinately.
“Oh, that was only to oblige you, Herr Schmidt. I thought you
might like to have your wife and children taken care of.”
“I take care of them myself.”
“To be sure you will, if you don’t kick the bucket. I see you’re riled,
Herr Schmidt. My advice is that you smoke a pipe. It will make you
feel better.”
This suggestion appeared to strike the German favorably, for
though he did not deign an articulate reply, he pulled out a pipe,
which appeared to have seen much service, and was soon smoking
placidly, and to judge from appearance, much more comfortable in
mind.
Meanwhile the road had entered the forest and the trees cut off
what scanty daylight yet remained.
“How long are these woods?” inquired Gates of the driver.
“Two miles or thereabouts, sir.”
“It is a lonely place?”
“Yes, sir; but that isn’t the worst of it,” said the driver, with a
certain significance in his tone.
“Isn’t the worst of it? What is, then?”
“Loneliness is better than bad company.”
“What are you driving at?”
“I’ll tell you, sir. There’s a set of desperadoes who infest these
parts—bandits, we call them—and these woods are said to be their
favorite lurking-place.”
“That’s pleasant news, Morton,” said Gates, turning to the clerk.
Evidently Morton thought so, for he looked very much disturbed at
the intelligence.
“Why didn’t you tell us before?” he said to the driver.
“I didn’t want to make you uncomfortable.”
“Then why did you bring us to these woods?”
“Because there is no other way.”
“What is dat you say?” interrupted Herr Schmidt at this point.
“Oh, nothing very particular,” said Gates. “I hope your life is
insured.”
“What for?”
“Because there is a gang of robbers in this forest, the driver says.
If we meet them, they may take a fancy to cut our throats.”
“Let me get out!” roared the frightened Dutchman. “I will nicht
stay to have meine throat cut. How will I get home to meine Frau?”
“It won’t do any good, your getting out,” said the driver. “The
robbers are just as likely to be behind as before. The best thing to
do is to push on.”
The driver’s words were unexpectedly verified. Before he had fairly
finished speaking, two men sprang out from the covert from
opposite sides of the road. One seized the horse by the bridle. The
other advanced, pistol in hand, to parley with the passengers.
CHAPTER XXXII

CAPTURED BY HIGHWAYMEN.

HAT do you want?” demanded Gates.


“Your money,” said the other briefly.
Gates was a man of courage, and he answered coolly:
“Your answer is brief, and to the point.”
“I meant it to be,” said the highwayman.
“Suppose we object to complying with your polite request, what
then?”
“I hold the answer in my hand.”
“Your pistol, I suppose.”
“You are perfectly correct. You must surrender either your money
or your life.”
The Dutchman, who had been staring open-mouthed, began to
understand the condition of affairs, and was panic-stricken.
“Give him de money,” he said, trembling. “Take his money, good
gentleman, and spare my life. I want to go home to meine Katrine.”
Serious as the case was, Gates could not help laughing at the
naiveté of his Teutonic traveling companion.
“Mr. Highwayman,” he said, “I assure you it isn’t worth your while
to rob me. My Dutch friend here is a great capitalist—a banker, I
believe. Be content with what he will give you.”
Herr Schmidt was exasperated.
“That is one beeg lie,” he said. “I am only a poor saloon-keeper,
with a few dollars which I made by selling lager. Let me go, and I
will go home to meine Katrine.”
“Gentlemen,” said the highwayman, “I make no exceptions. You
must all empty your pockets.”
“Stop a minute!” said Gates, and he suddenly drew a revolver
from his pocket and pointed it at the robber.
The latter did not appear disconcerted.
“That won’t avail you,” he said.
“Why not?” asked Gates. “We are four to two.”
“We shall see.”
The robber put a whistle to his lips and blew a shrill blast.
In answer to this summons six other men burst from the covert,
all armed, all dangerous.
“You see,” said the first speaker, “we are stronger than you
thought. Fire at me, and all your lives are sacrificed. Your triumph
will be short.”
“Don’t shoot, Herr Gates,” said the Dutchman in an agony of
apprehension. “I don’t want to die. What would become of Katrine
and the Kinder?”
Gates was a sensible man. He saw that to fire would only be to
throw away his own life and that of his companions. This he felt that
he had no moral right to do.
“What shall I do?” he asked, turning to Morton.
“It’s useless to resist,” said the latter nervously.
“And what do you say, Tom?”
“Since these gentlemen are so very pressing, we shall be obliged
to yield.”
“I believe you are right.”
Then turning to the former speaker, who appeared to be the chief
of the robbers, he said:
“Will you let us go if we surrender our money?”
“Not to-day. You must follow us.”
“Where?”
“Where we shall lead you.”
“What is that for?”
“It is unnecessary to ask.”
“That is adding insult to injury. I don’t like that.”
“Perhaps,” suggested Tom, “these gentlemen mean to give us
some supper and a night’s lodging. If so, I go for accepting the
invitation. There isn’t any hotel about here that I know of. I take
their invitation as very kind.”
“They mean to make us pay dearly for their accommodation.”
“We may as well get something for our money,” said Tom.
“That’s so. Well, gentlemen, for reasons which it is unnecessary to
particularize, we accept your invitation.”
“Very good,” said the chief. “Put up your revolver, then, first of all,
or rather give it to me.”
“I would like to keep it.”
“Impossible. Give it up.”
Gates handed over the weapon unwillingly.
“Now give me yours,” said the chief to Morton.
The latter with trembling hand surrendered it. He was deficient in
courage, and had sat silent, pale with terror, while the conference
had gone on.
“Now, my young bantam,” said the robber, turning to Tom, “have
you any?”
“Yes, but I should like to keep it.”
“Hand it over.”
“It doesn’t belong to me.”
“We’ll take care of it for the owner.”
“Here it is. Be careful how you handle it, for it’s loaded. It might
hit my fat friend there.”
The Dutchman began to kick at this suggestion.
“Take care, Mr. Robber,” he exclaimed. “It might go off all at once,
and that would be an end of Johann Schmidt.”
“Oh, never mind, mein herr,” said Tom. “There are plenty of John
Schmidts in the world. One more or less wouldn’t make much
difference.”
“It would make much difference to me,” said Johann sensibly, “and
mein Katrine and the kinder.”
“Well, what next?” asked Gates. “Can we go on?”
“No, you must go with us. First, get down from the wagon.”
“What is that for?”
“Ask no questions, but obey,” said the highwayman sternly.
“Very good. I suppose, under the circumstances, we must obey
orders.”
“Get down, Herr Schmidt,” said Tom to the Teuton.
“What for? What will he do?” asked the terrified Dutchman.
“I don’t know,” said Tom gravely; “but I’ll tell you what they do
sometimes.”
“Was?”
“They stand travelers up in a line and shoot them.”
“Will they be so wicked?” groaned the poor Dutchman, turning as
pale as his florid complexion would admit. “They would not dare!”
“They dare anything, but the only thing we can do is to follow
directions.”
Tom assisted the poor man from the wagon. Gates and Morton
were already out.
“Now,” said the chief of the highwaymen, turning to the driver,
“you can go. But take heed,” he added sternly, “that you say nothing
of this adventure. If you do, you are a marked man, and your life
will not be worth an hour’s purchase.”
“I understand,” said the man.
Gates turned toward the driver with sudden suspicion.
“I believe you are in league with these men,” he said sternly. “You
have led us into a trap.”
“That is not so,” said the driver earnestly. “I swear it.”
“The man speaks truth,” said the captain. “We have never had
anything to do with him.”
“Then why don’t you keep him as you do us?”
“We don’t fly at such game. He is a poor laboring man. We don’t
prey on such.”
“I am a poor laboring man,” said Herr Schmidt eagerly. “Let me
go, too, good Mr. Robber. I am not rich like these gentlemen.”
The chief laughed.
“We can tell better by and by,” he said. “Now, gentlemen, I must
trouble you to follow us.”
Escorted by the eight highwaymen, our four travelers walked on
into the depths of the forest.
CHAPTER XXXIII

MORTON’S SECRET.

HEY walked for about a mile, threading the intricacies of the


forest. Tom did not particularly mind the walk. In fact, though
the idea of being a captive in the hands of robbers was not
particularly agreeable, there was a spice of adventure and romance
about it which he liked. Gates, too, was a man who took things
philosophically, and did not allow himself to be disturbed overmuch
by any contretemps like the present. But the other two, namely,
Morton and our Teutonic friend, took it more to heart. Morton had a
great deal to lose, and he was in terror lest the papers and
certificates of stock should be found upon his person. For them he
had staked reputation and liberty. For them he was an exile and a
fugitive, and he felt that if they were lost he should have little left to
live for.
As for Herr Schmidt, he was troubled in more than one way. First,
with his portly figure and superfluous load of flesh, he found
locomotion, especially in the forest, quite difficult. Then again he
had with him three hundred dollars in gold, which he was very
reluctant to part with. He felt that they would all be taken from him,
and what to do then he did not know. It would take money to go on,
it would take money to go back. On the whole the prospect of his
seeing again the fair Katrine, who, good woman, was physically a
very good match for her Johann, was indeed small. So he kept
groaning as he walked, and indulged, from time to time, in little
ejaculations expressive of his unhappy frame of mind.
Tom and Gates walked on together.
“I wonder if it’s much farther,” said Gates. “Our German friend
doesn’t look happy.”
Tom laughed.
“Perhaps I shouldn’t be, if I had such a load to carry.”
“And if you had a Katrine and kinder at home.”
“Just so. But I haven’t. How is it with you?”
“Oh, I’m an independent bachelor, roaming the world for a living.
I’m like a cat. However I’m tossed up, I’m sure to land on my feet.”
“Then I hope I shall be like a cat, too.”
“You don’t seem very much disturbed.”
“No. It’s my first adventure, and I haven’t much to lose.”
“So with me. Well, Morton, how goes it? You look as if you were
attending a funeral.”
“Will there be a funeral?” interrupted the terrified Dutchman. “Oh,
Gott in Himmel! they will not kill us?”
“No, mein herr, I think not. They’ll only take all our money.”
Mr. Schmidt groaned piteously, and for the fiftieth time execrated
his folly in selling out a lager bier saloon, in which he was making
money, to start in quest of the mines. Ah, little did the plump Katrine
and the children, waiting eagerly to hear of his success, dream that
he was even now in the clutches of robbers.
But the longest journey has an ending, and this was not a very
long journey.
They reached a rude wooden building, backed by a precipitous
elevation. There was nothing peculiar in its appearance, except that
it had no windows. In fact, the main wonder was, that in this lonely
place there should be any building at all.
“Halt, gentlemen,” said the captain, “it is here that we stop.”
“Is this our hotel?” asked Tom lightly.
“Yes,” said the captain, relaxing his stern features with a smile.
“Shall I announce to you the rules of this house?”
“What are they?”
“Payment in advance.”
Morton’s face changed, and the Dutchman looked unhappy.
“I hope your bill won’t be unreasonable,” said Gates.
“Not at all. We shall not ask more than you have.”
“Thank you; you are very considerate.”
“We’ll begin with you, then,” said the captain, addressing Gates.
“Oh, I’m a poor devil. I haven’t much.”
“Produce what you have.”
Gates took out his purse, which proved to contain a hundred and
fifty dollars in gold.
“Is that all?”
“Every cent.”
“Search him.”
Two members of the band advanced and searched him, but
nothing more was to be found.
“You are an honest fellow. I won’t take all. Here!” and the robber
returned twenty dollars of the sum taken.
“Thank you!” said Gates, with a little surprise. “Really, for a robber,
you are very polite and honorable.”
“Now it’s your turn, young bantam,” was addressed to Tom.
Our hero produced all his money, as was shown by the
subsequent search.
“Good!” said the captain. “Here are twenty for you. It will take you
to the mines. Now, old man, it’s your turn.”
Herr Schmidt would have done well to profit by the example of his
companions, and surrendered what he could not retain. But it was
too much for his equanimity. He brought out twenty-five dollars, and
stoutly asseverated that it was all he had. But the captain was too
sharp for him. A skillful examination disclosed eleven times as much
more.
“You were richer than you thought,” said the captain, in a sarcastic
tone.
“It is all I had. I am ruined!” exclaimed Johann piteously. “Good
robber, give me back half.”
“Not one penny!” returned the chief emphatically. “You tried to
defraud me, and you merit no consideration at my hands. You were
not like these gentlemen,” and he nodded approvingly in the
direction of Gates and Tom.
Herr Schmidt wrung his hands and protested that he was ruined,
and that his Katrine and children would all starve.
“Let them cook you, then,” said the captain. “That will keep them
alive for a month.”
But even this suggestion did not mitigate the grief of the unhappy
Teuton, who sunk down on a stump near by and bewailed his fate.
Morton was reserved to the last. He was wise enough to give up
all his gold, though he had considerably more than either of his
companions. But he also was compelled to submit to a search. No
money was found, but the belt was discovered.
“What is that?” demanded the captain.
“A belt,” faltered Morton.
“What is in it?”
“Papers—no money, I assure you,” hurriedly answered Morton.
“If they are papers, we must see them,” said the captain.
“They would be of no value to you,” said Morton quickly. “They are
business papers.”
“I must see them,” said the captain suspiciously.
Tom had pricked up his ears when he first heard the papers
mentioned. His heart beat quick. Were these the securities of which
he was in search? He believed so, and waited anxiously to ascertain.
Yet, even if they should prove to be so, how would he be the better
off?
He bent his eyes eagerly upon the robber-captain as he opened
the belt and revealed the contents.
CHAPTER XXXIV

THE ROBBERS’ DEN.

A! WHAT have we here?” said the robber chief, as he drew out


first a certificate of stock in a New York bank.
Morton changed color.
“It is the property of a friend,” he said hurriedly.
“And that friend’s name is Armstrong—is it not so?”
“Yes,” he said, in a low voice.
When Tom heard the name Armstrong, all his doubts were
removed. There was no longer a doubt that he had found the
absconding clerk. But that was not his only object. He desired also
to regain possession of the stolen securities, and they were in the
hands of a powerful robber-chief, of whom he was himself the
prisoner. Still he was not without hope.
The captain proceeded with his examination of the papers. They
proved all to represent value, and could Mr. Armstrong have used
them as collateral, he would have been able to avert his failure.
Morton looked on with feverish anxiety while this examination was
going on.
“May I have the papers back?” he asked nervously.
“Certainly not,” said the captain with emphasis.
“They will do you no good.”
“How do you know that?” demanded the bandit, fixing his eyes
sternly upon his prisoner.
“You cannot negotiate them.”
“Can you?”
“No,” said Morton hesitatingly.
“How comes it then that you have them in your possession?”
asked the captain searchingly.
“I hold them in trust,” answered Morton after a pause.
“And where is this Armstrong?”
“In New York.”
Morton wiped the perspiration from his brow. He had been forced
to make admissions that might prove damaging to him. How did he
know but that full particulars of his flight might have been printed,
and fallen under the eyes of his fellow-prisoners? If so, he risked his
freedom by what he had confessed. He determined to part company
with them as soon as possible.
“I shall not give these papers back to you,” said the chief. “They
don’t belong to you, it appears.”
“They were confided to me by Mr. Armstrong.”
“They are safer in my hands. But we have wasted time enough on
this matter, Alonzo, conduct the prisoners into the building.”
Now was Tom’s opportunity.
He walked boldly up to the robber-chief and said:
“Captain, when you are at leisure, I should like to speak to you on
business of importance.”
The captain, regarding his youthful appearance, answered with a
smile:
“You are a young man to have business of importance.”
“It may be so,” said Tom, “but it is none the less true. I can say,
also, that the business is of as much importance to you as to me.”
“Humph!” said the other, evidently surprised. “I doubt that.
However, I will humor your whim, youngster. I will give you a chance
to show whether you have spoken the truth. But take heed that you
do not waste my time.”
“I shall not,” said Tom confidently. “What I have to say is for your
advantage.”
A thought occurred to the captain.
This boy might have wealthy friends, and he might be intending to
offer a ransom in return for his liberty. His words favored such a
supposition, and the chief decided to grant his request.
“Alonzo,” he said, “conduct the other prisoners to the place of
secrecy. This boy will remain with me.”
Alonzo, a stalwart member of the band, bowed in token of
obedience.
“Come,” he said, turning to Gates, Morton, and the German;
“follow me.”
“Thank you,” said Gates coolly. “I suppose you are about to show
us our rooms.”
Morton, stupefied at his loss, said nothing. Everything had gone
against him. The proceeds of his defalcation had melted into thin air.
He complied silently.
But the Teuton was the most obstreperous.
“Where is it you will take me?” he cried. “I will not go.”
“Won’t you?” asked Alonzo grimly, drawing a formidable-looking
knife from his girdle.
“Oh, Gott in Himmel! He will cut mein throat!” ejaculated the
horror-stricken Dutchman, his knees trembling beneath him.
“Not if you obey orders,” said Alonzo, inclined to laugh.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like