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
1
vote
1 answer

JFugue ParserListenerAdapter onChordParsed method not invoked

I am trying to read a midi file that contains only a guitar track. The track is made of both single notes and chords. While i can successfully read all notes through onNoteParsed method, i cannot read chords. In fact the onChordParsed method is…
BabaNew
  • 884
  • 1
  • 13
  • 27
1
vote
1 answer

How to do slurs, ties and dynamics in JFugue 5

How can I do slurs, ties and dynamics in JFugue 5? Concerning the dynamics, I would like to have them for one pattern until I place another dynamic and I want to set the dynamic volume (for example "mp" | "setVolume(mp=48)" or something that works…
Zero
  • 84
  • 8
1
vote
1 answer

JFugue Duration map string-millisecond based on BPM

Is there a way to get millisecond duration of a jfugue duration like w, given a specific BPM rate? Something like: int millisDuration = durationManager.getMillis("w", 120);
BabaNew
  • 884
  • 1
  • 13
  • 27
1
vote
0 answers

JFugue converts midi file incorrectly

(using jfugue 5.0.9) I wanted to convert .mid to .txt (staccato), and later to .mid again, to confirm conversions worked. Both .mid (original and converted) should be equal ideally, but the converted (midi -> staccato -> midi) file has weird delayed…
some dude
  • 11
  • 1
1
vote
1 answer

JFugue: Get music string duration

Given the music string Aq Aq Bi Bi Ci Ci is there an object in JFugue that can retrieve its duration (as a double or as a string)? For example: double musicStringDuration = new DurationMapper().getDoubleMSDuration("Aq Aq Bi Bi Ci…
BabaNew
  • 884
  • 1
  • 13
  • 27
1
vote
1 answer

How to get the Tempo dictionary in JFugue 5.0

Is there a way to retrieve an array of strings containing all the tempos supported by JFugue (ver 5.0.9) ? At the moment i am typing them as literals in an array new String[]{"Lento","Adagio"} but i wish there was a better way.
BabaNew
  • 884
  • 1
  • 13
  • 27
1
vote
2 answers

JFugue: Is there a way to get the current note that a player() is on?

I am making a virtual piano project and I have some transcribed sample songs. I would like to know if I could get the current note that the player is on, so that it could be displayed visually on a piano. Edit: I'm still learning Java, so sorry in…
jwang22
  • 19
  • 4
1
vote
1 answer

JFugue - Pattern Output of MIDI file clarification

so I've been experimenting with JFugue a little bit and I've become truly interested in the output in readable human form. One thing I see many times is, before the chords, there are a bunch of groups of characters such as "V1 :CE(X,X)" and, from…
Vasko LoL
  • 93
  • 3
1
vote
1 answer

JFugue semitones between 2 notes

What is the fastest way (if any) to get the semitones between 2 notes in JFugue (vr 5.0.9) ? For instance, how can i get the number of semitones between F4 and G5?
BabaNew
  • 884
  • 1
  • 13
  • 27
1
vote
1 answer

jFugue incorrectly parsing tempo

I'm using jFugue to parse a midi file and it will always parse the tempo incorrectly(I know that the tempo is 140 and it is saying that the tempo is 720). At first I thought that it might, somehow, be multiplying the actual tempo by some number and…
scottbot95
  • 369
  • 1
  • 2
  • 14
1
vote
0 answers

JFugue 5 external midi device on Mac

I am trying to connect my PSR-A3000 keyboard to play some midi files from computer. When I run the code: import java.io.File; import java.io.IOException; import javax.sound.midi.InvalidMidiDataException; import javax.sound.midi.MidiSystem; import…
chikitin
  • 762
  • 6
  • 28
1
vote
1 answer

JFugue 5 note problems

I'm trying to use JFugue 5.0.9 in my Java project to create *.midi files with it. While implementing JFugue's midi capabilities into my project that uses frequencies of a 24 tune makam piano, I realized it has some tune issues. For example this…
mofselvi
  • 21
  • 5
1
vote
1 answer

JFugue 5.0 can't control volume

i love jFugue, but i can't control the volume of a pattern. This 2 patterns, in my laptop, play at the same volume(on the paper the second should be twice louder than the first): Pattern pattern1 = new Pattern("X[Volume]=8000 C D E"); …
BabaNew
  • 884
  • 1
  • 13
  • 27
1
vote
0 answers

Using JFugue's delayed play

I'm currently trying to use JFugue 5.0.9 successfully in my project and was going to use the delayed play feature to render a progress bar and the position of the notes. I've wrote my own parser and generated a pattern to play. The track uses chords…
P. Knabe
  • 11
  • 1
1
vote
1 answer

JFugue MusicString key setting not working

I am new to JFugue, and I've been trying some stuff, but i can't change the key of a MusicString. Here's what I try: Player player = new Player(); player.play("KBmaj T120 C D E F G A B"); It just doesn't change the key. What am I missing?
Adrià
  • 207
  • 1
  • 4
  • 12