On Mon, 2008-07-07 at 22:19 +0200, Sebastian Moors wrote:
> Hi Scott,
> 
> Great work!! All your patches are in our repository now. I like 
> especially the patch which adds the ctrl-feature to all rotary-widgets.

Thanks for taking the patches!

> Of course small changes on existing code parts (code cleanup etc.)
> which don't change the behaviour are *not* affected by the feature freeze.

Well what I have so far is not small. I have implemented a Pan class
that takes care of all the transformations from a single scalar value
(from rotary controls and note property editors) to separate left and
right channel gain values and vis-versa. It also stores the pre-computed
values for efficient playback. This makes the calculations consistent.
Currently there are various forms of the following algorithm floating
around the code in various places.

If panValue > 0
  left = (1 - panValue) * 2
  right = 1.0
else
  left = 1.0
  right = panValue * 2

plus the other way around. Also the Note class currently pins the right
channels to a range from 0.0 to 0.5. This is then compensated for during
playback by scaling the result by 2 in the sampler code.

The new Pan class hides all the dirty details and code in the rest of
the app looks more like:

left = instrument->get_pan_l()
note->set_pan(panValue)
note->set_pan_lr(left, right)

The Pan class also normalizes the note left and right channel values to
max of 1.0. This changes the way the values are saved in songs and makes
opening new songs with older 0.9.4 development releases not work as
expected WRT note panning. This is the only reason that could make it
important to take the changes for the official 0.9.4 release - to avoid
compatibility issues with song files in the future. Forward
compatibility will work, just opening new files with old versions might
not.

Anyway, I still have a bit of testing do to and then I will send in a
patch. It's not fixing anything that I am aware of, just making the code
cleaner, and more consistent. 

-Scott


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to