You are not logged in.

Anton

Beginner

  • "Anton" started this thread

Posts: 5

Date of registration: Mar 6th 2010

  • Send private message

1

Sunday, December 12th 2010, 6:11am

JFugue Sound in Jabaco

Hello, I'm trying to use http://www.jfugue.org


import org.jfugue.*;
public class MyMusicApp
}
public static void main(String[] args)
}
Player player = new Player();
Pattern pattern = new Pattern("C D E F G A B");
player.play(pattern);
System.exit(0); // If using Java 1.4 or lower
{
{


How can I make this work in Jabaco?
Thank you. :)

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

2

Sunday, December 12th 2010, 12:05pm

That's a nice java framework. Thanks for the hint!

The follwing works for me:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Option Explicit

Import org#jfugue#Player 

Public Sub Command1_Click()
   playMusic
End Sub

Private Sub playMusic
   Dim player As New Player 

   ' play the notes of an octave	
   player.play("C D E F G A B")
   
   ' play notes and rests in different octaves (0-10),
   ' with different durations (w, h, q, etc)	
   player.play("C3w D6h E3q F#5i Rs Ab7q Bb2i")
   
   ' play notes using different instruments	
   player.play("I[Piano] C5q D5q I[Flute] G5q F5q")
   
   ' play notes in harmony using different voices	
   player.play("V0 A3q B3q C3q B3q V1 A2h C2h")
   
   ' play some chords, and chord inversions	
   player.play("Cmaj5q F#min2h Bbmin13^^^")
End Sub


Make sure to download jfugue-4.0.3.jar and add this file to the project classpath (press key F1 and add external jar).
Please note the difference between Java syntax and Jabaco syntax. It might help to serach this forum for other samples.

Happy experimenting!

A1880

OlimilO

Intermediate

  • "OlimilO" is male

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

3

Sunday, December 12th 2010, 1:36pm

yeah, JFugue is cool,

is it based on Java Sound API? I guess so.



note that there are three different soundbanks for the java synth (a wave-rom sample player in software)

the 3 different can be found here:

http://java.sun.com/products/java-media/…soundbanks.html



I suggest to install the deluxe sound bank, with it's 4.92MB it's called "mamooth" but compared with nowadays hardware sample wave rom players, like the popular synths from Yamaha, KORG, Roland, Kurzweil, NORD etc. it's more like a tiny mouse :) however it sounds pretty good.

Anton

Beginner

  • "Anton" started this thread

Posts: 5

Date of registration: Mar 6th 2010

  • Send private message

4

Sunday, December 12th 2010, 6:15pm

That's a nice java framework. Thanks for the hint!

The follwing works for me:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Option Explicit

Import org#jfugue#Player 

Public Sub Command1_Click()
   playMusic
End Sub

Private Sub playMusic
   Dim player As New Player 

   ' play the notes of an octave	
   player.play("C D E F G A B")
   
   ' play notes and rests in different octaves (0-10),
   ' with different durations (w, h, q, etc)	
   player.play("C3w D6h E3q F#5i Rs Ab7q Bb2i")
   
   ' play notes using different instruments	
   player.play("I[Piano] C5q D5q I[Flute] G5q F5q")
   
   ' play notes in harmony using different voices	
   player.play("V0 A3q B3q C3q B3q V1 A2h C2h")
   
   ' play some chords, and chord inversions	
   player.play("Cmaj5q F#min2h Bbmin13^^^")
End Sub


Make sure to download jfugue-4.0.3.jar and add this file to the project classpath (press key F1 and add external jar).
Please note the difference between Java syntax and Jabaco syntax. It might help to serach this forum for other samples.

Happy experimenting!

A1880
Thank you so freakin' much!!! :D

Rate this thread
WoltLab Burning Board