Sound comparison with JRaaga/JFugue

Attached are
Same notes (pitch,duration), same soundfont and same instrument - played from SCAMP and JRaaga / JFugue
SCAMP Recording:

JRaaga Recording:

Wondering why difference
One thing that is in JRaaga - is each note has attack of 120 (out of 127) and a release of 30 out of 127
Gotta keep trying

Hmm… not sure what’s going on here. What code are you using to generate the scamp recording?

Both audio were recorded using my phone - let each software to play the notes. If that is what you meant.

No, I mean what is the code? (What do the play_note calls look like?) It sounds to me like the pitches are being read differently.

Marc Evanstein
www.marcevanstein.com

Both codes play the same “pitch numbers” -
here is the western notes played by JRaaga

JRaaga Western notes(Veena)
T72 V0 I1 L0 :CON(65,0) :PW(8151) F4/0.125a120d30 :PW(8192) F#4/0.125a120d30 :PW(8245) A4/0.125a120d30 :PW(8192) :PW(8145) A#4/0.0625a120d30 :PW(8192) :PW(8185) B4/0.0625a120d30 :PW(8192) :PW(8198) C#5/0.0625a120d30 :PW(8192) :PW(8252) E5/0.0625a120d30 :PW(8192) :PW(8252) E5/0.0625a120d30 :PW(8192) :PW(8151) F5/0.0625a120d30 :PW(8192) F#5/0.125a120d30 :PW(8245) A5/0.125a120d30 :PW(8192) :PW(8145) A#5/0.125a120d30 :PW(8192) :PW(8185) B5/0.25a120d30 :PW(8192) :PW(8198) C#6/0.125a120d30 :PW(8192) :PW(8252) E6/0.125a120d30 :PW(8192) :PW(8151) F6/0.125a120d30 :PW(8192) F#5/0.25a120d30 :CON(65,127)

You are right - though western notes are same - I do see some pitch wheel events:PW() in above output - which means they are “fractional notes”
I have to read JFugue manual to understand :PW(8151) to :PW(8182) is what fractional note of F4
Second thing that is different is “duration factor”
In JFugue - default note is a “quarter note” - but when I played with duration of 0.25 in SCAMP is was too short. So I kept as default=1.0

SCAMP Western Notes (Veena) - here there are no fractional notes.
While coding now in python - I thought since carnatic notes in the soundfont are already aligned to western midi notes - no need for fractional notes.
n. ScampInstrument(Veena) Veena 65.0 0.5
s ScampInstrument(Veena) Veena 66.0 0.5
r ScampInstrument(Veena) Veena 69.0 0.5
g ScampInstrument(Veena) Veena 70.0 0.25
m ScampInstrument(Veena) Veena 72.0 0.25
p ScampInstrument(Veena) Veena 73.0 0.25
d ScampInstrument(Veena) Veena 76.0 0.25
d ScampInstrument(Veena) Veena 76.0 0.25
n ScampInstrument(Veena) Veena 77.0 0.25
s’ ScampInstrument(Veena) Veena 78.0 0.5
r’ ScampInstrument(Veena) Veena 81.0 0.5
g’ ScampInstrument(Veena) Veena 82.0 0.5
m’ ScampInstrument(Veena) Veena 84.0 1.0
p’ ScampInstrument(Veena) Veena 85.0 0.5
d’ ScampInstrument(Veena) Veena 88.0 0.5
n’ ScampInstrument(Veena) Veena 89.0 0.5
s’ ScampInstrument(Veena) Veena 78.0 1.0

SCAMP audio after adjusting carnatic note frequencies to their ratio / fractional note

n. ScampInstrument(Veena) Veena 64.5 0.5
s ScampInstrument(Veena) Veena 66.0 0.5
r ScampInstrument(Veena) Veena 67.33333333333333 0.5
g ScampInstrument(Veena) Veena 69.0 0.25
m ScampInstrument(Veena) Veena 70.2 0.25
p ScampInstrument(Veena) Veena 72.0 0.25
d ScampInstrument(Veena) Veena 74.0 0.25
d ScampInstrument(Veena) Veena 74.0 0.25
n ScampInstrument(Veena) Veena 76.5 0.25
s’ ScampInstrument(Veena) Veena 78.0 0.5
r’ ScampInstrument(Veena) Veena 79.33333333333333 0.5
g’ ScampInstrument(Veena) Veena 81.0 0.5
m’ ScampInstrument(Veena) Veena 82.2 1.0
p’ ScampInstrument(Veena) Veena 84.0 0.5
d’ ScampInstrument(Veena) Veena 86.0 0.5
n’ ScampInstrument(Veena) Veena 88.5 0.5
s’ ScampInstrument(Veena) Veena 78.0 1.0

Anyway - I have to go back and compare my java code and python code - whether I use same “math”
Because - in carnatic there is also what is called “base note” represented by “S” (which is not nesame as western note C) for each instrument - to align with the instrument’s harmonics and the vocalist.

Marc,
I think I see exact one octave of difference between JFugue and SCAMP.
Please let me know if you feel the same.
Java Code:

import org.jfugue.player.Player;

public class JFugueDemo {
public static void main(String[] args) {
Player player = new Player();
String notes = "V0 T60 I[Piano] C5 “;// C#5 D5 D#5 E5 F5 F#5 G5 G#5 A5 A#5 B5”;
player.play(notes);
}
}

And the SCAMP Code

from scamp import *
s = Session()
s.tempo = 60
durn = 1.0
piano = s.new_part(“piano”)
start = 72
end = 73
for note in range(start,end):
piano.play_note(note,1.0,durn)
exit()

Notice the octave difference. Now change SCAMP note to 60 they would sound the same
Not being a musician myself - not sure my observation is right.
PS:
JFugue jar can be downloaded from
http://www.jfugue.org/jfugue-5.0.9.jar

Marc,
Sorry for too many posts. I think I now know the reason.
I had originally used JFugue-4 and then switched to latest JFugue-5. It appears JFugue-4 used the octave range as -1 to 9 while JFugue-5 changed it to 0-10 scale.
http://www.jfugue.org/articles/differences.html
Which means C5 in JFugue-5 will play one octave higher than same C5 in JFugue-4
Hmmm. Now I have to figure out the implications of this to my pyrhon and java code