| |
Jammer
Registered: Nov 2002 Posts: 1292 |
problematic playback od GT multispeeds
I'm not sure how problems and hickups are common for playback on real machine but considerable number of my works usually sounds broken, especially those ones composed with the latest GT release. What's the culprit here? Are GT compilations that cycle sensitive or what? :) During the release of Club Stylier and a few other multis I was forced to create false SID address working as a buffer and then copy values to proper registers but it's really unwanted workaround. Any clues? |
|
| |
algorithm
Registered: May 2002 Posts: 702 |
I had a similar issue with some of the tracks that i composed for the Eclectic Demo. There was a noticeable difference between goattracker and Winvice/Real c64. Perhaps they are based on different resid revisions/filter curves? Or that the method of writing to sid registers are different for the realtime playback in the editor in comparison to the compiled sid data? |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
I don't mean filters or wave sounds. Mostly problems with hardrestart time, wrong attacks, wrong gate etc. Sounds like problems with buffering or so. |
| |
algorithm
Registered: May 2002 Posts: 702 |
This was also another difference (Hard restart and adsr) Which i believe may be perhaps due to writes to emulated sid differing in editor in comparison with compiled sid tune or/and resid version difference |
| |
iAN CooG
Registered: May 2002 Posts: 3137 |
writing sid regs in different order give different results.
goattracker at every $1003 call executes this code 3 times, with X=0/7/E
13AA 9D E4 13 STA $13E4,X
13AD BD FA 13 LDA $13FA,X
13B0 3D 11 14 AND $1411,X
13B3 9D 04 80 STA $D404,X
13B6 BD 23 14 LDA $1423,X
13B9 9D 00 80 STA $D400,X
13BC BD 24 14 LDA $1424,X
13BF 9D 01 80 STA $D401,X
13C2 BD 25 14 LDA $1425,X
13C5 9D 02 80 STA $D402,X
13C8 BD 26 14 LDA $1426,X
13CB 9D 03 80 STA $D403,X
13CE BD 35 14 LDA $1435,X
13D1 9D 05 80 STA $D405,X
13D4 BD 36 14 LDA $1436,X
13D7 9D 06 80 STA $D406,X
13DA 60 RTS
not counting $d415/16/17/18 set at different times;
While a buffered sid write copies backward the buffer to sidregs.
08A2 A2 18 LDX #$18
08A4 BD 00 80 LDA $8000,X
08A7 9D 00 D4 STA $D400,X
08AA CA DEX
08AB 10 F7 BPL $08A4
If GoatTracker editor always uses buffered playback then ALL GT tunes should play wrong/different. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11147 |
its even mentioned in the docs iirc =P |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
Well, I have no intention in reading code part of docs and prefer leave it for coders :P The more interesting part is - can this unpredictable behaviour be fixed and will Lasse do this? ;) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11147 |
the solution is to always use buffered writes. i am sure one of your groupmates can knock up the code for it :=P |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
I always do but the results are as I've described nonetheless :/ |
| |
Soren
Registered: Dec 2001 Posts: 547 |
d406,d405,d404 (and for the other voices aswell)
Use that order and things ought to be as good as they can get.
Furthermore it's a good idea to empty the sid buffer into sid registers as the FIRST thing in music/sound routines. |
| |
Hein
Registered: Apr 2004 Posts: 933 |
I suppose the C64 playback should also be using stable rasters and without badlines, so no accidental delays occur during playback. |
| |
Conrad
Registered: Nov 2006 Posts: 837 |
It may not matter that much to you, but I took a bit of time to make recordings from real C64 to provide comparisons. (Recorded on a Tascam DR-60 recorder)
Sorry that they're .wav files, I don't have time to encode them.
----------------------------------------------------
https://www.dropbox.com/s/civxe3fwejcy2o9/Club%20Sylier_Compo%2..
This is recorded from the compo entry at Forever 2010 (Club Stylier)
----------------------------------------------------
https://www.dropbox.com/s/r7412oyxeuiwgra/Club%20Stylier_My%20p..
This is a recording of my own player code, where the GT music routine writes to ghost registers (I hacked it ;)) and then at each call, the contents of the ghost registers are written to the SID registers FIRST before it JSR's $1003. The SID register writing order is done this way:
PULSE LO 1,
PULSE HI 1,
SUSTAIN/RELEASE 1,
ATTACK/DECAY 1,
FREQ LO 1,
FREQ HI 1,
WAVE CONTROL 1,
PULSE LO 2,
PULSE HI 2,
SUSTAIN/RELEASE 2,
ATTACK/DECAY 2,
FREQ LO 2,
FREQ HI 2,
WAVE CONTROL 2,
PULSE LO 3,
PULSE HI 3,
SUSTAIN/RELEASE 3,
ATTACK/DECAY 3,
FREQ LO 3,
FREQ HI 3,
WAVE CONTROL 3,
$d416,
$d417,
$d418
On a PAL machine there are 312 raster lines, which I assume is how GoatTracker divides the positions for calling the play routine, therefore I did the same... Raster positions in my player are: $10, $5e, $ac, $fa Screen is also turned off and black , so no bad lines and minimal background noise.
----------------------------------------------------
and finally...
https://www.dropbox.com/s/zsvm0wmlzkx55w6/Club%20Sylier_1541u%2..
This is a recording from the tune played from my HVSC directory in the 1541 ultimate SID player
As far as HR bugs is concerned, I couldn't hear any big differences between my player and the player used for the original compo entry, but the one played in the 1541u SID player does sound bad indeed. Didn't bother recording the Riverwash 6 invite code. ;) |
| |
iAN CooG
Registered: May 2002 Posts: 3137 |
https://www.dropbox.com/s/siobwu4dpjv67z7/Club_Stylier_buffered..
now i've ripped it with buffered writes, the sid in HVSC was added as it was and it's not using buffered writes.
try if this is better and if so will be replaced in next update. |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
Thanks guys a lot!
Conrad, compo entry used my additional routine with buffer and playback was correct. Original buffered writes from GT's compiler didn't work (at least in Vice). But its a heck of unnecessary work as I had to use false sid address in GT and copy registers in compo player routine and everyone would have to do the same in his prod. Version with your player cuts stabs to early thus I guess hardrestart is too long or sth.
It's almost a general rule that my tunes play correctly in SidPlay but have problems in prods - singlespeeds as well (VN#55 intro).
I guess it's mostly up to Cadaver to correct things suggested here in his compiler. Hopefuly, he will as everything's just been given on a silver platter. You guys are really helpful. |
| |
cadaver
Registered: Feb 2002 Posts: 1154 |
The buffering in GT has historically been per-channel (at the end of channel execution) to work better with sound effect playback. Obviously it's not enough for demanding tunes like multispeeds, as channel execution will take varying time.
Maybe I'll do a final update where the buffering happens right at the beginning of the play call, in a simple loop.
Which way you do run your copy loop from the fake regs? |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
irq1:
asl $d019
lda #0
sta $d020
ldx #$18
loop1:
lda virtual_sid,x
sta $d400,x
dex
bpl loop1
jsr $1003 // play music
lda #<irq2
sta $0314
lda #>irq2
sta $0315
lda #$6c
sta $d012
pla
tay
pla
tax
pla
rti
That was my routine in each call but I'm not a coder and it was real hit/miss ;) |
| |
cadaver
Registered: Feb 2002 Posts: 1154 |
Thanks. I figured it'd be reverse so that it gets the wave/ADSR write timing mostly similar. |
| |
cadaver
Registered: Feb 2002 Posts: 1154 |
Here's a preview version of the updated GT, I'd appreciate testing. There's a new relocator option (at the bottom) that will enable the full buffering mode.
http://cadaver.homeftp.net/tools/gt273preview.zip |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
libwinpthread-1.dll is missing ;) |
| |
cadaver
Registered: Feb 2002 Posts: 1154 |
Seems I have to update the makefile to link everything statically. Hold on, new version should appear shortly.. |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
Ok, I've just downloaded dll myself ;) Testing with 16x multispeeds :D |
| |
cadaver
Registered: Feb 2002 Posts: 1154 |
I recommend to redownload the zip now, as it contains also slightly updated editor code: the editor is now permanently locked to the "full buffered" mode SID write timing, as that's basically the only timing it can emulate 100% exactly without running a C64 CPU :) |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
One more thing. Is this 'vinyl crack' in editor normal? The higher speed the more audible it appears. Right after this update cracks become really frequent ;)
edit: I see that GT has really hard time with buffer under 50s, hence the cracks ;)
Right. After the update, GT now behaves more like SidPlay - sometimes strange gates occur between sounds in 16x tunes like in the compiled ones. No problems with 4x.
Couple of tests:
- Dancing Girls 4x SNG
- Dancing Girls 4x SID
- First 16x SNG
- First 16x SID
- Second 16x SNG
- Second 16x SID
Two 16x are problematic by definition seemingly, the 4x tune was one of the most troublesome before the update and sounded really random in SidPlay. |
| |
cadaver
Registered: Feb 2002 Posts: 1154 |
Now the editor & compiled playback (with full buffering) should be as close to each other as possible, so if something doesn't work at a particular speed, then the only advice remaining is: don't do it, or use different ADSR settings etc. |
| |
Linus
Registered: Jun 2004 Posts: 639 |
OSX port where are thou? |
| |
Conrad
Registered: Nov 2006 Posts: 837 |
@cadaver, thanks for adding the buffer option. Will be quite useful. :)
@Jammer, Dancing Girls... Very nice cover! :D |
| |
Mr. SID
Registered: Jan 2003 Posts: 422 |
Quote: OSX port where are thou?
I'll have a go at it when I get back home from vacation... No promises though... |
| |
Linus
Registered: Jun 2004 Posts: 639 |
Great, thank you! |
| |
Linus
Registered: Jun 2004 Posts: 639 |
@Jammer:
Dancing Girls is _very_ nice indeed!
Going beyond 8x in GT doesn't make much sense for me tho as I usually encounter more disadvantages than advantages (wavetable lenght, slow pulse- and filtersweeps and what not). I certainly do love the snare in your second attempt, nontheless. |
| |
cadaver
Registered: Feb 2002 Posts: 1154 |
GT2.73 has been released at http://cadaver.homeftp.net/tools/goattrk2.zip and SourceForge; the preview version above has been removed. |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
Hey, 16x tunes have more regular playback. How did you pull that off? ;)
I'm experimenting with hardrestart set to F000/FF00. Sounds promising. |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
- HR Test SNG
- HR Test SID
A little test in single speed with high tempo. Instrument Attack 01 is useful for the first time I suppose, also in multispeeds ;) Try to experiment with editor hardrestart Attack and Decay for the best results. I stick to FF00 at the moment and instruments gained more pleasant and less gated restart. Thanks to this, instrument HR time can be shortened at least one frame in many cases which results in better clicks. I've managed to cut it to 07 in 4x and from 20 to 1C in 16x. Mind that short instrument Release makes fast, non legato passages broken.
I strongly recommend redownloading my tests in order to catch the difference - playback became almost error-free and clicky in a good way. One thing that bothers me is little slowdown in First 16x test - too CPU extensive due to full SID buffer in each call?
Another 16x test also revealed slowdowns in compiled sid:
- Clicky Drums 16x SNG
- Clicky Drums 16x SID |
| |
Soren
Registered: Dec 2001 Posts: 547 |
Hard restart! Oh Noes! /o\
:D
I keep moving further and further away from using HR. I just find that in many cases it cuts too much sound between notes and gets to sound a bit too stiff.
Ofcourse it's good for some things... I know..
:) |
| |
Linus
Registered: Jun 2004 Posts: 639 |
http://www.zeidnetz.de/ExtraDrums_16x-3.sid
@Jammer: I added some base ;) In for a coop? |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
Linus, my pleasure - it's splendid! :D
Soren: GT used to have no restart once and it was a big nono ;) You can disable HR in instrument anyway :P |
| |
McMeatLoaf
Registered: Jan 2005 Posts: 106 |
Linus: Did you use the -g command to change the center pitch? The tuning sounds a bit higher than the usual 440 hz. |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
McMeatLoaf: I don't think so. In 16x multispeeds arpeggios can work so quickly that you get a one welded tone together with aliquotes. That's one of the tricks for multispeed instruments - in wavetable you put e.g. base pitch and two semitones up in loop, you get one semitone up as a result but its perceived finetune relies also on waveform, pulse width, filtering etc. |
| |
Linus
Registered: Jun 2004 Posts: 639 |
What Jammer said :) |
| |
Soren
Registered: Dec 2001 Posts: 547 |
Jammer: Either something was not good enough in no-hardrestart GT, OR it was the people using it. :D
When using sid buffers, and doing that well, no hard restart is quite neat. But ofcourse still tricky to play with. |
| |
Linus
Registered: Jun 2004 Posts: 639 |
Thanks to Soren I started abandoning HR from my lead instruments a while ago and they really benefit from it. |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
Well, I prefer setting Attack to 1 or 2. The same effect in GT, no messing with HR ;) |
| |
cadaver
Registered: Feb 2002 Posts: 1154 |
By using low but non-zero attack you're basically asking for maximum trouble :) At low values the SID's internal ADSR counter is wrapping around in a fast loop (10-20 cycles if I remember right) and in that case, if the SID writes to trigger the note come late, the attack is messed up & delayed. |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
Well, that is basis for my multispeed instruments ;)
I've just tried changing instruments in Dancing Girls to Attack 0 and no HR but it's one utter mess. Are you really sure about it? ;) |
| |
FATFrost Account closed
Registered: Sep 2003 Posts: 211 |
I had this problem too... In the editor the time sounds like jeff/jammer/Linus/Hubbard,, when I export... Sounds like shizz... Oh... That's my skills?! :/ |
| |
FATFrost Account closed
Registered: Sep 2003 Posts: 211 |
Forgot I'm just a scabby old pixel tramp.. :) |
| |
Linus
Registered: Jun 2004 Posts: 639 |
Quote: Well, I prefer setting Attack to 1 or 2. The same effect in GT, no messing with HR ;)
That is _far_ from the same effect, dude! :)
Anyway, regarding low non-zero attack values in multispeed tunes, I can only agree with Cadaver - the attack gets unpredictable.
You could try changing the attack settings in your "Dancing Girls" track to '0' and add an '$E9' at the beginning of your wavetable instead. That was the basis for my multispeed instruments a couple of years ago. |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
Interesting. What's your current basis, then? :)
I've just tried this way and it sounds like shit. Instrument beginnings are being eaten. Maybe some SNG? I'm too dumb for this, apparently :D |
| |
Linus
Registered: Jun 2004 Posts: 639 |
My current basis is "50hz is enough for everybody" :) |
| |
Jammer
Registered: Nov 2002 Posts: 1292 |
Somehow, I expected that :P |
| |
Mixer
Registered: Apr 2008 Posts: 422 |
Quote: My current basis is "50hz is enough for everybody" :)
Applause, if the pun is intended :D |
| |
Linus
Registered: Jun 2004 Posts: 639 |
Yours truly takes a bow! |