JFugue - Java API for Music Programming

The Complete Guide to JFugue

Cover of The Complete Guide to JFugue

First Edition, April 2008
Covers JFugue 4.0
Format: PDF document
118 pages

Table of Contents

  • Getting Started with JFugue 
  • Using the JFugue MusicString 
  • Working with Patterns
  • The JFugue Player
  • Working With MIDI Files
  • Using JFugue With MIDI Devices
  • Rhythms, Intervals, and Microtones
  • The Architecture of JFugue
  • Exploring JFugue's "Extras" Package
  • JFugue By Example
  • Creative Applications with JFugue

The Complete Guide to JFugue - Full Table of Contents

  Table of Contents7
  Detailed Table of Contents9
  Forward13
  Getting Started with JFugue15
    Downloading JFugue15
    Running a Test Program15
    Using JFugue from an Integrated Development Environment16
    Deciding which version of JFugue to use17
    Using MIDI Soundbanks17
      Downloading Soundbanks18
      Installing the Java Media Soundbanks18
      Using Gervill to Load Soundbanks19
  Using the JFugue MusicString21
    Introducing the MusicString21
    Learning the Parts of the MusicString22
    Notes, Rests, and Chords22
      Sharps, Flats, and Naturals23
      Octave23
      Chords24
      Chord Inversions25
      Duration26
      Triplets and Other Tuplets27
      Ties28
      Attack and Decay Velocities29
      Notes played in Melody and Harmony29
    Measure30
    Key Signature31
    Instrument31
    Voice34
      MIDI Percussion Track34
    Layer35
    Tempo36
    Pitch Wheel36
    Channel Pressure37
    Polyphonic Pressure37
    Controller Events37
    Constants40
    Timing Information41
    MusicString Style41
    JFugue Elements: Using Objects instead of MusicStrings42
    Getting Assistance with Notes45
    Transcribing Sheet Music to JFugue MusicString46
  Working with Patterns49
    What is a Pattern?49
    Using Patterns as Musical Building Blocks50
    Using Patterns to Construct Music51
    Observing Changes to a Pattern with a PatternListener53
    Maintaining Properties within a Pattern53
    Loading and Saving Patterns54
    Transforming Patterns with PatternTransformer55
      PatternTransformers Included with with JFugue56
      How to Create a PatternTransformer57
      How to Use a PatternTransformer59
      PatternTransformers In Action59
    Using a ParserListener to Analyze a Pattern60
    Working with MIDI Patterns62
  The JFugue Player63
    Playing Music63
    Starting a Player with a Known Sequencer or Synthesizer64
    Pausing, Rewinding, and Forwarding the Player64
    The Streaming Player65
      How to Simulate a Pipe Organ67
      Throttling the Delivery of New Fragments68
    The Anticipator: Know Upcoming Events Before They Happen68
  Working with MIDI Files71
    Understanding MIDI Support in JFugue71
    Playing MIDI Files72
    Creating MIDI Files72
    Converting MIDI to JFugue MusicStrings72
  Using JFugue with MIDI Devices75
    Why Communicate with External Devices?75
    Setting Up Communication with External Devices75
    JFugue’s Device Classes76
    Using the Intelligent Device Resolver76
    Sending Music to a MIDI Device77
    Listening to Music from a MIDI Device78
    Troubleshooting Your Connections79
  Rhythms, Intervals, and Microtones81
    Rhythm81
    Interval Notation85
    Combining Rhythm and Interval Notation86
    Microtonal Music88
  The Architecture of JFugue89
    Parsers and ParserListeners (or Renderers)89
      JFugue Supports MusicXML90
      Recombine Parsers and Renderers Endlessly90
      Creating a New Parser90
      Creating a New Renderer91
      Ideas for New Parsers and Renderers92
    Working with MusicStringParser92
    Adding a new JFugue Element92
  Exploring JFugue’s "Extras" Package97
    FilePlayer97
    Midi2JFugue98
  JFugue by Example99
    The Quintessential Music Program99
    How to Save Music as a MIDI file99
    How to Load and Play a MIDI file100
    How to Save a Pattern100
    How to Load a Pattern100
    How to Load a MIDI file and convert it into a JFugue MusicString101
    How to Combine Patterns101
    How to Repeat a Pattern101
    How to Create an Anonymous ParserListener101
    How to Create Your Own Parser102
    How to Create Your Own Renderer102
    How to Connect a Parser to a Renderer103
    How to Parse MIDI and Render a MusicString103
    How to Parse a MusicString and Render MIDI103
    How to Create a Rhythm103
    How to Use Interval Notation104
    How to Combine Intervals and Rhythms104
    How to Use Microtone Notation105
    How to Send MIDI to an External Device106
    How to Send a Pattern to an External Device106
    How to Listen for Music from an External Device106
    How to Use JFugue with Loaded Soundbanks107
  Creative Applications with JFugue109
    JFugue Drum Circle109
    Lindenmayer System (L-System) Music114
  Conclusion117