sbechet / xmrsplayer

Mirror of https://codeberg.org/sbechet/xmrsplayer
MIT License
7 stars 1 forks source link

a playback inaccuracy (handling Amiga periods as if they're linear) #5

Closed RepellantMold closed 6 months ago

RepellantMold commented 6 months ago

I had noticed that some portamento slides were off during a fast section when I attempted to play one of my latest songs that was released in XM format called Jaded Nostalgia (the section in question is at 125 BPM / 2 tick speed).

The module with just the part and a lot of channels removed so you can focus on the lead fast_port.xm.zip

Below are downloads to audio clips (since wave files are not uploadable :/)

XMrsPlayer (latest main branch)

OpenMPT 1.31.05.00

MilkyTracker 1.04.00

FastTracker 2 Clone v1.77

sbechet commented 6 months ago

Hello RepellantMold,

Thank you for your report. You right.

Over the next few days, I will finish creating the necessary abstractions to make the effects code more readable. Then, I plan to look in more detail at the algorithms in FT2-clone and I hope to be able to correct your problem quickly thanks to your example..

sbechet commented 6 months ago

Hello,

I found (an understand) the bug.

XMrs bug beetween linear and amiga period. I will make the changes as soon as possible.

FastTracker II Clone

printf("period:%d->%d, speed:%d now:%d",ch->realPeriod, ch->wantPeriod, ch->portaSpeed, ch->realPeriod-ch->portaSpeed);

period:884->441, speed:16 now:868 period:868->441, speed:16 now:852 period:852->441, speed:16 now:836 period:836->441, speed:16 now:820

period:820->441, speed:32 now:788 period:788->441, speed:32 now:756 period:756->441, speed:32 now:724 period:724->441, speed:32 now:692

period:692->441, speed:252 now:440

XMrsPlayer

print!("period:{}->{}, speed:{}", self.period, self.tone_portamento_target_period, self.tone_portamento_speed); ... println!(" now:{}", self.period);

period:3873->3105, speed:16 now:3857 period:3857->3105, speed:16 now:3841 period:3841->3105, speed:16 now:3825 period:3825->3105, speed:16 now:3809

period:3809->3105, speed:32 now:3777 period:3777->3105, speed:32 now:3745 period:3745->3105, speed:32 now:3713 period:3713->3105, speed:32 now:3681

period:3681->3105, speed:252 now:3429

sbechet commented 6 months ago

Can you try again with xmrsplayer and xmrs in version 0.4.2^H3 for amiga and linear freq compatibility please :-)

RepellantMold commented 6 months ago

Testing it again with the version you suggested, and it now sounds correct.

sbechet commented 6 months ago

Hello,

I have a very strange things. I'm using ft2-clone for test.

t2.zip

Here you find t1_remove1and2.xm where i simply remove track 1 and track 2: music sound seems correct with ft2 but bad with xmrsplayer.

Then i decide to save instrument 2 in t1_2.xi and track 3 in t1.xt. I create a new project in ft2 then load instr and track. Here you find the result: t1_copy_past.xm.

Now sound is the same using ft2 and xmrsplayer. But music track is ugly for all.

Do you have an idea?

sbechet commented 6 months ago

I don't understand the previous problem, but the auto-vib bug seems to be fixed in version 0.4.6

sbechet commented 6 months ago

I'm just discovering the openMPT test cases. I'll try to take a look at it in the next few months.

RepellantMold commented 6 months ago

Hello,

I have a very strange things. I'm using ft2-clone for test.

t2.zip

Here you find t1_remove1and2.xm where i simply remove track 1 and track 2: music sound seems correct with ft2 but bad with xmrsplayer.

Then i decide to save instrument 2 in t1_2.xi and track 3 in t1.xt. I create a new project in ft2 then load instr and track. Here you find the result: t1_copy_past.xm.

Now sound is the same using ft2 and xmrsplayer. But music track is ugly for all.

Do you have an idea?

well my song doesn't use linear slides (something I admit I should've brought up first), and t1_copy_past.xm has linear slides turned on

sbechet commented 6 months ago

Do you have an idea?

well my song doesn't use linear slides (something I admit I should've brought up first), and t1_copy_past.xm has linear slides turned on

oops second time with the same problem! I changed a lot of things to have more abstraction and less bug in v0.4.7.

I'm going to take a little break because making an accurate player is, I think, absolutely impossible to succeed nor is this the objective of this project..

However, I think I have a not too bad result now. I'll have to motivate myself to make a little editor around the player now then include new "instruments" like i want in xmrs (SID Instr, Rob Hubbard Instr, Euclidian Rythms Instr and midi).