Topic: Stripes (Tritone)

I might as well post this here since I remembered I have an account here. First piece of music I made this year as a whole.

https://soundcloud.com/moviemovies1/str … ectrum-48k

Still most comfy with the Tritone engine after all these years.

Re: Stripes (Tritone)

Very good track. Particularly like it from 47 secs in where the bass kicks in. Sounds like way more than 3 channels

Re: Stripes (Tritone)

Wooo MovieMovies1, long time no see! Fantastisk track, still rocking the beeper like a boss, I see wink

Re: Stripes (Tritone)

It's nice to see that people like this track, I'm very happy with it myself.

I do find myself a bit frustrated with the xm2tritone conversion tool nowadays with how it handles detune. It treats E5x as a direct -8 to +7 to the frequency, which is highly ineffective due to how frequencies are done in Tritone. I've looked at the converted music asm files and each note is stored as a direct frequency write from 000h to 0xFFFh, so it would definitely be possible to rewrite the XM converter to make things correlate to a linear pitch assignment using a lookup table or similar, but I wouldn't be able to do that myself given my lack of programming skills. I do think it'd be a huge benefit though as it'd allow for much more fine detune control without having to dive into the music data file and manually edit the frequencies directly.

Re: Stripes (Tritone)

I think I could hack something like it into the converter. What exactly should those 15 steps in E5x represent, though? E58 is no detune of course and then I guess E50 should represent -¼ tone and E5F should represent +¼ tone. I don't like the idea of having a lookup for this, so I'd prefer to have a formula in the form of

freq = freq_base + (E5x_param - 8) * something_something

6 (edited by MovieMovies1 2025-01-20 00:50:09)

Re: Stripes (Tritone)

A formula is definitely the more elegant solution, I just thought of a lookup table first for whatever reason (probably my non-programmer brain).

As for how the E5x effect works in the XM format, it's in ⅛ semitone steps, or 12.5 cents, from one semitone lower to ⅞ semitone higher:

E50 = -100 (1 semitone lower)
E51 = -87.5
E52 = -75 
E53 = -62.5
E54 = -50
E55 = -37.5
E56 = -25
E57 = -12.5
E58 = 0
E59 = +12.5
E5A = +25
E5B = +37.5
E5C = +50
E5D = +62.5
E5E = +75
E5F = +87.5 (⅞ semitone higher)

Another thing I've also noticed is that the overall tuning of Tritone is slight off from standard A=440Hz tuning. Clock speed and memory contention both seem to affect just how much, as different models produce different deviations from standard tuning. Using the current xm2tritone's tuning table conversions I recorded a test tone of what should be an A at 440Hz from different models in an emulator:

   48K: -34 cents from A=440
  128K: -11 cents from A=440
+2A/+3: +22 cents from A=440

As can be seen the 48K at 3.5 MHz with contended memory is downtuned the most, where the 3.5469Mhz 128K is a bit higher, while the +2A/+3 is even higher in pitch owing to the memory in use being uncontended. I think it might be neat to perhaps be able to set a custom tuning, to be able to perhaps compensate for this or just for the purposes of achieving alternate tunings, but this is absolutely not a necessity, moreso a curious observation.

Re: Stripes (Tritone)

Hmm, having a range of -1 - +⅞ semitune would make sense from a "least surprise" pov, I guess. Otoh we could have twice the resolution if we do half of that range, since with the former setup, ranges actually overlap. Then again I'm not entirely sure it's even possible to represent that with 16-bit frequency resolution. Hmm... I'll work something out and then you can test to see what works best for you.

As far as custom tuning goes, that'd be a bit more involved, so I'd rather pass on that for now, even though I would very much like to have that available myself. Bintracker will eventually support that kind of thing, hopefully.

Re: Stripes (Tritone)

-1 to +⅞ semitones would definitely be the optimal way to go I feel. It does technically introduce some overlap in detuned notes, but that can make it easier to think about how to apply detunes more logically, and the less discrepancies between the source module and the compiled files the better I think. ⅛ steps gives plenty room for working with fine pitch changes, though Tritone can definitely handle 1/16 steps very well with its 12-bit frequency resolution (I discovered it's 12 bits when I checked the .asm music data, each note is made up of 16 bits, but only 12 of those bits are the frequency data. Seems to work the same as the Famicom Disk System's frequency register, was able to hack a copy of Dn-FamiTracker with an appropriate clock frequency to get matching frequency data between it and Tritone)

The custom tuning I was thinking of was moreso a global detune for everything to compensate for the different global pitch of different spectrum models that could possibly be relatively easy to do, but it's not of much importance either way. Per-note detune would be too complicated, especially for XM conversions.

9 (edited by Shiru Yesterday 12:49:25)

Re: Stripes (Tritone)

It is easy to change pitch, the converter calculates frequency table in runtime, deriving it from 3500000 Hz clock frequency. This value is valid for russian clones, but obviously a bit off for original 48K or 128K models. The problem is that Tritone was made so long back, so its XM converter was in C, and it takes a recompile to change that. Later engines had a Python converter that is easier to modify.

website - 1bit music - other music - youtube - bandcamp - patreon - twitter (latest news there)

10 (edited by utz Yesterday 22:45:09)

Re: Stripes (Tritone)

Ah yes, of course. I was completely fixated on non-standard tunings somehow. I suppose overall pitch could be made configurable through a command line switch.

Edit: Variable pitch implemented. xm2tritone now takes a value for the CPU speed as an optional second argument after the filename.

Re: Stripes (Tritone)

Unfortunately the executable you shared gives me an error when I try to run it, says it's a 16-bit application for whatever reason and then doesn't do anything. Unsure why it's being identified as a 16-bit application as it definitely is not one. I tried running it inside of DOSBox out of curiosity, but there it just hangs the command prompt indefinitely.

12 (edited by utz Yesterday 23:06:44)

Re: Stripes (Tritone)

Whoops, actually paying attention while compiling may help lol

Edit: Added the upgraded E5x support, as discussed. Pls let me know if it works as intended.

13 (edited by MovieMovies1 Today 00:30:19)

Re: Stripes (Tritone)

EDIT Upon further testing it seems to not detune properly either. I'll test further

EDIT 2: I see what's happening now, an E5x detune is making things an octave too high as I stated at first, but each detune step is 1/16th instead of 1/8th of a semitone, i.e. an E5C results in +25 cents instead of +50 cents. If the octave-too-high bug and the strength of each detune is changed to 1/8th, I think this would be perfect.

EDIT 3: Attached a module file that could be used to test. Wanted to attach the resulting .tap file as well to show how the detune goes wrong but I can only attach one file and I cannot delete the attachment to replace it with a .zip archive containing both.

original message:
It almost works properly, but every note with an E5x effect is for some reason a whole octave up from what it should be. An E5C effect on a C-4 results in a detune of +1250 cents instead of the expected +50, and even an E58, which should be no change at all, results in notes going up a whole octave. I'm really not sure what would cause this and I don't know programming well enough to go in and fix this myself (I do appreciate that you shared the source code though!)

Post's attachments

dt-test.xm 20.04 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

14 (edited by utz Today 00:42:53)

Re: Stripes (Tritone)

Thanks for figuring stuff out! I should get some sleep, but here's one last quick attempt before I do that.

D'oh! Screwed it up again if I'm not mistaken. Ctrl+F "0.25", change to "0.125", if you wanna compile yourself, otherwise I'll upload a new binary tomorrow.

Post's attachments

xm2tritone.cpp 5.54 kb, 2 downloads since 2025-01-22 

xm2tritone.exe 225.5 kb, 2 downloads since 2025-01-22 

You don't have the permssions to download the attachments of this post.

15 (edited by MovieMovies1 Today 01:23:01)

Re: Stripes (Tritone)

The octave problem is fixed now, but now each E5x step is 25 semitones! So close... Inspecting the source code I think the octave going too high in the older code made the cents value not work properly, so with the octave bug fixed it the detune strength should be left unchanged. I'll try my hand at compiling it myself since it seems like an easy enough fix to make on my own, I'll just have to install Visual Studio first.

EDIT: All fixed up! Works perfectly now. Added a fixed executable along with the source in an attachment. Thank you so much for this, this will be of great use, and hopefully not just for me. The usage information could probably still be edited a bit to add credit to you, as well as add usage info on the new optional clock speed parameter, but I'll save that for another day.

Post's attachments

xm2tritone-linearpitch.zip 10.49 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

16

Re: Stripes (Tritone)

MovieMovies1 : You wouldn't be at all interested in sharing your music code would you?
Would you be interested in hearing how it sounds on a Jupiter Ace, TRS80 model 4, a Microbee or an Aquarius?

Just curious. And I do fully appreciate your viewpoint if you are not wanting for your music to go out.