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

Play JFugue pattern in an infinite loop for a metronome

How do I a produce an infinite loop using a JFugue pattern. I tried the following while loop for loop with a high counter In both cases, weird sounds get produced which are overlapped. When I run with a small counter like 10 in a for loop, it…
1
vote
1 answer

Define inverted chord with roman numerals with JFugue

This pdf says that inverted chords can be defined by adding ^ to the end of a chord definition, but this only works with explicit chord definitions as far as I can tell. For example: ChordProgression cp = new…
rootmeanclaire
  • 808
  • 3
  • 13
  • 37
1
vote
1 answer

JFugue - slides / pitch bends

Using JFugue 5.0, how would one go about creating pitch bends and slides like those in guitar pro? I've tried using CC65, but it doesn't seem to work on a guitar patch. I've looked at the documentation, and it doesn't say explicitly how this is…
NmdMystery
  • 2,778
  • 3
  • 32
  • 60
1
vote
0 answers

How to draw stave music in Java?

I want to ask how to draw stave music and its component like key signature and others in Java Netbeans 8 with JFugue 4 Library? Really confused. Anyone can help me or anyone have the references? Thank you so much.
Theresia
  • 33
  • 5
1
vote
1 answer

Transposing the key using jfugue - Some questions concerning Jfugue

I have a couple of questions concerning JFugue (5, the beta version). From The complete guide to JFugue, it is mentioned that depending on the Key Signature in the pattern, JFugue interprets the note value. As an example, in the case of an…
Hussein Hammoud
  • 171
  • 1
  • 13
1
vote
1 answer

jFugue: how to set the next pattern to be played by the Player?

Say I have a player who is currently playing a pattern and at a certain point I want to set the next pattern that it should play without producing a small pause when it switches between the two. It is similar to Android's mediaplayer class where…
Ziad Halabi
  • 964
  • 11
  • 31
1
vote
1 answer

Is it possible to use integer variables/integer array variables as notes in jFugue

I'm trying to create algorithmic music in netBeans using jFugue and have an integer array with the notes from one octave of the c major scale: String scaleNotesC[] = {"[60]", "[62]", "[64]", "[65]", "[67]", "[69]", "[71]", "[72]"}; When I run…
TheStuka
  • 83
  • 2
  • 10
1
vote
5 answers

Java File and ByteArray or InputStream

I want to use jFugue to play some MIDI music in an applet. There's a class for the MIDI pattern - Pattern - and the only method to load the pattern is from a File. Now, I don't know how applets load files and what not, but I am using a framework…
Peter Perháč
  • 20,434
  • 21
  • 120
  • 152
1
vote
5 answers

How to change pitch continuously in Java sound?

I'm working with midi using the Java sound API. Basically I'm trying to achieve a portamento effect where I can slide between different notes. The closest I've gotten is using the setPitchBend() method in MidiChannel. However, this only allows a…
Peter
  • 11
  • 1
  • 2
0
votes
1 answer

Reimplementing the "ToneMatrix" audio toy

There is a really cool audio "toy" called ToneMatrix. I would like to reimplement it as a Java applet. I've tried using JFugue's player.play with individual notes for sound and Thread.sleep for timing, but the results are horrible. JFugue stops…
Zarkonnen
  • 22,200
  • 14
  • 65
  • 81
0
votes
0 answers

JFugue: play list of music strings using loop

I am trying to play a list of music strings using a for loop. While the first music string is played correctly along with the base, the second and the subsequent do not play simultaneously. Am i missing something here? /** * @param args the…
BabaNew
  • 884
  • 1
  • 13
  • 27
0
votes
0 answers

Creating a Java desktop shortcut does not work

I have a Java program which runs just fine. Now I want to create a desktop shortcut. I don't create it in the Desktop folder, but that isn't a problem; I can create it in any folder. I'm doing it right how I should do: Right-click in the…
Zero
  • 84
  • 8
0
votes
1 answer

type javax.sound.midi.Sequence cannot be resolved

I am trying to use the open-source music programming API JFugue in my android 3.0 application, and am getting this error tag on the line player.play(pattern);: The type javax.sound.midi.Sequence cannot be resolved. It is indirectly referenced from…
MarioAran
  • 41
  • 1
  • 10
0
votes
1 answer

How do you import a package in Android Studio?

I am extremely inexperienced with Android Studio - and am having an issue with my imports. I'm trying to build an app that creates music from an ArrayList of "note" objects (I've made this class - it has info on). I am trying to import midi driver…
0
votes
2 answers

Dependency added to pom can not be resolved

I am trying to add a dependency to my pom.xml and facing an issue: IntelliJ error Cannot resolve jfugue:jfugue:5.0.9 The dependency I like to add is this one below from https://mvnrepository.com/artifact/jfugue/jfugue/5.0.9