Tezz Posted April 14, 2004 Share Posted April 14, 2004 Hi all, I've got some interesting projects underway recently and wonderd if any coders could help me with something I am stuck on.. Does anyone know what is the best way to include multiple RMT tracks within your code? If for instance you have 4-5 soundtracks all using the same set of instruments say for a games title screen, in-game music, game over etc.. , is there a way to include just the song data for each of the tracks without the instrument data. I have saved the striped RMT tracks independently but this will include the song data with instruments and all which would be a waste of memory to do for all modules. Has anyone any advice on how to acheive this?. Even some simple source code to change tracks with a key press 1-5 would be a great help to my understanding. Thanks, Tezz Quote Link to comment Share on other sites More sharing options...
raster/c.p.u. Posted April 15, 2004 Share Posted April 15, 2004 If for instance you have 4-5 soundtracks all using the same set of instruments say for a games title screen, in-game music, game over etc.. , is there a way to include just the song data for each of the tracks without the instrument data. I have saved the striped RMT tracks independently but this will include the song data with instruments and all which would be a waste of memory to do for all modules.Has anyone any advice on how to acheive this?. Even some simple source code to change tracks with a key press 1-5 would be a great help to my understanding. Thanks, Tezz Hi, Tezz. I recommend you to create one RMT modul with all this parts one by one. For example - In song it can look like this: 00: 01 02 03 04 01: 05 06 07 08 02: GOTO 00 03: 09 0A 0B 0C 04: GOTO 03 05: 0D 0E 0F 10 06: GOTO 05 All this parts can use the same set of instruments of course. Then you can play this song parts by "init" parameter - see the asm_src/music.a65 example - there is: ldx #<MODUL;low byte of RMT module to X reg ldy #>MODUL;hi byte of RMT module to Y reg lda #0 ;starting song line 0-255 to A reg jsr RASTERMUSICTRACKER ;Init So, instead of "lda #0" there can be lda #3 for playing from songline 3 (your music part 2) or lda #5 for playing from songline 5 (your music part 3). It's easy, I think. Ok? Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted April 15, 2004 Share Posted April 15, 2004 thanks raster! very useful! and f.e. how would you solve sound effects? f.e. game soundtrack (f.e. 3 channels in RMT) and one channel is left for sounds? does RMT player leave one soundchannel for own sound routines? or can RMT be triggered from "outside" to play soundfx? Quote Link to comment Share on other sites More sharing options...
emkay Posted April 15, 2004 Share Posted April 15, 2004 thanks raster! very useful! and f.e. how would you solve sound effects? f.e. game soundtrack (f.e. 3 channels in RMT) and one channel is left for sounds? does RMT player leave one soundchannel for own sound routines? or can RMT be triggered from "outside" to play soundfx? Belonging to the XL's hw,you can always do soundeffects as long as you don't use the soundchannel for the music. Independent of the music player. Quote Link to comment Share on other sites More sharing options...
raster/c.p.u. Posted April 15, 2004 Share Posted April 15, 2004 thanks raster! very useful!and f.e. how would you solve sound effects? f.e. game soundtrack (f.e. 3 channels in RMT) and one channel is left for sounds? does RMT player leave one soundchannel for own sound routines? or can RMT be triggered from "outside" to play soundfx? There is more possibilities: For example - You can do "jsr RASTERMUSICTRACKER+3 ;1 play", and then overwrite RMT's private AUDF/AUDC registers which are prepared now for store to POKEY during the next "jsr RASTERMUSICTRACKER+3 ;1 play". See the declaration of these registers (asm_src/rmtplayr.a65): trackn_audf org *+TRACKS trackn_audc org *+TRACKS So, lda #value, sta trackn_audf+3 <-for audf of generator 3, and lda #value, sta trackn_audc+3 <-for audc of generator 3. Values you store to trackn_audf/audc will be moved to POKEY and then RMT routine will overwrite them with new own prepared values... but if you will replace this values after RASTERMUSICTRACKER+3 routine every time, your values will be victorious. Of course, the other way is - you can trim some parts (in SetPokey function) of rmtplayr.a65 with "lda trackn_audf/c+..., sta $d200+...". Quote Link to comment Share on other sites More sharing options...
Tezz Posted April 15, 2004 Author Share Posted April 15, 2004 Thanks for all that raster, that's really helpful! I was thinking maybe I could jump to different song positions to achieve this. That's a simple way for me to include more tracks. Great! Thanks Should be able to post the projects soon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.