I was working on a song back in the previous version that I just loaded up into 3.2. It was still in progress when I upgraded.
I was using the vel parameter to control the velocity of it, and if it had the default of 0.2, that it was fine. I found out something was wrong because I had a few notes that didn’t have the velocity on them. They blended well in the previous verison, but stick out now.
The original default was 0.2, so how is it that a default run(the second one), so much louder then ones with a vel > 0.2
The piano synth has been updated to allow for fractional tuning, ie you can now play 72.3 with the piano synth. I’m not sure if this would have affected the behaviour of the vel parameter.
the mods were done by user emlyn
I don’t remember exactly what I did, but looking back at the PR, it looks like the original version had a superfluous scaling by a factor of 4 that seemed like a bug. That was removed, and the default velocity scaled up by a factor of 4 to compensate.
That probably wasn’t a bug. I added a scale factor to all synths to help get them to be a similar amp.
I didn’t notice you had modified that. I thought you had just changed the pitch capabilities. In the future, it would always be beneficial to check to see if an assumption about something being a bug was true before acting on it!
Sorry, it was discussed in the PR (with @ethancrawford), so I guess I just assumed you were OK with the resolution, but I should have been more careful to bring it to your attention specifically.
Would it be useful if I sent a PR setting it back to the previous value? It would of course be another breaking change, but only compared to 3.2.0, not earlier versions, and at least it would be consistent with the other synths again.
I’ve opened a PR here with a potential fix. It doesn’t behave identically to how it did before version 3.2.0, as I think there was a bug in the old behaviour (or maybe it was doing something I don’t understand), but it should have the same output volume (at least for velocities up to 0.25).
My PR was just merged, so the next release should have the default velocity back at 0.2, with the scaling factor of 4 on the output of the synth (instead of on the velocity parameter, which would have allowed setting out-of-range values before) so that the volume is back in sync with earlier versions.
Hmm. Not sure this is right yet.
try this on 3.2.1 beta
live_loop :test do
8.times do
n=scale(:c4,:major).tick
synth :piano,note: n,release: 0.2#,vel: 0.6
sleep 0.2
end
8.times do
n=scale(:c4,:major).tick
synth :tri,note: n,release: 0.2
sleep 0.2
end
end
The piano synth is incredibly quiet with the default vel opt =0.2
It needs to be much higher, or , if it is to remain there, then adjustments need to be made elsewhere in the synth definitiion.
Compare what it sounds like in version 3.1 or 3.2
Also uncomment the #,vel: 0.6 and see the difference… experiment with other values for the vel opt.
I think I’ve tracked down the problem. Changing vel doesn’t affect the volume linearly, so when it was reduced by a factor of 4, the signal had to be amplified by a much larger factor to compensate. This PR should fix it.