Jump to content



0

RMT Music Problem, need help


7 replies to this topic

#1 peteym5 OFFLINE  

peteym5

    Dragonstomper

  • 769 posts
  • Location:Western New York USA

Posted Fri Sep 9, 2011 9:00 AM

I am trying to add in music to a game project I am working on. The RMT file has multiple music lines for different short pieces of music upon game events. The problem is that it only plays the first song and repeats it over and over.

Code to call the song:
    JSR rmt_silence
 	LDX #<RMTBNK
	LDY #>RMTBNK
	lda #00 ;(#02, #04,...)
	jsr rmt_init

Does not matter what I put in the LDA #nn, I still get the first song.

#2 Tezz OFFLINE  

Tezz

    Stargunner

  • 1,799 posts
  • Location:Manchester, England

Posted Fri Sep 9, 2011 9:05 AM

		lda #5			 ; starting song line
		ldx #<MODUL
	        ldy #>MODUL
	        jsr RASTERMUSICTRACKER   ; init

..
..
		jsr RASTERMUSICTRACKER+3 ; play

..
..
		jsr RASTERMUSICTRACKER+9 ; stop

Edited by Tezz, Fri Sep 9, 2011 9:08 AM.


#3 Creature XL OFFLINE  

Creature XL

    Moonsweeper

  • 297 posts
  • Location:Hannover.De

Posted Fri Sep 9, 2011 9:30 AM

On a related note. I added the music for our Abbuc-Contest entry (you have seen the video on youtube, right?) in the last minutes so I hadn't enuff time to figure it out.
I wanted to stop the music when teh charackter dies. And restart it at the beginning when the game continues. I called RMT_STOP (+9) and then the init stuff I did to stat the music.
What happens, as can be seen in the video, is that the music stops but starts at the same track I stopped it :(

What is the correct way of doin it?

Edit:
BTW, the "official" video in case you missed it.
Oh, and its not a preview, its the game we entered.


Edited by Creature XL, Fri Sep 9, 2011 9:35 AM.


#4 Rybags ONLINE  

Rybags

    Quadrunner

  • 10,313 posts
  • Location:Australia

Posted Fri Sep 9, 2011 9:35 AM

A deficiency I found with RMT is that I couldn't find a flag or return event that's triggered when you hit the end of song.

What I did is just put GOTO in the songs which jumps to a silent part which has real slow tempo. Use in conjunction with your own timer that can be used as a flag.

I don't think I've had trouble with wrong song repeating though.

Edited by Rybags, Fri Sep 9, 2011 9:39 AM.


#5 Tezz OFFLINE  

Tezz

    Stargunner

  • 1,799 posts
  • Location:Manchester, England

Posted Fri Sep 9, 2011 9:39 AM

:) I was wondering who it was in the contest that did the lesbian themed Mighty Bomb Jack!
You don't need to init again, just stop +9 and start+3

#6 Creature XL OFFLINE  

Creature XL

    Moonsweeper

  • 297 posts
  • Location:Hannover.De

Posted Fri Sep 9, 2011 9:47 AM

View PostTezz, on Fri Sep 9, 2011 9:39 AM, said:

:) I was wondering who it was in the contest that did the lesbian themed Mighty Bomb Jack!
You don't need to init again, just stop +9 and start+3

All I can say is that the title screen was the first element we had. You might remember it from an gfx contest last year.
As Exin moved to Hanover and as all of his Commodore-mates weren't into games he asked me. Well, I couldn't turn this offer down. :P
When do you get some one who does Atari graphics living 500 meters away from you? The idea to enter it for the Contest is from OSon.
Took me some months of coding after work.

And yes, he made the intro pics as well, however, no time to include. :(

#7 Tezz OFFLINE  

Tezz

    Stargunner

  • 1,799 posts
  • Location:Manchester, England

Posted Fri Sep 9, 2011 10:56 AM

View PostCreature XL, on Fri Sep 9, 2011 9:47 AM, said:

All I can say is that the title screen was the first element we had. You might remember it from an gfx contest last year.
As Exin moved to Hanover and as all of his Commodore-mates weren't into games he asked me. Well, I couldn't turn this offer down. :P
When do you get some one who does Atari graphics living 500 meters away from you? The idea to enter it for the Contest is from OSon.
Took me some months of coding after work.

And yes, he made the intro pics as well, however, no time to include. :(
cool, yes I remember seeing the pic in the gfx contest last year. Are you planning to add the enemies and pics after this contest release or will you be moving on to work on other things?

#8 peteym5 OFFLINE  

peteym5

    Dragonstomper

  • 769 posts
  • Location:Western New York USA

Posted Fri Sep 9, 2011 10:59 AM

Thanks guys, The jsr RASTERMUSICTRACKER+9 ; stop (I call JSR rmt_silence directly), but that did not stop the song from playing over and over for some reason.

I found in the RMT_Feature file that FEAT_NOSTARTINGSONGLINE equ 1 instead of equ 0. I was sent these files many times over with corrections and old version get mixed up with the current version.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users