atarionline.pl Music in Turbo basic - Forum Atarum

Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.

  • :
  • :

Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.

    • 1: CommentAuthorMrGrelec
    • CommentTime11 Apr 2012
     
    Hello.

    I would like to learn to play music files in turbo basic, a goode example is the game music match, i would like to learn to start music files in TB and also stop music files in TB, so i can have foreksampel a music intro for a game.

    Thank you.
    • 2:
       
      CommentAuthorjhusak
    • CommentTime11 Apr 2012
     
    Then you must learn:
    How the USR function work
    How binary files are handled (music is in such form)
    What is music player
    How to choose memory location for it
    How to choose memory location for the music itself
    How to load binary files

    All in TB aspect.

    Then you create a little one or two USR routines, one for play music, the second for stopping the music and you are home.

    Now write what is the magic for you and what do you know very well.
    • 3:
       
      CommentAuthorKaz
    • CommentTime11 Apr 2012
     
    Step by step "how to play RMT music in Basic"

    ->link<-
    • 4: CommentAuthorMrGrelec
    • CommentTime11 Apr 2012
     
    thank you, i did test the routine some time ago and yes i got the music to play but i have no idea on how to stop it again so i can use FX for games, in the thread about the routine i Can not see any explanation on how to stop music again, Stopping music is imortant also foreksampel to change to different song or to use Sound FX in a game.

    Or as a exampel have Intro music and then stop music when game start for sound Fx.

    Any help is apriciated.

    Thank you.
    • 5:
       
      CommentAuthorxeen
    • CommentTime11 Apr 2012 zmieniony
     
    as far as I remember you should call USR procedure with address only, without any additional parameters, to stop music.
    • 6: CommentAuthorMrGrelec
    • CommentTime11 Apr 2012
     
    Thank you. il try that :)
    • 7: CommentAuthorMrGrelec
    • CommentTime11 Apr 2012
     
    I was able to stop music by calling the adress for the player and the song , But after music is stopped The normal sound commands like this example

    Sound 0,50,10,10

    Is not working normal, it gives no sound, so the Rmtmono.ply is still probably i memory.

    Is there any easy way to erase memory locations from Turbo Basic ? maybe erasing location will make it work as normal after using the rmtmono.ply ?

    Or is there som other way to get this to work ?
    • 8: CommentAuthorMrGrelec
    • CommentTime11 Apr 2012
     
    Yes !! Found out how to Stop the music.. very easy. thanks for the tip.. heres how its done :

    X=USR($8F85)


    So my next game will have music ..:)
    • 9:
       
      CommentAuthorKaz
    • CommentTime11 Apr 2012
     
    What game? :D
    • 10: CommentAuthorMrGrelec
    • CommentTime11 Apr 2012
     
    Well..

    Some sort of Alien....
    • 11:
       
      CommentAuthorKaz
    • CommentTime11 Apr 2012
     
    Sounds interesting, keep going, our fingers are crossed! :)
  1.  
    Alien playing with chewed bubblegum :) Nice!
    • 13:
       
      CommentAuthorjhusak
    • CommentTime11 Apr 2012
     
    Chewie - He is an alien!
    • 14: CommentAuthorMrGrelec
    • CommentTime22 Apr 2012
     
    Im having som trouble with the rmtmono.ply.

    Im getting it to work when the memory is empty but when my own game program is loaded then bload of the rmtmono.ply crash my program, probably due to some memory location conflict so i wonder if its possible to put the rmtmono.ply some other place in memory ?,, is it diffcult..

    Here is the usr to start the player
    X=USR($8F85,$9500,$7000)

    But the program crashes on the Bload"d:rmtmono.ply" that is when my own program is loaded,, not with blank memory..

    memory conflict somwhere so i need to learn how to put the rmtmono.ply in som different memory location if its possible ?

    Thanks.
    • 15: CommentAuthormarok
    • CommentTime22 Apr 2012
     
    My attempt to answer (language limits).

    The rmtmono.ply is bonded with the memory location (itself and the music module), so you need generate your own file of rmt player.
    To do it you should use RMT tracker on PC, load the music module and choose option 'Project/Export as/Stripped song file' (that mean attempt to save this same file you loaded first - now warning - try to rename file because if you don't and you cancel procedure, you lost loaded file - it will be erased automatically, that really important if you not have any copy left).
    Goal is to have access to address location your music module (you may have to change too) and description of the module (FEAT) that allow you generate only needed parts of the player (shorts it to the limit).
    After you copy to clipboard text you have showed and paste to clean one text file and rename it as rmt_feat (or similar like it is original - i no remember now), you must try cross-assembler x-asm (or mads) and generate file onto rmtplayr.asx included in one of folder at RMT tracker. But before that, you need change the org address of the player, so you must add/ change line like "player org $9500" follow your needs.

    (Warning: the entered address must be rounded to memory page border, i mean $xx00, and you must calculate that player uses quite much memory before itself - look inside rmtplayr.asx at comment lines)