Questions tagged [jfugue]

JFugue is an open-source library for programming music for Java and JVM languages.

JFugue is an open-source library for programming music for Java and JVM languages.

Example code:

// Example 1
Player player = new Player();
player.play("C D E F G A B");

// Example 2
ChordProgression cp = new ChordProgression("I IV V").setKey("Eb");
new Player().play(cp);

Homepage | JavaDoc

92 questions
0
votes
1 answer

Java jFugue music play

import org.jfugue.player.Player; public class MusicPlayer { public static void main(String[] args) { TwelveBarBlues twelveBarBlues = new TwelveBarBlues(); System.out.println("Twelve Bar blues Playing: "); Player player…
0
votes
1 answer

It is possible to use at the same time two players with jFugue

I'm trying to make a musical game (a bit like "Guitar Hero") and I'm having some issues to notify the player when he/she is getting a wrong 'note' played. Now is just a basic system but for example if the player has to push Up Arrow and missed it…
0
votes
1 answer

How can I save pattern changes to a loaded midi?

I am working on a school coding project, which involves using the JFugue library in Java. However, I am having significant difficulty saving loaded and edited patterns to a file. So far, I have tried both the player.saveMidi (which is not…
0
votes
0 answers

How to import Jfugues library on Android Studio

I coded a java application with eclipse using jfugues library for my computer. I was trying to build the same application for my android phone using Android Studio but I can't figure out how to import this jfugues library. Can someone explain me…
Joelbeni
  • 1
  • 2
0
votes
1 answer

JFugue note changing not working properly

I'm trying to transpose a note, but the result it returns is not what it should be. Could you please check my code and tell me where I am wrong? public int changeTone(String chord) { int changeTone = 0; switch(chord) { …
Adir
  • 11
  • 1
  • 4
0
votes
0 answers

Importing a jar file with hyphens

When I downloaded the jar file, it downloads as jfugue-5.0.9.jar. I loaded it into the Blue J IDE but I can't import it. With the hyphen I get a syntax error. I tried renaming it to just jfugue.jar but it says the package does not exist.
0
votes
1 answer

Chord.setOctave(x) returns notes with wrong value in jFugue 5. what am I missing?

Here is the sample code: public class TestNoteValue { public static void main(String[] args) { Chord c = new Chord("C5maj"); DevLog.debug(MusicAnnotationUtil.reportChord(c)); // ---------------- c.setOctave(4); …
Qing Song
  • 517
  • 1
  • 3
  • 12
0
votes
1 answer

How to use MusicXmlParser in jFugue 5.0?

I'm trying to parse a Staccato Pattern into MusicXml. However, it's not working, as the parsed MusicXml contains almost nothing. I don't know if it's due to something wrong with my Staccato string, or the MusicXmlParser. Here's my code, including…
Qing Song
  • 517
  • 1
  • 3
  • 12
0
votes
1 answer

jFugue ChordProgression sample from the complete guide v5 doesn't work

I'm using jFugue 5.0.9. My code is a modified version of a sample (which doesn't work either. :# ) from the purchased complete guide to jFugue. Here's the code: private void chordProgression2() { ChordProgression cp = new ChordProgression("I IV…
Qing Song
  • 517
  • 1
  • 3
  • 12
0
votes
1 answer

How to transform pattern in jFugue 5.0?

In jFugue 4.0 there's a nice function: Transforming Patterns with PatternTransformer but all pattern transformers are removed in jFugue 5.0. I understand it must be replaced with something cool. but what to do in jFugue 5.0 please? i get no clue. I…
Qing Song
  • 517
  • 1
  • 3
  • 12
0
votes
1 answer

how to slur notes with jfugue

I am trying to play a series of about 200 pitches in succession using jfugue. The notes all play but it is choppy. Is it possible to have the notes play in a smooth way, like an instrument slurring two notes?
0
votes
1 answer

Define diminished chord as a roman numeral with JFugue

So I want to have a diminished seven chord, as it is the diatonic in major mode and often used in place of the major seven in minor mode. This site says that diminished chords can be defined by using dim after the chord name, but this only works…
rootmeanclaire
  • 808
  • 3
  • 13
  • 37
0
votes
1 answer

Musixml parsing exception when trying to parse with JFugue, how to fix this?

I'm having a error when trying to parse musicxml files, tried with both JFugue 4.0.3 and 5.0.5. Invocation (JFugue 4.0.3): MusicStringRenderer renderer = new MusicStringRenderer(); MusicXmlParser parser = new MusicXmlParser(); …
JohnFi
  • 11
  • 2
0
votes
1 answer

Note being played twice in jfugue

My code is as follows: player.play("C"); It plays the note C, but twice. I wasn't getting it at first. After running the code multiple times, it started giving this glitch.
Joyston
  • 806
  • 8
  • 10
0
votes
1 answer

musicxmlparser error unreported exception

I am doing my project about software score reader, in this part I want to convert musicxmlparser to staccato/midi but before that I code some public static void main(String[] args) throws InvalidMidiDataException, IOException { …