Syntaron - W.I.P.

Miscellaneous Forums/Blitz Showcase/Syntaron - W.I.P.

How the mouse events are handled:

MouseDown
...sets flags based on position and mousebutton clicked
-left click sets marker creation flag
-middle click sets position dragging
-right click sets value dragging (value/vibrato/curve)

MouseUp
...clears flags

MouseMove
...uses flags to determin what to do with mouse movement

Marker Handling
...selects/creates and alters marker values
- if the marker creation flag is set it checks if a marker exists underneath current mouseposition. It goes through all the markers until it has found one and switches marker creation flag off. If not, then a marker is created, sorted and the flag is cleared as well.

- value dragging checks which or if a marker is selected and checks the type of dragging by several means...
A. if left control is held down it transfers the dragging amount into curve_out value of current marker
B. if left shift is held down...etc..etc
C. if vibrato is allowed, it transfers dragging amounts horizontal to vibrato speed and vertical to vibrato amount and sets the vibrato active flag.
D. if vibrato is not active, it sets vibrato is not allowed and transfers dragging amount into marker's amount.

Altogther it only once or twice goes through all the markers until it is selected or created&selected. After that a marker is identified and will be used directly.

However, I'm thinking about a way to limit the sample generation loop to the area affected by the currently selected marker, but vibrato for example would not display correctly, since it's not based on sin, but on an accumulation, much like a filter. Changes to one markers vibrato will offset the behavior of following markers. This allows a continuous alteration to smoothly blend between different speeds. I'm thinking about a clever way to deal with it, though...




- position dragging...well...drags the marker around and does a number of things to deal with crossing over markers.