TX81Z algorithms


#1

Here's my patch which implements all 8 TX81Z algorithms. I realised after finishing this patch that DrJustice had implemented more or less the same thing ages ago, albeit in a slightly different way. It was a fun exercise regardless. It sounds decent IMO, although the turning up the feedback on OP4 seems to get a bit glitchy.

Files:
TX81Z_newobject.axp (43.7 KB)
pwm operator.axo (2.1 KB)

I would like to take this further in terms of accuracy, firstly by implementing the 7 other waveforms available on the TX81Z, but I'm not 100% sure how. To me, they look like slices and permutations of a sine wave. Does anyone have insight into how this could be done? Link for reference, they are drawn on page 19 of the PDF and their harmonic content described on page 51:

https://www.manualslib.com/manual/779968/Yamaha-Tx81z.html

and here they are displayed on an oscilloscope:


#4

Looking forward to playing with it. Regards the glitch you mention, maybe jiggle the related objects around the screen a bit as it could be something to do with the execution order positions, and it just might fix it!


#5

Hi! I found this picture illustration of the waveforms:

I can't try it out at the moment, but I think something like the second waveform could be achieved by running a sine oscilliator through a sss/math/expCurveA object. The third one might be possible by running it through a half-wave rectifier like dist/rectifier and number four by putting that through an expCurveA. The other ones, from 5 to 8 I have no idea how to reproduce, as it looks like the same waveforms ran twice as fast but only half of the cycle. Maybe they can be achieved by doubling frequency and multiplying with a square wave (which would have to be in phase with the oscillator)?


#6

Hi @borututuforte,

You can "sync libraries" and have a look at the help patch
menu bar Help -> Library -> community -> tiar ->PIW -> oscExtended

The PIW/osc is a "pre integrated wave" oscillator. It is capable of antialiased phase modulation.

It is based on a formula defined waveform.
This waveform is calculated at init by a PIW/gen object.
You can click the Edit of the PIW/gen to see the formula.


At present, the PIW oscillator is only capable of addressing a single waveform.
I'm working on a more advanced one that will be able to change waveforms on a wavetable.


#7

Awesome, so that's already there! As usual just hidden under a slightly cryptic name that doesn't ring a bell for someone like me. How is it going to be able to change waveforms, by using more memory or will it recalculate the waveform?

Also i read your instructions here and I'd like to experiment with this, could you explain a bit more about what syntax is possible? For example what is "f" and what does "?" do?


#8

Hi:
I owned a TX81Z for 25 years (I just sold it a few months ago because I moved overseas).
I don't think you need to implement those extra waveforms, of course if you want to do it is allright but I don't think that they add anything interesting to the sound.
First of all there is no factory patches in the TX81Z that uses those extra waveforms, also I never found a third party patch that uses them either.
I tried several times to make patches with them and found that always add an unpleasant buzzy tone in the upper harmonics, increases the alliasing, and most of them don't sound much different to a sine in the lower harmonics.
May be using them with a low pass filter at the output could make more sense as you can filter out the buzziness.
Anyway I'm in the process of doing a TX81Z implementation myself, at some point my goal will be to make it accurate in other aspects (envelope times and behaviour, modulation depths, etc) so I can reproduce some of the TX81Z sounds I love (and miss).
I will try your patch soon :slight_smile:


#9

there is no factory patches in the TX81Z that uses those extra waveforms

Are you sure? There's a gearslutz thread with synth-nerds arguing that the famous "lately bass"-preset can't be faithfully reproduced by another FM synth because it uses one of the extra waveforms. I love that sound on some cheesy 90s songs, so I'll probably try to patch it on the axoloti.


#10

I love the TX81Z, I own one and especially like the midi delay effect.
I have been working on a midi delay based on it, I'm pretty new to Axoloti so I guess it is pretty crude and could be reproduced in a better way, I also added some parameters i thought could be useful for me.

If you are working on the reproduction of this section from the TX81Z, I would be interested in seeing it!


#11

When I released this object, i planned to make some sort of tutorial but time flies...

So, it is a nice occasion to start one (and to work again on its XT / cross table extension).


I will focus on the functions that can be used for the classic waveforms found in DX/TX synths.

The waveform stored in the gen object are calculated and preprocessed for anti aliasing at initialization of the patch. Once calculated they are "static", hence a gain in CPU.

The syntax is C code.
In fact, it is a line of C code that is inserted in the object in its init procedure.

x is the float variable that varies from 0 to 1.

The function sin1(x) is a sine that makes a cycle when x goes from 0 to 1 (so you don't need to bother with pi coefficients).

sin1(x)                 // generates a one cycle sine wave
sin1(0.5f * x)          // generates half a sine wave
sin1(0.25f * x)         // generates a quarter sine wave
sin1(x)+0.5f*sin1(7*x)  // generates two harmonics (one and seven)

tri(x) is a triangle function, it can be provided with a secondary parameter that sets its symmetry.
It can be used the same way as the sin1(x) function.

tri(x, 0.333f) + 0.5f * tri(7*x)

A very useful trick is the C ternary operator

condition ? value for true : value for false

conditionnal ternary operator on wikipedia

Thanks to it, it is possible to set one portion of the waveform with a formula and an other portion with another.

 x<0.5f ? sin1(2*x) : tri(2*x,0.3333f)

#12

I have just uploaded the new XT (cross table) objects.
You can give it a try.
Sync library and Help -> library -> community -> tiar -> XT -> gen8

The gen8 is a cross table generator with 8 formulas/waveforms.
I formulated the 8 TX81Z in there.

Note: a single XT/gen8 can be used by many XT/osc .


#13

That's great stuff, thanks a lot. Super awesome that you included smooth crossfades between waves! The wave distortion part is also interesting. This could become my new favourite oscillator object. Cheers!


#14

Dude, thank you so much! I have been out of the country and unable to work on Axo coding but I'm going to mess around with your stuff tonight and see what happens. Do you know of any good resources for understanding the effects of aliasing in this context? I'm only aware of it in the context of pixels :slight_smile:

Thanks to @borututuforte @Sebo and @Paulus for your contributions too, hopefully between the lot of us we can make a really accurate patch!


#15

In "distortion mode", the XT/osc object acts like a look up table. So the functions put in the XT/gen8 can be used as distortion functions.


#16

In an image, aliasing occurs when a pixel represents the value of the image on a point.
To avoid aliasing, the pixel should represent the mean value under the surface of the pixel.

For audio, with a fixed sample rate, it is the same principle.
When a sample represents a instant in time, you may have aliasing.
If you calculate the mean value of the signal during a sample time interval, you can anti alias.

The integro differential method i use here, is based on this principle.

Other methods exist, each one with its + and -.


#17

Thanks, that makes total sense.

I've updated my patch to use your oscillators and it can now make some very crazy sounds, these oscillators are awesome. It's a bit more resource intensive, but that's to be expected. Still could probably do 2 note polyphony so it beats the Volca FM on that point :smiley:

Here's the updated file:

TX81Z_gen8.axp (48.3 KB)


#18

You make me doubt about it and I checked the Lately Bass sysex file with one TX81Z editor that I still have, just to see what waveforms are used (I don't have the synth so I can hear it) and indeed one of the operators uses a non-sine wave (the spheric one), so I was wrong...
Now, I'm not shure if I had the wrong idea that none of the patches uses the extra waveforms because most files I checked didn't use them and just missed the ones that does, or just I see that just a few use them and just tought there was exceptions and forget about them... It was a long time when I use the module intensively...
Sorry about the mistake.


#19

Maybe, you can gain some CPU by using DrJustice drj/switch/fm4op_alg :smiley:

I think that for operator 4 (the one with feedback but no modulation input) you can use tiar/osc/SelfPM


#20

Nice one, I'll give the fm4op_alg a go and see if that helps. I can't seem to find your SelfPM object in my library, though.

Switching from 'interp' to 'vintage' mode in the gen8 object also knocked off a good few DSP load percentages.


#21

I have made some modifications to @DrJustice fm4op_alg (removed the output clipper, the "feedback leaves" and "inleted" the algorithm selector). I put my version in tiar/mux

Here is a patch that uses it along with SelfPM osc as op4
(you should sync library before using it to get the modified fm4op_alg)

TX81Z_tiar.axp (14.3 KB)

The CPU load is almost the same but i think that we save some RAM.
I don't seem to have too much aliasing even with OP4 feedback and peaky waveforms.


#22

The "vintage" mode provides "stepy" waveforms. The waveform is still anti aliased, but with small wavetable size (64 and below), they can give a specific early digital flavor to the sound (phenomenon known as "imaging").
On my Axoloti 25% -> 21% cpu.