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

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")

Yes, I had been trying to make a chord preset which would emulate a mountain dulcimer which has two drone strings and two strings in unison for melodies and is fretted for a diatonic scale.  My attempts failed and I had thought this was either because I had settings for two notes the same or because the overall (or perhaps partial) range was over some limit (possibly two octaves). I discounted the first option, except that it seemed to result in the monophonic effect sometimes. 

I noted that some of the factory presets set two notes the same - so maybe you can get away with two notes set the same , but with three or more you get the error? The range issue I put down to a protection against having a setting that would try and play notes outside the range the Orba can handle.

I have one last idea to try and get what I was trying to achieve but if that fails I will abandon the plan. 


I reported the chords as a second lead preset effect because I felt it could be useful and fairly straightforward to implement.


BJG145 noted a similar sort of thing that made the lead behave like a chord preset. I confess I wasn't sure about that - it seemed unlikely to me that the seeker entry would do that. But I haven't experimented with it - it didn't seem to me to have an advantage to it.

@subskybox - when you made the Clarinet preset how did you determine the loop values? I now understand the concept of frames a bit and am comfortable about finding a value to avoid the first attack of the sound but I wonder if there is anything I need to know to get a clean sounding loop and set an appropriate end point?

I have it mind to make a set (or two) of flute sounds if I can.

From the technical perspective,  I can quote SF2 specification. It is a virtual sampled instruments format,   not the same as in  Orba, but I  had successfully used the same loop points as in original SF2 files and it sounded well, so I suppose the same rules apply.


"The loops are defined by “equivalent points” in the sample. This means that there are two sample data points which are logically equivalent, and a loop occurs when these points are spliced atop one another. "

....

"The eight data points (four on each side) surrounding the two equivalent loop points should also be forced to be identical. By forcing the data to be identical, all interpolation algorithms are guaranteed to properly reproduce an artifact-free loop."

Basically it means that amplitude data (wave "height") at the loop point is the same in the loopStart and loopEnd,  and surrounding frames are  similar as well between two points.


I guess it is mandatory to follow this rule to get a a loop without a click, but still does not guarantee a perfect sounding loop.


As for how exactly to achieve that - I am not sure, sorry, as I have no such experience, but keyword for googling the options would be "sample loop points", as "loop points"  seems to be a common term for this thing.


And, loop parameters in orba are defined in "frames" not "time",  as far as I can see you already got it correctly.

---

P.S.

You might try Polyphone editor for SF2 fonts,  I recall some tool for somewhat automate searching loop points in wav samples  in there, and loop points were shown in frames if I am not wrong. 

(https://youtu.be/keCSodUsj2k?t=166)


@Subskybox - Many thanks for that indeed. I use Audacity -  what I was going to try, but haven't tested out yet, was to choose an area then zoom in to see the wave shape and adjust it's start and end to a matching point of the wave shape then take the times and multiply them by 48000 - but I had no expectation that his would actually work properly, or at all!

Your explanation is just what I was looking for and I can certainly give that a go.


Well I got impatient and tried loading my experimental flute preset. There was only a single octave of samples and I had found audacity wasn't too happy about the frequencies - one sample it identified in the wrong octave.

So the results - it sounds much breathier on the Orba than the sample did on the computer. Second, the loop (only on the lowest note sample) pulsed a bit, but worked. I guess I need a longer loop area.

I tried playing with octave settings - sometimes I can get three octaves, sometimes only two.

Finally, and I've seen this before, but it has disappeared later, is that in the lower octave the scale jumps down an octave from key five onwards.

If I can get it working a bit better it's usable, at least.

I'd like to report that I finally got around to trying my stereo samples experiment. Unfortunately, it did not work.


What I created was a sound that repeated the word "left" for about 5 seconds on the left channel and repeated the word "right" on the right channel for the same duration. I then created a simple preset using this sample. The result was that I could hear "left" & "right" at the same time. The "left" and "right" may have been coming from separate sides of Orba 2 but I can't confirm. I'm not sure if there are two separate speakers in there or not. I believe @BJG145 showed there was only one speaker in his teardown of Orba 1. I tried with headphones and the channels were merged (branched mono).


I then wired the Tilt gesture to Controller# 8 & 10 (which are typically the MIDI controller numbers associated with Pan/Balance). I had hoped I could hear only "left" to start and only "right" when I titled Orba. Booo! This had zero effect. 

I think we've experimented with everything we've seen in the xml: SynthPatch, ModifierChain, SeekerList, BezierCurvesEntry, etc...


The last frontier appears to be PatternList. My interpretation of this is looped MIDI patterns. I've seen an old Orba 1 promo video where someone held down a pad and it looped some type of arpeggio. This would appear to be the MIDI equivalent of a Stem. I have no idea if these are currently active but I assume they are (otherwise why do these nodes appear in a .artipreset file?). I read in the old release notes for Orba 1 something about them.. I'm thinking maybe if I download some of the very early versions of the Orba 1 App, that maybe there are some presets with patterns defined. Based on the attributes however, I assume that patternData is MIDI data similar to how it is defined in a song LoopData->eventData. And that patternDuration is the same as nBars. I doubt I'll be successful, but I'm going to give it a try next.

 

Turns out old versions of the App had a folder structure like this:


├───Loops

│ ├───Bass

│ ├───Chords

│ ├───Drums

│ └───Lead

├───Patterns

│ ├───percussion

│ └───tonal

├───Presets

│ ├───Bass

│ ├───Chords

│ ├───Drums

│ ├───Lead

│ └───Mixer

├───Songs

├───Sounds

│ ├───Bass

│ ├───Chords

│ ├───Drums

│ └───Lead

└───UpdateUtilities

    ├───artiphon_esp32_programmer

    ├───capsense

    └───dfu-util-win


No presets included PatternLists which I assume is the same as Loops. I was able to save a empty Loop which generated an xml structure like this:

<?xml version="1.0" encoding="UTF-8"?>

<LoopEntry name="Test" tempo="120.0" length="0.0" timeSignature="4/4" key="C"
           tagList="Test" coverImage="" description="Test">
  <MidiSequenceEntry name="" midiSequenceData=""/>
</LoopEntry> 

  

@Subskybox - I had wondered about PatternList but assumed they were not used - until I noticed there was something there in a particular drum preset - but I can't recall which one, and it looked specifically drum related. Since percussion is something I don't do (friends keep me well away from drums etc.), I didn't pay much attention to it.

I had a quick look to see if I could find it again, but failed. Thinking about it, I think I got the impression it defined a drum pattern (for one bar presumably) and how many times it should be repeated. But like I say, I wasn't paying attention. I guess I was considering whether drum presets would be better for making Hangdrum presets than Leads (but only out of curiosity) - if that helps to find it.

Perhaps it was this I was thinking of - though I'm not sure if offers much insight:


(Can't recall where I found it.)

song

So I looked at that Quantized2.song file to see if  could find any sense to the PatternLists in it. The only thing I could suggest sounds, frankly, a bit crazy. I don't think the lists are actually doing anything in this example.

I wondered whether this could allow different settings to be used in different circumstances. Since the patterns here are about scales - maybe you could for example, and for some weird reason, make the lead preset play in the major scale, except for say, when you transpose the song to G major,  when you could set the scale to pentatonic instead.

Assuming that could be the case, perhaps it might be possible to do something similar with, say, pitch bend and make it only function on certain notes of the scale. Of course here, I'm making huge assumptions! (But I rather like the idea.)

@DavidBenton I've seen structures like that before but I'm not sure what they are. That may be a song I uploaded long ago?! I remember messing around with quantization on Orba 1 and re-created a Daft Punk song loop.

Login or Signup to post a comment