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
8
votes
6 answers

.NET API for music programming?

In short words I am looking for a .NET translation of JFugue. Update I realize that there is no real .NET alternative for JFugue, the posts bellow are always great as a guideline for one who wants to develop it by his own. Thanks for all of…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
8
votes
3 answers

Looking for evolutionary music example code

I would like to implement an interactive evolutionary algorithm for generating music (probably just simple melodies to start with). I'd like to use JFugue for this. Its website claims that it is well-suited to evolutionary music, but I can't find…
Dan Dyer
  • 53,737
  • 19
  • 129
  • 165
7
votes
3 answers

I want to draw the sheet music using MusicXml in android app

I tried various ways to do this. Using proxymusic-2.0.jar Library => Marshalling and unmarshalling done between Java object and Xml file, but I didn't find a way to draw it unmarshalled from Xml file on Android app(Activity, View, etc.) Using…
kywpcm
  • 79
  • 1
  • 4
6
votes
1 answer

Is there any library in javascript that is similar to JFugue in Java?

With JFugue, synthesizing music is as simple as this: Player player = new Player(); player.play("C D E F G A B"); While I do realize that the HTML5 Audio API is still under development for most of the browsers, I am quite unaware if any of these…
Ram
  • 293
  • 2
  • 7
3
votes
1 answer

Using jfugue, how do I generate random music strings (using player.play) from an array?

I'm using Jfugue in Eclipse, and I have a list of music strings in the code. When I run the code, it plays back all of them, but I want to play back one at a time in random order. So far I'm using: Pattern pattern = new Pattern…
user11471046
3
votes
1 answer

JFugue: Loaded MIDI file is not played with the correct instruments

I use the following code to load and play a MIDI file with JFugue: import java.io.File; import org.jfugue.Pattern; import org.jfugue.Player; public class PlayMidiFromFile { public static void main(final String[] args) { try { …
Jens Piegsa
  • 7,399
  • 5
  • 58
  • 106
3
votes
1 answer

jfugue - Controlling the volume of the pattern

I'm trying to control the volume of a pattern. From the documentation I found this: X[Volume]=10200; which they mentioned controls the volume. I'm not sure how to use this. Should I declare something to use this? From what I understand this is a…
Mike Smith
  • 139
  • 2
  • 2
  • 12
3
votes
1 answer

Terminating a long-executing thread and then starting a new one in response to user changing parameters via UI in an applet

I have an applet which creates music using the JFugue API and plays it for the user. It allows the user to input a music phrase which the piece will be based on, or lets them choose to have a phrase generated randomly. I had been using the following…
granmoe
  • 312
  • 1
  • 11
3
votes
0 answers

JFugue '+' not getting parsed? Chords not sounding

Looks like in version 4.1x , 4.02 (these are the only ones i've tried) the harmony '+' is not working. When I execute: Player p = new Player(); p.play ("C5maj"); I hear all three notes but when I execute p.play("C+G+E"); I only hear the E note.…
Adil Khan
  • 63
  • 3
2
votes
1 answer

JFugue: Get notes of a specific scale

What is the correct way to retrieve the notes that belong to a scale in JFugue, for example C maj? I have seen there is this class org.jfugue.theory.Intervals but i don't understand what i should pass as constructor parameter
BabaNew
  • 884
  • 1
  • 13
  • 27
2
votes
1 answer

How could one draw sheet music from MusicXML in Java?

I am currently working on a sight-reading app that requires display of musical notation; I am struggling to find a way to efficiently draw this in a JFrame. I am looking at the JFugue library to help with this, and the description of the class…
2
votes
1 answer

Why some far apart frequencies are sounding at the same pitch in JFugue?

In the given code below freqs 240 and 254.1764 are far apart, but sounding both at 240. The same is true for 288 and 301.395, and same problem is with last two 432 and 552.09. I need help to sort out whether the problem is in java or JFugue part. …
Harjit Singh
  • 905
  • 1
  • 8
  • 17
2
votes
1 answer

JFugue RealtimePlayer can't play multiple instruments simultaneously

I have run into a problem with JFugue 5.0.7: I'm coding a realtime application that plays music indefinitely, but the RealtimePlayer provided by the jfugue library mixes instruments with each other. I have the following code public class HelloJFugue…
Esa Lindqvist
  • 311
  • 2
  • 6
2
votes
1 answer

JFugue to parse midi file and output .csv?

I want to convert a midi file to a .csv representation like this: Notename, startTick, duration, velocity also including entire chords(sets of notes starting at the same tick). Now, JFugue has a MidiParser class which looks like it might be able to…
2
votes
1 answer

How to get the instrument dictionary in JFugue 5.0

I'm doing a project with JFugue 5.0, I've tried 4.0 but 5.0 seems smoother than his previous brother. Anyway, I have the complete guide to JFugue v4 and these are the Strings used to refer to the differents percussion instruments Now, when I try to…
user5421954
1
2 3 4 5 6 7