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

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 just did a quick try of this in Audacity. On first try pressing Z found  zero crossings - but not in a similar part of the shape. Zooming in even more I found I could correct that by hand and get a smooth loop. But on another attempt Audacity did get equivalent points first time and got a smooth loop.


Just a note for others reading this - it's better if you have a good length of carefully chosen loop area - my sample had some vibrato, so I had to try and pick parts and points with as even amplitude as I could.


I made a small set of samples just to try it out on the orba - if that seems to work well enough I will start again with a better set.


1 person likes this

@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.


@DavidBenton: For the Clarinet, I used Audacity to find the loop points. The start and end points are the Sample#, not Time (as you figured out). You can set Audacity to show the selection range in samples rather than time:

image

What you need to do is just guess roughly the area you want to loop and then press 'Z'. This will move the edges of your selection to the nearest 0 crossings.


image


Next, set Loop to Selection and then play the loop to make sure it sounds clean. You will likely have to repeat this process 4-5 times until you find a clean looping point. Once you do, immediately type these numbers into your .artipreset file for the given sample. It's tedious but it worked for me.



1 person likes this

@Ignis32 - yes, I had thought loop points might have been time based - but I have learnt better since!

I don't want to use existing sound fonts - I was planning on making my own, and I'm not too keen on the idea of having to figure out about them first.

What you say partly supports what I might have first tried which would be to calculate a start point and try an end point by adding a number that would be a multiple of 16 - that should tie in with what you have suggested. So thanks for that.

I have tried looking at Juce documentation for hints about things like this - but it hasn't really helped much! (And I barely understand most of it.)

It will take a bit of time for me to get round to making the samples so I'll see what else I can find in the meantime.


I almost fell into the trap that bricked your Orba, if I recall correctly. I was trying to make a lead preset from a chord preset - I found the eventSource="Modifier 0 0" caused the Orba to crash and reboot. Luckily it didn't do more than that. I deleted the preset, and edited out that entry before restoring it and all was well.


1 person likes this

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 - 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.

Ah, I've just tried that last attempt I mentioned above. The result works (with lots of pairs of the same notes in the chordLists - it's not quite what I'd hoped but it works (hurray!) and sounds rather nice, but in a different way intended. (There were some compromises to avoid failure.)

My first attempt though sounded very different in the minor. I tried changing the audioEngineMinor parameter in the compatibility section in SynthPatch to match the major sound parameter and hey presto it worked - making them sound the same in tone. (I had not previously expected these parameters to do something like that.)


I will wait a bit and test this out a bit more - just to see if it behaves itself. If it stays good I will post it on the appropriate thread.


1 person likes this

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.

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

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.

@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.

@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.


1 person likes this

@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]


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.

Login or Signup to post a comment