[Doc updated] Weird noise artefacts appearing

What is Arkos Tracker? Forums Arkos Tracker forum Bug reports [Doc updated] Weird noise artefacts appearing

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #29864
    robpearmain
    Participant

    It could be one of a hundred things, but I have a simple two channel song playing in my game which loops.

    I am using a ZX spectrum 128k both emulated and real. On the third channel I play sound effects.

    After a while when the music has looped 10 or so times, I start to get weird noise artefacts appearing on the sound channel.

    Do I need to stop the sound on a channel before playing a new one, or is there anything else you could recommend.

    As I say, it could be one of a hundred things, but it seems like the song, or channel is getting corrupted over time.

    I am using the minimal player

    #29865
    Targhan
    Keymaster

    No idea what the problem could be. There is no need to stop a sfx before playing a new one. To eliminate all possible side-effects, could you first make a try with only the test sample of the package? If the problem still occurs I can investigate if you send me the music and sound effects.

    #29866
    robpearmain
    Participant

    Hi

    I have created a video of the issue (Starts about 3 minutes in to it)

    Background Click

    I will send you the source code once I find somewhere to share it (I will edit this post)

    Essentially, the demo program plays a simple 2 channel tune. Pressing the ‘1’ key fires off 6 FX (Channel 3) in rotation. After a while, a background click starts to appear.

    I have tested again in my game, and if you do not play an FX the music repeats with no issue. However, if you play an FX, after the same time, approx 3 mins the background noise appears.

    I wonder if it is due to no music playing on the 3rd channel or if the FX is corrupt somehow.

    It seems to be after the music has repeated 16 times or more

    Here is a video of my game and the error (About 2 mins 40 in to the video)
    In Game Sound Issues

    #29867
    robpearmain
    Participant

    Hi

    Link to the source code is here (And a tap file)

    Source Code for Test

    To compile to TAP

    pasmo –tapbas musictst.asm musictst.tap

    #29868
    Targhan
    Keymaster

    Ok, received. I’ll check that as soon as I can. Thanks for all the info!

    #29869
    robpearmain
    Participant

    Excellent

    Arkos Tracker is so good, and I really appreciate all the effort you put in to it! If you need any more information or testing, please ask

    Rob

    #29870
    Targhan
    Keymaster

    I don’t reproduce this on CPC… I suspect your Pasmo-generated code. You used Disark to generate your code, right?

    #29871
    Targhan
    Keymaster

    Do you think it would be difficult to you NOT to use Pasmo, but only Rasm, only a test (so, no Disark)? If yes, don’t bother.
    It’s just that it’s not easy for me to debug on other system than CPC, I don’t have the tools.

    #29872
    robpearmain
    Participant

    Yes, I used Disark to produce the pasmo code

    I will test just using Rasm as you suggest and get back to you with my results ASAP

    Thanks

    Rob

    #29873
    Targhan
    Keymaster

    Ok, found the problem (didn’t find the reason, but it’s related to Disark). It’s late so I’m going to invest it tomorrow. But in pnpmusicpasmo.asm, line 228:
    ld (PLY_AKM_TRACK1_PTINSTRUMENT),de
    ld (1748),de
    ld (1786),de

    This is wrong of course. The PLY_AKM_TRACK2_PTINSTRUMENT and 3 are not well relocated (they are not declared). I’ll correct this as soon as possible. As a quick patch (I didn’t test it though!!)
    ld (PLY_AKM_TRACK1_PTINSTRUMENT),de
    ld (PLY_AKM_TRACK2_DATA + 10),de
    ld (PLY_AKM_TRACK3_DATA + 10),de

    Basically, it has nothing to do with the sound effect. Or another even quicker patch, you could simply add a RST sound (or any silent instrument) on the 3 channel, and you’re done! 🙂

    #29876
    Targhan
    Keymaster

    Ok, found the problem in the player. This is only a Disark problem. from the lines 228, simply add these two labels. Disark will know what to do with them :).

    ld (PLY_AKM_Track1_PtInstrument),de
    DisarkForceReferenceDuring3_PtInstrumentTrack2:
    ld (PLY_AKM_Track2_PtInstrument),de
    DisarkForceReferenceDuring3_PtInstrumentTrack3:
    ld (PLY_AKM_Track3_PtInstrument),de

    I won’t make a new release for this though, unless I find other problems in the other players. My only gripe is that my test units should have found this kind of problem! I will have to check that.
    Thanks a lot for the report!

    #29879
    Targhan
    Keymaster

    Ok, good news! It is not a bug :).
    But the RASM command line is actually wrong:
    rasm PlayerAndMusic.asm -o PlayerAndMusic -s -sl
    It should be:
    rasm PlayerAndMusic.asm -o PlayerAndMusic -s -sl -sq

    Some labels were not exported. Which is why my test units couldn’t reproduce the bug, because the integrated version I use automatically export ALL the labels.

    So don’t modify the .asm file like I told you before, simply update the RASM call. Tell me if it works for you!

    I’ve updated the documentation accordingly.

    #29881
    robpearmain
    Participant

    Hi Julien

    Tested, and all working

    So the issue was rasm

    -sq export also EQU symbol

    Thanks for hunting this down,

    Best Regards

    Rob

    #29882
    robpearmain
    Participant

    Note,

    Using a song in production, using any assembler

    Doc needs updating

    Thanks

    Rob

    #29884
    Targhan
    Keymaster

    Good catch!! Updated. Thanks!

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.