An Introduction to Music Technology Dan Hosken -
Downloadable PDF 2025
https://ebookfinal.com/download/an-introduction-to-music-technology-dan-
hosken/
Visit ebookfinal.com today to download the complete set of
ebooks or textbooks
Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Disability Studies An Interdisciplinary Introduction 1st
Edition Dan Goodley
https://ebookfinal.com/download/disability-studies-an-
interdisciplinary-introduction-1st-edition-dan-goodley/
The Person An Introduction to the Science of Personality
Psychology 5th Edition Dan P. Mcadams
https://ebookfinal.com/download/the-person-an-introduction-to-the-
science-of-personality-psychology-5th-edition-dan-p-mcadams/
An Introduction to Petroleum Technology Economics and
Politics 1st Edition James G. Speight
https://ebookfinal.com/download/an-introduction-to-petroleum-
technology-economics-and-politics-1st-edition-james-g-speight/
Bricklin on Technology 1st Edition Dan Bricklin
https://ebookfinal.com/download/bricklin-on-technology-1st-edition-
dan-bricklin/
Introduction to Computer Music 1st Edition Nick Collins
https://ebookfinal.com/download/introduction-to-computer-music-1st-
edition-nick-collins/
Exceptional Learners Introduction to Special Education
10th Edition Dan P. Hallahan
https://ebookfinal.com/download/exceptional-learners-introduction-to-
special-education-10th-edition-dan-p-hallahan/
Managing Technology and Innovation An Introduction 1st
Edition Robert M. Verburg
https://ebookfinal.com/download/managing-technology-and-innovation-an-
introduction-1st-edition-robert-m-verburg/
Physics and Technology for Future Presidents An
Introduction to the Essential Physics Every World Leader
Needs to Know Muller
https://ebookfinal.com/download/physics-and-technology-for-future-
presidents-an-introduction-to-the-essential-physics-every-world-
leader-needs-to-know-muller/
Adhesion and Adhesives Technology An Introduction 3rd
Edition Alphonsus V. Pocius (Auth.)
https://ebookfinal.com/download/adhesion-and-adhesives-technology-an-
introduction-3rd-edition-alphonsus-v-pocius-auth/
An Introduction to Music Technology Dan Hosken
An Introduction to Music Technology Dan Hosken Digital
Instant Download
Author(s): Dan Hosken
ISBN(s): 9780415997294, 0415997291
Edition: Pap/Psc
File Details: PDF, 13.23 MB
Year: 2010
Language: english
An Introduction to Music Technology Dan Hosken
An Introduction to
Music Technology
An Introduction to Music Technology provides a clear overview of the essential elements of
music technology for today’s musician. It is designed to provide music students with the
background necessary to apply technology in their creating, teaching, and performing.
This book focuses on five topics that underlie the hardware and software in use today:
Sound, Audio, MIDI, Synthesis and Sampling, and Computer Notation and Computer-
Assisted Instruction. In addition, there is an appendix that covers necessary computer
hardware and software concepts.
Features:
• Thorough explanations of key topics in music technology
• Content applicable to all software and hardware, not linked to just one piece of software
or gear
• In-depth discussion of digital audio topics, such as sampling rates, resolutions, and file
formats
• Explanations of standard audio plug-ins including dynamics processors, EQs, and delay-
based effects
• Coverage of synthesis and sampling in software instruments
• Pedagogical features, including:
– Further Reading sections that allow the student to delve deeper into topics of interest
– Suggested Activities that can be carried out with a variety of different programs
– Key Terms at the end of each chapter
– What do I need? Chapters covering the types of hardware and software needed in
order to put together Audio and MIDI systems
– The companion website contains links to audio examples that demonstrate various
concepts, step-by-step tutorials, relevant hardware, software, and additional audio
and video resources.
Dan Hosken is Professor of Music at California State University, Northridge, where he
teaches courses in music technology, electronic music, composition, and theory. As an
educator, he is an active member of the Association for Technology in Music Instruction
(ATMI). As a composer, he specializes in interactive electronic music involving dancers and
musicians using live motion sensing and audio processing.
Visit the companion website www.routledge.com/textbooks/9780415997294
An Introduction to Music Technology Dan Hosken
An Introduction to
Music Technology
Dan Hosken
California State University, Northridge
First published 2011
by Routledge
270 Madison Avenue, New York, NY 10016
Simultaneously published in the UK
by Routledge
2 Park Square, Milton Park, Abingdon, Oxon OX14 4RN
Routledge is an imprint of the Taylor & Francis Group, an informa business
© 2011 Taylor & Francis
All rights reserved. No part of this book may be reprinted or reproduced
or utilized in any form or by any electronic, mechanical, or other means,
now known or hereafter invented, including photocopying and recording,
or in any information storage or retrieval system, without permission in
writing from the publishers.
Windows is a registered trademark of Microsoft Corporation in the United
States and other countries.
Apple, AppleTV, GarageBand, iPod, iPod Touch, iTunes, Logic Studio,
Mac OS, MainStage, MobileMe, and Soundtrack Pro are trademarks of
Apple Inc., registered in the U.S. and other countries.
Finale, Finale Allegro, Finale PrintMusic, Finale Songwriter, Finale Notepad,
and SmartMusic are registered trademarks of MakeMusic, Inc.
Screenshots of these products are copyright of MakeMusic, Inc. and are
used by permission.
Except where noted, musical examples were created with Finale® software.
Trademark Notice: Product or corporate names may be trademarks or
registered trademarks, and are used only for identification and explanation
without intent to infringe.
Figure 16.1: Screenshot from Alfred’s Interactive Musician Student Version
(#23135) by Morton Manus. Copyright © 2004. Reprinted with permission
of Alfred Music Publishing Co., Inc.: www.alfred.com
Library of Congress Cataloging in Publication Data
Hosken, Daniel W. (Daniel William)
An introduction to music technology/Dan Hosken.—1st ed.
p. cm.
Includes bibliographical references.
1. Music—Data processing. 2. Sound—Recording and reproducing—
Digital techniques. I. Title.
ML74.H67 2010
780.285—dc22 2009051982
ISBN13: 978–0–415–87827–2 (hbk)
ISBN13: 978–0–415–99729–4 (pbk)
ISBN13: 978–0–203–84951–4 (ebk)
This edition published in the Taylor & Francis e-Library, 2010.
To purchase your own copy of this or any of Taylor & Francis or Routledge’s
collection of thousands of eBooks please go to www.eBookstore.tandf.co.uk.
ISBN 0-203-84951-5 Master e-book ISBN
List of illustrations vii
Preface xv
Introduction 1
Section I: Sound 5
1 What is Sound? 7
2 Sound Properties and the Waveform View 17
3 The Overtone Series and the Spectrum View 32
Further Reading 44
Suggested Activities 45
Section II: Audio 49
4 Audio Hardware 51
5 Digital Audio Data 72
6 Digital Audio Software: The Digital Audio Workstation 86
7 Audio—What Do I Need? 107
Further Reading 116
Suggested Activities 117
Contents
Section III: MIDI 125
8 MIDI Hardware 128
9 MIDI Messages 142
10 MIDI Sequencing 159
11 MIDI—What Do I Need? 184
Further Reading 189
Suggested Activities 190
Section IV: Synthesis and Sampling 195
12 Electronic Sound Production 198
13 Synthesis Methods 215
14 Sampling Methods 233
Further Reading 244
Suggested Activities 246
Section V: Computer Notation and Computer-assisted Instruction 253
15 Computer Notation 255
16 Computer-assisted Instruction 282
Appendix: The Music Computer 309
Part 1 Computer Hardware 311
Part 2 Computer Software 329
Appendix: Further Reading 354
Appendix: Suggested Activities 355
Selected Bibliography 359
Index 363
vi CONTENTS
FIGURES
1.1 String moving forward and backward, showing compression and
rarefaction 8
1.2 Air entering a clarinet mouthpiece, showing compression and rarefaction 10
1.3 Side cutaway view of a flute blowhole, showing compression and
rarefaction 10
1.4 Side cutaway view of the mouthpiece of a brass instrument, showing
compression and rarefaction 11
1.5 Side cutaway view of a speaker cone, showing compression and
rarefaction 12
1.6 Basic anatomy of the human ear 14
1.7 Simplified view of an “unrolled” cochlea 15
2.1 Vibrating string produces a series of compressions and rarefactions 17
2.2 Waveform view of sound 18
2.3a Waveform view showing the period of the waveform measured from
two different starting points 19
2.3b Two waves with the same amplitude but different frequencies 19
2.4 Frequencies associated with piano keys 20
2.5a Waveform view showing the amplitude of the waveform measured in
two different ways 21
2.5b Two waves with the same frequency but different amplitudes graphed
on the same axis 21
2.6 Custom-molded earplugs designed especially for music 24
2.7 Two cycles of a trumpet waveform 25
2.8 Basic waveforms 26
2.9 Amplitude plots of white noise and pink noise 26
2.10 “Zoom out” from individual cycles of a waveform to see the
amplitude envelope 27
Illustrations
2.11 ADSR amplitude envelope characteristic of bowed or blown
instruments 27
2.12 AR amplitude envelope characteristic of struck or plucked instruments 28
2.13 “Zoom out” from individual cycles of the waveform of a percussive
sound 30
2.14 Results of transient analysis 30
3.1 First 16 partials of the overtone series built on A2 33
3.2 Spectrum view of sound 37
3.3 Three different views of a voice saying “oo-ah-ee-oh” on the same
pitch 39
3.4 Basic waveforms and their spectra 40
3.5 Waveform and spectrum view of three sine waves adding together to
form a more complex waveform 40
3.6 Inharmonic spectrum of a small bell 41
3.7 Frequency distributions of white noise and pink noise 42
3.8 Hip-Hop and Spoken Word settings of the graphic equalizer from
Apple’s iTunes 43
4.1 Audio recording path from acoustic vibrations to digital signal 52
4.2 Audio playback path from digital signal to acoustic vibrations 53
4.3 Simplified drawings of microphone capsules 54
4.4 Shure SM-58 end-address, small-diaphragm dynamic microphone 56
4.5 AT4050 side-address, large-diaphragm condenser microphone 56
4.6 Snowball USB microphone 56
4.7 ATW-2120 wireless microphone/transmitter and receiver 56
4.8 Microphone polar (directional) patterns 57
4.9 Grace Design M201 two-channel microphone preamp 58
4.10 ART Z-direct passive direct box 60
4.11 Typical configuration for capturing a guitar signal 60
4.12 Audio connectors 61
4.13 Mackie 802-VLZ3 eight-input small analog mixer 63
4.14 Yamaha MG82CX eight-input small analog mixer 63
4.15 Euphonix MC Mix control surface 64
4.16 Mbox 2 USB audio interface 66
4.17 Edirol UA-25EX USB audio interface 66
4.18 M-Audio FireWire Solo audio interface 66
4.19 Edirol R-09HR flash-based portable recorder 69
4.20 Crown XLS 202 two-channel power amplifier 70
4.21 Genelec 6010A active monitors and 5040A subwoofer 70
5.1 Analog and digital representations 72
5.2 Waveform sampled in time 73
5.3 Hypothetical spectrum showing the Nyquist frequency 74
5.4 Waveform sampled in time and quantized in amplitude 76
5.5 Zoomed-in view of the sampled and quantized waveform 77
viii ILLUSTRATIONS
5.6 Masking of one tone by another 82
5.7 The same loop as a WAVE file and a REX file 84
6.1 Transport controls from various DAWs 87
6.2 Clocks from various DAWs 88
6.3 Track controls in Cubase Studio and Digital Performer 89
6.4 Edit view for tracks in Logic Pro and Cubase Studio 90
6.5 Mix view for tracks in Pro Tools LE and Logic Pro 91
6.6 Two recording levels and the resultant waveforms 92
6.7 Latency-related settings in Logic Pro 94
6.8 Non-destructive editing 95
6.9 Using Trim and Edge Edit in Digital Performer 96
6.10 Fade-in in Digital Performer, fade-out in Pro Tools LE, and
crossfade in Logic Pro 97
6.11 Variously shaped fades 97
6.12 Pitch analysis and manipulation of digital audio 98
6.13 Pitch shift plug-in in Pro Tools LE 99
6.14 Edit view in Digital Performer 100
6.15 Mix view in Digital Performer 100
6.16 Dynamic range compression 101
6.17 “Rane Series” graphic EQ plug-in by Serato 102
6.18 Filter types 102
6.19 Masterworks parametric EQ in Digital Performer 103
6.20 Delay with feedback 104
6.21 Flanger plug-in and chorus plug-in from Digital Performer 104
6.22 Reason’s RV7000 reverb showing the density and shape of the
reflections 105
6.23 ProVerb convolution reverb from Digital Performer 105
7.1 Audio System 1 108
7.2 Audio System 2 110
7.3a Audio System 3. Sample recording configuration 113
7.3b Audio System 3. Sample recording configuration for drums 113
7.3c Audio System 3. Sample recording configuration 113
8.1 Roland System 100M modular analog synthesizer 129
8.2 Analog sequencer from the Roland System 100M 130
8.3 Yamaha DX7 131
8.4 M-Audio Axiom Pro 25 keyboard controller 132
8.5 Roland Fantom-XR sound module 132
8.6 Yamaha S03 keyboard synthesizer 133
8.7 Roland Fantom G7 workstation keyboard 134
8.8 Akai MPC 5000 workstation 134
8.9 In, Out, and Thru MIDI ports 135
8.10 MIDI connections 135
8.11 Daisychained MIDI connections 136
ILLUSTRATIONS ix
8.12 Computer and a keyboard synthesizer connected through a USB
MIDI interface 136
8.13 USB MIDI interfaces 137
8.14 4-in/4-out multiport MIDI interface: M-Audio USB MIDISport 4x4 138
8.15 Non-keyboard instrument controllers 139
8.16 Alternate musical controllers 140
8.17 MIDI-controllable water fountain 140
8.18 Summary of MIDI hardware 141
9.1 TV channels as an analogy for MIDI channels 143
9.2 Computer connected to a multitimbral synth 143
9.3 Computer connected to a 3-in/3-out multiport MIDI interface 144
9.4 Some key numbers and their pitch-register designations 146
9.5 Suggested correspondence between velocity and dynamic level 146
9.6 Modulation wheel 153
9.7 Change in CC7 causing different beginning and ending dynamics 153
9.8 Pitch bend wheel 155
9.9 Keyboards in split mode and layer mode 157
9.10 Summary of MIDI messages 158
10.1a Arrange window from Logic Pro 161
10.1b Tracks window from Cubase Studio 161
10.2 Transport controls from various sequencer/DAWs 161
10.3 Patchlist Viewer in Cubase Studio 162
10.4 Clocks from various sequencers 162
10.5 Pitch preferences in Digital Performer 163
10.6 Piano roll-style editors in Reason and Logic Pro 164
10.7 List editors showing the same messages in Logic Pro and Cubase
Studio 165
10.8 Drum pattern shown in the piano roll editor and drum editor in
Digital Performer 165
10.9 Music shown in the piano roll editor and notation editor in Digital
Performer 166
10.10 Mixer window showing MIDI tracks in Digital Performer 167
10.11 Step entry windows in Logic Pro and Digital Performer 169
10.12 Manual entry windows in Cubase Studio and Logic Pro 169
10.13 Overdub in piano roll editor of Digital Performer 170
10.14 Punch-in/punch-out in piano roll editor of Digital Performer 170
10.15 Loop-overdub in the piano roll editor of Digital Performer 171
10.16 “Cut” versus “snip” 172
10.17 Transpose windows in Digital Performer and Cubase Studio 173
10.18 Quantize window in Digital Performer 174
10.19 Groove quantize window in Digital Performer 174
10.20 Aligning a sequencer’s time grid with a free recording 176
10.21 Adjusting a sequencer’s tempo to markers when working with video 176
x ILLUSTRATIONS
10.22 MIDI Patch Thru preference window in Digital Performer and
track selected for patch thru in Logic Pro 177
10.23 Key played on a keyboard synth results in two note messages 178
10.24 Max patch 180
10.25 Max/MSP patch 181
10.26 Portion of the session view in Ableton’s Live 182
10.27 Patch in MainStage 182
11.1 MIDI and Audio System 1 184
11.2 MIDI and Audio System 2 186
11.3 MIDI and Audio System 3 187
12.1 Basic synthesis model based on analog synthesis 199
12.2 Wavetable synthesis 200
12.3 Basic waveforms 201
12.4 Effect of a low pass filter with resonance 202
12.5 ADSR envelope 203
12.6 Various ADSR controls and their resultant envelopes 204
12.7 Filter and filter envelope sections from Reason’s Subtractor 206
12.8 Envelope assigned to the pitch of the oscillator in Reason’s Subtractor 206
12.9 MOTU’s BassLine softsynth 208
12.10 Subtractor softsynth that is part of Propellerheads’ Reason 208
12.11 Variety of software synthesizers 209
12.12 Two programs on one computer communicating through ReWire 211
12.13 Two programs on separate computers 212
12.14 Audio configuration windows in Digital Performer and Reason 213
13.1 Wavetable synthesis 215
13.2 Waveform and spectrum view of three sine waves adding together 216
13.3 “Harmony Inspector” from the Spectra softsynth 217
13.4 Effect of various filter types on a spectrum 219
13.5 Simplified model of the vocal tract 220
13.6 Sawtooth wave processed by the formant filter in Reason’s Thor
synthesizer 220
13.7 BV512 vocoder from Propellerheads’ Reason 221
13.8 Harmonic spectrum that results from simple FM 223
13.9 Spectrum expert view in Native Instruments’ FM8 softsynth 224
13.10 Simplified physical model of a clarinet 225
13.11 Elements from Apple’s Sculpture physical modeling softsynth 226
13.12 Individual grain and a cloud of grains 227
13.13 Panel view of the Grain Osc instrument in Reaktor 228
13.14 Example Csound files 231
13.15 PD (Pure Data) patch 232
14.1 Three-second trumpet sample at A440 (A3), mezzo forte 234
14.2 Single trumpet sample keymapped to the full range of the instrument 235
14.3 Multisampled trumpet 236
ILLUSTRATIONS xi
14.4 Chromatically sampled piano with three velocity zones 236
14.5 Multisampled, velocity-switched trumpet with three velocity zones 237
14.6 Looped sample 239
14.7 Loop point shown in Kontakt’s loop editor 239
14.8 Key-switched sample set 240
14.9 Modulation window in Kontakt 241
15.1 Tools interface in various programs 257
15.2 Score creation window in Sibelius 258
15.3 Music OCR in PhotoScore Lite 259
15.4a MIDI file import dialog box in Finale 260
15.4b Quant Settings dialog box for MIDI file importing in Finale 260
15.5 Note palettes from several programs 261
15.6 Three enharmonic spellings of a note 262
15.7 Step-time dialog box from Overture and keyboard shortcut listing
from Notion 263
15.8 Tap source dialog box within Finale’s Hyperscribe tool and
Flexi-time options within Sibelius 263
15.9 Input quantize options for Flexi-time within Sibelius and possible
notation with proper quantization 264
15.10 Audio setup dialog box in Finale showing the MicNotator feature 265
15.11 Variety of non-note musical elements in notation software 266
15.12 Some layout views 268
15.13 Some plug-ins 269
15.14 Worksheet Creator in Sibelius 269
15.15 Flexible tempo playback 270
15.16 Playback options in Finale 271
15.17 Musical notation code versus a sound-related code 272
15.18 SMF versus MusicXML file transfer 274
15.19 Mapping between keystrokes and music images 275
15.20 Font error 275
16.1 Scale module in Alfred’s Interactive Musician 285
16.2 Interval ear training in EarMaster School 286
16.3 Screens in MacGAMUT 287
16.4 Rhythm reading screen in Practica Musica 287
16.5 Scale identification window in GNU Solfege 288
16.6 Evaluation of a first species exercise in Counterpointer 289
16.7 Scale ear trainer at MusicTheory.net 290
16.8 Definition and demonstration of anticipation at Teoria.com 291
16.9 Frequency band identification of band-filtered noise question and
answer at Post-Ut 291
16.10 Musicus with time signature at 4/4 292
16.11 Note-matching drill in Early Keyboard Skills 293
16.12 Music Ace I: a pitch comparison game and a doodle pad 294
xii ILLUSTRATIONS
16.13 Rhythm comparison game from Music Ace II 294
16.14 “Orchestra Game” from the Magic Flute Game and “Flying
Instruments” from Nutcracker Music 295
16.15 Thematic analysis for Mozart’s Symphony No. 40 296
16.16 Bubble Machine 297
16.17 Sonata Form Virtual Pocket Guide from Form Templates 297
16.18 Quiz screen from Music Terminology for Bands, Orchestras, and
Choirs 298
16.19 Late Romantic Orchestra page from Sibelius Instruments 299
16.20 Violin page from Sibelius Instruments 300
16.21 1960s’ page showing Free Jazz description and excerpt from Jazz
In Time 300
16.22 SmartMusic in Intelligent Accompaniment mode 302
16.23 SmartMusic showing assessment of a scale performance 302
16.24 Home Concert Xtreme showing tempo following 303
16.25 Amazing Slow Downer looping a small section of a be-bop jazz
recording 304
16.26 Musical Sketch Pad from the creatingmusic.com website 305
16.27 “Freeform Flyer” from Cloud 9 305
A1.1 Various connector cables 313
A1.2 FireWire audio interface: M-Audio FireWire Solo 313
A1.3a USB MIDI controller: M-Audio Oxygen8 V2 313
A1.3b USB MIDI interface: Edirol UM-1EX 313
A1.4a MIDI-controllable water fountain 314
A1.4b MIDI effects screen of Access 3.0 musical fountain show control software 315
A1.5a Intel Core i7 “Nehalem” Multi-core Central Processing Unit 316
A1.5b 2 GB DDR3 RAM 316
A1.6a Hard disk drive (HDD) 319
A1.6b Solid state drive (SSD) 319
A1.6c 8 GB high-speed USB flash drive 319
A1.7 Various types of Internet connections 326
A2.1 Flow of data between hardware and software 329
A2.2a File being moved into a folder/directory using the Mac OS X
Leopard GUI 331
A2.2b Same operation accomplished using the Terminal application 331
A2.2c File being moved into a folder/directory in the Windows Vista CLI 331
A2.3 Typical directory structure 332
A2.4 Excerpt from a phishing scam email 336
A2.5 EULA screen during installation of MacGAMUT ear training software 337
A2.6 Challenge-response screen used to authorize Max/MSP software 339
A2.7a Mac OS X Leopard save dialog box 341
A2.7b Windows Vista save dialog box 341
A2.7c File format export options in Audacity 341
ILLUSTRATIONS xiii
A2.8 Mac OS X Leopard info dialog box 341
A2.9 Three client computers making various webpage requests of one server 344
A2.10 Two computers in a peer-to-peer relationship 345
A2.11a Flash-based XSPF Web Music Player playing XSPF
formatted playlist 348
A2.11b Flash-based Yahoo! Media Player playing XSPF formatted playlist 348
A2.12 New World Symphony cello masterclass via Internet2 352
TABLES
2.1 Motion of string and corresponding air pressure in front of string 18
2.2 Some period–frequency relationships 20
2.3 Sound sources and related sound pressure levels 22
2.4 Maximum exposure time at various sound pressure levels 23
2.5 Recommended exposure limits for personal listening devices 24
2.6 Perceptual and physical properties of sound 31
3.1 Frequency relationships for overtone series on A (incomplete) 34
3.2 Frequency relationships for overtone series on A 34
3.3 Going up from C1 to C8 by fifths 35
3.4 Going up from C1 to C8 by octaves 35
3.5 Equal-tempered and ideal interval ratios 36
3.6 Revised perceptual and physical properties of sound 43
4.1 Recording sources and their cables/connectors 61
5.1 Number of bits and the corresponding number of values 77
5.2 Approximate file sizes for uncompressed audio 80
5.3 Approximate bitrates and file sizes for stereo audio 83
9.1 The General MIDI Patch Map 150
9.2 The General MIDI Percussion Map for Channel 10 152
9.3 Summary of channel voice messages 156
10.1 Tick values of note durations for a PPQN of 480 162
10.2 Sequencer file extensions 179
A1.1 Some inputs and outputs for computers 314
A1.2 Metric prefixes 321
A1.3 Current storage media sizes/size ranges 321
A1.4 Approximate sizes of common file types 321
A1.5 ISP types and current range of connection speeds 325
A1.6 Wi-Fi and Ethernet ideal top connectivity speeds 327
A1.7 Approximate download times at various connection speeds 328
A2.1 Some exclusive file formats and their associated applications 341
A2.2 Interchange file formats and short descriptions 342
xiv ILLUSTRATIONS
My motivation for writing this book is to provide a clear overview of the essential elements
of music technology in order to improve students’ understanding and use of technology
in their music performing, creating, and teaching. This textbook is designed to
accompany a one- or two-semester undergraduate course in music technology,
depending on the extent of the practical exercises and projects that accompany the course
and the amount of further reading and research required.
There are five sections in the book: Sound, Audio, MIDI, Synthesis and Sampling,
and Computer Notation and Computer-assisted Instruction. There are a number of
suggested activities, ranging from informational, such as taking stock of available audio
equipment, to active, such as taking a melody/chords/bass MIDI sequence and expanding
it to ten tracks.
ABOUT THIS BOOK
In addition to the five main sections of this book, referenced above—Sound, Audio,
MIDI, Synthesis and Sampling, and Computer Notation and Computer-assisted
Instruction—there is an appendix containing chapters on Computer Hardware and
Computer Software. Each section begins with an overview of the material covered in
its chapters and concludes with suggested activities that can be carried out using various
software and hardware, as well as recommendations for further reading (in Section V,
these features appear at the end of each chapter). There is also a Review of Key Terms
(which are bold in the text) at the end of each chapter.
Sound consists of a chapter discussing the basics of sound as created by some vibrating
source and received by the ears and brain, a chapter discussing the properties of sound
as seen through the waveform representation, and a chapter discussing the properties
of sound as seen through the spectrum representation. Along the way, I touch on a
variety of topics, such as the difference between the physical properties of sounds and
their perception by our ears and brain, the issue of loudness and hearing loss, and the
Preface
distinctions between equal temperament and tuning systems derived from the overtone
series.
Audio consists of a chapter on audio hardware, including microphones, mixers,
audio interfaces, and speakers; a chapter on digital audio data, including digital
specifications, audio file types, and audio file compression; a chapter on audio recording
and editing software, including recording levels, editing techniques, and audio effects;
and a chapter on what hardware and software you would need in order to put together
audio systems of varying degrees of complexity. I also touch on such topics as analog
signal levels and connector types, perceptual issues relating to higher sampling rates and
resolutions, and latency in monitoring.
MIDI consists of a chapter on MIDI hardware, including controllers, modules, and
synthesizers; a chapter on MIDI data, including note, program, and expressive messages;
a chapter on MIDI sequencing software, including recording and editing techniques;
and a chapter on the hardware and software you would need in order to put together
MIDI and audio systems of varying degrees of complexity. I also discuss aspects of
synthesizer history that impacted the development of MIDI, alternate MIDI controllers
and MIDI-controllable devices, the details of the most-used MIDI messages, and MIDI
software that goes beyond the sequencing paradigm.
Synthesis and Sampling consists of a chapter on electronic sound production,
including hardware synths, software synths, and a basic synthesis model; a chapter on
synthesis methods, including additive, subtractive, FM, physical modeling, and granular
synthesis; and a chapter on sampling techniques, including keymapping, multisampling,
and velocity switching. I also discuss low frequency oscillators (LFOs) and envelopes,
plug-in types and ReWire, talk boxes and vocoders, non-commercial software synths,
and sample libraries. The hardware and software needs for synthesis and sampling are
related to those of the “Audio” and “MIDI” sections and are covered in the section
overview.
Computer Notation and Computer-assisted Instruction consists of a chapter
on computer notation, including various note entry methods and editing techniques;
and a chapter on computer-assisted instruction (CAI) software, including programs for
musicianship and theory, programs for form and analysis, programs for history,
terminology, and instruments, programs for performance skills, and programs for creative
skills. The hardware and software needs for computer notation and CAI are related to
those of the “Audio” and “MIDI” sections and are covered in the individual chapters.
The Computer Hardware chapter in the appendix covers input and output devices,
processing components, storage devices, and network connections. Computer Software
in the appendix covers operating systems, applications software, malware, software
licenses, copy protection, and network software and data issues, including client-server
relationships, peer-to-peer relationships, Web 2.0, and Internet2. The appendix includes
suggestions for further reading and suggested activities for computer hardware and
software.
The website for this book, which can be found at www.routledge.com/textbooks/
9780415997294, contains many audio examples to help explain various concepts.
xvi PREFACE
I believe these examples provide an important link between what the students read and
their aural musical experiences. In addition, there are a variety of links for each section,
including links to relevant software and hardware and links to additional audio and video
resources.
The suggested activities in each section that involve software can be carried out
in a variety of different programs. If music technology is being presented in a course,
the class may have practical assignments to carry out using software available in the
school’s computer lab. If you are studying this material on your own, you can use software
that you already have, or use widely available inexpensive software or even freeware.
The book’s website contains a list of widely available programs, both commercial and
freeware, that would be suitable for these suggested activities.
Because there are so many programs available for carrying out the activities, and
these programs change so quickly, this book doesn’t contain instructions for specific
pieces of software (except for a few activities that utilize the freeware audio editor
Audacity). Fortunately, the documentation for most commercial programs and many
freeware programs is quite good and doing some of their tutorials and reading parts of
the manual (often available electronically from within the program itself) can get one
up to speed on a particular program. In addition, there are specific instructions for some
of the suggested activities for a few programs available on the book’s website.
TO THE INSTRUCTOR
Writing this book posed a number of challenges both in choosing appropriate content
and in selecting the most useful organization for that content. In making such decisions,
I was greatly helped by a number of anonymous reviewers, but in the end I had to
decide on a structure that made the most pedagogical sense to me, based on my years
of experience teaching music technology. For example:
• The subject of MIDI—MIDI has long been a staple of an introductory music
technology course. However, with the migration of sound generation from hardware
to software and the increasing dominance of direct USB (universal serial bus)
connections for controllers, current students are often unaware that they are using
MIDI at all when they’re recording notes to be played back by sample libraries or
displayed in a music notation program. In fact, for them MIDI is synonymous with
“cheesy” sound, despite the fact that MIDI doesn’t inherently “sound” like anything!
As a result, while MIDI is still an essential topic, it is no longer first and foremost.
While writing, I have moved the MIDI section to almost every position in the
book, finally settling on its current position after the section on audio, so that both
recording and loops are introduced as creative resources before delving into MIDI.
In addition, I have tried to emphasize in the book that, while MIDI cables are fast
disappearing, notes played on a controller are still encoded as MIDI, and MIDI
messages, with all their utility and their limitations, are still the elements that are
manipulated when creating non-loop-based synthesized or sampled parts.
PREFACE xvii
• The topics of computer hardware and software—These posed another
organizational dilemma. When I began teaching in the 1990s, only some students
had their own computers, few had an email account aside from the one given by
the university, and those who had Internet access at home were using sub-56K
dialup. In that environment, understanding the basics of computing was the first
essential topic of a music technology course. The current generation of students has
grown up with their own laptops, email, and broadband Internet connections, so
the basics of computing, while still relevant, are no longer the necessary first step
for every student. As a result, I placed the chapters on computer hardware and
computer software in the appendix so that the book starts right off dealing with
sound. However, that material might be valuable for students who haven’t had a
great deal of computer experience or for a course in which computer hardware and
software are covered in some depth.
• Amount and depth of coverage—In each of the sections, I have had to limit
the depth of coverage and give short shrift to some of the more complex issues to
keep the presentation of the material suitable for an introductory class, while at the
same time not simplifying away important concepts. I have tried to be thorough
with each of the topics, if not fully comprehensive. For example, in the chapter on
electronic sound production (Chapter 12), I introduce a basic synthesis model
consisting of an oscillator, a filter, and an amplifier, and I touch on such topics as
envelopes and LFOs and their roles in creating dynamic synthesized sound. However,
I felt it necessary to avoid such complexities as oscillator sync, chorusing, and intricate
modulation routings to avoid overloading students who are new to the subject. A
second book is currently in production entitled Music technology and the project studio
and this will take up and expand some of these concepts for the more advanced
student.
• Course organization—A one-semester basic course for all music majors might
cover each of the chapters in the book, with the possible exceptions of the chapters
in the appendix, and include one or two projects for each section. A one-semester
course that was more focused on preparing students for further study in audio
recording might skip the section on “Computer Notation and Computer-assisted
Instruction” and include more projects in the “Audio” section. A one-semester
course for future music educators might skip the more detailed chapters in the
“Synthesis and Sampling” section (Chapters 13 and 14) and spend more time on
projects in the “Computer Notation and Computer-assisted Instruction” section.
A two-semester course might cover each of the chapters in the book, perhaps
including the chapters in the appendix, include several projects for each section,
and include reading and writing projects utilizing the material suggested in the
“Further Reading” recommendations for each section.
• Choice of software—I have consciously avoided connecting this book to a
specific piece of hardware or software. While we all have our favorite digital audio
workstation (DAW) or notation software, there are several different programs that
could serve those functions equally well. However, I have tried to identify the features
xviii PREFACE
that are common to most programs and illustrate how different programs implement
those features. As a result, the tasks in the “Suggested Activities” for each section
are presented with generic instructions that will have to be translated into instructions
specific to the software you choose to use.
One possible solution to this is to have the students do the translating themselves:
they can utilize the user guides and tutorials for the given software to figure out
which buttons to push and which menu items to choose to accomplish the suggested
activities. This would, I believe, set the students solidly along the path to
technological independence and prepare them for their encounters with new
software in the future. However, this can be a time-consuming process for students
and can be frustrating for those who have had relatively little experience in learning
new software.
Another possible solution would be for you as the instructor to provide the students
with some variety of step-by-step instructions specific to your software of choice.
I’ve done this for my classes for years, and it has the advantage of getting the students
up and running quickly with the software. As the semester progresses, the instructions
can become more general, providing students with the motivation to utilize user
guides and tutorials that will set them on that path toward technological
independence.
The website for the book contains step-by-step tutorials for some of the projects
for a few pieces of software. This repository is necessarily incomplete in both the
software and the projects covered. Nevertheless, I hope it can be directly useful for
some of you and provide a template for others to create their own step-by-step
instructions.
I welcome feedback and criticism from my fellow music technology instructors in
order to improve future versions of this book. Please send such feedback to
dan.hosken@csun.edu.
TO THE STUDENT
This is a book written for you, as an aspiring musician, about the principles that underlie
modern music technology, and how these principles appear in common music hardware
and software. It goes deeper than the books that teach you which button to push or
which menu item to choose in a specific piece of software, but it does not go so deep
that you must be an electrical engineer or computer scientist to follow it. My goal in
writing this book is to give you the background to apply technology as you perform,
compose, teach, analyze, or engage in any other musical activities.
While eventually you must choose a specific piece of software or hardware for a
task and learn which buttons to push to make it do what you want, I firmly believe
that understanding common principles behind music software and hardware will enable
you to learn to use it more quickly and powerfully as well as adapt to new software
PREFACE xix
Another Random Scribd Document
with Unrelated Content
A: 6502 Instruction Set BVS What it does: Branches up to
127 bytes forward or 128 bytes backward from its own address if the
V (overflow) flag is set). Major uses: None. See BVC above.
Addressing Modes: Number of Name Format Opcode Bytes Used
Relative BVS addr. $70/112 2 Affected flags: none CLC What it does:
Clears the carry flag. (Puts a 0 into it.) Major uses: Always used
before any addition (ADC). If there are to be a series of additions
(multiple-byte addition), only the first ADC is preceded by CLC since
the carry feature is necessary. There might be a carry, and the result
will be incorrect if it is not taken into account. The 6502 does not
offer an addition instruction without the carry feature. Thus, you
must always clear it before the first ADC so a carry won't be
accidentally added. Addressing Modes: Number of Name Format
Opcode Bytes Used Implied CLC $18/24 1 Affected flags: Carry (C)
flag is set to zero, CLD What it does: Clears the decimal mode flag.
(Puts a 0 into it.) Major uses: Commodore computers execute a CLD
when first turned on as well as upon entry to monitor modes
(PET/CBM models) and when the SYS command occurs. Apple and
Atari, however, can arrive in an ML environment with the D flag in an
indeterminant state. An attempt to execute ML 193
A: 6502 Instruction Set with this flag set would cause
disaster — all mathematics would be performed in "decimal mode."
It is therefore suggested that owners of Apple and Atari computers
CLD during the early phase, the initialization phase, of their
programs. Though this is an unlikely bug, it would be a difficult one
to recognize should it occur. For further detail about the 6502's
decimal mode, see SED below. Addressing Modes: Number of Name
Format Opcode Bytes Used Implied CLD $D8/216 1 Affected flags:
Decimal (D) flag is set to zero. CLI What it does: Clears the
interrupt-disable flag. All interrupts will therefore be serviced
(including maskable ones). Major uses: To restore normal interrupt
routine processing following a temporary suspension of interrupts for
the purpose of redirecting the interrupt vector. For more detail, see
SEI below. Addressing Modes: Number of Name Format Opcode
Bytes Used Implied CLI $58/88 1 Affected flags: Interrupt (I) flag is
set to zero. CLV What it does: Clears the overflow flag. (Puts a 0 into
it.) Major uses: None. (See BVC above.) Addressing Modes: Number
of Name Format Opcode Bytes Used Implied CLV $B8/184 1 Affected
flags: Overflow (V) flag is set to zero. 194
A: 6502 Instruction Set CMP What it does: Compares the
byte in memory to the byte in the accumulator. Three flags are
affected, but the bytes in memory and in the accumulator are
undisturbed. A CMP is actually a subtraction of the byte in memory
from the byte in the accumulator. Therefore, if you LDA #15:CMP
#15 — the result (of the subtraction) will be zero, and BEQ would be
triggered since the CMP would have set the Z flag. Major uses: This
is an important instruction in ML. It is central to IF-THEN and ON-
GOTO type structures. In combination with the B branching
instructions like BEQ, CMP allows the 6502 chip to make decisions,
to take alternative pathways depending on comparisons. CMP throws
the N, Z, or C flag up or down. Then a B instruction can branch,
depending on the condition of a flag. Often, an action will affect
flags by itself, and a CMP will not be necessary. For example, LDA
#15 will put a 0 into the N flag (seventh bit not set) and will put a 0
into the Z flag (the result was not 0). LDA does not affect the C flag.
In any event, you could LDA #15: BPL TARGET, and the branch
would take effect. However, if you LDA $20 and need to know if the
byte loaded is precisely $0D, you must CMP #$0D:BEQ TARGET. So,
while CMP is sometimes not absolutely necessary, it will never hurt
to include it prior to branching. Another important branch decision is
based on > or < situations. In this case, you use BCC and BCS to
test the C (carry) flag. And you've got to keep in mind the order of
the numbers being compared. The memory byte is compared to the
byte sitting in the accumulator. The structure is memory is less than
or equal to the accumulator (BCC is triggered because the carry flag
was cleared). Or memory is more than accumulator (BCS is triggered
because the carry flag was set). Here's an example. If you want to
find out if the number in the accumulator is less than $40, just CMP
#$41:BCC LESSTHAN (be sure to remember that the carry flag is
cleared if a number is less than or equal; that's why we test for less
than $40 by comparing with a $41): LDA #75 CMP #$41; IS IT LESS
THAN $40? BCC LESSTHAN 195
A: 6502 Instruction Set One final comment about the useful
BCC/BCS tests following CMP: It's easy to remember that BCC
means less than or equal and BCS means more than if you notice
that C is less than S in the alphabet. The other flag affected by CMPs
is the N flag. Its uses are limited since it merely reports the status of
the seventh bit; BPL triggers if that bit is clear, BMI triggers if it's
set. However, that seventh bit does show whether the number is
greater than (or equal to) or less than 128, and you can apply this
information to the ASCII code or to look for BASIC keywords or to
search databases (BPL and BMI are used by LADS's database search
routines in the Array subprogram). Nevertheless, since LDA and
many other instructions affect the N flag, you can often directly BPL
or BMI without any need to CMP first. Addressing Modes: Number of
Name Format Opcode Byti es Used Immediate CMP #15 $C9/201 2
Zero Page CMP 15 $C5/197 2 Zero Page,X CMP 15,X $D5/213 2
Absolute CMP 1500 $CD/205 3 Absolute,X CMP 1500,X $DD/221 3
Absolute,Y CMP 1500,Y SD9/217 3 Indirect,X CMP (15,X) SCI/193 2
Indirect,Y CMP (15),Y $Dl/209 2 Affected flags: NZ C CPX What it
does: Compares the byte in memory to the byte in the X register.
Three flags are affected, but the bytes in memory and in the X
register are undisturbed. A CPX is actually a subtraction of the byte
in memory from the byte in the X register. Therefore, if you LDA
#15:CPX #15 — the result (of the subtraction) will be zero and BEQ
would be triggered since the CPX would have set the Z flag. Major
uses: X is generally used as an index, a counter within loops.
Though the Y register is often preferred as an index since it can
serve for the very useful indirect Y addressing 196
A: 6502 Instruction Set mode (LDA (15),Y) — the X register
is nevertheless pressed into service when more than one index is
necessary or when Y is busy with other tasks. In any case, the flags,
conditions, and purposes of CPX are quite similar to CMP (the
equivalent comparison instruction for the accumulator). For further
information on the various possible comparisons (greater than,
equal, less than, not equal), see CMP above. Addressing Modes:
Name Format Opcode Number of Bytes Used Immediate Zero Page
Absolute CPX #15 CPX 15 CPX 1500 $E0/224 $E4/228 SEC/236 2 2
3 Affected flags: N Z C CPY What it does: Compares the byte in
memory to the byte in the Y register. Three flags are affected, but
the bytes in memory and in the Y register are undisturbed. A CPX is
actually a subtraction of the byte in memory from the byte in the Y
register. Therefore, if you LDA #15: CPY #15— the result (of the
subtraction) will be zero, and BEQ would be triggered since the CPY
would have set the Z flag. Major uses: Y is the most popular index,
the most heavily used counter within loops since it can serve two
purposes: It permits the very useful indirect Y addressing mode
(LDA (15), Y) and can simultaneously maintain a count of loop
events. See CMP above for a detailed discussion of the various
branch comparisons which CPY can implement. Addressing Modes:
Name Format Opcode Number of Bytes Used Immediate Zero Page
Absolute CPY #15 CPY 15 CPY 1500 SCO/192 SC4/196 SCC/204 2 2
3 Affected flags: NZC 197
A: 6502 Instruction Set DEC What it does: Reduces the
value of a byte in memory by 1. The N and Z flags are affected.
Major uses: A useful alternative to SBC when you are reducing the
value of a memory address. DEC is simpler and shorter than SBC,
and although DEC doesn't affect the C flag, you can still decrement
double-byte numbers (see "Decrement Double-Byte Numbers" in
Appendix E). The other main use for DEC is to control a memory
index when the X and Y registers are too busy to provide this
service. For example, you could define, say, address $505 as a
counter for a loop structure. Then: LOOP STA $8000:DEC $505:BEQ
ENDJMP LOOP. This structure would continue storing A into $8000
until address $505 was decremented down to zero. This imitates
DEX or DEY and allows you to set up as many nested loop structures
(loops within loops) as you wish. Addressing Modes: Name Format
Opcode Number of Bytes Used Zero Page Zero Page,X Absolute
Absolute,X DEC 15 DEC 15,X DEC 1500 DEC 1500,X $C6/198
$D6/214 SCE/206 $DE/222 2 2 3 3 Affected flags: N Z DEX What it
does: Reduces the X register by 1. Major uses: Used as a counter
(an index) within loops. Normally, you LDX with some number (the
number of times you want the loop executed) and then DEX:BEQ
END as a way of counting events and exiting the loop at the right
time. Addressing Modes: Number of Name Format Opcode Bytes
Used Implied DEX SCA/202 1 Affected flags: N Z 198
A: 6502 Instruction Set DEY What it does: Reduces the Y
register by 1. Major uses: Like DEX, DEY is often used as a counter
for loop structures. But DEY is the more common of the two since
the Y register can simultaneously serve two purposes within a loop
by permitting the very popular indirect Y addressing mode. A
common way to print a screen message (the ASCII form of the
message is at $5000 in this example, and the message ends with 0):
LDY #0:LOOP LDA $5000,Y:BEQ END:STA SCREEN,Y:INY:JMP
LOOP:END continue with the program. Addressing Modes: Name
Implied Affected flags: N Z Number of Format Opcode Bytes Used
DEY $88/136 1 EOR What it does: Exclusive ORs a byte in memory
with the accumulator. Each bit in memory is compared with each bit
in the accumulator, and the bits are then set (given a 1) if one of the
compared bits is 1. However, bits are cleared if both are 0 or if both
are 1. The bits in the byte held in the accumulator are the only ones
affected by this comparison. Major uses: EOR doesn't have too many
uses. Its main value is to toggle a bit. If a bit is clear (is a 0), it will
be set (to a 1); if a bit is set, it will be cleared. For example, if you
want to reverse the current state of the sixth bit in a given byte:
LDA BYTE:EOR #$40:STA BYTE. This will set bit 6 in BYTE if it was 0
(and clear it if it was 1). This selective bit toggling could be used to
"shift" an unshifted ASCII character via EOR #$80 (1000000). Or if
the character were shifted, EOR #$80 would make it lowercase. EOR
toggles. 199
A: 6502 Instruction Set Addressing Modes: Number of
Name Format Opcode Byti es Used Immediate EOR #15 $49/73 2
Zero Page EOR 15 $45/69 2 Zero Page,X EOR 15,X $55/85 2
Absolute EOR 1500 $4D/77 3 Absolute,X EOR 1500,X $5D/93 3
Absolute,Y EOR 1500,Y $59/89 3 Indirect,X EOR (15,X) $41/65 2
Indirect,Y EOR (15),Y $51/81 2 Affected flags: NZ INC What it does:
Increases the value of a byte in memory by 1, Major uses: Used
exactly as DEC (see DEC above), except it counts up instead of
down. For raising address pointers or supplementing the X and Y
registers as loop indexes. Addressing Modes: Number of Name
Format Opcode Bytes Used Zero Page Zero Page,X Absolute
Absolute,X INC 15 INC 15,X INC 1500 INC 1500.X $E6/230 $F6/246
$EE/238 $FE/254 2 2 3 3 Affected flags: NZ INX What it does:
Increases the X register by 1. Major uses: Used exactly as DEX (see
DEX above), except it counts up instead of down. For loop indexing.
Addressing Modes: Number of Name Format Opcode Bytes Used
Implied INX $E8/232 1 Affected flags: N Z 200
A: 6502 Instruction Set INY What it does: Increases the Y
register by 1. Major uses: Used exactly as DEY (see DEY above),
except it counts up instead of down. For loop indexing and working
with the indirect Y addressing mode (LDA (15),Y). Addressing
Modes: Number of Name Format Opcode Bytes Used Implied INY
$C8/200 1 Affected flags: N Z JMP What it does: Jumps to any
location in memory. Major uses: Branching long range. It is the
equivalent of BASIC'S GOTO instruction. The bytes in the program
counter are replaced with the address (the argument) following the
JMP instruction and, therefore, program execution continues from
this new address. Indirect jumping — JMP (1500) — is not
recommended, although some programmers find it useful. It allows
you to set up a table of jump targets and bounce off them indirectly.
For example, if you had placed the numbers $00 $04 in addresses
$88 and $89, a JMP ($0088) instruction would send the program to
whatever ML routine was located in address $0400. Unfortunately, if
you should locate one of your pointers on the edge of a page (for
example, $00FF or $17FF), this indirect JMP addressing mode
reveals its great weakness. There is a bug which causes the jump to
travel to the wrong place — JMP ($00FF) picks up the first byte of
the pointer from $00FF, but the second byte of the pointer will be
incorrectly taken from $0000. With JMP ($17FF), the second byte of
the pointer would come from what's in address $1700. Since there is
this bug, and since there are no compelling reasons to set up JMP
tables, you might want to forget you ever heard of indirect jumping.
201
A: 6502 Instruction Set Addressing Modes: Name Format
Opcode Number of Bytes Used Absolute JMP 1500 Indirect JMP
(1500) $4C/76 $6C/108 3 3 Affected flags: none JSR What it does:
Jumps to a subroutine anywhere in memory. Saves the PC (Program
Counter) address, plus three, of the JSR instruction by pushing it
onto the stack. The next RTS in the program will then pull that
address off the stack and return to the instruction following the JSR.
Major uses: As the direct equivalent of BASIC'S GOSUB command,
JSR is heavily used in ML programming to send control to a
subroutine and then (via RTS) to return and pick up where you left
off. The larger and more sophisticated a program becomes, the more
often JSR will be invoked. In LADS, whenever something is printed
to screen or printer, you'll often see a chain of JSRs performing
necessary tasks: JSR PRNTCR: JSR PRNTSAJSR PRNTSPACE:JSR
PRNTNUM:JSR PRNTSPACE. This JSR chain prints a carriage return,
the current assembly address, a space, a number, and another
space. Another thing you might notice in LADS and other ML
programs is a PLA:PLA pair. Since JSR stuffs the correct return
address onto the stack before leaving for a subroutine, you need to
do something about that return address if you later decide not to
RTS back to the position of the JSR in the program. This might be
the case if you usually want to RTS, but in some particular cases,
you don't. For those cases, you can take control of program flow by
removing the return address from the stack (PLA:PLA will clean off
the two-byte address) and then performing a direct JMP to wherever
you want to go. If you JMP out of a subroutine without PLA:PLA, you
could easily overflow the stack and crash the program. 202
A: 6502 Instruction Set Addressing Modes: Number of
Name Format Opcode Bytes Used Absolute JSR 1500 $20/32 3
Affected flags: none LDA What it does: Loads the accumulator with a
byte from memory. Copy might be a better word than load, since the
byte in memory is unaffected by the transfer. Major uses: The
busiest place in the computer. Bytes coming in from disk, tape, or
keyboard all flow through the accumulator, as do bytes on their way
to screen or peripherals. Also, because the accumulator differs in
some important ways from the X and Y registers, the accumulator is
used by ML programmers in a different way from the other registers.
Since INY/DEY and INX/DEX make those registers useful as counters
for loops (the accumulator couldn't be conveniently employed as an
index; there is no INA instruction), the accumulator is the main
temporary storage register for bytes during their manipulation in an
ML program. ML programming, in fact, can be defined as essentially
the rapid, organized maneuvering of single bytes in memory. And it
is the accumulator where these bytes often briefly rest before being
sent elsewhere. Addressing Modes: Number of Name Format Opcode
Byti ss Used Immediate Zero Page Zero Page,X Absolute LDA #15
LDA 15 LDA 15,X LDA 1500 $A9/169 $A5/165 SB5/181 $AD/173 2 2
2 3 Absolute,X Absolute,Y Indirect,X Indirect,Y LDA 1500,X LDA
1500,Y ' LDA (15,X) LDA (15),Y $BD/189 $B9/185 $A1/161 SB1/177
3 3 2 2 Affected flags: N Z 203
A: 6502 Instruction Set LDX What it does: Loads the X
register with a byte from memory. Major uses: The X register can
perform many of the tasks that the accumulator performs, but it is
generally used as an index for loops. In preparation for its role as an
index, LDX puts a value into the register. Addressing Modes: Name
Immediate Zero Page Zero Page,Y Absolute Absolute,Y Affected
flags: N Z Format LDX #15 LDX 15 LDX 15,Y LDX 1500 LDX 1500,Y
Opcode $A2/162 $A6/166 $B6/182 $AE/174 SBE/190 Number of
Bytes Used 2 2 2 3 3 LDY What it does: Loads the Y register with a
byte from memory. Major uses: The Y register can perform many of
the tasks that the accumulator performs, but it is generally used as
an index for loops. In preparation for its role as an index, LDY puts a
value into the register. Addressing Modes: Name Format Opcode
Number of Bytes Used Immediate Zero Page Zero Page,X Absolute
Absolute,X LDY #15 LDY 15 LDY 15,X LDY 1500 LDY 1500,X
SAO/160 SA4/164 SB4/180 SAC/172 SBC/188 2 2 2 3 3 Affected
flags: NZ 204
A: 6502 Instruction Set LSR What it does: Shifts the bits in
the accumulator or in a byte in memory to the right, by one bit. A
zero is stuffed into bit 7, and bit 0 is put into the carry flag. 0
VTvTvTvTvTvTv?* Bit Bit Bit Bit Bit Bit Bit Bit 7 6 5 4 3 2 10 Major
uses: To divide a byte by 2. In combination with the ROR instruction,
LSR can divide a two-byte or larger number (see Appendix E).
LSR:LSR:LSR:LSR will put the high four bits (the high nybble) into
the low nybble (with the high nybble replaced by the zeros being
stuffed into the seventh bit and then shifted to the right). Addressing
Modes: Name Format Opcode Number of Bytes Used Accumulator
Zero Page Zero Page,X Absolute Absolute,X LSR LSR 15 LSR 15,X
LSR 1500 LSR 1500,X $4A/74 $46/70 $56/86 $4E/78 $5E/94 2 2 2 3
3 Affected flags: NZC NOP What it does: Nothing. No operation.
Major uses: Debugging. When setting breakpoints with BRK, you will
often discover that a breakpoint, when examined, passes the test.
That is, there is nothing wrong at that place in the program. So, to
allow the program to execute to the next breakpoint, you cover the
BRK with a NOP. Then, when you run the program, the computer will
slide over the NOP with no effect on the program. Three NOPs could
cover a JSR XXXX, and you could see the effect on the program
when that particular JSR is eliminated. 205
A: 6502 Instruction Set Addressing Modes: Number of
Name Format Opcode Bytes Used Implied NOP $EA/234 1 Affected
flags: none ORA What it does: Logically ORs a byte in memory with
the byte in the accumulator. The result is in the accumulator. An OR
results in a 1 if either the bit in memory or the bit in the accumulator
is 1. Major uses: Like an AND mask which turns bits off, ORA masks
can be used to turn bits on. For example, if you wanted to "shift" an
ASCII character by setting the seventh bit, you could LDA
CHARACTER:ORA #$80. The number $80 in binary is 10000000, so
all the bits in CHARACTER which are ORed with zeros here will be
left unchanged. (If a bit in CHARACTER is a 1, it stays a 1. If it is a
0, it stays 0.) But the 1 in the seventh bit of $80 will cause a 0 in the
CHARACTER to turn into a 1. (If CHARACTER already has a 1 in its
seventh bit, it will remain a 1.) Addressing Modes: Number of Name
Format Opcode Byti es Used Immediate Zero Page Zero Page,X
Absolute Absolute,X Absolute,Y Indirect,X Indirect,Y ORA #15 ORA
15 ORA 15,X ORA 1500 ORA 1500,X ORA 1500,Y ORA (15,X) ORA
(15),Y $09/9 $05/5 $15/21 $0D/13 $lD/29 $19/25 $01/1 $11/17 2 2
2 3 3 3 2 2 Affected flags: N Z 206
A: 6502 Instruction Set PHA What it does: Pushes the
accumulator onto the stack. Major uses: To temporarily (very
temporarily) save the byte in the accumulator. If you are within a
particular subroutine and you need to save a value for a brief time,
you can PHA it. But beware that you must PLA it back into the
accumulator before any RTS so that it won't misdirect the computer
to the wrong RTS address. All RTS addresses are saved on the stack.
Probably a safer way to temporarily save a value (a number) would
be to STA TEMP or put it in some other temporary variable that
you've set aside to hold things. Also, the values of A, X, and Y need
to be temporarily saved, and the programmer will combine TYA and
TXA with several PHAs to stuff all three registers onto the stack. But,
again, matching PLAs must restore the stack as soon as possible and
certainly prior to any RTS. Addressing Modes: Number of Name
Format Opcode Bytes Used Implied PHA $48/72 1 Affected flags:
none PHP What it does: Pushes the "processor status" onto the top
of the stack. This byte is the status register, the byte which holds all
the flags: N Z C I D V. Major uses: To temporarily (very temporarily)
save the state of the flags. If you need to preserve all the current
conditions for a minute (see description of PHA above), you may
also want to preserve the status register as well. You must, however,
restore the status register byte and clean up the stack by using a
PLP before the next RTS. Addressing Modes: Number of Name
Format Opcode Bytes Used Implied PHP $08/8 1 Affected flags:
none 207
A: 6502 Instruction Set PLA What it does: Pulls the top byte
off the stack and puts it into the accumulator. Major uses: To restore
a number which was temporarily stored on top of the stack (with the
PHA instruction). It is the opposite action of PHA (see above). Note
that PLA does affect the N and Z flags. Each PHA must be matched
by a corresponding PLA if the stack is to correctly maintain RTS
addresses, which is the main purpose of the stack. Addressing
Modes: Number of Name Format Opcode Bytes Used Implied PLA
$68/104 1 Affected flags: N Z PLP What it does: Pulls the top byte
off the stack and puts it into the status register (where the flags
are). PLP is a mnemonic for PuLl Processor status. Major uses: To
restore the condition of the flags after the status register has been
temporarily stored on top of the stack (with the PHP instruction). It
is the opposite action of PHP (see above). PLP, of course, affects all
the flags. Any PHP must be matched by a corresponding PLP if the
stack is to correctly maintain RTS addresses, which is the main
purpose of the stack. Addressing Modes: Number of Name Format
Opcode Bytes Used Implied PLP $28/40 1 Affected flags: all ROL
What it does: Rotates the bits in the accumulator or in a byte in
memory to the left, by one bit. A rotate left (as opposed to an ASL,
Arithmetic Shift Left) moves bit 7 to the 208
A: 6502 Instruction Set carry, moves the carry into bit 0,
and every other bit moves one position to its left. (ASL operates
quite similarly, except it always puts a 0 into bit 0.) /~ /~ r s- /~
r /~^| Carry *%7T > WVW^* Flag Bit Bit Bit Bit Bit Bit Bit Bit
Major uses: To multiply a byte by 2. ROL can be used with ASL to
multiply multiple-byte numbers since ROL pulls any carry into bit 0.
If an ASL resulted in a carry, it would be thus taken into account in
the next higher byte in a multiplebyte number. (See Appendix E.)
Notice how the act of moving columns of binary numbers to the left
has the effect of multiplying by 2: 0010 (the number 2 in binary)
0100 (the number 4) This same effect can be observed with decimal
numbers, except the columns represent powers of 10: 0010 (the
number 10 in decimal) 0100 (the number 100) Addressing Modes:
Number of Name Format Opcode Bytes Used Accumulator Zero Page
Zero Page,X Absolute Absolute,X ROL ROL 15 ROL 15,X ROL 1500
ROL 1500,X $2A/42 $26/38 $36/54 $2E/46 $3E/62 1 2 2 3 3
Affected flags: N Z C ROR What it does: Rotates the bits in the
accumulator or in a byte in memory to the right, by one bit. A rotate
right (as opposed to a LSR, Logical Shift Right) moves bit 0 into the
carry, 209
A: 6502 Instruction Set moves the carry into bit 7, and
every other bit moves one position to its right. (LSR operates quite
similarly, except it always puts a 0 into bit 7.) /A iQ% /fr /T^ fa A
/T^ Bit Bit Bit Bit Bit Bit Bit Bit 7 6 5 4 3 2 10 Major uses: To divide a
byte by 2. ROR can be used with LSR to divide multiple-byte
numbers since ROR puts any carry into bit 7. If an LSR resulted in a
carry, it would be thus taken into account in the next lower byte in a
multiple-byte number. (See Appendix E.) Notice how the act of
moving columns of binary numbers to the right has the effect of
dividing by 2: 1000 (the number 8 in binary) 0100 (the number 4)
This same effect can be observed with decimal numbers, except the
columns represent powers of 10: 1000 (the number 1000 in decimal)
0100 (the number 100) Addressing Modes: Number of Name Format
Opcode Bytes Used Accumulator Zero Page Zero Page,X Absolute
Absolute,X ROR ROR 15 ROR 15,X ROR 1500 ROR 1500,X $6A/106
$66/102 $76/118 $6E/110 $7E/126 1 2 2 3 3 Affected flags: N Z C
RTI What it does: Returns from an interrupt. Major uses: None. You
might want to add your own routines to your machine's normal
interrupt routines (see SEI 210
A: 6502 Instruction Set below), but you won't be
generating actual interrupts of your own. Consequently, you cannot
ReTurn from Interrupts you never create. never create Addressing
Modes Name Format Opcode Number of Bytes Used Implied Affected
RTI flags: all (status register $40/64 1 is retrieved from the stack).
RTS What it does: Returns from a subroutine jump (caused by JSR).
Major uses: Automatically picks off the two top bytes on the stack
and places them into the program counter. This reverses the actions
taken by JSR (which put the program counter bytes onto the stack
just before leaving for a subroutine). When RTS puts the return
bytes into the program counter, the next event in the computer's
world will be the instruction following the JSR which stuffed the
return address onto the stack in the first place. Addressing Modes:
Number of Name Format Opcode Bytes Used Implied RTS $60/96 1
Affected flags: none SBC What it does: Subtracts a byte in memory
from the byte in the accumulator, and "borrows" if necessary. If a
"borrow" takes place, the carry flag is cleared (set to 0). Thus, you
always SEC (set the carry flag) before an SBC operation so you can
tell if you need a "borrow." In other words, when an SBC operation
clears the carry flag, it means that the byte in memory was larger
than the byte in the accumulator. And since 211
A: 6502 Instruction Set memory is subtracted from the
accumulator in an SBC operation, if memory is the larger number, we
must "borrow." Major uses: Subtracts one number from another.
Addressing Modes: Number of Name Format Opcode Byt es Used
Immediate SBC #15 $E9/233 2 Zero Page SBC 15 $E5/229 2 Zero
Page,X SBC 15,X $F5/245 2 Absolute SBC 1500 $ED/237 3 Absolute,
X SBC 1500,X $FD/253 3 Absolute,Y SBC 1500,Y $F9/249 3
Indirect,X SBC (15,X) $El/225 2 Indirect,Y SBC (15),Y $F1/241 2
Affected flags: N Z C V SEC What it does: Sets the carry (C) flag (in
the processor status register byte). Major uses: This instruction is
always used before any SBC operation to show if the result of the
subtraction was negative (if the accumulator contained a smaller
number than the byte in memory being subtracted from it). See SBC
above. Addressing Modes: Number of Name Format Opcode Bytes
Used Implied SEC $38/56 1 Affected flags: C SED What it does: Sets
the decimal (D) flag (in the processor status register byte). Major
uses: Setting this flag puts the 6502 into decimal arithmetic mode.
This mode can be easier to use when you are inputting or outputting
decimal numbers (from the user of a program or to the screen).
Simple addition and subtraction can be performed in decimal mode,
but most programmers ignore 212
A: 6502 Instruction Set this feature since more complicated
math requires that you remain in the normal binary state of the
6502. Note: Commodore computers automatically clear this mode
when entering ML via SYS. However, Apple and Atari computers can
enter ML in an indeterminant state. Since there is a possibility that
the D flag might be set (causing havoc) on entry to an ML routine, it
is sometimes suggested that owners of these two computers use the
CLD instruction at the start of any ML program they write. Any ML
programmer must CLD following any deliberate use of the decimal
mode. Addressing Modes: Number of Name Format Opcode Bytes
Used Implied SED SF8/248 1 Affected flags: D SEI What it does:
Sets the interrupt disable flag (the I flag) in the processor status
byte. When this flag is up, the 6502 will not acknowledge or act
upon interrupt attempts (except a few nonmaskable interrupts which
can take control in spite of this flag, like a reset of the entire
computer). The operating systems of most computers will regularly
interrupt the activities of the chip for necessary, high-priority tasks
such as updating an internal clock, displaying things on the TV,
receiving signals from the keyboard, etc. These interruptions of
whatever the chip is doing normally occur 60 times every second. To
find out what housekeeping routines your computer interrupts the
chip to accomplish, look at the pointer in $FFFE/FFFF. It gives the
starting address of the maskable interrupt routines. Major uses: You
can alter a RAM pointer so that it sends these interrupts to your own
ML routine, and your routine then would conclude by pointing to the
normal interrupt routines. In this way, you can add something you
want (a click sound for each keystroke? the time of day on the
screen?) to the normal actions of your operating system. The
advantage of this method over normal SYSing is that your interrupt-
driven routine is essentially transparent to whatever else you are
doing 213
A: 6502 Instruction Set (in whatever language). Your
customization appears to have become part of the computer's
ordinary habits. However, if you try to alter the RAM pointer while
the other interrupts are active, you will point away from the normal
housekeeping routines in ROM, crashing the computer. This is where
SEI comes in. You disable the interrupts while you LDA STA LDA STA
the new pointer. Then CLI turns the interrupt back on and nothing is
disturbed. Interrupt processing is a whole subcategory of ML
programming and has been widely discussed in magazine articles.
Look there if you need more detail. Addressing Modes: Name Format
Implied SEI Affected flags: I Opcode $78/120 Number of Bytes Used
1 STA What it does: Stores the byte in the accumulator into memory.
Major uses: Can serve many purposes and is among the most used
instructions. Many other instructions leave their results in the
accumulator (ADC/SBC and logical operations like ORA), after which
they are stored in memory with STA. Addressing Modes: Number of
Name Format Opcode Byt« es Used Zero Page Zero Page,X Absolute
Absolute,X Absolute,Y Indirect,X Indirect,Y STA 15 STA 15,X STA
1500 STA 1500,X STA 1500, Y STA (15,X) STA (15),Y $85/133
$95/149 $8D/141 $9D/157 $99/153 $81/129 $91/145 2 2 3 3 3 2 2
Affected flags: none 214
A: 6502 Instruction Set STX What it does: Stores the byte
in the X register into memory. Major uses: Copies the byte in X into
a byte in memory. Addressing Modes: Number of Name Format
Opcode Bytes Used Zero Page STX 15 $86/134 2 Zero Page,Y STX
15, Y $96/150 2 Absolute STX 1500 $8E/142 3 Affected flags: none
STY What it does: Stores the byte in the Y register into memory.
Major uses: Copies the byte in Y into a byte in memory. Addressing
Modes: Number of Name Format Opcode Bytes Used Zero Page STY
15 $84/132 2 Zero Page,X STY 15,X $94/148 2 Absolute STY 1500
$8C/140 3 Affected flags: none TAX What it does: Transfers the byte
in the accumulator to the X register. Major uses: Sometimes you can
copy the byte in the accumulator into the X register as a way of
briefly storing the byte until it's needed again by the accumulator. If
X is currently unused, TAX is a convenient alternative to PHA
(another temporary storage method). However, since X is often
employed as a loop counter, TAX is a relatively rarely used
instruction. 215
A: 6502 Instruction Set Addressing Modes: Number of
Name Format Opcode Bytes Used Implied TAX $AA/170 1 Affected
flags: N Z TAY What it does: Transfers the byte in the accumulator to
the Y register. Major uses: Sometimes you can copy the byte in the
accumulator into the Y register as a way of briefly storing the byte
until it's needed again by the accumulator. If Y is currently unused,
TAY is a convenient alternative to PHA (another temporary storage
method). However, since Y is quite often employed as a loop
counter, TAY is a relatively rarely used instruction. Addressing
Modes: Number of Name Format Opcode Bytes Used Implied TAY
$A8/168 1 Affected flags: N Z TSX What it does: Transfers the stack
pointer to the X register. Major uses: The stack pointer is a byte in
the 6502 chip which points to where a new value (number) can be
added to the stack. The stack pointer would be "raised" by two, for
example, when you JSR and the two bytes of the program counter
are pushed onto the stack. The next available space on the stack
thus becomes two higher than it was previously. By contrast, an RTS
will pull a two-byte return address off the stack, freeing up some
space, and the stack pointer would then be "lowered" by two. The
stack pointer is always added to $0100 since the stack is located
between addresses $0100 and $01FF. 216
A: 6502 Instruction Set Addressing Modes: Number of
Name Format Opcode Bytes Used Implied TSX $BA/186 1 Affected
flags: N Z TXA What it does: Transfers the byte in the X register to
the accumulator. Major uses: There are times, after X has been used
as a counter, when you'll want to compute something using the
value of the counter. And you'll therefore need to transfer the byte in
X to the accumulator. For example, if you search the screen for
character $75: CHARACTER = $75:SCREEN = $0400 LDX #0 LOOP
LDA SCREEN,X:CMP #CHARACTER:BEQ MORE:INX BEQ NOTFOUND
; (this prevents an endless loop MORE TXA ; (you now know the
character's location) NOTFOUND BRK In this example, we want to
perform some action based on the location of the character. Perhaps
we want to remember the location in a variable for later reference.
This will require that we transfer the value of X to the accumulator
so it can be added to the SCREEN start address. Addressing Modes:
Number of Name Format Opcode Bytes Used Implied TXA $8A/138 1
Affected flags: N Z 217
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!
ebookfinal.com

More Related Content

PDF
An Introduction to Music Technology 2nd Edition Dan Hosken
PDF
Handbook of recording engineering 4th ed Edition John Eargle
PPT
Chapter 01 intro to audio in mm
PDF
Computer Sound Design Synthesis Techniques And Programming 2nd Edition Eduard...
DOCX
Ig2 task 1 work sheet thomas giblin
PDF
Audio Production Worktext Concepts Techniques and Equipment 6th Edition David...
PDF
Foundations In Sound Design For Linear Media A Multidisciplinary Approach Mic...
PDF
Audio anecdotes tools tips and techniques for digital audio Vol 2 Barzel
An Introduction to Music Technology 2nd Edition Dan Hosken
Handbook of recording engineering 4th ed Edition John Eargle
Chapter 01 intro to audio in mm
Computer Sound Design Synthesis Techniques And Programming 2nd Edition Eduard...
Ig2 task 1 work sheet thomas giblin
Audio Production Worktext Concepts Techniques and Equipment 6th Edition David...
Foundations In Sound Design For Linear Media A Multidisciplinary Approach Mic...
Audio anecdotes tools tips and techniques for digital audio Vol 2 Barzel

Similar to An Introduction to Music Technology Dan Hosken (20)

PDF
Audio anecdotes tools tips and techniques for digital audio Vol 2 Barzel
PPT
AUDIO DEVICES, FORMATS AND CODECS
PPTX
DOCX
Ig2 task 1 work sheet (revisited)
PDF
01-00-ACA-Introduction-2-MIR.pdf
PDF
Computer sound design synthesis techniques and programming 2nd Edition Eduard...
PDF
New Digital Musical Instruments Control And Interactions Beyond The Keyboard ...
PPT
Podcasting
DOCX
Martin devney IG2 task 1 work sheet
DOCX
Ig2 task 1_work_sheet
PDF
Fundamentals Of Digital Audio Alan P Kefauver David Patschke
PDF
Hidden Structure Music Analysis Using Computers David Cope
PDF
Digital Audio Processing Fundamentals Aurelio Uncini
DOCX
Ig2 task 1 work sheet 2
PPTX
Digital audio formats
PDF
Hidden Structure Music Analysis Using Computers David Cope
PDF
Music Technology and Education Amplifying Musicality 2nd Edition Brown
PDF
Composing Interactive Music Techniques And Ideas Using Max 1st Edition Todd W...
PDF
Music Technology and Education Amplifying Musicality 2nd Edition Brown
DOCX
Sound recording glossary improved 2
Audio anecdotes tools tips and techniques for digital audio Vol 2 Barzel
AUDIO DEVICES, FORMATS AND CODECS
Ig2 task 1 work sheet (revisited)
01-00-ACA-Introduction-2-MIR.pdf
Computer sound design synthesis techniques and programming 2nd Edition Eduard...
New Digital Musical Instruments Control And Interactions Beyond The Keyboard ...
Podcasting
Martin devney IG2 task 1 work sheet
Ig2 task 1_work_sheet
Fundamentals Of Digital Audio Alan P Kefauver David Patschke
Hidden Structure Music Analysis Using Computers David Cope
Digital Audio Processing Fundamentals Aurelio Uncini
Ig2 task 1 work sheet 2
Digital audio formats
Hidden Structure Music Analysis Using Computers David Cope
Music Technology and Education Amplifying Musicality 2nd Edition Brown
Composing Interactive Music Techniques And Ideas Using Max 1st Edition Todd W...
Music Technology and Education Amplifying Musicality 2nd Edition Brown
Sound recording glossary improved 2
Ad

Recently uploaded (20)

PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
PDF
IGGE1 Understanding the Self1234567891011
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Complications of Minimal Access-Surgery.pdf
PPTX
Computer Architecture Input Output Memory.pptx
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Uderstanding digital marketing and marketing stratergie for engaging the digi...
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
TNA_Presentation-1-Final(SAVE)) (1).pptx
IGGE1 Understanding the Self1234567891011
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Share_Module_2_Power_conflict_and_negotiation.pptx
Environmental Education MCQ BD2EE - Share Source.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
Complications of Minimal Access-Surgery.pdf
Computer Architecture Input Output Memory.pptx
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Uderstanding digital marketing and marketing stratergie for engaging the digi...
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Weekly quiz Compilation Jan -July 25.pdf
What if we spent less time fighting change, and more time building what’s rig...
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Unit 4 Computer Architecture Multicore Processor.pptx
Ad

An Introduction to Music Technology Dan Hosken

  • 1. An Introduction to Music Technology Dan Hosken - Downloadable PDF 2025 https://ebookfinal.com/download/an-introduction-to-music-technology-dan- hosken/ Visit ebookfinal.com today to download the complete set of ebooks or textbooks
  • 2. Here are some recommended products that we believe you will be interested in. You can click the link to download. Disability Studies An Interdisciplinary Introduction 1st Edition Dan Goodley https://ebookfinal.com/download/disability-studies-an- interdisciplinary-introduction-1st-edition-dan-goodley/ The Person An Introduction to the Science of Personality Psychology 5th Edition Dan P. Mcadams https://ebookfinal.com/download/the-person-an-introduction-to-the- science-of-personality-psychology-5th-edition-dan-p-mcadams/ An Introduction to Petroleum Technology Economics and Politics 1st Edition James G. Speight https://ebookfinal.com/download/an-introduction-to-petroleum- technology-economics-and-politics-1st-edition-james-g-speight/ Bricklin on Technology 1st Edition Dan Bricklin https://ebookfinal.com/download/bricklin-on-technology-1st-edition- dan-bricklin/
  • 3. Introduction to Computer Music 1st Edition Nick Collins https://ebookfinal.com/download/introduction-to-computer-music-1st- edition-nick-collins/ Exceptional Learners Introduction to Special Education 10th Edition Dan P. Hallahan https://ebookfinal.com/download/exceptional-learners-introduction-to- special-education-10th-edition-dan-p-hallahan/ Managing Technology and Innovation An Introduction 1st Edition Robert M. Verburg https://ebookfinal.com/download/managing-technology-and-innovation-an- introduction-1st-edition-robert-m-verburg/ Physics and Technology for Future Presidents An Introduction to the Essential Physics Every World Leader Needs to Know Muller https://ebookfinal.com/download/physics-and-technology-for-future- presidents-an-introduction-to-the-essential-physics-every-world- leader-needs-to-know-muller/ Adhesion and Adhesives Technology An Introduction 3rd Edition Alphonsus V. Pocius (Auth.) https://ebookfinal.com/download/adhesion-and-adhesives-technology-an- introduction-3rd-edition-alphonsus-v-pocius-auth/
  • 5. An Introduction to Music Technology Dan Hosken Digital Instant Download Author(s): Dan Hosken ISBN(s): 9780415997294, 0415997291 Edition: Pap/Psc File Details: PDF, 13.23 MB Year: 2010 Language: english
  • 7. An Introduction to Music Technology An Introduction to Music Technology provides a clear overview of the essential elements of music technology for today’s musician. It is designed to provide music students with the background necessary to apply technology in their creating, teaching, and performing. This book focuses on five topics that underlie the hardware and software in use today: Sound, Audio, MIDI, Synthesis and Sampling, and Computer Notation and Computer- Assisted Instruction. In addition, there is an appendix that covers necessary computer hardware and software concepts. Features: • Thorough explanations of key topics in music technology • Content applicable to all software and hardware, not linked to just one piece of software or gear • In-depth discussion of digital audio topics, such as sampling rates, resolutions, and file formats • Explanations of standard audio plug-ins including dynamics processors, EQs, and delay- based effects • Coverage of synthesis and sampling in software instruments • Pedagogical features, including: – Further Reading sections that allow the student to delve deeper into topics of interest – Suggested Activities that can be carried out with a variety of different programs – Key Terms at the end of each chapter – What do I need? Chapters covering the types of hardware and software needed in order to put together Audio and MIDI systems – The companion website contains links to audio examples that demonstrate various concepts, step-by-step tutorials, relevant hardware, software, and additional audio and video resources. Dan Hosken is Professor of Music at California State University, Northridge, where he teaches courses in music technology, electronic music, composition, and theory. As an educator, he is an active member of the Association for Technology in Music Instruction (ATMI). As a composer, he specializes in interactive electronic music involving dancers and musicians using live motion sensing and audio processing. Visit the companion website www.routledge.com/textbooks/9780415997294
  • 9. An Introduction to Music Technology Dan Hosken California State University, Northridge
  • 10. First published 2011 by Routledge 270 Madison Avenue, New York, NY 10016 Simultaneously published in the UK by Routledge 2 Park Square, Milton Park, Abingdon, Oxon OX14 4RN Routledge is an imprint of the Taylor & Francis Group, an informa business © 2011 Taylor & Francis All rights reserved. No part of this book may be reprinted or reproduced or utilized in any form or by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying and recording, or in any information storage or retrieval system, without permission in writing from the publishers. Windows is a registered trademark of Microsoft Corporation in the United States and other countries. Apple, AppleTV, GarageBand, iPod, iPod Touch, iTunes, Logic Studio, Mac OS, MainStage, MobileMe, and Soundtrack Pro are trademarks of Apple Inc., registered in the U.S. and other countries. Finale, Finale Allegro, Finale PrintMusic, Finale Songwriter, Finale Notepad, and SmartMusic are registered trademarks of MakeMusic, Inc. Screenshots of these products are copyright of MakeMusic, Inc. and are used by permission. Except where noted, musical examples were created with Finale® software. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Figure 16.1: Screenshot from Alfred’s Interactive Musician Student Version (#23135) by Morton Manus. Copyright © 2004. Reprinted with permission of Alfred Music Publishing Co., Inc.: www.alfred.com Library of Congress Cataloging in Publication Data Hosken, Daniel W. (Daniel William) An introduction to music technology/Dan Hosken.—1st ed. p. cm. Includes bibliographical references. 1. Music—Data processing. 2. Sound—Recording and reproducing— Digital techniques. I. Title. ML74.H67 2010 780.285—dc22 2009051982 ISBN13: 978–0–415–87827–2 (hbk) ISBN13: 978–0–415–99729–4 (pbk) ISBN13: 978–0–203–84951–4 (ebk) This edition published in the Taylor & Francis e-Library, 2010. To purchase your own copy of this or any of Taylor & Francis or Routledge’s collection of thousands of eBooks please go to www.eBookstore.tandf.co.uk. ISBN 0-203-84951-5 Master e-book ISBN
  • 11. List of illustrations vii Preface xv Introduction 1 Section I: Sound 5 1 What is Sound? 7 2 Sound Properties and the Waveform View 17 3 The Overtone Series and the Spectrum View 32 Further Reading 44 Suggested Activities 45 Section II: Audio 49 4 Audio Hardware 51 5 Digital Audio Data 72 6 Digital Audio Software: The Digital Audio Workstation 86 7 Audio—What Do I Need? 107 Further Reading 116 Suggested Activities 117 Contents
  • 12. Section III: MIDI 125 8 MIDI Hardware 128 9 MIDI Messages 142 10 MIDI Sequencing 159 11 MIDI—What Do I Need? 184 Further Reading 189 Suggested Activities 190 Section IV: Synthesis and Sampling 195 12 Electronic Sound Production 198 13 Synthesis Methods 215 14 Sampling Methods 233 Further Reading 244 Suggested Activities 246 Section V: Computer Notation and Computer-assisted Instruction 253 15 Computer Notation 255 16 Computer-assisted Instruction 282 Appendix: The Music Computer 309 Part 1 Computer Hardware 311 Part 2 Computer Software 329 Appendix: Further Reading 354 Appendix: Suggested Activities 355 Selected Bibliography 359 Index 363 vi CONTENTS
  • 13. FIGURES 1.1 String moving forward and backward, showing compression and rarefaction 8 1.2 Air entering a clarinet mouthpiece, showing compression and rarefaction 10 1.3 Side cutaway view of a flute blowhole, showing compression and rarefaction 10 1.4 Side cutaway view of the mouthpiece of a brass instrument, showing compression and rarefaction 11 1.5 Side cutaway view of a speaker cone, showing compression and rarefaction 12 1.6 Basic anatomy of the human ear 14 1.7 Simplified view of an “unrolled” cochlea 15 2.1 Vibrating string produces a series of compressions and rarefactions 17 2.2 Waveform view of sound 18 2.3a Waveform view showing the period of the waveform measured from two different starting points 19 2.3b Two waves with the same amplitude but different frequencies 19 2.4 Frequencies associated with piano keys 20 2.5a Waveform view showing the amplitude of the waveform measured in two different ways 21 2.5b Two waves with the same frequency but different amplitudes graphed on the same axis 21 2.6 Custom-molded earplugs designed especially for music 24 2.7 Two cycles of a trumpet waveform 25 2.8 Basic waveforms 26 2.9 Amplitude plots of white noise and pink noise 26 2.10 “Zoom out” from individual cycles of a waveform to see the amplitude envelope 27 Illustrations
  • 14. 2.11 ADSR amplitude envelope characteristic of bowed or blown instruments 27 2.12 AR amplitude envelope characteristic of struck or plucked instruments 28 2.13 “Zoom out” from individual cycles of the waveform of a percussive sound 30 2.14 Results of transient analysis 30 3.1 First 16 partials of the overtone series built on A2 33 3.2 Spectrum view of sound 37 3.3 Three different views of a voice saying “oo-ah-ee-oh” on the same pitch 39 3.4 Basic waveforms and their spectra 40 3.5 Waveform and spectrum view of three sine waves adding together to form a more complex waveform 40 3.6 Inharmonic spectrum of a small bell 41 3.7 Frequency distributions of white noise and pink noise 42 3.8 Hip-Hop and Spoken Word settings of the graphic equalizer from Apple’s iTunes 43 4.1 Audio recording path from acoustic vibrations to digital signal 52 4.2 Audio playback path from digital signal to acoustic vibrations 53 4.3 Simplified drawings of microphone capsules 54 4.4 Shure SM-58 end-address, small-diaphragm dynamic microphone 56 4.5 AT4050 side-address, large-diaphragm condenser microphone 56 4.6 Snowball USB microphone 56 4.7 ATW-2120 wireless microphone/transmitter and receiver 56 4.8 Microphone polar (directional) patterns 57 4.9 Grace Design M201 two-channel microphone preamp 58 4.10 ART Z-direct passive direct box 60 4.11 Typical configuration for capturing a guitar signal 60 4.12 Audio connectors 61 4.13 Mackie 802-VLZ3 eight-input small analog mixer 63 4.14 Yamaha MG82CX eight-input small analog mixer 63 4.15 Euphonix MC Mix control surface 64 4.16 Mbox 2 USB audio interface 66 4.17 Edirol UA-25EX USB audio interface 66 4.18 M-Audio FireWire Solo audio interface 66 4.19 Edirol R-09HR flash-based portable recorder 69 4.20 Crown XLS 202 two-channel power amplifier 70 4.21 Genelec 6010A active monitors and 5040A subwoofer 70 5.1 Analog and digital representations 72 5.2 Waveform sampled in time 73 5.3 Hypothetical spectrum showing the Nyquist frequency 74 5.4 Waveform sampled in time and quantized in amplitude 76 5.5 Zoomed-in view of the sampled and quantized waveform 77 viii ILLUSTRATIONS
  • 15. 5.6 Masking of one tone by another 82 5.7 The same loop as a WAVE file and a REX file 84 6.1 Transport controls from various DAWs 87 6.2 Clocks from various DAWs 88 6.3 Track controls in Cubase Studio and Digital Performer 89 6.4 Edit view for tracks in Logic Pro and Cubase Studio 90 6.5 Mix view for tracks in Pro Tools LE and Logic Pro 91 6.6 Two recording levels and the resultant waveforms 92 6.7 Latency-related settings in Logic Pro 94 6.8 Non-destructive editing 95 6.9 Using Trim and Edge Edit in Digital Performer 96 6.10 Fade-in in Digital Performer, fade-out in Pro Tools LE, and crossfade in Logic Pro 97 6.11 Variously shaped fades 97 6.12 Pitch analysis and manipulation of digital audio 98 6.13 Pitch shift plug-in in Pro Tools LE 99 6.14 Edit view in Digital Performer 100 6.15 Mix view in Digital Performer 100 6.16 Dynamic range compression 101 6.17 “Rane Series” graphic EQ plug-in by Serato 102 6.18 Filter types 102 6.19 Masterworks parametric EQ in Digital Performer 103 6.20 Delay with feedback 104 6.21 Flanger plug-in and chorus plug-in from Digital Performer 104 6.22 Reason’s RV7000 reverb showing the density and shape of the reflections 105 6.23 ProVerb convolution reverb from Digital Performer 105 7.1 Audio System 1 108 7.2 Audio System 2 110 7.3a Audio System 3. Sample recording configuration 113 7.3b Audio System 3. Sample recording configuration for drums 113 7.3c Audio System 3. Sample recording configuration 113 8.1 Roland System 100M modular analog synthesizer 129 8.2 Analog sequencer from the Roland System 100M 130 8.3 Yamaha DX7 131 8.4 M-Audio Axiom Pro 25 keyboard controller 132 8.5 Roland Fantom-XR sound module 132 8.6 Yamaha S03 keyboard synthesizer 133 8.7 Roland Fantom G7 workstation keyboard 134 8.8 Akai MPC 5000 workstation 134 8.9 In, Out, and Thru MIDI ports 135 8.10 MIDI connections 135 8.11 Daisychained MIDI connections 136 ILLUSTRATIONS ix
  • 16. 8.12 Computer and a keyboard synthesizer connected through a USB MIDI interface 136 8.13 USB MIDI interfaces 137 8.14 4-in/4-out multiport MIDI interface: M-Audio USB MIDISport 4x4 138 8.15 Non-keyboard instrument controllers 139 8.16 Alternate musical controllers 140 8.17 MIDI-controllable water fountain 140 8.18 Summary of MIDI hardware 141 9.1 TV channels as an analogy for MIDI channels 143 9.2 Computer connected to a multitimbral synth 143 9.3 Computer connected to a 3-in/3-out multiport MIDI interface 144 9.4 Some key numbers and their pitch-register designations 146 9.5 Suggested correspondence between velocity and dynamic level 146 9.6 Modulation wheel 153 9.7 Change in CC7 causing different beginning and ending dynamics 153 9.8 Pitch bend wheel 155 9.9 Keyboards in split mode and layer mode 157 9.10 Summary of MIDI messages 158 10.1a Arrange window from Logic Pro 161 10.1b Tracks window from Cubase Studio 161 10.2 Transport controls from various sequencer/DAWs 161 10.3 Patchlist Viewer in Cubase Studio 162 10.4 Clocks from various sequencers 162 10.5 Pitch preferences in Digital Performer 163 10.6 Piano roll-style editors in Reason and Logic Pro 164 10.7 List editors showing the same messages in Logic Pro and Cubase Studio 165 10.8 Drum pattern shown in the piano roll editor and drum editor in Digital Performer 165 10.9 Music shown in the piano roll editor and notation editor in Digital Performer 166 10.10 Mixer window showing MIDI tracks in Digital Performer 167 10.11 Step entry windows in Logic Pro and Digital Performer 169 10.12 Manual entry windows in Cubase Studio and Logic Pro 169 10.13 Overdub in piano roll editor of Digital Performer 170 10.14 Punch-in/punch-out in piano roll editor of Digital Performer 170 10.15 Loop-overdub in the piano roll editor of Digital Performer 171 10.16 “Cut” versus “snip” 172 10.17 Transpose windows in Digital Performer and Cubase Studio 173 10.18 Quantize window in Digital Performer 174 10.19 Groove quantize window in Digital Performer 174 10.20 Aligning a sequencer’s time grid with a free recording 176 10.21 Adjusting a sequencer’s tempo to markers when working with video 176 x ILLUSTRATIONS
  • 17. 10.22 MIDI Patch Thru preference window in Digital Performer and track selected for patch thru in Logic Pro 177 10.23 Key played on a keyboard synth results in two note messages 178 10.24 Max patch 180 10.25 Max/MSP patch 181 10.26 Portion of the session view in Ableton’s Live 182 10.27 Patch in MainStage 182 11.1 MIDI and Audio System 1 184 11.2 MIDI and Audio System 2 186 11.3 MIDI and Audio System 3 187 12.1 Basic synthesis model based on analog synthesis 199 12.2 Wavetable synthesis 200 12.3 Basic waveforms 201 12.4 Effect of a low pass filter with resonance 202 12.5 ADSR envelope 203 12.6 Various ADSR controls and their resultant envelopes 204 12.7 Filter and filter envelope sections from Reason’s Subtractor 206 12.8 Envelope assigned to the pitch of the oscillator in Reason’s Subtractor 206 12.9 MOTU’s BassLine softsynth 208 12.10 Subtractor softsynth that is part of Propellerheads’ Reason 208 12.11 Variety of software synthesizers 209 12.12 Two programs on one computer communicating through ReWire 211 12.13 Two programs on separate computers 212 12.14 Audio configuration windows in Digital Performer and Reason 213 13.1 Wavetable synthesis 215 13.2 Waveform and spectrum view of three sine waves adding together 216 13.3 “Harmony Inspector” from the Spectra softsynth 217 13.4 Effect of various filter types on a spectrum 219 13.5 Simplified model of the vocal tract 220 13.6 Sawtooth wave processed by the formant filter in Reason’s Thor synthesizer 220 13.7 BV512 vocoder from Propellerheads’ Reason 221 13.8 Harmonic spectrum that results from simple FM 223 13.9 Spectrum expert view in Native Instruments’ FM8 softsynth 224 13.10 Simplified physical model of a clarinet 225 13.11 Elements from Apple’s Sculpture physical modeling softsynth 226 13.12 Individual grain and a cloud of grains 227 13.13 Panel view of the Grain Osc instrument in Reaktor 228 13.14 Example Csound files 231 13.15 PD (Pure Data) patch 232 14.1 Three-second trumpet sample at A440 (A3), mezzo forte 234 14.2 Single trumpet sample keymapped to the full range of the instrument 235 14.3 Multisampled trumpet 236 ILLUSTRATIONS xi
  • 18. 14.4 Chromatically sampled piano with three velocity zones 236 14.5 Multisampled, velocity-switched trumpet with three velocity zones 237 14.6 Looped sample 239 14.7 Loop point shown in Kontakt’s loop editor 239 14.8 Key-switched sample set 240 14.9 Modulation window in Kontakt 241 15.1 Tools interface in various programs 257 15.2 Score creation window in Sibelius 258 15.3 Music OCR in PhotoScore Lite 259 15.4a MIDI file import dialog box in Finale 260 15.4b Quant Settings dialog box for MIDI file importing in Finale 260 15.5 Note palettes from several programs 261 15.6 Three enharmonic spellings of a note 262 15.7 Step-time dialog box from Overture and keyboard shortcut listing from Notion 263 15.8 Tap source dialog box within Finale’s Hyperscribe tool and Flexi-time options within Sibelius 263 15.9 Input quantize options for Flexi-time within Sibelius and possible notation with proper quantization 264 15.10 Audio setup dialog box in Finale showing the MicNotator feature 265 15.11 Variety of non-note musical elements in notation software 266 15.12 Some layout views 268 15.13 Some plug-ins 269 15.14 Worksheet Creator in Sibelius 269 15.15 Flexible tempo playback 270 15.16 Playback options in Finale 271 15.17 Musical notation code versus a sound-related code 272 15.18 SMF versus MusicXML file transfer 274 15.19 Mapping between keystrokes and music images 275 15.20 Font error 275 16.1 Scale module in Alfred’s Interactive Musician 285 16.2 Interval ear training in EarMaster School 286 16.3 Screens in MacGAMUT 287 16.4 Rhythm reading screen in Practica Musica 287 16.5 Scale identification window in GNU Solfege 288 16.6 Evaluation of a first species exercise in Counterpointer 289 16.7 Scale ear trainer at MusicTheory.net 290 16.8 Definition and demonstration of anticipation at Teoria.com 291 16.9 Frequency band identification of band-filtered noise question and answer at Post-Ut 291 16.10 Musicus with time signature at 4/4 292 16.11 Note-matching drill in Early Keyboard Skills 293 16.12 Music Ace I: a pitch comparison game and a doodle pad 294 xii ILLUSTRATIONS
  • 19. 16.13 Rhythm comparison game from Music Ace II 294 16.14 “Orchestra Game” from the Magic Flute Game and “Flying Instruments” from Nutcracker Music 295 16.15 Thematic analysis for Mozart’s Symphony No. 40 296 16.16 Bubble Machine 297 16.17 Sonata Form Virtual Pocket Guide from Form Templates 297 16.18 Quiz screen from Music Terminology for Bands, Orchestras, and Choirs 298 16.19 Late Romantic Orchestra page from Sibelius Instruments 299 16.20 Violin page from Sibelius Instruments 300 16.21 1960s’ page showing Free Jazz description and excerpt from Jazz In Time 300 16.22 SmartMusic in Intelligent Accompaniment mode 302 16.23 SmartMusic showing assessment of a scale performance 302 16.24 Home Concert Xtreme showing tempo following 303 16.25 Amazing Slow Downer looping a small section of a be-bop jazz recording 304 16.26 Musical Sketch Pad from the creatingmusic.com website 305 16.27 “Freeform Flyer” from Cloud 9 305 A1.1 Various connector cables 313 A1.2 FireWire audio interface: M-Audio FireWire Solo 313 A1.3a USB MIDI controller: M-Audio Oxygen8 V2 313 A1.3b USB MIDI interface: Edirol UM-1EX 313 A1.4a MIDI-controllable water fountain 314 A1.4b MIDI effects screen of Access 3.0 musical fountain show control software 315 A1.5a Intel Core i7 “Nehalem” Multi-core Central Processing Unit 316 A1.5b 2 GB DDR3 RAM 316 A1.6a Hard disk drive (HDD) 319 A1.6b Solid state drive (SSD) 319 A1.6c 8 GB high-speed USB flash drive 319 A1.7 Various types of Internet connections 326 A2.1 Flow of data between hardware and software 329 A2.2a File being moved into a folder/directory using the Mac OS X Leopard GUI 331 A2.2b Same operation accomplished using the Terminal application 331 A2.2c File being moved into a folder/directory in the Windows Vista CLI 331 A2.3 Typical directory structure 332 A2.4 Excerpt from a phishing scam email 336 A2.5 EULA screen during installation of MacGAMUT ear training software 337 A2.6 Challenge-response screen used to authorize Max/MSP software 339 A2.7a Mac OS X Leopard save dialog box 341 A2.7b Windows Vista save dialog box 341 A2.7c File format export options in Audacity 341 ILLUSTRATIONS xiii
  • 20. A2.8 Mac OS X Leopard info dialog box 341 A2.9 Three client computers making various webpage requests of one server 344 A2.10 Two computers in a peer-to-peer relationship 345 A2.11a Flash-based XSPF Web Music Player playing XSPF formatted playlist 348 A2.11b Flash-based Yahoo! Media Player playing XSPF formatted playlist 348 A2.12 New World Symphony cello masterclass via Internet2 352 TABLES 2.1 Motion of string and corresponding air pressure in front of string 18 2.2 Some period–frequency relationships 20 2.3 Sound sources and related sound pressure levels 22 2.4 Maximum exposure time at various sound pressure levels 23 2.5 Recommended exposure limits for personal listening devices 24 2.6 Perceptual and physical properties of sound 31 3.1 Frequency relationships for overtone series on A (incomplete) 34 3.2 Frequency relationships for overtone series on A 34 3.3 Going up from C1 to C8 by fifths 35 3.4 Going up from C1 to C8 by octaves 35 3.5 Equal-tempered and ideal interval ratios 36 3.6 Revised perceptual and physical properties of sound 43 4.1 Recording sources and their cables/connectors 61 5.1 Number of bits and the corresponding number of values 77 5.2 Approximate file sizes for uncompressed audio 80 5.3 Approximate bitrates and file sizes for stereo audio 83 9.1 The General MIDI Patch Map 150 9.2 The General MIDI Percussion Map for Channel 10 152 9.3 Summary of channel voice messages 156 10.1 Tick values of note durations for a PPQN of 480 162 10.2 Sequencer file extensions 179 A1.1 Some inputs and outputs for computers 314 A1.2 Metric prefixes 321 A1.3 Current storage media sizes/size ranges 321 A1.4 Approximate sizes of common file types 321 A1.5 ISP types and current range of connection speeds 325 A1.6 Wi-Fi and Ethernet ideal top connectivity speeds 327 A1.7 Approximate download times at various connection speeds 328 A2.1 Some exclusive file formats and their associated applications 341 A2.2 Interchange file formats and short descriptions 342 xiv ILLUSTRATIONS
  • 21. My motivation for writing this book is to provide a clear overview of the essential elements of music technology in order to improve students’ understanding and use of technology in their music performing, creating, and teaching. This textbook is designed to accompany a one- or two-semester undergraduate course in music technology, depending on the extent of the practical exercises and projects that accompany the course and the amount of further reading and research required. There are five sections in the book: Sound, Audio, MIDI, Synthesis and Sampling, and Computer Notation and Computer-assisted Instruction. There are a number of suggested activities, ranging from informational, such as taking stock of available audio equipment, to active, such as taking a melody/chords/bass MIDI sequence and expanding it to ten tracks. ABOUT THIS BOOK In addition to the five main sections of this book, referenced above—Sound, Audio, MIDI, Synthesis and Sampling, and Computer Notation and Computer-assisted Instruction—there is an appendix containing chapters on Computer Hardware and Computer Software. Each section begins with an overview of the material covered in its chapters and concludes with suggested activities that can be carried out using various software and hardware, as well as recommendations for further reading (in Section V, these features appear at the end of each chapter). There is also a Review of Key Terms (which are bold in the text) at the end of each chapter. Sound consists of a chapter discussing the basics of sound as created by some vibrating source and received by the ears and brain, a chapter discussing the properties of sound as seen through the waveform representation, and a chapter discussing the properties of sound as seen through the spectrum representation. Along the way, I touch on a variety of topics, such as the difference between the physical properties of sounds and their perception by our ears and brain, the issue of loudness and hearing loss, and the Preface
  • 22. distinctions between equal temperament and tuning systems derived from the overtone series. Audio consists of a chapter on audio hardware, including microphones, mixers, audio interfaces, and speakers; a chapter on digital audio data, including digital specifications, audio file types, and audio file compression; a chapter on audio recording and editing software, including recording levels, editing techniques, and audio effects; and a chapter on what hardware and software you would need in order to put together audio systems of varying degrees of complexity. I also touch on such topics as analog signal levels and connector types, perceptual issues relating to higher sampling rates and resolutions, and latency in monitoring. MIDI consists of a chapter on MIDI hardware, including controllers, modules, and synthesizers; a chapter on MIDI data, including note, program, and expressive messages; a chapter on MIDI sequencing software, including recording and editing techniques; and a chapter on the hardware and software you would need in order to put together MIDI and audio systems of varying degrees of complexity. I also discuss aspects of synthesizer history that impacted the development of MIDI, alternate MIDI controllers and MIDI-controllable devices, the details of the most-used MIDI messages, and MIDI software that goes beyond the sequencing paradigm. Synthesis and Sampling consists of a chapter on electronic sound production, including hardware synths, software synths, and a basic synthesis model; a chapter on synthesis methods, including additive, subtractive, FM, physical modeling, and granular synthesis; and a chapter on sampling techniques, including keymapping, multisampling, and velocity switching. I also discuss low frequency oscillators (LFOs) and envelopes, plug-in types and ReWire, talk boxes and vocoders, non-commercial software synths, and sample libraries. The hardware and software needs for synthesis and sampling are related to those of the “Audio” and “MIDI” sections and are covered in the section overview. Computer Notation and Computer-assisted Instruction consists of a chapter on computer notation, including various note entry methods and editing techniques; and a chapter on computer-assisted instruction (CAI) software, including programs for musicianship and theory, programs for form and analysis, programs for history, terminology, and instruments, programs for performance skills, and programs for creative skills. The hardware and software needs for computer notation and CAI are related to those of the “Audio” and “MIDI” sections and are covered in the individual chapters. The Computer Hardware chapter in the appendix covers input and output devices, processing components, storage devices, and network connections. Computer Software in the appendix covers operating systems, applications software, malware, software licenses, copy protection, and network software and data issues, including client-server relationships, peer-to-peer relationships, Web 2.0, and Internet2. The appendix includes suggestions for further reading and suggested activities for computer hardware and software. The website for this book, which can be found at www.routledge.com/textbooks/ 9780415997294, contains many audio examples to help explain various concepts. xvi PREFACE
  • 23. I believe these examples provide an important link between what the students read and their aural musical experiences. In addition, there are a variety of links for each section, including links to relevant software and hardware and links to additional audio and video resources. The suggested activities in each section that involve software can be carried out in a variety of different programs. If music technology is being presented in a course, the class may have practical assignments to carry out using software available in the school’s computer lab. If you are studying this material on your own, you can use software that you already have, or use widely available inexpensive software or even freeware. The book’s website contains a list of widely available programs, both commercial and freeware, that would be suitable for these suggested activities. Because there are so many programs available for carrying out the activities, and these programs change so quickly, this book doesn’t contain instructions for specific pieces of software (except for a few activities that utilize the freeware audio editor Audacity). Fortunately, the documentation for most commercial programs and many freeware programs is quite good and doing some of their tutorials and reading parts of the manual (often available electronically from within the program itself) can get one up to speed on a particular program. In addition, there are specific instructions for some of the suggested activities for a few programs available on the book’s website. TO THE INSTRUCTOR Writing this book posed a number of challenges both in choosing appropriate content and in selecting the most useful organization for that content. In making such decisions, I was greatly helped by a number of anonymous reviewers, but in the end I had to decide on a structure that made the most pedagogical sense to me, based on my years of experience teaching music technology. For example: • The subject of MIDI—MIDI has long been a staple of an introductory music technology course. However, with the migration of sound generation from hardware to software and the increasing dominance of direct USB (universal serial bus) connections for controllers, current students are often unaware that they are using MIDI at all when they’re recording notes to be played back by sample libraries or displayed in a music notation program. In fact, for them MIDI is synonymous with “cheesy” sound, despite the fact that MIDI doesn’t inherently “sound” like anything! As a result, while MIDI is still an essential topic, it is no longer first and foremost. While writing, I have moved the MIDI section to almost every position in the book, finally settling on its current position after the section on audio, so that both recording and loops are introduced as creative resources before delving into MIDI. In addition, I have tried to emphasize in the book that, while MIDI cables are fast disappearing, notes played on a controller are still encoded as MIDI, and MIDI messages, with all their utility and their limitations, are still the elements that are manipulated when creating non-loop-based synthesized or sampled parts. PREFACE xvii
  • 24. • The topics of computer hardware and software—These posed another organizational dilemma. When I began teaching in the 1990s, only some students had their own computers, few had an email account aside from the one given by the university, and those who had Internet access at home were using sub-56K dialup. In that environment, understanding the basics of computing was the first essential topic of a music technology course. The current generation of students has grown up with their own laptops, email, and broadband Internet connections, so the basics of computing, while still relevant, are no longer the necessary first step for every student. As a result, I placed the chapters on computer hardware and computer software in the appendix so that the book starts right off dealing with sound. However, that material might be valuable for students who haven’t had a great deal of computer experience or for a course in which computer hardware and software are covered in some depth. • Amount and depth of coverage—In each of the sections, I have had to limit the depth of coverage and give short shrift to some of the more complex issues to keep the presentation of the material suitable for an introductory class, while at the same time not simplifying away important concepts. I have tried to be thorough with each of the topics, if not fully comprehensive. For example, in the chapter on electronic sound production (Chapter 12), I introduce a basic synthesis model consisting of an oscillator, a filter, and an amplifier, and I touch on such topics as envelopes and LFOs and their roles in creating dynamic synthesized sound. However, I felt it necessary to avoid such complexities as oscillator sync, chorusing, and intricate modulation routings to avoid overloading students who are new to the subject. A second book is currently in production entitled Music technology and the project studio and this will take up and expand some of these concepts for the more advanced student. • Course organization—A one-semester basic course for all music majors might cover each of the chapters in the book, with the possible exceptions of the chapters in the appendix, and include one or two projects for each section. A one-semester course that was more focused on preparing students for further study in audio recording might skip the section on “Computer Notation and Computer-assisted Instruction” and include more projects in the “Audio” section. A one-semester course for future music educators might skip the more detailed chapters in the “Synthesis and Sampling” section (Chapters 13 and 14) and spend more time on projects in the “Computer Notation and Computer-assisted Instruction” section. A two-semester course might cover each of the chapters in the book, perhaps including the chapters in the appendix, include several projects for each section, and include reading and writing projects utilizing the material suggested in the “Further Reading” recommendations for each section. • Choice of software—I have consciously avoided connecting this book to a specific piece of hardware or software. While we all have our favorite digital audio workstation (DAW) or notation software, there are several different programs that could serve those functions equally well. However, I have tried to identify the features xviii PREFACE
  • 25. that are common to most programs and illustrate how different programs implement those features. As a result, the tasks in the “Suggested Activities” for each section are presented with generic instructions that will have to be translated into instructions specific to the software you choose to use. One possible solution to this is to have the students do the translating themselves: they can utilize the user guides and tutorials for the given software to figure out which buttons to push and which menu items to choose to accomplish the suggested activities. This would, I believe, set the students solidly along the path to technological independence and prepare them for their encounters with new software in the future. However, this can be a time-consuming process for students and can be frustrating for those who have had relatively little experience in learning new software. Another possible solution would be for you as the instructor to provide the students with some variety of step-by-step instructions specific to your software of choice. I’ve done this for my classes for years, and it has the advantage of getting the students up and running quickly with the software. As the semester progresses, the instructions can become more general, providing students with the motivation to utilize user guides and tutorials that will set them on that path toward technological independence. The website for the book contains step-by-step tutorials for some of the projects for a few pieces of software. This repository is necessarily incomplete in both the software and the projects covered. Nevertheless, I hope it can be directly useful for some of you and provide a template for others to create their own step-by-step instructions. I welcome feedback and criticism from my fellow music technology instructors in order to improve future versions of this book. Please send such feedback to dan.hosken@csun.edu. TO THE STUDENT This is a book written for you, as an aspiring musician, about the principles that underlie modern music technology, and how these principles appear in common music hardware and software. It goes deeper than the books that teach you which button to push or which menu item to choose in a specific piece of software, but it does not go so deep that you must be an electrical engineer or computer scientist to follow it. My goal in writing this book is to give you the background to apply technology as you perform, compose, teach, analyze, or engage in any other musical activities. While eventually you must choose a specific piece of software or hardware for a task and learn which buttons to push to make it do what you want, I firmly believe that understanding common principles behind music software and hardware will enable you to learn to use it more quickly and powerfully as well as adapt to new software PREFACE xix
  • 26. Another Random Scribd Document with Unrelated Content
  • 27. A: 6502 Instruction Set BVS What it does: Branches up to 127 bytes forward or 128 bytes backward from its own address if the V (overflow) flag is set). Major uses: None. See BVC above. Addressing Modes: Number of Name Format Opcode Bytes Used Relative BVS addr. $70/112 2 Affected flags: none CLC What it does: Clears the carry flag. (Puts a 0 into it.) Major uses: Always used before any addition (ADC). If there are to be a series of additions (multiple-byte addition), only the first ADC is preceded by CLC since the carry feature is necessary. There might be a carry, and the result will be incorrect if it is not taken into account. The 6502 does not offer an addition instruction without the carry feature. Thus, you must always clear it before the first ADC so a carry won't be accidentally added. Addressing Modes: Number of Name Format Opcode Bytes Used Implied CLC $18/24 1 Affected flags: Carry (C) flag is set to zero, CLD What it does: Clears the decimal mode flag. (Puts a 0 into it.) Major uses: Commodore computers execute a CLD when first turned on as well as upon entry to monitor modes (PET/CBM models) and when the SYS command occurs. Apple and Atari, however, can arrive in an ML environment with the D flag in an indeterminant state. An attempt to execute ML 193
  • 28. A: 6502 Instruction Set with this flag set would cause disaster — all mathematics would be performed in "decimal mode." It is therefore suggested that owners of Apple and Atari computers CLD during the early phase, the initialization phase, of their programs. Though this is an unlikely bug, it would be a difficult one to recognize should it occur. For further detail about the 6502's decimal mode, see SED below. Addressing Modes: Number of Name Format Opcode Bytes Used Implied CLD $D8/216 1 Affected flags: Decimal (D) flag is set to zero. CLI What it does: Clears the interrupt-disable flag. All interrupts will therefore be serviced (including maskable ones). Major uses: To restore normal interrupt routine processing following a temporary suspension of interrupts for the purpose of redirecting the interrupt vector. For more detail, see SEI below. Addressing Modes: Number of Name Format Opcode Bytes Used Implied CLI $58/88 1 Affected flags: Interrupt (I) flag is set to zero. CLV What it does: Clears the overflow flag. (Puts a 0 into it.) Major uses: None. (See BVC above.) Addressing Modes: Number of Name Format Opcode Bytes Used Implied CLV $B8/184 1 Affected flags: Overflow (V) flag is set to zero. 194
  • 29. A: 6502 Instruction Set CMP What it does: Compares the byte in memory to the byte in the accumulator. Three flags are affected, but the bytes in memory and in the accumulator are undisturbed. A CMP is actually a subtraction of the byte in memory from the byte in the accumulator. Therefore, if you LDA #15:CMP #15 — the result (of the subtraction) will be zero, and BEQ would be triggered since the CMP would have set the Z flag. Major uses: This is an important instruction in ML. It is central to IF-THEN and ON- GOTO type structures. In combination with the B branching instructions like BEQ, CMP allows the 6502 chip to make decisions, to take alternative pathways depending on comparisons. CMP throws the N, Z, or C flag up or down. Then a B instruction can branch, depending on the condition of a flag. Often, an action will affect flags by itself, and a CMP will not be necessary. For example, LDA #15 will put a 0 into the N flag (seventh bit not set) and will put a 0 into the Z flag (the result was not 0). LDA does not affect the C flag. In any event, you could LDA #15: BPL TARGET, and the branch would take effect. However, if you LDA $20 and need to know if the byte loaded is precisely $0D, you must CMP #$0D:BEQ TARGET. So, while CMP is sometimes not absolutely necessary, it will never hurt to include it prior to branching. Another important branch decision is based on > or < situations. In this case, you use BCC and BCS to test the C (carry) flag. And you've got to keep in mind the order of the numbers being compared. The memory byte is compared to the byte sitting in the accumulator. The structure is memory is less than or equal to the accumulator (BCC is triggered because the carry flag was cleared). Or memory is more than accumulator (BCS is triggered because the carry flag was set). Here's an example. If you want to find out if the number in the accumulator is less than $40, just CMP #$41:BCC LESSTHAN (be sure to remember that the carry flag is cleared if a number is less than or equal; that's why we test for less than $40 by comparing with a $41): LDA #75 CMP #$41; IS IT LESS THAN $40? BCC LESSTHAN 195
  • 30. A: 6502 Instruction Set One final comment about the useful BCC/BCS tests following CMP: It's easy to remember that BCC means less than or equal and BCS means more than if you notice that C is less than S in the alphabet. The other flag affected by CMPs is the N flag. Its uses are limited since it merely reports the status of the seventh bit; BPL triggers if that bit is clear, BMI triggers if it's set. However, that seventh bit does show whether the number is greater than (or equal to) or less than 128, and you can apply this information to the ASCII code or to look for BASIC keywords or to search databases (BPL and BMI are used by LADS's database search routines in the Array subprogram). Nevertheless, since LDA and many other instructions affect the N flag, you can often directly BPL or BMI without any need to CMP first. Addressing Modes: Number of Name Format Opcode Byti es Used Immediate CMP #15 $C9/201 2 Zero Page CMP 15 $C5/197 2 Zero Page,X CMP 15,X $D5/213 2 Absolute CMP 1500 $CD/205 3 Absolute,X CMP 1500,X $DD/221 3 Absolute,Y CMP 1500,Y SD9/217 3 Indirect,X CMP (15,X) SCI/193 2 Indirect,Y CMP (15),Y $Dl/209 2 Affected flags: NZ C CPX What it does: Compares the byte in memory to the byte in the X register. Three flags are affected, but the bytes in memory and in the X register are undisturbed. A CPX is actually a subtraction of the byte in memory from the byte in the X register. Therefore, if you LDA #15:CPX #15 — the result (of the subtraction) will be zero and BEQ would be triggered since the CPX would have set the Z flag. Major uses: X is generally used as an index, a counter within loops. Though the Y register is often preferred as an index since it can serve for the very useful indirect Y addressing 196
  • 31. A: 6502 Instruction Set mode (LDA (15),Y) — the X register is nevertheless pressed into service when more than one index is necessary or when Y is busy with other tasks. In any case, the flags, conditions, and purposes of CPX are quite similar to CMP (the equivalent comparison instruction for the accumulator). For further information on the various possible comparisons (greater than, equal, less than, not equal), see CMP above. Addressing Modes: Name Format Opcode Number of Bytes Used Immediate Zero Page Absolute CPX #15 CPX 15 CPX 1500 $E0/224 $E4/228 SEC/236 2 2 3 Affected flags: N Z C CPY What it does: Compares the byte in memory to the byte in the Y register. Three flags are affected, but the bytes in memory and in the Y register are undisturbed. A CPX is actually a subtraction of the byte in memory from the byte in the Y register. Therefore, if you LDA #15: CPY #15— the result (of the subtraction) will be zero, and BEQ would be triggered since the CPY would have set the Z flag. Major uses: Y is the most popular index, the most heavily used counter within loops since it can serve two purposes: It permits the very useful indirect Y addressing mode (LDA (15), Y) and can simultaneously maintain a count of loop events. See CMP above for a detailed discussion of the various branch comparisons which CPY can implement. Addressing Modes: Name Format Opcode Number of Bytes Used Immediate Zero Page Absolute CPY #15 CPY 15 CPY 1500 SCO/192 SC4/196 SCC/204 2 2 3 Affected flags: NZC 197
  • 32. A: 6502 Instruction Set DEC What it does: Reduces the value of a byte in memory by 1. The N and Z flags are affected. Major uses: A useful alternative to SBC when you are reducing the value of a memory address. DEC is simpler and shorter than SBC, and although DEC doesn't affect the C flag, you can still decrement double-byte numbers (see "Decrement Double-Byte Numbers" in Appendix E). The other main use for DEC is to control a memory index when the X and Y registers are too busy to provide this service. For example, you could define, say, address $505 as a counter for a loop structure. Then: LOOP STA $8000:DEC $505:BEQ ENDJMP LOOP. This structure would continue storing A into $8000 until address $505 was decremented down to zero. This imitates DEX or DEY and allows you to set up as many nested loop structures (loops within loops) as you wish. Addressing Modes: Name Format Opcode Number of Bytes Used Zero Page Zero Page,X Absolute Absolute,X DEC 15 DEC 15,X DEC 1500 DEC 1500,X $C6/198 $D6/214 SCE/206 $DE/222 2 2 3 3 Affected flags: N Z DEX What it does: Reduces the X register by 1. Major uses: Used as a counter (an index) within loops. Normally, you LDX with some number (the number of times you want the loop executed) and then DEX:BEQ END as a way of counting events and exiting the loop at the right time. Addressing Modes: Number of Name Format Opcode Bytes Used Implied DEX SCA/202 1 Affected flags: N Z 198
  • 33. A: 6502 Instruction Set DEY What it does: Reduces the Y register by 1. Major uses: Like DEX, DEY is often used as a counter for loop structures. But DEY is the more common of the two since the Y register can simultaneously serve two purposes within a loop by permitting the very popular indirect Y addressing mode. A common way to print a screen message (the ASCII form of the message is at $5000 in this example, and the message ends with 0): LDY #0:LOOP LDA $5000,Y:BEQ END:STA SCREEN,Y:INY:JMP LOOP:END continue with the program. Addressing Modes: Name Implied Affected flags: N Z Number of Format Opcode Bytes Used DEY $88/136 1 EOR What it does: Exclusive ORs a byte in memory with the accumulator. Each bit in memory is compared with each bit in the accumulator, and the bits are then set (given a 1) if one of the compared bits is 1. However, bits are cleared if both are 0 or if both are 1. The bits in the byte held in the accumulator are the only ones affected by this comparison. Major uses: EOR doesn't have too many uses. Its main value is to toggle a bit. If a bit is clear (is a 0), it will be set (to a 1); if a bit is set, it will be cleared. For example, if you want to reverse the current state of the sixth bit in a given byte: LDA BYTE:EOR #$40:STA BYTE. This will set bit 6 in BYTE if it was 0 (and clear it if it was 1). This selective bit toggling could be used to "shift" an unshifted ASCII character via EOR #$80 (1000000). Or if the character were shifted, EOR #$80 would make it lowercase. EOR toggles. 199
  • 34. A: 6502 Instruction Set Addressing Modes: Number of Name Format Opcode Byti es Used Immediate EOR #15 $49/73 2 Zero Page EOR 15 $45/69 2 Zero Page,X EOR 15,X $55/85 2 Absolute EOR 1500 $4D/77 3 Absolute,X EOR 1500,X $5D/93 3 Absolute,Y EOR 1500,Y $59/89 3 Indirect,X EOR (15,X) $41/65 2 Indirect,Y EOR (15),Y $51/81 2 Affected flags: NZ INC What it does: Increases the value of a byte in memory by 1, Major uses: Used exactly as DEC (see DEC above), except it counts up instead of down. For raising address pointers or supplementing the X and Y registers as loop indexes. Addressing Modes: Number of Name Format Opcode Bytes Used Zero Page Zero Page,X Absolute Absolute,X INC 15 INC 15,X INC 1500 INC 1500.X $E6/230 $F6/246 $EE/238 $FE/254 2 2 3 3 Affected flags: NZ INX What it does: Increases the X register by 1. Major uses: Used exactly as DEX (see DEX above), except it counts up instead of down. For loop indexing. Addressing Modes: Number of Name Format Opcode Bytes Used Implied INX $E8/232 1 Affected flags: N Z 200
  • 35. A: 6502 Instruction Set INY What it does: Increases the Y register by 1. Major uses: Used exactly as DEY (see DEY above), except it counts up instead of down. For loop indexing and working with the indirect Y addressing mode (LDA (15),Y). Addressing Modes: Number of Name Format Opcode Bytes Used Implied INY $C8/200 1 Affected flags: N Z JMP What it does: Jumps to any location in memory. Major uses: Branching long range. It is the equivalent of BASIC'S GOTO instruction. The bytes in the program counter are replaced with the address (the argument) following the JMP instruction and, therefore, program execution continues from this new address. Indirect jumping — JMP (1500) — is not recommended, although some programmers find it useful. It allows you to set up a table of jump targets and bounce off them indirectly. For example, if you had placed the numbers $00 $04 in addresses $88 and $89, a JMP ($0088) instruction would send the program to whatever ML routine was located in address $0400. Unfortunately, if you should locate one of your pointers on the edge of a page (for example, $00FF or $17FF), this indirect JMP addressing mode reveals its great weakness. There is a bug which causes the jump to travel to the wrong place — JMP ($00FF) picks up the first byte of the pointer from $00FF, but the second byte of the pointer will be incorrectly taken from $0000. With JMP ($17FF), the second byte of the pointer would come from what's in address $1700. Since there is this bug, and since there are no compelling reasons to set up JMP tables, you might want to forget you ever heard of indirect jumping. 201
  • 36. A: 6502 Instruction Set Addressing Modes: Name Format Opcode Number of Bytes Used Absolute JMP 1500 Indirect JMP (1500) $4C/76 $6C/108 3 3 Affected flags: none JSR What it does: Jumps to a subroutine anywhere in memory. Saves the PC (Program Counter) address, plus three, of the JSR instruction by pushing it onto the stack. The next RTS in the program will then pull that address off the stack and return to the instruction following the JSR. Major uses: As the direct equivalent of BASIC'S GOSUB command, JSR is heavily used in ML programming to send control to a subroutine and then (via RTS) to return and pick up where you left off. The larger and more sophisticated a program becomes, the more often JSR will be invoked. In LADS, whenever something is printed to screen or printer, you'll often see a chain of JSRs performing necessary tasks: JSR PRNTCR: JSR PRNTSAJSR PRNTSPACE:JSR PRNTNUM:JSR PRNTSPACE. This JSR chain prints a carriage return, the current assembly address, a space, a number, and another space. Another thing you might notice in LADS and other ML programs is a PLA:PLA pair. Since JSR stuffs the correct return address onto the stack before leaving for a subroutine, you need to do something about that return address if you later decide not to RTS back to the position of the JSR in the program. This might be the case if you usually want to RTS, but in some particular cases, you don't. For those cases, you can take control of program flow by removing the return address from the stack (PLA:PLA will clean off the two-byte address) and then performing a direct JMP to wherever you want to go. If you JMP out of a subroutine without PLA:PLA, you could easily overflow the stack and crash the program. 202
  • 37. A: 6502 Instruction Set Addressing Modes: Number of Name Format Opcode Bytes Used Absolute JSR 1500 $20/32 3 Affected flags: none LDA What it does: Loads the accumulator with a byte from memory. Copy might be a better word than load, since the byte in memory is unaffected by the transfer. Major uses: The busiest place in the computer. Bytes coming in from disk, tape, or keyboard all flow through the accumulator, as do bytes on their way to screen or peripherals. Also, because the accumulator differs in some important ways from the X and Y registers, the accumulator is used by ML programmers in a different way from the other registers. Since INY/DEY and INX/DEX make those registers useful as counters for loops (the accumulator couldn't be conveniently employed as an index; there is no INA instruction), the accumulator is the main temporary storage register for bytes during their manipulation in an ML program. ML programming, in fact, can be defined as essentially the rapid, organized maneuvering of single bytes in memory. And it is the accumulator where these bytes often briefly rest before being sent elsewhere. Addressing Modes: Number of Name Format Opcode Byti ss Used Immediate Zero Page Zero Page,X Absolute LDA #15 LDA 15 LDA 15,X LDA 1500 $A9/169 $A5/165 SB5/181 $AD/173 2 2 2 3 Absolute,X Absolute,Y Indirect,X Indirect,Y LDA 1500,X LDA 1500,Y ' LDA (15,X) LDA (15),Y $BD/189 $B9/185 $A1/161 SB1/177 3 3 2 2 Affected flags: N Z 203
  • 38. A: 6502 Instruction Set LDX What it does: Loads the X register with a byte from memory. Major uses: The X register can perform many of the tasks that the accumulator performs, but it is generally used as an index for loops. In preparation for its role as an index, LDX puts a value into the register. Addressing Modes: Name Immediate Zero Page Zero Page,Y Absolute Absolute,Y Affected flags: N Z Format LDX #15 LDX 15 LDX 15,Y LDX 1500 LDX 1500,Y Opcode $A2/162 $A6/166 $B6/182 $AE/174 SBE/190 Number of Bytes Used 2 2 2 3 3 LDY What it does: Loads the Y register with a byte from memory. Major uses: The Y register can perform many of the tasks that the accumulator performs, but it is generally used as an index for loops. In preparation for its role as an index, LDY puts a value into the register. Addressing Modes: Name Format Opcode Number of Bytes Used Immediate Zero Page Zero Page,X Absolute Absolute,X LDY #15 LDY 15 LDY 15,X LDY 1500 LDY 1500,X SAO/160 SA4/164 SB4/180 SAC/172 SBC/188 2 2 2 3 3 Affected flags: NZ 204
  • 39. A: 6502 Instruction Set LSR What it does: Shifts the bits in the accumulator or in a byte in memory to the right, by one bit. A zero is stuffed into bit 7, and bit 0 is put into the carry flag. 0 VTvTvTvTvTvTv?* Bit Bit Bit Bit Bit Bit Bit Bit 7 6 5 4 3 2 10 Major uses: To divide a byte by 2. In combination with the ROR instruction, LSR can divide a two-byte or larger number (see Appendix E). LSR:LSR:LSR:LSR will put the high four bits (the high nybble) into the low nybble (with the high nybble replaced by the zeros being stuffed into the seventh bit and then shifted to the right). Addressing Modes: Name Format Opcode Number of Bytes Used Accumulator Zero Page Zero Page,X Absolute Absolute,X LSR LSR 15 LSR 15,X LSR 1500 LSR 1500,X $4A/74 $46/70 $56/86 $4E/78 $5E/94 2 2 2 3 3 Affected flags: NZC NOP What it does: Nothing. No operation. Major uses: Debugging. When setting breakpoints with BRK, you will often discover that a breakpoint, when examined, passes the test. That is, there is nothing wrong at that place in the program. So, to allow the program to execute to the next breakpoint, you cover the BRK with a NOP. Then, when you run the program, the computer will slide over the NOP with no effect on the program. Three NOPs could cover a JSR XXXX, and you could see the effect on the program when that particular JSR is eliminated. 205
  • 40. A: 6502 Instruction Set Addressing Modes: Number of Name Format Opcode Bytes Used Implied NOP $EA/234 1 Affected flags: none ORA What it does: Logically ORs a byte in memory with the byte in the accumulator. The result is in the accumulator. An OR results in a 1 if either the bit in memory or the bit in the accumulator is 1. Major uses: Like an AND mask which turns bits off, ORA masks can be used to turn bits on. For example, if you wanted to "shift" an ASCII character by setting the seventh bit, you could LDA CHARACTER:ORA #$80. The number $80 in binary is 10000000, so all the bits in CHARACTER which are ORed with zeros here will be left unchanged. (If a bit in CHARACTER is a 1, it stays a 1. If it is a 0, it stays 0.) But the 1 in the seventh bit of $80 will cause a 0 in the CHARACTER to turn into a 1. (If CHARACTER already has a 1 in its seventh bit, it will remain a 1.) Addressing Modes: Number of Name Format Opcode Byti es Used Immediate Zero Page Zero Page,X Absolute Absolute,X Absolute,Y Indirect,X Indirect,Y ORA #15 ORA 15 ORA 15,X ORA 1500 ORA 1500,X ORA 1500,Y ORA (15,X) ORA (15),Y $09/9 $05/5 $15/21 $0D/13 $lD/29 $19/25 $01/1 $11/17 2 2 2 3 3 3 2 2 Affected flags: N Z 206
  • 41. A: 6502 Instruction Set PHA What it does: Pushes the accumulator onto the stack. Major uses: To temporarily (very temporarily) save the byte in the accumulator. If you are within a particular subroutine and you need to save a value for a brief time, you can PHA it. But beware that you must PLA it back into the accumulator before any RTS so that it won't misdirect the computer to the wrong RTS address. All RTS addresses are saved on the stack. Probably a safer way to temporarily save a value (a number) would be to STA TEMP or put it in some other temporary variable that you've set aside to hold things. Also, the values of A, X, and Y need to be temporarily saved, and the programmer will combine TYA and TXA with several PHAs to stuff all three registers onto the stack. But, again, matching PLAs must restore the stack as soon as possible and certainly prior to any RTS. Addressing Modes: Number of Name Format Opcode Bytes Used Implied PHA $48/72 1 Affected flags: none PHP What it does: Pushes the "processor status" onto the top of the stack. This byte is the status register, the byte which holds all the flags: N Z C I D V. Major uses: To temporarily (very temporarily) save the state of the flags. If you need to preserve all the current conditions for a minute (see description of PHA above), you may also want to preserve the status register as well. You must, however, restore the status register byte and clean up the stack by using a PLP before the next RTS. Addressing Modes: Number of Name Format Opcode Bytes Used Implied PHP $08/8 1 Affected flags: none 207
  • 42. A: 6502 Instruction Set PLA What it does: Pulls the top byte off the stack and puts it into the accumulator. Major uses: To restore a number which was temporarily stored on top of the stack (with the PHA instruction). It is the opposite action of PHA (see above). Note that PLA does affect the N and Z flags. Each PHA must be matched by a corresponding PLA if the stack is to correctly maintain RTS addresses, which is the main purpose of the stack. Addressing Modes: Number of Name Format Opcode Bytes Used Implied PLA $68/104 1 Affected flags: N Z PLP What it does: Pulls the top byte off the stack and puts it into the status register (where the flags are). PLP is a mnemonic for PuLl Processor status. Major uses: To restore the condition of the flags after the status register has been temporarily stored on top of the stack (with the PHP instruction). It is the opposite action of PHP (see above). PLP, of course, affects all the flags. Any PHP must be matched by a corresponding PLP if the stack is to correctly maintain RTS addresses, which is the main purpose of the stack. Addressing Modes: Number of Name Format Opcode Bytes Used Implied PLP $28/40 1 Affected flags: all ROL What it does: Rotates the bits in the accumulator or in a byte in memory to the left, by one bit. A rotate left (as opposed to an ASL, Arithmetic Shift Left) moves bit 7 to the 208
  • 43. A: 6502 Instruction Set carry, moves the carry into bit 0, and every other bit moves one position to its left. (ASL operates quite similarly, except it always puts a 0 into bit 0.) /~ /~ r s- /~ r /~^| Carry *%7T > WVW^* Flag Bit Bit Bit Bit Bit Bit Bit Bit Major uses: To multiply a byte by 2. ROL can be used with ASL to multiply multiple-byte numbers since ROL pulls any carry into bit 0. If an ASL resulted in a carry, it would be thus taken into account in the next higher byte in a multiplebyte number. (See Appendix E.) Notice how the act of moving columns of binary numbers to the left has the effect of multiplying by 2: 0010 (the number 2 in binary) 0100 (the number 4) This same effect can be observed with decimal numbers, except the columns represent powers of 10: 0010 (the number 10 in decimal) 0100 (the number 100) Addressing Modes: Number of Name Format Opcode Bytes Used Accumulator Zero Page Zero Page,X Absolute Absolute,X ROL ROL 15 ROL 15,X ROL 1500 ROL 1500,X $2A/42 $26/38 $36/54 $2E/46 $3E/62 1 2 2 3 3 Affected flags: N Z C ROR What it does: Rotates the bits in the accumulator or in a byte in memory to the right, by one bit. A rotate right (as opposed to a LSR, Logical Shift Right) moves bit 0 into the carry, 209
  • 44. A: 6502 Instruction Set moves the carry into bit 7, and every other bit moves one position to its right. (LSR operates quite similarly, except it always puts a 0 into bit 7.) /A iQ% /fr /T^ fa A /T^ Bit Bit Bit Bit Bit Bit Bit Bit 7 6 5 4 3 2 10 Major uses: To divide a byte by 2. ROR can be used with LSR to divide multiple-byte numbers since ROR puts any carry into bit 7. If an LSR resulted in a carry, it would be thus taken into account in the next lower byte in a multiple-byte number. (See Appendix E.) Notice how the act of moving columns of binary numbers to the right has the effect of dividing by 2: 1000 (the number 8 in binary) 0100 (the number 4) This same effect can be observed with decimal numbers, except the columns represent powers of 10: 1000 (the number 1000 in decimal) 0100 (the number 100) Addressing Modes: Number of Name Format Opcode Bytes Used Accumulator Zero Page Zero Page,X Absolute Absolute,X ROR ROR 15 ROR 15,X ROR 1500 ROR 1500,X $6A/106 $66/102 $76/118 $6E/110 $7E/126 1 2 2 3 3 Affected flags: N Z C RTI What it does: Returns from an interrupt. Major uses: None. You might want to add your own routines to your machine's normal interrupt routines (see SEI 210
  • 45. A: 6502 Instruction Set below), but you won't be generating actual interrupts of your own. Consequently, you cannot ReTurn from Interrupts you never create. never create Addressing Modes Name Format Opcode Number of Bytes Used Implied Affected RTI flags: all (status register $40/64 1 is retrieved from the stack). RTS What it does: Returns from a subroutine jump (caused by JSR). Major uses: Automatically picks off the two top bytes on the stack and places them into the program counter. This reverses the actions taken by JSR (which put the program counter bytes onto the stack just before leaving for a subroutine). When RTS puts the return bytes into the program counter, the next event in the computer's world will be the instruction following the JSR which stuffed the return address onto the stack in the first place. Addressing Modes: Number of Name Format Opcode Bytes Used Implied RTS $60/96 1 Affected flags: none SBC What it does: Subtracts a byte in memory from the byte in the accumulator, and "borrows" if necessary. If a "borrow" takes place, the carry flag is cleared (set to 0). Thus, you always SEC (set the carry flag) before an SBC operation so you can tell if you need a "borrow." In other words, when an SBC operation clears the carry flag, it means that the byte in memory was larger than the byte in the accumulator. And since 211
  • 46. A: 6502 Instruction Set memory is subtracted from the accumulator in an SBC operation, if memory is the larger number, we must "borrow." Major uses: Subtracts one number from another. Addressing Modes: Number of Name Format Opcode Byt es Used Immediate SBC #15 $E9/233 2 Zero Page SBC 15 $E5/229 2 Zero Page,X SBC 15,X $F5/245 2 Absolute SBC 1500 $ED/237 3 Absolute, X SBC 1500,X $FD/253 3 Absolute,Y SBC 1500,Y $F9/249 3 Indirect,X SBC (15,X) $El/225 2 Indirect,Y SBC (15),Y $F1/241 2 Affected flags: N Z C V SEC What it does: Sets the carry (C) flag (in the processor status register byte). Major uses: This instruction is always used before any SBC operation to show if the result of the subtraction was negative (if the accumulator contained a smaller number than the byte in memory being subtracted from it). See SBC above. Addressing Modes: Number of Name Format Opcode Bytes Used Implied SEC $38/56 1 Affected flags: C SED What it does: Sets the decimal (D) flag (in the processor status register byte). Major uses: Setting this flag puts the 6502 into decimal arithmetic mode. This mode can be easier to use when you are inputting or outputting decimal numbers (from the user of a program or to the screen). Simple addition and subtraction can be performed in decimal mode, but most programmers ignore 212
  • 47. A: 6502 Instruction Set this feature since more complicated math requires that you remain in the normal binary state of the 6502. Note: Commodore computers automatically clear this mode when entering ML via SYS. However, Apple and Atari computers can enter ML in an indeterminant state. Since there is a possibility that the D flag might be set (causing havoc) on entry to an ML routine, it is sometimes suggested that owners of these two computers use the CLD instruction at the start of any ML program they write. Any ML programmer must CLD following any deliberate use of the decimal mode. Addressing Modes: Number of Name Format Opcode Bytes Used Implied SED SF8/248 1 Affected flags: D SEI What it does: Sets the interrupt disable flag (the I flag) in the processor status byte. When this flag is up, the 6502 will not acknowledge or act upon interrupt attempts (except a few nonmaskable interrupts which can take control in spite of this flag, like a reset of the entire computer). The operating systems of most computers will regularly interrupt the activities of the chip for necessary, high-priority tasks such as updating an internal clock, displaying things on the TV, receiving signals from the keyboard, etc. These interruptions of whatever the chip is doing normally occur 60 times every second. To find out what housekeeping routines your computer interrupts the chip to accomplish, look at the pointer in $FFFE/FFFF. It gives the starting address of the maskable interrupt routines. Major uses: You can alter a RAM pointer so that it sends these interrupts to your own ML routine, and your routine then would conclude by pointing to the normal interrupt routines. In this way, you can add something you want (a click sound for each keystroke? the time of day on the screen?) to the normal actions of your operating system. The advantage of this method over normal SYSing is that your interrupt- driven routine is essentially transparent to whatever else you are doing 213
  • 48. A: 6502 Instruction Set (in whatever language). Your customization appears to have become part of the computer's ordinary habits. However, if you try to alter the RAM pointer while the other interrupts are active, you will point away from the normal housekeeping routines in ROM, crashing the computer. This is where SEI comes in. You disable the interrupts while you LDA STA LDA STA the new pointer. Then CLI turns the interrupt back on and nothing is disturbed. Interrupt processing is a whole subcategory of ML programming and has been widely discussed in magazine articles. Look there if you need more detail. Addressing Modes: Name Format Implied SEI Affected flags: I Opcode $78/120 Number of Bytes Used 1 STA What it does: Stores the byte in the accumulator into memory. Major uses: Can serve many purposes and is among the most used instructions. Many other instructions leave their results in the accumulator (ADC/SBC and logical operations like ORA), after which they are stored in memory with STA. Addressing Modes: Number of Name Format Opcode Byt« es Used Zero Page Zero Page,X Absolute Absolute,X Absolute,Y Indirect,X Indirect,Y STA 15 STA 15,X STA 1500 STA 1500,X STA 1500, Y STA (15,X) STA (15),Y $85/133 $95/149 $8D/141 $9D/157 $99/153 $81/129 $91/145 2 2 3 3 3 2 2 Affected flags: none 214
  • 49. A: 6502 Instruction Set STX What it does: Stores the byte in the X register into memory. Major uses: Copies the byte in X into a byte in memory. Addressing Modes: Number of Name Format Opcode Bytes Used Zero Page STX 15 $86/134 2 Zero Page,Y STX 15, Y $96/150 2 Absolute STX 1500 $8E/142 3 Affected flags: none STY What it does: Stores the byte in the Y register into memory. Major uses: Copies the byte in Y into a byte in memory. Addressing Modes: Number of Name Format Opcode Bytes Used Zero Page STY 15 $84/132 2 Zero Page,X STY 15,X $94/148 2 Absolute STY 1500 $8C/140 3 Affected flags: none TAX What it does: Transfers the byte in the accumulator to the X register. Major uses: Sometimes you can copy the byte in the accumulator into the X register as a way of briefly storing the byte until it's needed again by the accumulator. If X is currently unused, TAX is a convenient alternative to PHA (another temporary storage method). However, since X is often employed as a loop counter, TAX is a relatively rarely used instruction. 215
  • 50. A: 6502 Instruction Set Addressing Modes: Number of Name Format Opcode Bytes Used Implied TAX $AA/170 1 Affected flags: N Z TAY What it does: Transfers the byte in the accumulator to the Y register. Major uses: Sometimes you can copy the byte in the accumulator into the Y register as a way of briefly storing the byte until it's needed again by the accumulator. If Y is currently unused, TAY is a convenient alternative to PHA (another temporary storage method). However, since Y is quite often employed as a loop counter, TAY is a relatively rarely used instruction. Addressing Modes: Number of Name Format Opcode Bytes Used Implied TAY $A8/168 1 Affected flags: N Z TSX What it does: Transfers the stack pointer to the X register. Major uses: The stack pointer is a byte in the 6502 chip which points to where a new value (number) can be added to the stack. The stack pointer would be "raised" by two, for example, when you JSR and the two bytes of the program counter are pushed onto the stack. The next available space on the stack thus becomes two higher than it was previously. By contrast, an RTS will pull a two-byte return address off the stack, freeing up some space, and the stack pointer would then be "lowered" by two. The stack pointer is always added to $0100 since the stack is located between addresses $0100 and $01FF. 216
  • 51. A: 6502 Instruction Set Addressing Modes: Number of Name Format Opcode Bytes Used Implied TSX $BA/186 1 Affected flags: N Z TXA What it does: Transfers the byte in the X register to the accumulator. Major uses: There are times, after X has been used as a counter, when you'll want to compute something using the value of the counter. And you'll therefore need to transfer the byte in X to the accumulator. For example, if you search the screen for character $75: CHARACTER = $75:SCREEN = $0400 LDX #0 LOOP LDA SCREEN,X:CMP #CHARACTER:BEQ MORE:INX BEQ NOTFOUND ; (this prevents an endless loop MORE TXA ; (you now know the character's location) NOTFOUND BRK In this example, we want to perform some action based on the location of the character. Perhaps we want to remember the location in a variable for later reference. This will require that we transfer the value of X to the accumulator so it can be added to the SCREEN start address. Addressing Modes: Number of Name Format Opcode Bytes Used Implied TXA $8A/138 1 Affected flags: N Z 217
  • 52. 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! ebookfinal.com