nplayer in basic (Development MSX Fora)MSX Resource Center            
            
English Nederlands Espa�ol Portugu�s Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 68 gasten en 2 MSX vrienden online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - nplayer in basic

Schrijver

nplayer in basic

norakomi
msx professional
Berichten: 861
Geplaatst: 17 Februari 2005, 22:56   
helllllllloooo !!!

How are you all doing?

Me has another question (what else is new)
I am looking for a way to use nplayer in basic to play a msx-music song.
When I use nplayer (which is totaly basic) there is no problem getting the
song to play.
but when I leave nplayer and look into it´s listing I get confused,
and can´t seen to get a song to run.

I´m sure it´s something realy simple like:

bload"nbasic.bin",r
bload"song.mbk"
and then....
????
some way to play the song....
but how?
[D-Tail]

msx guru
Berichten: 3019
Geplaatst: 18 Februari 2005, 10:59   
This should solve it:
10 DEF INT E,P: DIM P(15)
20 CALL TURBO ON(P())
30 DIM F$(1) 'F$ is used e.g. for passing files to NBASIC
40 PRINT "Loading replayer..."
50 P(0)=0: E=USR(71) 'Load MB1.4 replayer using function 71
60 PRINT "Loading song..."
70 F$(0)="song.mbm": E=USR(31) 'Open song file, leaves file id in P(0)
80 P(2)=6: P(3)=0: P(4)=&H4000: E=USR(33) 'Read 16384 bytes from file P(0) to segment 6, address 0
90 E=USR(32) 'Close song file, song file now resides in segment 6
100 PRINT "Loading samplekit..."
110 F$(0)="song.mbk": E=USR(31): E=USR(78): E=USR(32) 'Open kit file, read contents to sample RAM and close it again
120 PRINT "Start replaying!"
130 P(0)=6: P(1)=0: E=USR(74) 'Start music replay
140 IF INKEY$="" GOTO 140 'Wait until a key is pressed
150 E=USR(75) 'Stop music replay
160 CALL TURBO OFF
170 PRINT "All done!": END
Have phun with it ^_^, I didn't test this code but iirc I myself used it a couple of times this way. Moonsound songs shouldn't make the difference, as long as you load the appropriate replayer and use the Moonsound functions instead of the Moonblaster functions.
norakomi
msx professional
Berichten: 861
Geplaatst: 18 Februari 2005, 15:12   
D-TAIL, YOU RULE.

§ CASE CLOSED §
[D-Tail]

msx guru
Berichten: 3019
Geplaatst: 18 Februari 2005, 15:18   
hehe, thanks, you're welcome
 
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.