<s>
JFugue	B-Language
is	O
an	O
open	B-Application
source	I-Application
programming	I-Application
library	O
that	O
allows	O
one	O
to	O
program	O
music	O
in	O
the	O
Java	B-Language
programming	I-Language
language	I-Language
without	O
the	O
complexities	O
of	O
MIDI	O
.	O
</s>
<s>
Versions	O
3	O
and	O
4	O
were	O
released	O
under	O
the	O
LGPL-2.1-or-later	B-License
license	O
.	O
</s>
<s>
The	O
current	O
version	O
,	O
JFugue	B-Language
5.0	O
,	O
was	O
released	O
in	O
March	O
2015	O
,	O
under	O
the	O
Apache-2.0	B-Application
license	O
.	O
</s>
<s>
Brian	O
Eubanks	O
has	O
described	O
JFugue	B-Language
as	O
"	O
useful	O
for	O
applications	O
that	O
need	O
a	O
quick	O
and	O
easy	O
way	O
to	O
play	O
music	O
or	O
to	O
generate	O
MIDI	O
files.	O
"	O
</s>
<s>
Here	O
's	O
an	O
example	O
Java	B-Language
program	O
that	O
will	O
play	O
the	O
C-major	O
scale	O
in	O
JFugue	B-Language
.	O
</s>
<s>
The	O
string	O
passed	O
to	O
JFugue	B-Language
contains	O
a	O
series	O
of	O
musical	O
instructions	O
that	O
JFugue	B-Language
parses	O
and	O
turns	O
into	O
musical	O
events	O
,	O
which	O
by	O
default	O
are	O
rendered	O
in	O
MIDI	O
.	O
</s>
<s>
While	O
the	O
default	O
use	O
case	O
for	O
JFugue	B-Language
is	O
to	O
convert	O
Staccato	O
to	O
MIDI	O
,	O
the	O
architecture	O
allows	O
it	O
to	O
read	O
and	O
write	O
musical	O
information	O
from	O
and	O
to	O
a	O
variety	O
of	O
formats	O
(	O
e.g.	O
,	O
MIDI	O
to	O
MusicXML	O
,	O
Staccato	O
to	O
LilyPond	O
)	O
.	O
</s>
<s>
JFugue	B-Language
5.0	O
contains	O
a	O
set	O
of	O
classes	O
that	O
represent	O
ideas	O
in	O
music	O
theory	O
,	O
including	O
intervals	O
,	O
scales	O
,	O
chords	O
,	O
and	O
chord	O
progressions	O
.	O
</s>
<s>
The	O
notion	O
of	O
Patterns	O
is	O
integral	O
to	O
JFugue	B-Language
.	O
</s>
<s>
JFugue	B-Language
5.0	O
makes	O
extensive	O
use	O
of	O
fluent	O
interfaces	O
,	O
also	O
known	O
as	O
method	B-Language
chaining	I-Language
,	O
which	O
lets	O
developers	O
write	O
short	O
,	O
expressive	O
pieces	O
of	O
code	O
like	O
the	O
following	O
:	O
</s>
<s>
JFugue	B-Language
is	O
capable	O
of	O
producing	O
microtonal	O
music	O
by	O
using	O
a	O
Staccato	O
element	O
consisting	O
of	O
the	O
letter	O
'	O
m	O
 '	O
followed	O
by	O
the	O
frequency	O
in	O
Hertz	O
of	O
the	O
desired	O
tone	O
.	O
</s>
<s>
Like	O
other	O
notes	O
in	O
JFugue	B-Language
,	O
this	O
tone	O
may	O
be	O
followed	O
by	O
a	O
duration	O
(	O
such	O
as	O
'	O
w	O
 '	O
for	O
a	O
whole	O
note	O
or	O
'	O
q	O
 '	O
for	O
a	O
quarter	O
note	O
)	O
and	O
note	O
dynamics	O
(	O
e.g.	O
,	O
"	O
note	O
on	O
"	O
and	O
"	O
note	O
off	O
"	O
velocities	O
)	O
.	O
</s>
<s>
JFugue	B-Language
converts	O
the	O
microtone	O
frequency	O
to	O
a	O
sequence	O
of	O
MIDI	O
Pitch	O
Wheel	O
and	O
Note	O
events	O
to	O
achieve	O
the	O
desired	O
tone	O
.	O
</s>
<s>
JFugue	B-Language
provides	O
an	O
intuitive	O
programming	O
interface	O
for	O
creating	O
beats	O
and	O
rhythms	O
.	O
</s>
<s>
The	O
characters	O
in	O
the	O
strings	O
below	O
each	O
correspond	O
to	O
a	O
percussion	O
note	O
that	O
is	O
played	O
on	O
the	O
percussive	O
MIDI	O
Channel	O
(	O
the	O
tenth	O
channel	O
)	O
;	O
default	O
settings	O
are	O
provided	O
for	O
common	O
sounds	O
(	O
e.g.	O
,	O
"	O
O	O
"	O
for	O
"[BASS_DRUM]q"	O
)	O
,	O
although	O
any	O
Java	B-Language
Map	O
or	O
Character	O
to	O
String	O
may	O
be	O
passed	O
to	O
the	O
Rhythm	O
constructor	O
.	O
</s>
<s>
In	O
addition	O
to	O
allowing	O
music	O
to	O
be	O
converted	O
from	O
one	O
music	O
format	O
to	O
another	O
,	O
the	O
architecture	O
of	O
JFugue	B-Language
can	O
be	O
used	O
to	O
create	O
programmatic	O
tools	O
that	O
are	O
capable	O
of	O
both	O
performing	O
computations	O
on	O
incoming	O
music	O
(	O
from	O
any	O
format	O
)	O
and	O
changing	O
incoming	O
music	O
.	O
</s>
<s>
JFugue	B-Language
provides	O
functionality	O
on	O
top	O
of	O
Java	B-Language
's	O
MIDI	O
Transmitter	O
and	O
Receiver	O
classes	O
to	O
reduce	O
the	O
amount	O
of	O
code	O
that	O
a	O
developer	O
would	O
need	O
to	O
write	O
to	O
connect	O
to	O
external	O
MIDI	O
devices	O
.	O
</s>
<s>
JFugue	B-Language
has	O
been	O
used	O
in	O
a	O
number	O
of	O
applications	O
,	O
including	O
software	O
projects	O
and	O
artistic	O
installations	O
.	O
</s>
<s>
JFugue	B-Language
has	O
been	O
used	O
to	O
play	O
music	O
when	O
a	O
software	O
build	O
fails	O
or	O
succeeds	O
.	O
</s>
<s>
JFugue	B-Language
is	O
one	O
of	O
the	O
few	O
Java	B-Language
libraries	O
that	O
lets	O
one	O
do	O
something	O
interesting	O
in	O
as	O
little	O
as	O
one	O
or	O
two	O
lines	O
of	O
code	O
.	O
</s>
