| Table of Contents | 7 |
| Detailed Table of Contents | 9 |
| Forward | 13 |
| Getting Started with JFugue | 15 |
| Downloading JFugue | 15 |
| Running a Test Program | 15 |
| Using JFugue from an Integrated Development Environment | 16 |
| Deciding which version of JFugue to use | 17 |
| Using MIDI Soundbanks | 17 |
| Downloading Soundbanks | 18 |
| Installing the Java Media Soundbanks | 18 |
| Using Gervill to Load Soundbanks | 19 |
| Using the JFugue MusicString | 21 |
| Introducing the MusicString | 21 |
| Learning the Parts of the MusicString | 22 |
| Notes, Rests, and Chords | 22 |
| Sharps, Flats, and Naturals | 23 |
| Octave | 23 |
| Chords | 24 |
| Chord Inversions | 25 |
| Duration | 26 |
| Triplets and Other Tuplets | 27 |
| Ties | 28 |
| Attack and Decay Velocities | 29 |
| Notes played in Melody and Harmony | 29 |
| Measure | 30 |
| Key Signature | 31 |
| Instrument | 31 |
| Voice | 34 |
| MIDI Percussion Track | 34 |
| Layer | 35 |
| Tempo | 36 |
| Pitch Wheel | 36 |
| Channel Pressure | 37 |
| Polyphonic Pressure | 37 |
| Controller Events | 37 |
| Constants | 40 |
| Timing Information | 41 |
| MusicString Style | 41 |
| JFugue Elements: Using Objects instead of MusicStrings | 42 |
| Getting Assistance with Notes | 45 |
| Transcribing Sheet Music to JFugue MusicString | 46 |
| Working with Patterns | 49 |
| What is a Pattern? | 49 |
| Using Patterns as Musical Building Blocks | 50 |
| Using Patterns to Construct Music | 51 |
| Observing Changes to a Pattern with a PatternListener | 53 |
| Maintaining Properties within a Pattern | 53 |
| Loading and Saving Patterns | 54 |
| Transforming Patterns with PatternTransformer | 55 |
| PatternTransformers Included with with JFugue | 56 |
| How to Create a PatternTransformer | 57 |
| How to Use a PatternTransformer | 59 |
| PatternTransformers In Action | 59 |
| Using a ParserListener to Analyze a Pattern | 60 |
| Working with MIDI Patterns | 62 |
| The JFugue Player | 63 |
| Playing Music | 63 |
| Starting a Player with a Known Sequencer or Synthesizer | 64 |
| Pausing, Rewinding, and Forwarding the Player | 64 |
| The Streaming Player | 65 |
| How to Simulate a Pipe Organ | 67 |
| Throttling the Delivery of New Fragments | 68 |
| The Anticipator: Know Upcoming Events Before They Happen | 68 |
| Working with MIDI Files | 71 |
| Understanding MIDI Support in JFugue | 71 |
| Playing MIDI Files | 72 |
| Creating MIDI Files | 72 |
| Converting MIDI to JFugue MusicStrings | 72 |
| Using JFugue with MIDI Devices | 75 |
| Why Communicate with External Devices? | 75 |
| Setting Up Communication with External Devices | 75 |
| JFugues Device Classes | 76 |
| Using the Intelligent Device Resolver | 76 |
| Sending Music to a MIDI Device | 77 |
| Listening to Music from a MIDI Device | 78 |
| Troubleshooting Your Connections | 79 |
| Rhythms, Intervals, and Microtones | 81 |
| Rhythm | 81 |
| Interval Notation | 85 |
| Combining Rhythm and Interval Notation | 86 |
| Microtonal Music | 88 |
| The Architecture of JFugue | 89 |
| Parsers and ParserListeners (or Renderers) | 89 |
| JFugue Supports MusicXML | 90 |
| Recombine Parsers and Renderers Endlessly | 90 |
| Creating a New Parser | 90 |
| Creating a New Renderer | 91 |
| Ideas for New Parsers and Renderers | 92 |
| Working with MusicStringParser | 92 |
| Adding a new JFugue Element | 92 |
| Exploring JFugues "Extras" Package | 97 |
| FilePlayer | 97 |
| Midi2JFugue | 98 |
| JFugue by Example | 99 |
| The Quintessential Music Program | 99 |
| How to Save Music as a MIDI file | 99 |
| How to Load and Play a MIDI file | 100 |
| How to Save a Pattern | 100 |
| How to Load a Pattern | 100 |
| How to Load a MIDI file and convert it into a JFugue MusicString | 101 |
| How to Combine Patterns | 101 |
| How to Repeat a Pattern | 101 |
| How to Create an Anonymous ParserListener | 101 |
| How to Create Your Own Parser | 102 |
| How to Create Your Own Renderer | 102 |
| How to Connect a Parser to a Renderer | 103 |
| How to Parse MIDI and Render a MusicString | 103 |
| How to Parse a MusicString and Render MIDI | 103 |
| How to Create a Rhythm | 103 |
| How to Use Interval Notation | 104 |
| How to Combine Intervals and Rhythms | 104 |
| How to Use Microtone Notation | 105 |
| How to Send MIDI to an External Device | 106 |
| How to Send a Pattern to an External Device | 106 |
| How to Listen for Music from an External Device | 106 |
| How to Use JFugue with Loaded Soundbanks | 107 |
| Creative Applications with JFugue | 109 |
| JFugue Drum Circle | 109 |
| Lindenmayer System (L-System) Music | 114 |
| Conclusion | 117 |