[SOLVED] #play command skipping 2 lines, cant figure out why

NOTE: I HATE A LOT OF YOUR ZZT GAMES, SO WATCH OUT!

Moderators: Commodore, Zenith Nadir

Post Reply
KlaxMaster
newcomer
Posts: 2
Joined: Mon Feb 06, 2023 12:42 am

[SOLVED] #play command skipping 2 lines, cant figure out why

Post by KlaxMaster »

[SOLVED: My simultaneous post on reddit received an answer. putting a /i for each 16th note after every line helps the buffer clear out. As the buffer was filling up]

I'm transposing this piece of music to ZZT for no reason other than shits and giggles. (ZZT 3.2, via Windows 98SE, on a Packard Bell Platinum 64MB RAM, and Pentium MMX @166MHz)

Code: Select all

#PLAY iea+cqeieqdidqc-b+dx
#PLAY ieab+qdidqcicq-ba+cx
#PLAY iea+cqeieqdideeqgfx
#PLAY i+edqedic-qbhaqx
#PLAY iea+cqeieqdidqc-b+dx
#PLAY ieab+qdidqcicq-ba+cx
#PLAY iea+cqeieqdideeqgfx
#PLAY i+edqedic-qbhaqx
#PLAY h.+fifgqaiaqgigqfq.eidqcidh.eqx
#PLAY h.+fifgqaiaqgigqfw.ehx
#PLAY iea+cqeieqdidqc-b+dx
#PLAY ieab+qdidqcicq-ba+cx
#PLAY iea+cqeieqdideeqgfx
#PLAY i+edqedic-qbhaqx
To break it down:
-Lines 1-4 and 5-8, are identical. they were copy/pasted once i got the sound right.
-Lines 9 and 10 are the bridge.
-Lines 11-14 again are identical to 1-4, copy/pasted.

If I play the whole song, lines 12 and 13 are completely skipped. Goes straight to line 14 after 11.
if i only have the SECOND half of the song (lines 9-14) it does not skip those two lines. its only when I have the whole thing.

I've put this object on its own board, and even deleted ALL other code from the object, other than the name and

Code: Select all

:touch
#lock
#play (whole song)
#unlock
#end
I've even attempted to re-copy/paste line 2 & 3 to position 12&13, no luck. i even pasted it TWICE in a row. (so the format would be line 11,12,13,12,13,14 ) and it skips BOTH 12 &13s, and goes directly to 14

I filled the 2 lines with a scale, (line 12: qcdegab+c then Line 13: +c-bagfedc), and it stopped completely after line 12., did not do line 13 or 14.

I then split it into 2 labels (song1, song2 )so it goes

Code: Select all

:touch
#send name:song1
#end

:song1
#play (1-8)
#send name:song2
#end

:song2
#play (9-14)
#end
and the issue persists.

Out of sheer curiosity, i commented out lines 1-4 (but left them there) and the lines 5-14 played fine finally. but with the first 'verse' diasbled

Is there some upper limit to how many lines an object can have? this isnt that many, though, and with all the added variables and call outs, it's overall longer than it was before, and still worked...

I tried splitting the song to 2 objects. now @name1 has :song1 and @name2 has :song2. the hand off happens FINE, but the song still skips the same 2 lines. A sample song i have is 17 lines, and has way more notes, so its not likely a limit im hitting.

Lastly, i finally just FINISHED the song anyway. (only 2 more lines, 15 and 16) and the song still plays the same, skips line 12 and 13, plays 14, then ends (does not play 15 and 16).

I dont see any rogue spaces or other characters in the code at all. the code linked IS a direct copy paste from in the program, to a text doc)
Last edited by KlaxMaster on Mon Feb 06, 2023 3:57 am, edited 1 time in total.
KlaxMaster
newcomer
Posts: 2
Joined: Mon Feb 06, 2023 12:42 am

Re: #play command skipping 2 lines, cant figure out why

Post by KlaxMaster »

I used ZZT a LOT as a teen back in the mid to late 90s. But haven't done much of anything since then, other than having it available on any machine i've owned, just incase I ever have the time.

So i was basically creating tests, just to re familiarize myself with basic stuff.

Here is my entire code, both with everything I'm testing, and stripped down to only have my intended song. The song plays identically between the two, though. (Note: The doorman object does not yet exist, so there is no object to recieve that flag yet)

Code: Select all

@TESTOBJECT
#end

:touch
Hello Friend, Select a routine to test:
!move; Move in a circle.
!muzmak-sample; Play a music sample from Muzmak.
!playmoon; Play Moonlight Densetsu.
!lyrics; Display lyrics to Moonlight Densetsu.
!command; Tell the doorman to move.
#end

:move
#lock
/i/i/n/i/e/i/s/i/w
#unlock
#end

:playmoon
#lock
#PLAY iea+cqeieqdidqc-b+dx
#PLAY ieab+qdidqcicq-ba+cx
#PLAY iea+cqeieqdideeqgfx
#PLAY i+edqedic-qbhaqx
#PLAY iea+cqeieqdidqc-b+dx
#PLAY ieab+qdidqcicq-ba+cx
#PLAY iea+cqeieqdideeqgfx
#PLAY i+edqedic-qbhaqx
#PLAY h.+fifgqaiaqgigqfq.eidqcidh.eqx
#PLAY h.+fifgqaiaqgigqfw.ehx
#PLAY iea+cqeieqdidqc-b+dx
#PLAY ieab+qdidqcicq-ba+cx
#PLAY iea+cqeieqdideeqgfx
#PLAY i+edqedic-qbhaqx
#PLAY i+edqedic-qbhaqx
#PLAY i+edeqxxiegqa
#unlock
#end

:lyrics
$Moonlight Densetsu

Gomen ne sunao janakute

Yume no naka nara ieru
Shikou kairo wa shooto sunzen
Ima sugu aitai yo
Nakitaku naru you na moonlight
Denwa mo dekinai midnight
Datte junjou doushiyou
Haato wa mangekyou
Tsuki no hikari ni michibikare

Nando mo meguriau
Seiza no matataki kazoe
uranau koi no yukue
Onaji kuni ni umareta
no mirakuru romansu
Moichido futari de weekend
Kamisama kanaete happy-end
Genzai kako mirai mo
Anata ni kubittake
Deatta toki no natsukashii
Manazashi wasurenai
Ikusenman no hoshi kara
anata wo mitsukerareru
Guuzen mo chansu ni
kaeru ikikata ga suki yo
Fushigi na kiseki kurosu shite
Nando mo meguri au
Seiza no matataki kazoe
uranau koi no yukue
Onaji kuni ni umareta
no mirakuru romansu
Shinjite iru no mirakuru romansu
#end

:command
#send doorman:goaway
#end

:muzmak-sample
#lock
/i/i
#PLAY s.cegb+c-bgecegb+c-bge
#PLAY s.cegb+c-egb+e-egb+g-egb
#PLAY s.cdfa+c-fadcdfa+c-fad
#PLAY s.cdfa+c-dfa+f-dfa+a-dfa
#PLAY s.cdgb+d-bgdcdgb+d-bgd
#PLAY s.cdgb+d-dgb+g-dgb+b-dgb
#PLAY s.++c--eg+c+c--eg+cg-ec+ce
#PLAY s.+g-fa+cg-fa+cd-fa+c--g+fa+c
#PLAY s.cegb+c-bgecegb+c-bge
#PLAY s.cegb+c-egb+e-egb+g-egb
#PLAY s.cdfa+c-fadcdfa+c-fad
#PLAY s.cdfa+c-dfa+f-dfa+a-dfa
#PLAY s.cdgb+d-bgdcdgb+d-bgd
#PLAY s.cdgb+d-dgb+g-dgb+b-dgb
#PLAY s.++c--d#g+c+c--d#g+cg-d#c+cd#
#PLAY s.+g-fa+c--g+fa+c
#PLAY s.cegb+q.c
#unlock
#end
And here is when i removed all other parts

Code: Select all

@TESTOBJECT
#end

:touch
#lock
#PLAY iea+cqeieqdidqc-b+dx
#PLAY ieab+qdidqcicq-ba+cx
#PLAY iea+cqeieqdideeqgfx
#PLAY i+edqedic-qbhaqx
#PLAY iea+cqeieqdidqc-b+dx
#PLAY ieab+qdidqcicq-ba+cx
#PLAY iea+cqeieqdideeqgfx
#PLAY i+edqedic-qbhaqx
#PLAY h.+fifgqaiaqgigqfq.eidqcidh.eqx
#PLAY h.+fifgqaiaqgigqfw.ehx
#PLAY iea+cqeieqdidqc-b+dx
#PLAY ieab+qdidqcicq-ba+cx
#PLAY iea+cqeieqdideeqgfx
#PLAY i+edqedic-qbhaqx
#PLAY i+edqedic-qbhaqx
#PLAY i+edeqxxiegqa
#unlock
#end
Post Reply