Start a new topic

Orba 2 Hacking Knowledge Base

image

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

@DavidBenton Totally agree.


I have a good understanding of Bezier curves (I've done some visual programming with them in the past) and I also understand exactly what you mean -- the linear relationship that I'm looking for... So I'm hoping I'm well suited for the job. I do believe I came to a full stop last time I tried with Orba1 Bezier curves, but I'm willing to try again. If I can decipher how they are recording the points, I could certainly figure out how to get a linear relation between sensor input and selected velocity. I'll share the raw data from those strings soon and maybe if a number of us stare at them, we can figure it out :)


I do already see a pattern in that 'AQ' appears to be some type of delineator.

I was surprised at the results of the raw data. The Base64 strings produce an array of 47 values:


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]


Lead & Bass:

AQUFBQUFBQUFAQEBAQEBAQEBAQEBAQEBAQYGBgYGBgYGAQEFAQEBAQEEAQEBAQE=

[1,5,5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,6,6,6,6,6,6,1,1,5,1,1,1,1,1,4,1,1,1,1,1]


Chord:

AQUFBQUFBQUFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEFAQEBAQEEAQEBAQE=

[1,5,5,5,5,5,5,5,5,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,5,1,1,1,1,1,4,1,1,1,1,1]


Please share your thoughts if you spot any patterns here.

@Subskybox

As a quick experiment I tried to add the drum data to a lead preset with only Pitch Bend to test a gesture.

First thing - it didn't break the preset!

However it made little, if any, difference. Perhaps for the last twenty degrees or so of a 90 degree tilt, pitch bend stopped changing. I think it continued through all 90 previously.


The drum data strikes me as almost vanilla as they could be, except for the one shared digit near the end. It made sense to me that the first group of data would be unique to drum presets - they are rather different in that the sounds usually have a short duration. (And that the drums should be diffeent.)


It does strike me that there could be something to infer about the differences between chords and the lead and bass but I can't really see why chords should be different.


If the first digit is a flag or header we then have 4 groups of 8 digits (perhaps) and after that a different two groups, where only the third digit is not 1.

(In the 4 groups the digits are all the same in the examples we have - not so in the remainder.)


I think I read somewhere that the last "=" character in base64 is some sort of meaningless filler. I didn't really understand what I read, but perhaps the "AQ" are just the filler first character in each set ot 8?


(I like your highlighting of the differences, by the way - really helpful.)


What all this can mean in regard to bezier curves is beyond me I'm afraid - I could only try and read them in terms of how they would be drawn in a vector art context, and that didn't seem to work to me .


It's a bit sad of me that I'm now fascinated by this puzzle!


1 person likes this

I found this image online:

image

I'm trying to see if there is a way to split these arrays that might correspond. One way to split them as you suggest is like this:


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]


Lead & Bass:

AQUFBQUFBQUFAQEBAQEBAQEBAQEBAQEBAQYGBgYGBgYGAQEFAQEBAQEEAQEBAQE=

[1,

 5,5,5,5,5,5,5,5,

 1,1,1,1,1,1,1,1,

 1,1,1,1,1,1,1,1,

 6,6,6,6,6,6,6,6,

 1,1,5,1,1,1,1,1,

 4,1,1,1,1,1]


Chord:

AQUFBQUFBQUFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEFAQEBAQEEAQEBAQE=

[1,

 5,5,5,5,5,5,5,5,

 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,5,1,1,1,1,1,

 4,1,1,1,1,1]


I'm not quite sure if this is correct?! One thing is for sure, don't spend any time trying to find patterns in the Base64 string. I went down that rabbit hole last year and any patterns you find are just coincidence. The magic is in the number arrays somewhere..

I'm also looking at BezierCurvesEntry which has 7 unique Base64 strings:

bezierCurvesData="AAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0qEaOj21EUt/6Ru1F4UUA/v9GAP7/RgAAAAAAAAAAZ5gZRsLVo0N7UDhGUt/6RgD+/0YA/v9GAAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0KEZx9ChGcfSoRnH0qEYA/v9GAP7/RgAAAAAAAAAAcfQoRnH0KEZx9KhGcfSoRgD+/0YA/v9GAAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0KEZx9ChGcfSoRnH0qEYA/v9GAP7/Rg=="/>
bezierCurvesData="AAAAAAAAAAAbIdtFuHmURkLVY0atYNBGAP7/RgD+/0YAAAAAAAAAAHH0qEajwHVEUt/6Ru1F4UUA/v9GAP7/RgAAAAAAAAAAZ5gZRtDVo0N7UDhGUt/6RgD+/0YA/v9GAAAAAAAAAAC+J5xGwtWjQ6PA9UbC1SNEAP7/RgD+f0YAAAAAAAAAAHH0KEZx9ChGcfSoRnH0qEYA/v9GAP7/RgAAAAAAAAAAcfQoRnH0KEZx9KhGcfSoRgD+/0YA/v9GAAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0KEZx9ChGcfSoRnH0qEYA/v9GAP7/Rg=="/>
bezierCurvesData="AAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0qEajwHVEUt/6Ru1F4UUA/v9GAP7/RgAAAAAAAAAAZ5gZRtDVo0N7UDhGUt/6RgD+/0YA/v9GAAAAAAAAAAC+J5xGWDKiQ00x80aspBtEAP7/RgD+f0YAAAAAAAAAAHH0KEZx9ChGcfSoRnH0qEYA/v9GAP7/RgAAAAAAAAAAcfQoR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H0qEYA/v9GAP7/RgAAAAAAAAAAcfQoRnH0KEZx9KhGcfSoRgD+/0YA/v9GAAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0KEZx9ChGcfSoRnH0qEYA/v9GAP7/Rg=="/>
bezierCurvesData="AAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0qEaNj21EUt/6RutF4UUA/v9GAP7/RgAAAAAAAAAAZ5gZRsLVo0N7UDhGUt/6RgD+/0YA/v9GAAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0KEZx9ChGcfSoRnH0qEYA/v9GAP7/RgAAAAAAAAAAcfQoRnH0KEZx9KhGcfSoRgD+/0YA/v9GAAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0KEZx9ChGcfSoRnH0qEYA/v9GAP7/Rg=="/>

Each decode to 256 values. Here I split the last one in groups of 8:


0,0,0,0,0,0,0,0,

113,244,40,70,113,244,40,70,

113,244,168,70,113,244,168,70,

0,254,255,70,0,254,255,70,

0,0,0,0,0,0,0,0,

113,244,168,70,141,143,109,68,

82,223,250,70,235,69,225,69,

0,254,255,70,0,254,255,70,

0,0,0,0,0,0,0,0,

103,152,25,70,194,213,163,67,

123,80,56,70,82,223,250,70,

0,254,255,70,0,254,255,70,

0,0,0,0,0,0,0,0,

113,244,40,70,113,244,40,70,

113,244,168,70,113,244,168,70,

0,254,255,70,0,254,255,70,

0,0,0,0,0,0,0,0,

113,244,40,70,113,244,40,70,

113,244,168,70,113,244,168,70,

0,254,255,70,0,254,255,70,

0,0,0,0,0,0,0,0,

113,244,40,70,113,244,40,70,

113,244,168,70,113,244,168,70,

0,254,255,70,0,254,255,70,

0,0,0,0,0,0,0,0,

113,244,40,70,113,244,40,70,

113,244,168,70,113,244,168,70,

0,254,255,70,0,254,255,70,

0,0,0,0,0,0,0,0,

113,244,40,70,113,244,40,70,

113,244,168,70,113,244,168,70,

0,254,255,70,0,254,255,70


There's definitely some patterns here. I'm not really sure what these do yet but I'm going to try to build a list of Preset types/names that use each of the 7 strings to look for patterns.

Here are the 7 BezierCurvesEntries along with the Presets they are used with. Note: pattern 7 published above is unique to the Ambient Chord Preset. I played with this sound to find out what was so special about it. I found this sound has NoteOff velocity which I hadn't noticed from any sound before. I'm not sure how this is achieved or even if the Bezier curve(s) have any impact. 

txt
(476 Bytes)
txt
(4.12 KB)
txt
(475 Bytes)
txt
(4.02 KB)
txt
(475 Bytes)
txt
(3.28 KB)
txt
(2.8 KB)

Based on the above, my assumption is that there are several Bezier curves defined. I would guess that one Bezier is defined like this:


[0,0,0,0],[0,0,0,0],

[113,244,40,70],[113,244,40,70],

[113,244,168,70],[113,244,168,70],

[0,254,255,70],[0,254,255,70]


as


[P0x],[P0y],

[P1x],[P1y],

[P2x],[P2y],

[P3x],[P3y]


image

I assume that the first Point is bottom left [0,0,0,0][0,0,0,0] and that the last Point is top right [0,254,255,70],[0,254,255,70].


image


I'm then going to speculate that each of the 4 integers somehow represent a 32 bit number (likely a float). I'm going to research some different ways of storing these numbers and can hopefully find the right schema. I feel like I'm on the right trail.



I think I've got it! It appears to be using the Float (IEEE754 Single precision 32-bit) standard and is recorded in reverse (many programs do this to simplify bit-shifting). I converted the curve:


[0,0,0,0],[0,0,0,0],

[113,244,40,70],[113,244,40,70],

[113,244,168,70],[113,244,168,70],

[0,254,255,70],[0,254,255,70]


to


0.0 , 0.0

1.08131103515625E4 , 1.08131103515625E4 

2.1626220703125E4 , 2.1626220703125E4 

3.2767E4, 3.2767E4 (Note this value is the max value for a 16-bit signed int)


..which is completely linear! This can't be a coincidence. I'll need to convert the other curves this week to see what all the curves look like. The first one is here:


image



1 person likes this

I can only describe my thinking - which I imagine may well be too simplistic.


I am thinking, in terms of a graph with the x axis being either the rate of change of the application of the effect or the total amount of effect at each point in time (which would be constrained by parameters in the patch probably) - because I see the Y axis as time (although this might be better thought of as the passage through a gesture).


I assume only a simple curve - a C shape and perhaps S - is used. Something more complex might be considered desirable, but would you really need it? (I also thought why make it more complicated than needed when the computing power is limited?)


Going back to my vector art thinking only 4 coordinates would be required -  a start and end position and the co-ordinates of the two "hooks" that define the actual curve. This would require 8 numbers to be passed to whatever routine actual does the calculations. It seems to me that the start and end point in time (Y) could be derived from the parameters in the patch, perhaps the weight (X) as well. But they may be included for convenience. (Quite why they should be obfuscated in a base64 string rather than just hex I don't know.) 

Sticking with that idea there could be four hooks, as I have sometimes seen, and that would tie in with your breakdown of the numbers as in your previous post.


The straight line you found seems to fit with what I would expect - an even addition to the effect over the passage of the gesture. Perhaps the other strings simply define a basic set of curves which could be used, keeping the whole thing simple. To me that seems a sensible approach - giving options that can be simply applied by preset designers. If they are lazy a designer might simply try a straight line first and not bother to try others to see if they work better - which would have been a good idea on the Tilt Lead preset in my opinion. This would be good for us too, because we could stick to known safe strings to use and with some degree of understanding what they will do.


And I agree you may have cracked it!




From the end users point of view this could make the Orba a better, expressive instrument to play,  (along with what you did with the samples on the Pandrum preset) -  to me that seems a big step up from being just a toy to a real instrument.

I've tried swapping out the GestureCurveAssignmentsEntry alone and BezierCurvesEntry alone and also the whole Bezier caboodle on a preset with seekers only for pitch bend on tilt and vanilla synthPatch - but without any effect.

I'm not convinced that my experiments have been thorough enough though at this point, but I'm beginning to wonder whether this is something that's not actually being used by the Orba.

As an aside, I was poking around some of the sample sets and found a couple of sets that had samples at such a high pitch they were painful, and a couple that might have been above my (aged) hearing capability! Which sort of re-enforces the idea that there's stuff that just isn't used in the data and presets.

But I will do a bit more experimenting.

I had another thought this morning - I have been trying lead presets in isolation. But perhaps, just as chords can be "inherited" from the underlying song (Having the Ambieent song at the moment on the Orba  my Dulcihack preset now plays in minor - which is quite nice actually), possibly the bezier curves could also be inherited. It would make some sense since gestures may affect chords, bass and drums as well as the lead.

I've not been able to try out this idea properly yet though.

I'm working on a new utility to edit Bezier curves. Here is a screen shot of what is defined in the Chord Ambeeant Preset. It appears that only 2 of 8 curves are defined and the rest are all set to linear Bezier curves. This is the data from Pattern7.txt above. I'm going to load in the other 6 this weekend. The Bezier widget I found allows me to edit the curves so I can insert them into other Presets to see if they actually do anything?!


image


I was going to experiment further with the patterns you listed before but I got distracted with trying to get a couple of other presets working better or at all. I've sort of done with that now. (Although not entirely successfully - with a sample based preset I found that I lost the character of the instrument sound  - perhaps because I'd had to pitch correct the samples.) 

The second pattern is the closest to one that might do what I was looking for  - but would probably want something flatter at the start.  But I guess different curves will work better with different patches.


I'm finding the Orba to be a bit erratic when loading modified  presets and sometimes find I'm not actually getting to hear the effects of what I've done when I expect to.


I don't think I initially paid enough attention to the various curves when I started down this path. There are actually 3 types of curves: BezierCurvesEntry, GestureCurveAssignmentsEntry and EventCurveAssignmentsEntry. For example: 

<BezierCurvesEntry name="Default BezierCurves" bezierCurvesData="AAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0qEaNj21EUt/6RutF4UUA/v9GAP7/RgAAAAAAAAAAZ5gZRsLVo0N7UDhGUt/6RgD+/0YA/v9GAAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0KEZx9ChGcfSoRnH0qEYA/v9GAP7/RgAAAAAAAAAAcfQoRnH0KEZx9KhGcfSoRgD+/0YA/v9GAAAAAAAAAABx9ChGcfQoRnH0qEZx9KhGAP7/RgD+/0YAAAAAAAAAAHH0KEZx9ChGcfSoRnH0qEYA/v9GAP7/Rg=="/>
<GestureCurveAssignmentsEntry name="Default GestureCurveAssignments" curveAssignmentsData="AQUFBQUFBQUFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEFAQEBAQEEAQEBAQE="/>
<EventCurveAssignmentsEntry name="Default EventCurveAssignments" curveAssignmentsData="AQEBAQEBAQEBAQEBAQE="/>

 I in correctly assumed they were all Bezier curves, but only the first node actually mentions "Bezier". The data from the others (Gesture & Event) is certainly something else. I'll come back to these since I now have a clear path on Bezier curves, but I haven't quite figured out what the other curves are. 

Login or Signup to post a comment