Author Topic: SIDex plugin  (Read 26565 times)

Sebby75

  • Posts: 37
Re: SIDex plugin
« Reply #100 on: 10 Oct '21 - 16:48 »
Malade,

Here is video... 

https://www.youtube.com/watch?v=19_64OwObfg

Crashes at
0:30
1:28
2:25
3:10
3:20
3:30

While I was recording it.. idea sprung to my mind...
I have noticed that it did not crash when i changed settings while song was playing... but it did crash EVERY SINGLE TIME when i changed settings while nothing was playing...
I think your plugin is trying to force song restart on pressing "apply" regardless whether anything is loaded and playing or not... and if there is nothing to restart.. it simply crashes.

Should have absolutely nothing to do with my config... all 3 machines tested are on Windows 10 64bit, one is 5 year old and the other two year old at most...
it was tested as described earlier....  xmplay.exe (latest stuff version 3.8.5.28) + your plugin + sids.. nothing else in directory, default xmplay.ini config is auto generated on first start..

Regards
Sebby75
« Last Edit: 10 Oct '21 - 17:29 by Sebby75 »

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #101 on: 10 Oct '21 - 18:41 »
Hi folks,
           thanks to Sebby75 for spotting a nullprt bug in the config code which was causing a crash when apply was clicked with no sid loaded or no sid in xmplay list, i would of never even thought about checking that but he found it , well done buddy !.

here is an update, enjoy.

:

v1.4a
- ( AKA : v1.4 internal rev )
- Added on the fly support for live voice muting / filter changes / surround ( some sound issues could remain and will require a manual stop and restart of the playing sid ).
- Code tidy / cleanup / optimized.
- Fixed crash when applying settings or clicking ok with no sid in playlist or no sid playing.
- Full sourcecode available at https://github.com/StronSon

report any bugs you find , thanks.

redownload if downloaded 3rd sid channel muting was enabled but not active.

Regards ,
            Malade.
« Last Edit: 7 Dec '21 - 18:45 by Malade »

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #102 on: 10 Oct '21 - 19:11 »
redownload attachment from the last post by me if you downloaded before edit,3rd sid channel muting was enabled but not active.

redownload for fix.

Sebby75

  • Posts: 37
Re: SIDex plugin
« Reply #103 on: 10 Oct '21 - 20:19 »
Malade,

You will hate me...

Please try this with 1.4a
Play any sid....   press stop TWICE...   go to options and hit OK button (=crash). I think that bug must still be at one other place in the code..

Also once it crashes... it seem to sometimes auto default on the next run to settings where 2nd voice of first sid, and 1st and 3rd voice of second sid are disabled,
(see screenshot) prior to crash all voices were enabled.

I have experienced this behaviour earlier with 1.2 and 1.3,  this is exact reason why I keep asking you WHERE voice settings are saved.. so that I can look post crash what values are stored in there...

I don't have time to test further today... but will try to use latest version tomorrow for a bit during the day and see if i come across any other bugs..

edit #1:
uploaded video showing what i have tried to describe above.. https://www.youtube.com/watch?v=LfiaytZD3dg
crash at 1:20 and right after restart you can see that some voices are disabled...

Regards
Sebby75
« Last Edit: 10 Oct '21 - 20:29 by Sebby75 »

Dhry

  • Posts: 130
Re: SIDex plugin
« Reply #104 on: 10 Oct '21 - 20:43 »
Also, if you click OK (either with or without changing any options) it stops playing the current track and moves to the next track in the playlist. If you have just a single track in the playlist it restarts that track, sure, but starting the next track in sequence on clicking ok seems a bit weird. But low pri.

if you would like to improve it feel free as the source is available
I'm absolutely not a developer and have to rely on you and KD to do updates to this, so as long as we're fine posting bug reports here (or on github if it comes to that), that works for me. Thanks for your efforts with this plugin.

DRS
« Last Edit: 11 Oct '21 - 08:10 by Dhry »

Sebby75

  • Posts: 37
Re: SIDex plugin
« Reply #105 on: 11 Oct '21 - 08:09 »

Also, if you click OK (either with or without changing any options) it stops playing the current track and moves to the next track in the playlist. If you have just a single track in the playlist it restarts that track, sure, but starting the next track in sequence on clicking ok seems a bit weird. But low pri.

if you would like to improve it feel free as the source is available
I'm absolutely not a developer and have to rely on you and KD to do updates to this, so as long as we're fine posting bug reports here (or on github if it comes to that), that works for me. Thanks for your efforts with this plugin.

DRS

your post looks unreadable... font is 2 pixel high...
And yeah.. it seem to be doing exactly what you have described... applying new options now skips to next track..
wish there was a way to disable this all together and tune would just carry on playing as it was in 1.1


Dhry

  • Posts: 130
Re: SIDex plugin
« Reply #106 on: 11 Oct '21 - 08:12 »
your post looks unreadable... font is 2 pixel high...
Fixed, sorry about that.
DRS

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #107 on: 11 Oct '21 - 15:51 »
Hi lads ,
           Ok ,i will look into it for you. ps sebby75 i dont hate you , glad that your taking the time to check it for bugs , i usually run it , let it go on its merry way for 20 minutes .. no crash > post .. in that order , good that your digging around and finding them. i will fix what i can but i am hitting some brick walls as the skip to next tune is intentional as for the life of me i cannot find a way to reset the tune the player and the time of the track all together without it crashing and it will not give me an error , it could have something to do with petite pack on xmplay somehow blocking the debug, so .. skip to next does it all for me.

an unpacked xmplay would be of great help but i cant find one so its trial and error at the moment.

dont worry lads ,it will eventually be polished and working 100% , if not il go back to the base and take out dual sid / surround maybe , just takes time to iron it all out, we will get there in the end , once the player is solid , updating to the latest libsidplayfp's wont be a problem at all. :).

Regards,
            Malade.
« Last Edit: 11 Oct '21 - 16:02 by Malade »

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: SIDex plugin
« Reply #108 on: 11 Oct '21 - 16:09 »
...but i am hitting some brick walls as the skip to next tune is intentional as for the life of me i cannot find a way to reset the tune the player and the time of the track all together...

Yep, unless Ian corrects me I'm pretty sure it isn't possible, that's why Fraggies old one would apply most settings on a new track instead of trying to do so in the middle. The filter levels and things like that could be dynamic but for the heavier things it was always on a new track.

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #109 on: 11 Oct '21 - 16:11 »
Malade,

You will hate me...

Please try this with 1.4a
Play any sid....   press stop TWICE...   go to options and hit OK button (=crash). I think that bug must still be at one other place in the code..

Also once it crashes... it seem to sometimes auto default on the next run to settings where 2nd voice of first sid, and 1st and 3rd voice of second sid are disabled,
(see screenshot) prior to crash all voices were enabled.

I have experienced this behaviour earlier with 1.2 and 1.3,  this is exact reason why I keep asking you WHERE voice settings are saved.. so that I can look post crash what values are stored in there...

I don't have time to test further today... but will try to use latest version tomorrow for a bit during the day and see if i come across any other bugs..

edit #1:
uploaded video showing what i have tried to describe above.. https://www.youtube.com/watch?v=LfiaytZD3dg
crash at 1:20 and right after restart you can see that some voices are disabled...

Regards
Sebby75

Hi Sebby , basicly its not saving options unless there is a tune playing or has been played ( which i know about but didnt previously in earlier versions ), and when it has been played , it crashes on the next option config save correct?

ps info: voice configs are not saved yet , they are are session only at the moment until i can fix the config , i could will add saving later.

Regards ( i still dont hate you  ;D ;D ),
                                                        Malade.

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #110 on: 11 Oct '21 - 16:17 »
...but i am hitting some brick walls as the skip to next tune is intentional as for the life of me i cannot find a way to reset the tune the player and the time of the track all together...

Yep, unless Ian corrects me I'm pretty sure it isn't possible, that's why Fraggies old one would apply most settings on a new track instead of trying to do so in the middle. The filter levels and things like that could be dynamic but for the heavier things it was always on a new track.

It could be done using writeprocessmemory and grabbing the pointer to the time pointer from xmplay and re-writing the memory , but i will do that later , the problem is restarting the tune , the way that libsidplay player plays is a continuous loop with no way but a hack to actually stop it playing so as for now its plodding along with a hack haltplayer to 'pause it' sleep then release it back to play , stop doesn't actually stop it , i pause it , change the config , load the tune then allow it to continue , must be a better way surely... but getting there but slowly.

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #111 on: 11 Oct '21 - 16:30 »
Hi all,
        test this please , see if it still has issues with config.

Code: [Select]
- removed nullptr check on
//if (sidEngine.m_engine)
{
if (initThis) {
sidEngine.m_config = sidEngine.m_engine->config();
Regards ,
             Malade.
« Last Edit: 7 Dec '21 - 18:45 by Malade »

Dhry

  • Posts: 130
Re: SIDex plugin
« Reply #112 on: 11 Oct '21 - 17:15 »
Not sure if this is still expected to be happening, but 1.4b still crashes if you:
1) Play any SID
2) Press stop TWICE in the player
3) Go into SidEX options and click OK - no need to change anything at all.

Would a dump file help troubleshoot this? I seem to recall there's a "procdump" command that you can use to get this out of XMplay.

Also: I've found that a lot of the tracks in Musicians\L\LMan have very audible clicks at the start of the tracks. Just might be useful for any future testing of power-on/click attenuation.

Cheers
DRS
« Last Edit: 11 Oct '21 - 17:26 by Dhry »

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #113 on: 11 Oct '21 - 17:31 »
Hi ,
    thanks for the info Dhry , in my next post there is a 1.4c attached ,i posted it in this post but it must of been missed somehow, download it and give it a try , the crashing should be fixed now , also i will look at procdump and Lman tunes , i have some of Lmans tunes in one of my playlists , very talented guy.


Regards,
Malade.
« Last Edit: 7 Dec '21 - 18:46 by Malade »

Sebby75

  • Posts: 37
Re: SIDex plugin
« Reply #114 on: 11 Oct '21 - 18:34 »

Hi Sebby , basicly its not saving options unless there is a tune playing or has been played ( which i know about but didnt previously in earlier versions ), and when it has been played , it crashes on the next option config save correct?

ps info: voice configs are not saved yet , they are are session only at the moment until i can fix the config , i could will add saving later.

Regards ( i still dont hate you  ;D ;D ),
                                                        Malade.

Malade,

I havent tested 1.4a that well to confirm what is and what is not being saved.... only re-checked for earlier crashes...
Basically when xmplay is started, nothing played and you change options in SIDex... it seems to work fine
When song is playing... again it seems to work fine...
But if you play any songs.. then stop it and unload it...(press stop twice).. then changing and applying SIDex options lead to crash...

Regarding voice settings... i would really prefer if these are NOT saved at all, and SIDex should default to all voices active upon starting XMPlay...
If what you're saying is correct (voice config not being saved).. then I cannot understand reason why some voices are disabled when XMPlay is restarted after crash??
It almost looks like after crashing it is taking default voice configuration from some surround settings.. (even when surround is not on)..

Regards
Sebby75

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #115 on: 11 Oct '21 - 19:55 »
Hi,

somehow between my last post and your latest post its been missed ( i posted an update ) , reposting it as an attachment now in this post.

the 3 voice config is a leftover from when i first added multiple sids at 0xd400 ( 2 sids 1 tune for the surround effect ) , it has been removed now so default is all voices on startup, regarding saving voices between restarts , i will make it optional in time , as for now voice config is not saved between restarts, resolve the crashes , get the player to a solid position , then we can move on with extra features if need be and most likely all will be optional.


update
v1.4c

post back with any issues you find ,thanks to everyone who's helping.

Regards,
Malade.
« Last Edit: 7 Dec '21 - 18:46 by Malade »

Sebby75

  • Posts: 37
Re: SIDex plugin
« Reply #116 on: 11 Oct '21 - 21:29 »
Malade...

Quick question... 

When surround is OFF and I am playing single sid tune... am I correct to say that left and right channel should be IDENTICAL?? basically mono sound... this is what I expect at least...

Plugin 1.1 produces exactly that... left and right is identical..
Plugin 1.4c produces slightly different waveform to left and right channel... which I can hear as a bit of an echo/spatial effect...
sidplayfp... left and right identical

again, forgive me if I'm wrong but... it looks to me like your version of plugin is emulating two sids for single sid tunes... SID1 is playing all 3 voices and outputting them to left channel.. and SID2 is playing same 3 voices and outputting them to right channel...   somehow output to each channel is slightly different.. whether filter settings are different for each of them.. or something else...  Why not emulate only one sid for single sid tunes when surround is disabled?? and direct identical output to both channels... 

attached screenshots as follows:
SIDex1.1  waveform
SIDex1.4c waveform
SIDed1.4c used settings
sidplayfp waveform used option -s (force stereo)

Used Last Ninja 3 (subsong 7) in all cases..
« Last Edit: 11 Oct '21 - 21:53 by Sebby75 »

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #117 on: 11 Oct '21 - 21:52 »
Malade...

Quick question... 

When surround is OFF and I am playing single sid tune... am I correct to say that left and right channel should be IDENTICAL?? basically mono sound... this is what I expect at least...

Plugin 1.1 produces exactly that... left and right is identical..
Plugin 1.4c produces slightly different waveform to left and right channel... which I can hear as a bit of an echo/spatial effect...
sidplayfp... left and right identical

again, forgive me if I'm wrong but... it looks to me like your version of plugin is emulating two sids for single sid tunes... SID1 is playing all 3 voices and outputting them to left channel.. and SID2 is playing same 3 voices and outputting them to right channel...   somehow output to each channel is slightly different.. whether filter settings are different for each of them.. or something else...  Why not emulate only one sid for single sid tunes when surround is disabled?? and direct identical output to both channels... 

attached screenshots as follows:
SIDex1.1  waveform
SIDex1.4c waveform
SIDed1.4c used settings
sidplayfp waveform used option -s (force stereo)

Hi Sebby75 ,
                  yes that is correct ,eventually an extra drop down box for each sid to force sid chip types will be added , for sid 1 ( 6581 / 8580 ), sid 2 ( 6581 / 8580 ) and sid 3 ( 6581 / 8580 ) type , 2 sid chips are active for now while its being tested, 1 for 6581 and 1 for 8580 to debug surround , when the final v2 is finished there will be 1 channel mono , 2 channel stereo , 3 l+m+r channel surround .

thanks for pointing it out buddy i may not of known, concentrate on finding bugs if any that crash the player , if there are any let me know so i can start to finish up and go to work on fixing up the bonus parts and aesthetics of it all.

Regards,
Malade.

Dhry

  • Posts: 130
Re: SIDex plugin
« Reply #118 on: 12 Oct '21 - 23:14 »
Found a bug in 1.4c. Seems to have to do with surround playback.

1) Switch surround on.
2) Play Galway's immortal Arkanoid track - http://deepsid.chordian.net/?file=/MUSICIANS/G/Galway_Martin/Arkanoid.sid - take note of how clear and loud the drums sound, a few seconds into the track.
3) Now play a different track - some don't trigger this, but one that does is http://deepsid.chordian.net/?file=/MUSICIANS/G/Galancy/Galancy_Tune_00.sid
4) Now play Arkanoid again. Note that something has changed in the playback, the drums are completely muffled now.

Won't fix itself until you restart XMPlay. Doesn't matter if you play any other tracks then come back to Arkanoid, or whether you turn off Surround or not.

Edit: I just realised that this happens even if you don't turn on Surround. Playing Galancy_Tune_00.sid then Arkanoid.sid borks playback instantly.

Edit 2: Oh god. This happens with SIDex 1.1 as well!

DRS
« Last Edit: 12 Oct '21 - 23:29 by Dhry »

Sebby75

  • Posts: 37
Re: SIDex plugin
« Reply #119 on: 13 Oct '21 - 11:57 »

Edit: I just realised that this happens even if you don't turn on Surround. Playing Galancy_Tune_00.sid then Arkanoid.sid borks playback instantly.


DRS

can't test right now as i'm at work...
Is it the case that playing 8580 tune is freezing sid emulation to 8580 model and won't revert to 6581 on tune change??
try to force it to 8580 in settings, restart xmplay and see how does Arkanoid sounds like....

or maybe its filter setting that is sticky... not sid model...

Dhry

  • Posts: 130
Re: SIDex plugin
« Reply #120 on: 13 Oct '21 - 23:25 »
Is it the case that playing 8580 tune is freezing sid emulation to 8580 model and won't revert to 6581 on tune change??
try to force it to 8580 in settings, restart xmplay and see how does Arkanoid sounds like....

Interesting. using 1.4c - if I lock it to either 6581 or 8580, I can play Arkanoid then the other track and back again and Arkanoid sounds fine. Doesn't matter which SID I lock to, or whether or not surround is on.
I can then take off the lock checkmark and the proper playback persists, Arkanoid playback will not break. But restart XMplay, turn off lock and then play one then the other and Arkanoid breaks again.

Interestingly enough, when operating without the lock (ie "broken playback mode"), playback of the Galancy track is way softer than Arkanoid, like half volume. If I use Lock, though, Galancy plays a lot louder. Seems like not locking the chip type just makes the player toggle over to some weird mode that it shouldn't be going to, and locking it prevents that (permanently), even if you subsequently unlock, for the remainder of the XMplay session.

DRS

Keltic Danor

  • XMPlay Support
  • Posts: 915
Re: SIDex plugin
« Reply #121 on: 14 Oct '21 - 10:58 »
Is it the case that playing 8580 tune is freezing sid emulation to 8580 model and won't revert to 6581 on tune change??
try to force it to 8580 in settings, restart xmplay and see how does Arkanoid sounds like....

Interesting. using 1.4c - if I lock it to either 6581 or 8580, I can play Arkanoid then the other track and back again and Arkanoid sounds fine. Doesn't matter which SID I lock to, or whether or not surround is on.
I can then take off the lock checkmark and the proper playback persists, Arkanoid playback will not break. But restart XMplay, turn off lock and then play one then the other and Arkanoid breaks again.

Interestingly enough, when operating without the lock (ie "broken playback mode"), playback of the Galancy track is way softer than Arkanoid, like half volume. If I use Lock, though, Galancy plays a lot louder. Seems like not locking the chip type just makes the player toggle over to some weird mode that it shouldn't be going to, and locking it prevents that (permanently), even if you subsequently unlock, for the remainder of the XMplay session.

DRS
At what second does it sound different? I tried it with a different 1.1 and couldn't tell any difference. Althought it might just be my ears. :P

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #122 on: 14 Oct '21 - 17:32 »
Is it the case that playing 8580 tune is freezing sid emulation to 8580 model and won't revert to 6581 on tune change??
try to force it to 8580 in settings, restart xmplay and see how does Arkanoid sounds like....

Interesting. using 1.4c - if I lock it to either 6581 or 8580, I can play Arkanoid then the other track and back again and Arkanoid sounds fine. Doesn't matter which SID I lock to, or whether or not surround is on.
I can then take off the lock checkmark and the proper playback persists, Arkanoid playback will not break. But restart XMplay, turn off lock and then play one then the other and Arkanoid breaks again.

Interestingly enough, when operating without the lock (ie "broken playback mode"), playback of the Galancy track is way softer than Arkanoid, like half volume. If I use Lock, though, Galancy plays a lot louder. Seems like not locking the chip type just makes the player toggle over to some weird mode that it shouldn't be going to, and locking it prevents that (permanently), even if you subsequently unlock, for the remainder of the XMplay session.

DRS

At what second does it sound different? I tried it with a different 1.1 and couldn't tell any difference. Althought it might just be my ears. :P

Same , i cant tell any difference either.

there is a difference if you play galancy , then arkanoid ( IN THAT ORDER ) , i will have a look to see if 8580 is actually being reset.

found the problem it is digiboost not resetting fixed.
« Last Edit: 14 Oct '21 - 18:21 by Malade »

Dhry

  • Posts: 130
Re: SIDex plugin
« Reply #123 on: 19 Oct '21 - 00:43 »
there is a difference if you play galancy , then arkanoid ( IN THAT ORDER ) , i will have a look to see if 8580 is actually being reset.
found the problem it is digiboost not resetting fixed.

Correct, I just checked and the issue doesn't happen at all if you have digiboost disabled.

Cheers
DRS

Malade

  • Posts: 64
Re: SIDex plugin
« Reply #124 on: 26 Oct '21 - 14:17 »
Thanks Drhy , fixed it a while back , today had time to work on it some more , fixed all bugs as far as i can now tell , added some other things along with sound trimming , making it sound as much like 1 of my hardware c64#s , tweaking / comparing different sids , so far so good ( and its optional btw ) , only 1 final thing to do , allow selection of second sid model ( chip type ) then it should be ready for public release , trying to think of a new name for it ( gone with SodaSID for now ) but will probably keep the original name as to save confusion , cant see any reason to change it actually ,  see how it goes , few hours of testing then there should be a final release , it should need nothing else but updating to later libsidplays now after i next compile.



Happy days,
                 Malade.
« Last Edit: 26 Oct '21 - 14:22 by Malade »