I did much the same when I first started thinking about the bezier curves. I first tried swapping the curveAssignmentsData string only - I can't recall exactly why but I had a suspicion that it related to the modes (lead,chords etc.) somehow. Perhaps these can be a red herring if they are being ignored in favour of the settings in one of the other modes and so seem to have no effect? This, or something like it, would possibly explain some of the odd things I have experienced.
I just had a thought. The word "Assignments" might be the key. Perhaps there are 8 Bezier curves described in BezierCurvesEntry and [Gesture | Event]CurveAssignmentsEntry simply assign them to various parameters. GestureCurveAssignmentsEntry contains 47 digits which appear to be in the range 1-8.
So for example for Drum, all gesture parameters point to Bezier curve 1 except for parameter 42 which points to Bezier curve 4:
Drum:
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEEAQEBAQE=
[1,
1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,
4,1,1,1,1,1]
and for EventCurveAssignmentsEntry, it contains 14 parameter mappings:
AQEBAQEBAQEBAQEBAQE=
[1,1,1,1,1,1,1,1,1,1,1,1,1,1]
Nice online converter if anyone wants to experiment with assignments:
My first thought when I saw that number of 14 parameters was does that tie up to the groups of parameters in the SynthPatch mod groups - but there's only 4X3 of them - but if they did relate then it could be down to formatting required by the Juce engine or 2 of the 14 are required but not used by the Orba. I mention that because we could fall foul of trying to match numbers when they perhaps don't - because the Orba doesn't use all the things the engine can.
That said your observation about the BezierCurvesEntry is compatible with what I experienced with the few attempts I tried.
Looking at the bezierCurvesData string in hex in groups of four bytes it looks like 7 entries each starting with 8 bytes of zero and then 48 bytes . There's also a lot of the group values the same. Don't know what that might mean though. (And so - to my bed.)
Oh dear - 14 is exactly twice 7 isn't it. Significant?
For the 14 values (EventCurveAssignmentsEntry) I was thinking they might correspond to some of these (which I found in the code):
Bump, Lift, Move, MoveX, MoveY, MoveZ, Palm, Press, Radiate, Shake, Slide, Spin, Tap, Tilt, Vibrato
I agree not to get fixated on the numbers 47 and 12. I'm assuming they are some type of mappings for now but could be completely wrong.
As for the Bezier curves, I'm 99% sure that I am correct with my interpretation. The Base64 string converts to exactly 256 bytes (8*4*8 = 256). That is 8 Points per Bezier curve * 4 bytes per Point (float32 value) * 8 Bezier curves.
The first 32 bytes are:
00 00 00 00 00 00 00 00 71 f4 28 46 71 f4 28 46 71 f4 a8 46 71 f4 a8 46 00 fe ff 46 00 fe ff 46
Point 1 = (0,0)
Point 2 = (10813.1103515625,10813.1103515625)
Point 3 = (21626.220703125,21626.220703125)
Point 4 = (32767,32767 )
The float numbers are stored using the Float (IEEE754 Single precision 32-bit) standard and in reverse order (Little Endian). So for example, Point 4 X/Y are stored with the 4 bytes 00 fe ff 46 so if you reverse these you get 0x46fffe00 and this is 3.2767e4 as seen here:
https://www.binaryconvert.com/result_float.html?hexadecimal=46FFFE00
Hope that helps. There's no need to worry about the math or conversions. I've written a utility that decodes Base64, shows the curves, allows you to edit the curves and then copy back the new Base64 string. I'll share it to my GitHub site soon.
Here is my report-out for all the Bezier Sets I found (7 unique sets) in all the Factory Presets:
Summary:
The correspondence you make with the EventCurveAssignmentsEntry makes sense if you think of it as a provision for a range of different controllers (defined by the JUCE engine and/or the MPE midi standards?) The Orba (and perhaps the Roli keyboards, for example) would use the MoveX, Y and Z parameters whereas others might only use the general Move parameter. Some of the others might not be used by the Orba as well - but intended for other controllers.
As far as the bezier curves go, I would only want to go as far as swapping out known entries to get close to the behaviour that would work best for each preset. But understanding how they work and what they do is important to understand how to use them.
By the way it has occurred to me that you can do some interesting things (but of limited use!) with the chord settings. For example, by shifting down by one all offset values for the key 7 you can get a chord on the flattened 7th of the major scale (it works, I've done it) - probably more useful than one on the major 7th. It could also be possible (but a bit mind bending to do) to create a a preset with only 3 or 4 chords but with different voicings for them (first inversions, or added 7ths, for example) - which would be great for harmonically simple songs.
Yes that's right! I created all kinds of custom chords for Orba 1. It was much harder then because it was all encoded in Base64! Now they've made it human readable. You can create any chords you want even mix modes. Diminished chords, 6/9 chords.. only limited to 4 notes per chord.
@DavidBenton Do you know that the [major | minor]ChordLists are just offsets (in semitones) from the root note of each pad?
<ChordModifierParams majorChordList="0, 7, 12, 16; 0, 7, 12, 15; 0, 7, 12, 15; 0, 4, 7, 16; 0, 4, 7, 12; 0, 3, 7, 12; 0, 3, 12, -4; 0, 4, 12, -5; " minorChordList="0, 3, 7, 0; 0, 3, 8, 0; 0, 4, 7, 0; 0, 3, 7, 0; 0, 3, 7, 0; 0, 4, 7, 0; 0, 4, 7, 0; 0, 3, 7, 0; "/>
If you are in C Major [C,D,E,F,G,A,B,C], the chords would be:
C,G,C,E [0,7,12,16]
D,A,D,F [0,7,12,15]
E,B,E,G [0,7,12,15]
F,A,C,A [0,4,7,16]
G,B,D,G [0,4,7,12]
A,C,E,A [0,3,7,12]
B,D,B,G [0,3,12,-4]
C,E,C,G [0,4,12,-5]
The root notes for the Minor mode are Natural Minor so [C,D,Eb,F,G,Ab,Bb,C]
@Subskybox - Thanks for that but actually I had a decent grounding in musical theory - it's just that it had many years of neglect, rust and been mistreated since. Plus the electronic era has a rather different ways and means than I'm used to.
@DavidBenton
"It could also be possible (but a bit mind bending to do) to create a a preset with only 3 or 4 chords but with different voicings for them (first inversions, or added 7ths, for example) - which would be great for harmonically simple songs."
BTW, I made a tool to make Orba Chords for Orba 1 but is still very useful for Orba 2 to work out the offsets. https://github.com/subskybox/Orba. Scroll to the bottom of that page and watch the 2 minute Demo movie.
Just an observation from my experiments with chord presets:
If you remove the chord offset lists by removing the the whole ModifierEntry section (being careful not to break the xml formatting) you get what is effectively another lead voice - with polyphonic capability, but without gestures (although I suspect it might be possible to add that).
The preset seems to work in songs OK, so could be useful for some songs where the chord presets are too limiting, although it keeps you down to notes in one octave. If using a SynthPatch section from a lead you may want to lower the volume in the patch for the best effect.
While I was working on the tool above, I wanted people to have a way to make custom scales. I did this by setting all the offsets for each pad to the same number. For example:
<ChordModifierParams majorChordList="0, 0, 0, 0; 0, 0, 0, 0; 0, 0, 0, 0; 0, 0, 0, 0; 0, 0, 0, 0; 0, 0, 0, 0; 0, 0, 0, 0; 0, 0, 0, 0; " minorChordList="..."/>
..And in this case (for C Major) it would produce:
C,C,C,C [0,0,0,0]
D,D,D,D [0,0,0,0]
E,E,E,E [0,0,0,0]
F,F,F,F [0,0,0,0]
G,G,G,G [0,0,0,0]
A,A,A,A [0,0,0,0]
B,B,B,B [0,0,0,0]
C,C,C,C [0,0,0,0]
Orba will not allow to play the same MIDI note twice so you basically get one note. This can be used to make any scale you want or even shift by half octaves. What I found out after a while as that by doing this that it is still monophonic. It was the presence of the ModifierChain that forced it to monophonic. You can drop a Lead voice into the Chord folder and it will work.
There were two more bytes that I had to modify to make a Bass or Lead pickup the Modifier Chain and they had to do with the first Seeker (a.k.a. SeekerType="Note")
Subskybox
This forum is intended to share Orba 2 hacking tips amongst the Orba 2 community. NOTE: Please post facts that are well understood & useful. If you have theories to discuss, please start another forum and link to it here.
2 people like this idea