Topic: Velocity curves calculator : java application for Pianoteq

Hi folks,

Just for fun - I created a java application that calculates velocity curves for pianoteq: you write a (javascript) formula in a text field, press a button, and the clipboard contains the velocity map - then you just paste it in PTQ.

Download and check it out here:
http://sites.google.com/site/eranshome/software

Enjoy,
Eran

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

Sorry to be slow, but I'm confused about what this does. What is the X value that we write, and how do we know what value to write?

I see that writing (20), for example, and clicking on Calculate creates a new curve that can be copied and pasted into the PT Velocity pane, but I have no idea what (20) would represent or how to determine that (20) is the number that I should write...

Re: Velocity curves calculator : java application for Pianoteq

Hi Jake

I was eager to release it - but without good documentation.
So here is some:

The input range (from -> to) is mapped to the "mapped input" (from -> to)
So the default is that velocities 0->127 are mapped to x=0.0 -> x=1.0
Now f(x) is applied to that range of x's.
Its output is always normalized so that it exactly fits between the output range.

For example: f(x) = x*x, with default parameters would give you a "slow" curve.
If you want to try an "S" shaped curve, then try:
   map input to: From: -1  To: 1
   f(x) = pow(x,3) + x/2

By the way - when you press the "calculate .. button" it already puts the result in the clipboard - so you don't have to copy it yourself.

Hope this helps,

Eran

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

etalmor wrote:

Hope this helps

Sorry to be so dense but it doesn't help me

I assume you have to decide what your velocity range should by trial and error? In my case it would probably be 0-115 That would be x=o>x=115 right?

So for me the Input range would be From 0 to 115 Step 8 (the number of points on the curve?)

Map input to - I'm guessing this is what number the midi sends for the range set in Input range so in my case 0 would send 0 and 115 would send 1.00 instead of the default 127 sending 1.00?

I have absolutely no idea what I should put in f(x) =
I assume it determines the shape of the curve? but how do you know what to enter? pow(x,3)=x/2 means absolutely nothing to me. My knowledge of maths is minimal I'm afraid!

Output range is what velocities PTQ sends out? What is it sending out to?
Sorry again I don't understand much about Midi either!

Hope you're not offended I'm sure this is a very cool and useful app!

Last edited by BazC (12-03-2010 16:14)

Re: Velocity curves calculator : java application for Pianoteq

Thanks. So x is a variable one determines by choosing what kind of curve one wants. I was confused because I thought that there might be a way of arriving at x, that there might be a way to test one's keyboard, for example, to determine the best value for x.

One thing that would be very valuable here: the ability to store the results of the calculations. But, thinking as I write, I guess that what would be saved would be a text file, and we can already store settings as text files.

Regardless, I can see many interesting things that you might dev along similar lines for other parameters. These are things that one can create a spreadsheet for, of course, but your interface is less cumbersome, and combining the calculation with copying the result to the clipboard makes it clean.

Possibly:

iH curves. Are you familiar with the Railsback curve, a representation of how inharmonicity varies from string to string along the keyboard? You might set x as an average deviation for string length? (The ideal is of course to eliminate iH, but if one wants to recreate a specific piano sound, it can be desirable to recreate its iH and then the stretching needed to compensate for it.)

Tuning, perhaps. It might be possible to set up partial matches for a pretuning with something like what you've created. Scala can do this now, but one has to create the text file by hand and load the Scala file. Would require recording all of the default partial matches and the iH on each string and more. Have to think about this. (EDIT: I do understand that PianoTeq is tuned by beat matching, instead of just partial matching. One might be able to roughly match the beats this way, however, and at least quickly compare various combinations of 4:2 or 2:1 octaves etc...?)

Those are just things that I'm thinking about now. In reality, you could set up any calculations for any single parameter that can be pasted into a PianoTeq pane.

Would it also be possible to set up (like a spreadsheet can do, but more cleanly using your interface) variations of a setting that depend on the settings for another parameter? For example, could one copy changed settings for the Piano hammer strike, say, into a java app  and then auto create similar changes for the Mezz and Hard strikes? (In other words, if you've created a fairly complex, irregular remapping of the soft hammer strikes and want to remap the other strikes by exactly the same degree, which takes a while to do manually, one could paste the figures for the soft strikes into the applet and create the same degree of change in the other strikes?) 

I didn't mean to kidnap your thread, however.

Last edited by Jake Johnson (12-03-2010 18:50)

Re: Velocity curves calculator : java application for Pianoteq

Here's how to emulate the factory valocity presets with the calculator:

Input: 0 -> 127
Step: 8
Mapped input: 0 -> 1
Output: 0 -> 127

f(x) =:
  Fast :                    pow(x,2)
  Moderately Fast:  pow(x,1/0.7)
  Normal:                x
  Moderately Slow: pow(x,0.7)
  Slow:                    pow(x,0.5)       
             or simply   
                               sqrt(x)

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

Oh, I just understood one thing, I think. To determine the values of Input, you watch the PianoTeq velocity pane and hit your very softest and hardest strikes, yes?

Won't the desired output always be 0 - 1? (Are the "Map input to" boxes needed?)

Last edited by Jake Johnson (12-03-2010 16:38)

Re: Velocity curves calculator : java application for Pianoteq

Jake Johnson wrote:

Oh, I just understood one thing, I think. To determine the values of Input, you watch the PianoTeq velocity pane and hit your very softest and hardest strikes, yes?

That is correct...
You might rightfully ask - what's the calculator useful for - it doesn't help you guess the right internal curve you'd like. That is an individual preference. By my underlying assumption is that a curve is better if it could be described with a concise mathematical formula ..
So the calculator let's you create such accurate curves.

For example you could create the types of curves that come with the preset ("slow keyboard -> fast keyboard") - but set the "speed" to your own liking.
So if f(x) = pow(x,2), is a "fast keyboard", you can create a "very fast keyboard" with  f(x) = pow(x,3).
And you can create something between slow (f(x) = pow(x,0.5)) and moderately slow (f(x) = pow(x,0.7)) using f(x)=pow(x,0.6)

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

Jake Johnson wrote:

Won't the desired output always be 0 - 1? (Are the "Map input to" boxes needed?)

No ... so this might be a little confusing...
I could have let f(x) just take the original value (0 -> 127) and let you deal with it to produce an adequate output range... but that is not very convenient ... Instead my calculator is running your function over the entire range - it records the minimum and maximum outputs, and scales them to fit the output range that you designated ....

Now - i haven't answered the question of what the "map input" is useful for...
So if you know a little about polynomial curves - then polynoms with odd-degrees, like 3,5,7,etc... have an S shape when their input is running between negative and positive numbers...
So for instance take x to be -10,-9, ...0,...  9, 10
and run it with x*x*x, this will give you an S shape ....
Now in javascript - you can write instead of x*x*x, simply pow(x,3).
The problem now is that the input is running form 0 to 127 ...
so if I hadn't added the "map to input" feature, you'd have to write something like:
  f(x) = pow(x-64, 3) + 64
Because 64 is the middle of the 0-127 range

This is a little awkward. Instead the default input is mapped to 0.00->1.00. Again - if you couldn't change that you'd need to write:
  f(x) = pow(x-0.5,3) + 0.5
Because 0.5 is the middle of the 0 -> 1 range.

So finally - you can simple change the mapping of the input to (-1) -> (1). and have f(x) = pow(x,3).

By the way - due to the automatic normalization of the output- you'll get equivalent result for all the following input mapping:
(-1) -> (1)
-.5 -> .5
-64 -> 64
But you can get interesting result if you do
-2 -> 3


Regarding the "step" - it is not the number of points on the output graph, but rather the "sampling" step of the output. The lower this number, the more points you'll have. More precisely, the number of points is influenced both by the "step" value and the input range. For input range 0->127, and step 8, you'll get 16 points (128/8) points.
Usually you don't need to change the step value. I like 8...

Last edited by etalmor (12-03-2010 17:12)
M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

BazC wrote:

Hope you're not offended I'm sure this is a very cool and useful app!

Not at all ... you might find answers in my previous post to Jake.

-- Eran

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

So this could become very valuable as people experiment with various keyboards and match\adjust the responses to Pianoteq. Slowly catching on...

Re: Velocity curves calculator : java application for Pianoteq

Jake Johnson wrote:

So this could become very valuable as people experiment with various keyboards and match\adjust the responses to Pianoteq...

This is what I hope ... It would be cool if people share their formulas, and not just the final result - i bet there are just a few interesting families of formulas that are applicable to most keyboards, and the differences lay in the parameters ...

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

Nice tool ! I could approximate my posted curve with this:

Input Range : 10 to 117 step 16
Map to [ -1 , 1 ]
f(x)=atan(x)
Output Range : 0 to 127

So much more elegant !

I'll add it to the other forum.

Re: Velocity curves calculator : java application for Pianoteq

OK I think I understand it a little better now. I have no idea about the f(x)= box though. That describes the shape of the curve right? I guess you have to know maths to understand that bit.

Gilles Map input -1 to 1 f(x) = atan(x) works fairly well for me (thanks!) but produces quite a flat curve - almost straight. How can I make it a bit more curvy?

Re: Velocity curves calculator : java application for Pianoteq

BazC wrote:

OK I think I understand it a little better now. I have no idea about the f(x)= box though. That describes the shape of the curve right? I guess you have to know maths to understand that bit.

Gilles Map input -1 to 1 f(x) = atan(x) works fairly well for me (thanks!) but produces quite a flat curve - almost straight. How can I make it a bit more curvy?

Try mapping input from -2 to 2 or -3 to 3 etc. This will produce rounder curves.

atan(x) is the standard name for the arctangent trigonometric function.

See : http://fr.wikipedia.org/wiki/Fonction_arctangente

Re: Velocity curves calculator : java application for Pianoteq

Excellent, thanks Gilles! -2 to 2 works pretty well.

Re: Velocity curves calculator : java application for Pianoteq

etalmor wrote:
Jake Johnson wrote:

Won't the desired output always be 0 - 1? (Are the "Map input to" boxes needed?)

No ... so this might be a little confusing...
I could have let f(x) just take the original value (0 -> 127) and let you deal with it to produce an adequate output range... but that is not very convenient ... Instead my calculator is running your function over the entire range - it records the minimum and maximum outputs, and scales them to fit the output range that you designated ....

Now - i haven't answered the question of what the "map input" is useful for...
So if you know a little about polynomial curves - then polynoms with odd-degrees, like 3,5,7,etc... have an S shape when their input is running between negative and positive numbers...
So for instance take x to be -10,-9, ...0,...  9, 10
and run it with x*x*x, this will give you an S shape ....
Now in javascript - you can write instead of x*x*x, simply pow(x,3).
The problem now is that the input is running form 0 to 127 ...
so if I hadn't added the "map to input" feature, you'd have to write something like:
  f(x) = pow(x-64, 3) + 64
Because 64 is the middle of the 0-127 range

This is a little awkward. Instead the default input is mapped to 0.00->1.00. Again - if you couldn't change that you'd need to write:
  f(x) = pow(x-0.5,3) + 0.5
Because 0.5 is the middle of the 0 -> 1 range.

So finally - you can simple change the mapping of the input to (-1) -> (1). and have f(x) = pow(x,3).

By the way - due to the automatic normalization of the output- you'll get equivalent result for all the following input mapping:
(-1) -> (1)
-.5 -> .5
-64 -> 64
But you can get interesting result if you do
-2 -> 3


Regarding the "step" - it is not the number of points on the output graph, but rather the "sampling" step of the output. The lower this number, the more points you'll have. More precisely, the number of points is influenced both by the "step" value and the input range. For input range 0->127, and step 8, you'll get 16 points (128/8) points.
Usually you don't need to change the step value. I like 8...

This amount of control is great. I have to wonder, though, if it might be good to simplify these things by using sliders with labels ("Curve steepness"?) and have the math done in the background, WITH the ability to enter the figures manually, as well, off to the side, or a separate tab, if Java allows tabs.

I don't mean to be critical. I just got lost fast. Thanks so much for creating this program.

Re: Velocity curves calculator : java application for Pianoteq

Jake Johnson wrote:

This amount of control is great. I have to wonder, though, if it might be good to simplify these things by using sliders with labels ("Curve steepness"?) and have the math done in the background, WITH the ability to enter the figures manually, as well, off to the side, or a separate tab, if Java allows tabs.

I don't mean to be critical. I just got lost fast. Thanks so much for creating this program.

Well - part of the problem is that I don't know yet what are the interesting formulas. For example: I though polynomials (Ax^3+Bx^2+Cx), square roots, and about Sin and Cosine as relevant formulas. I didn't think about atan ... which also gives a nice effect. So I can't just lay down tabs for all intersting formulas.
Now - creating a customizable generic interface where you can define your own formula, and assign slides to various inputs of it - would possibly solve the problem, but is quite a bit more hassle.

Let's see what formulas people come up with - and rethink this.

Thanks
Eran

Last edited by etalmor (14-03-2010 09:15)
M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

I'm looking forward to seeing what people do with this.

One thing that particularly interests me is how different formulas may interact with the hammer hardness settings.

Thanks again.

Re: Velocity curves calculator : java application for Pianoteq

etalmor wrote:

I created a java application that calculates velocity curves for pianoteq: you write a (javascript) formula in a text field, press a button, and the clipboard contains the velocity map - then you just paste it in PTQ. Download and check it out here:
http://sites.google.com/site/eranshome/software
Enjoy, Eran

Etalmor - It would be nice if you could incorporate a graph drawing routine and some sample equations into your script.    I was playing with this little java app earlier-
http://gcalc.net/
It's good for visualizing alternative velocity curves as you can set the start values for the graph and zoom to extents, etc.  The math functions -at least for "power" are different than yours.  (gcalc uses "^")  I would have thought being java they would be the same.  I'm also curious... if you map every value from 1 to 127, is there any effect on latency or any slight computational "bog" on Pianoteq ?

"Downing a fifth results in diminished capacity."

Re: Velocity curves calculator : java application for Pianoteq

Hi Cellomangler

Actually I've added drawing (but not posted it yet), and I want to add ability to save/load presets (with some examples). When I get it done i'll post it to my site and ping the forum...

I tried mapping every value from 0 to 127 and didn't notice any slowdown in pianoteq. Translating the velocity curve should take constant time, using a small 128 cell array, no matter how "complex" the velocity graph looks like. I bet this is what Pianoteq is doing... quite standard.

Thanks
Eran

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

etalmor wrote:

Actually I've added drawing (but not posted it yet), and I want to add ability to save/load presets (with some examples). When I get it done i'll post it to my site and ping the forum...

Awesome...  kudos !  ...but then get back on the grand unification theory.

"Downing a fifth results in diminished capacity."

Re: Velocity curves calculator : java application for Pianoteq

Hi Folks

I posted a new version of the calculator with loading/saving of presets, some predefined presets (with descriptions), and a visualization of the curve.

http://sites.google.com/site/eranshome/software

The presets have an XML format, but their extention is .pcc (PtqCurveCalc).

Enjoy,
Eran

Last edited by etalmor (23-03-2010 08:13)
M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

Thanks. I'm using the s_atan preset some and liking it. Seems to fit. The Satan preset?

Re: Velocity curves calculator : java application for Pianoteq

Jake Johnson wrote:

Thanks. I'm using the s_atan preset some and liking it. Seems to fit. The Satan preset?

Ha!!! didn't notice that - seems i'm possessed by the devil ...

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

I found this very dynamic and cool curve I call the "double hump". It gives you better control in three zones - Pianissimo, Mezzo, Fortissimo

velocity = [0, 1, 9, 17, 25, 33, 41, 49, 57, 65, 73, 81, 89, 97, 105, 113, 121, 127; 0,0, 5, 12, 21, 32, 44, 53, 59, 64, 69, 76, 86, 97, 108, 117, 124, 127]

Obtain by the calculator:
input: 1->127
step: 8
map: 1 -> 5
fx: sin(x*3.14)+x*7
range: 0 -> 127

Here's the pcc file:

<?xml version="1.0" encoding="UTF-8" ?>
<curve version="1.0">
<description>A double hump shape using two cycle of sin(), off by a phase...
The "x*7" component is used to straighten it out </description>
<in_from>1</in_from>
<in_to>127</in_to>
<step>8</step>
<fx>sin(x*3.14)+x*7</fx>
<in_map_from>1</in_map_from>
<in_map_to>5</in_map_to>
<out_from>0</out_from>
<out_to>127</out_to>
</curve>

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

What I still don't get is how you determine what numbers to feed into it for the shape. Do you have a general shape in mind that you want to create, and then find the numbers that will create it?

Separate question: would it be possible to create a randomization thing for this, with some set, unvarying conditions (the scale must slant to the right, the next step can't be lower than the previous steps, etc)? Just a thought.

Enjoying satan.

Last edited by Jake Johnson (24-03-2010 21:00)

Re: Velocity curves calculator : java application for Pianoteq

on Mac I'm getting errors with the program? It doesn't work

Re: Velocity curves calculator : java application for Pianoteq

creart wrote:

on Mac I'm getting errors with the program? It doesn't work

That's a shame - the reason I chose java was that it would be cross platform ... It would take a few days until I can get access to a macbook pro .... in the meanwhile - if you are interested I can share the source files (I've developed it in the netbeans IDE)

-- Eran

Last edited by etalmor (25-03-2010 08:19)
M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

Jake Johnson wrote:

What I still don't get is how you determine what numbers to feed into it for the shape. Do you have a general shape in mind that you want to create, and then find the numbers that will create it?

Well - let's try to break it down ...:
1) You should get to know the shapes that some functions will give you, and the useful ranges they work with e.g:

1.a) The straight line: "x", simply a rising straight line.

1.b) The square: "x*x", or "pow(x,2)". its useful range is non-negative numbers. e.g. map input from 0->1.
If you map it to negative numbers as well - e.g. -1 -> 1, you'll get a mirror image of the 0->1, i.e. a "bowl" shape - first falling, then rising. You don't want that for velocity.

1.c) sin(x) - it gives you a wave, a full cycle for x=0 -> x=2*PI. A wave in itself is not useful, because it sometimes rises, but sometimes fall - which you don't want. (In math it mean sin(x) is "not monotonously rising", or simply "not monotone"). But later we'll see how to combine functions and make sin(x) useful to create a "rising wave"
Regarding the range you either map the input from 0 -> 6.28, (== 2*PI)
but I prefer to map the input to the number of half-cycles you want,
e.g.: 0->2 for a full cycle, 0->3 for a cycle and half. You can also play with the phase by mapping 1->3, will give you a full cycle but starting on the "off beat" of the cycle.
and then write in f(x): sin(x*PI)

1.d) The cube:  "x*x*x", or "pow(x,3)" -> in the positive range it is similar to x*x, but steeper. However in the negative range it doesn't give you a mirror image, but rather a "rotated" image ,so it is monotone around (-1 -> 1), with a nice S shape.

1.e) The square root: "pow(x,0.5)" - gives a fast rising edge. Can only be used for non-negative inputs - so map your inputs to 0->1

There are more functions, the cos (similar to sin), atan (another interesting s-shape)...

2) but now you can combine them ....
So basically think of if as a "mixing console" - you can combine two (or more) shapes with different "volumes" by adding them together, and multiplying each one by its respective "volume", or coefficient.

So e.g. - if you want a "rising wave" - than you can combine the "sin" function with the straight line "x" like so:
map input to (0 -> 2)
fx: sin(x*PI) + x.
Still not steep enough - let's give "x" some more volume
   sin(x*PI) + x*2
not enough ... how about:
   sin(x*PI) + x*4
This gives a monotone shape ...

another example: say you want to combine the square-root "pow(x,.5)" with the cube S-shape  "pow(x,3)".
The problem here is that square-root can only be used in ranges >0, e.g. 0->1, and the cube you want to use in range -1->1 ...
So what you can so map the input to 0->1, and adjust X inside pow(x,3) to go from range -1->1, like so:
    pow(x*2-1, 3).
Combining the to functions together:
    pow(x,.5) + pow(x*2-1, 3)
Playing with the coefficients to get interesting results:
    30*pow(x,.5) + pow(x*2-1, 3)

Jake Johnson wrote:

Separate question: would it be possible to create a randomization thing for this, with some set, unvarying conditions (the scale must slant to the right, the next step can't be lower than the previous steps, etc)? Just a thought.
Enjoying satan.

Well you can use "random()" combined with some other curve, and give random a low coefficient, so that it only rises, like so:

0.1*random(1) + x
or:
0.2*random(1) + pow(x,3) + x
etc ....

Personally I'd rather have my curve precise w/o any randomness...

best,
Eran

Last edited by etalmor (25-03-2010 09:02)
M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

Yikes. Programming homework. But thanks. I need to learn more of the math. Inexcusable not to, these days.

[Longish post follows.]

Thinking aloud on another subject: I wish that there was a way for users to match their velocity response with PianoTeq: Play a note at given velocities, record the response of their keyboard, and then enter the numbers into your program to establish some points on the plot, and have the program guess at various curves that would connect the points. About the only way I can imagine doing this is to:

1. Have the user listen to some midi-generated notes at specific velocities (say 15, 35, 55, 75, 100, and 127) and then play each on his or her keyboard, trying to match each in amplitude and timbre. There would be a live spectral display of the note to be matched, which would play until the user clicked on "Stop," and a live display of the spectral image as played by the user: visual feedback for the matching. The user wouldn't be trying to match the midi vel, but instead the sound.
2. Two volume meters would also be displayed, one for the recorded note and one for the notes played for the user.  Why volume meters? So users wouldn't make the very easy mistake of thinking their sound was off because they were listening at a lower volume than intended for a timbre and mistook their most audible high freqs for a thin sound. (A perhaps too complex version of this program would actually tell the user when the amplitude and spectral components were a close match, something like piano tuning software that shows a needle indicating closeness to a desired pitch.)
3. The user would also be watching a display like the PianoTeq velocity pane, and would write down what velocities he or she actually played to reach the desired amplitude and timbre for each note.
4. Said user would then enter the velocities he or she wrote down into your program, which would already know the actual velocities played by the midi file that the user listened to, and could make adjustments and  offer various curves that would connect the plot points.

Rube Goldberg? But all of the components exist--It's just a combination of PianoTeq, which can both play the model notes at specific vels and show the user the velocity he or she was playing, opening two spectral\amp displays at once, and your program. (My system, at least, lets me have two sound sources running at once.) But having to open four programs, including yours, is no fun. So could we get the two added spectral\amp displays added to your program tomorrow...?   

Yeah. But it might actually be of great value, since it would let users match their keyboard to any music program that shows a midi event list with the velocities and allows creating vel curves. Music program developers could very easily create midi files that presented the ideal sound to be achieved at given vels with their program, and then let the user recreate it. Might take users about five-ten minutes to adjust their keyboard to the music program, but it would solve the entire problem of variable velocity responses. (I wonder how many support questions relate to velocity response, although the user may not realize that the problem is velocity response?) I can't think of any other way without attaching a velocity reader or a pressure gauge to the user's keyboard and comparing the results with the midi response.

Sorry to drag on about this. I could put something like this together in SynthEdit, I guess, but someone who knows C-Sound or another program that creates active visuals could create something much better.
(Which reflects on me, not on Synthedit). I don't even know if Java can create active spectral displays, let alone two at once...

(This desire to match the keyboard to PianoTeq is why I was thinking about randomization--the thought was that the user might be able to guess a shape that would match up well, and then try out slight, random variations until a close match was achieved, and then fine-tune the match.)

Last edited by Jake Johnson (25-03-2010 17:36)

Re: Velocity curves calculator : java application for Pianoteq

HI Etalmor

that might be an idea - I am downloading the IDE right now...
It's the 'normal' Java one right?

Then I can try to compile and see what OSX comes up with...
Maybe send me a PM so I can send you my email-information

cheers
Hans

Re: Velocity curves calculator : java application for Pianoteq

Revision:

Come to think of it, the amp display wouldn't be needed, since spectral display programs show the amplitude by the height of each bar\line. A bar display might be best, for clarity...

Re: Velocity curves calculator : java application for Pianoteq

Hi Guys

I checked in a new version 1.2 that has a very useful feature:
Each formula can have up to 10 named "constants" - so in order to customize a formula you just need to change the constants without having to understand much of the math behind it. I've described what the constants do in each formula's description field ...

E.g. - I made the "double hump" formula into a more generic "wrinkles" formula, where you can set the number of wrinkles, how much they are "ironed out", their phase, and an overall "belly" that gives the entire shape an "in" or "out" curve ...


Download and check it out here:
http://sites.google.com/site/eranshome/software

Enjoy,
Eran

M-Audio Profire 610 / Roland Fp-3 / Reaper / PianoTeq!
www.myspace.com/etalmor

Re: Velocity curves calculator : java application for Pianoteq

etalmor wrote:
creart wrote:

on Mac I'm getting errors with the program? It doesn't work

That's a shame - the reason I chose java was that it would be cross platform ... It would take a few days until I can get access to a macbook pro .... in the meanwhile - if you are interested I can share the source files (I've developed it in the netbeans IDE)

-- Eran

Console Output: java.lang.NoClassDefFoundError: javax/swing/GroupLayout$Group

Under OS X 10.5 the default version of Java is Java 1.5. Got rid of the above error by changing the default version to Java 1.6 (Java SE 6 64-bit), by launching application Java Preferences.app located at /Applications/Utilities/Java/.

Console Output: Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 129

PtqCurveCalc.jar loads but with no GUI.

I found this article that might help you build PtqCurveCalc with NetBeans so that it will run on OS X. Check it out, if you want to run PtqCurveCalc.jar on any out-of-the-box installation of OSX.

Article: http://jimblackler.net/blog/?p=43