F.L Posted January 2, 2018 Author Share Posted January 2, 2018 hello i am now addind the sound but there is something i dont understand to how playing them.... here is an exemple of my method to play the sword in the game : basic_r_indx=0 basic_r_size=0 DIM sfxcount DO sfxcount=sfxcount+1 vsync RLOCATE 0,16: RPRINT " ": RPRINTINT sfxcount IF sfxcount = 60 THEN SNDPLAY(0,4) SNDFREQ(4,8000) sfxcount = 0 END IF LOOP with this example, my sfx must be played each 1 second, but sometime it works , and sometime it don't works the project with assets are in attached files... thanks in advance ! sfxtest.zip Quote Link to comment Share on other sites More sharing options...
ggn Posted January 3, 2018 Share Posted January 3, 2018 Sorry but after trying a lot of different ideas I couldn't find a robust solution to your problem. There are simply too many hidden stuff inside raptor and u-235 sound engine for me to determine who's at fault here. My only suggestion for the moment would be to switch to Zerosquare's library. Read up on the audio tutorial for more information on this. Unless anyone else has any other ideas? Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted January 3, 2018 Share Posted January 3, 2018 Sorry but after trying a lot of different ideas I couldn't find a robust solution to your problem. There are simply too many hidden stuff inside raptor and u-235 sound engine for me to determine who's at fault here. My only suggestion for the moment would be to switch to Zerosquare's library. Read up on the audio tutorial for more information on this. Unless anyone else has any other ideas? API 2.0 doesn't have any DSP code in it, it is separated out for the end user to select a player. Quote Link to comment Share on other sites More sharing options...
ggn Posted January 3, 2018 Share Posted January 3, 2018 API 2.0 doesn't have any DSP code in it, it is separated out for the end user to select a player. rb+ pulls that trick years ago, it's not the issue here. Quote Link to comment Share on other sites More sharing options...
Sporadic Posted January 3, 2018 Share Posted January 3, 2018 I've had random sounds not play in VJ when using u235 but zero always worked in vj. Both work every time on hardware though. 2 Quote Link to comment Share on other sites More sharing options...
ggn Posted January 3, 2018 Share Posted January 3, 2018 I've had random sounds not play in VJ when using u235 but zero always worked in vj. Both work every time on hardware though. Well that explains a lot actually Quote Link to comment Share on other sites More sharing options...
F.L Posted January 3, 2018 Author Share Posted January 3, 2018 I've had random sounds not play in VJ when using u235 but zero always worked in vj. Both work every time on hardware though. it's a good news ! else, if i do this with u235 the sound is played everytime , but if the sfx it too short, it plays it two times : basic_r_indx=0 basic_r_size=0 DIM sfxcount DO sfxcount=sfxcount+1 vsync RLOCATE 0,16: RPRINT " ": RPRINTINT sfxcount IF sfxcount > 60 THEN SNDPLAY(0,4) SNDFREQ(4,8000) END IF IF sfxcount > 65 THEN sfxcount = 0 LOOP i will try with zeroplayer Quote Link to comment Share on other sites More sharing options...
Sporadic Posted January 3, 2018 Share Posted January 3, 2018 You are checking if sfxcount > 60 there and playing the sound but not resetting the counter until 65. That will cause wierdness and call the sndplay 5 times. Quote Link to comment Share on other sites More sharing options...
F.L Posted January 3, 2018 Author Share Posted January 3, 2018 yes i know its a bad method but its the only way i found to have the sfx every time with vj.... Quote Link to comment Share on other sites More sharing options...
F.L Posted January 3, 2018 Author Share Posted January 3, 2018 oh yes, its cool ! :thumbsup: it works fine with zerosquare ! now i can add all my sfx to the game ! sfxtest2.zip 8 Quote Link to comment Share on other sites More sharing options...
F.L Posted January 4, 2018 Author Share Posted January 4, 2018 i need your help ! (again !) now the sound works fine but i have no pad input....... i have read in rapapp.s that u235 is needed for the pad input... how to do please ? can't use zerosquare thanks in advance Quote Link to comment Share on other sites More sharing options...
Sporadic Posted January 4, 2018 Share Posted January 4, 2018 (edited) If you change to zerosquare audio engine, that also means the input changes too. Look in quickstart document for the different constants to use and also you have to call zeropad() Both audio engines also control their own input Edited January 4, 2018 by Sporadic 3 Quote Link to comment Share on other sites More sharing options...
F.L Posted January 5, 2018 Author Share Posted January 5, 2018 hello i have add zeropad, it works but in my game the main loop is slow down ( / 2 ) ! i use it like this : basic_r_indx=1 basic_r_size=0 Input_SetNormalPadMode RLOCATE 0,16:RPRINT "input?" do ZEROPAD() if zero_left_pad band Input_Pad_Left THEN RLOCATE 0,24:RPRINT "ok!" loop i do something wrong or is it normal ?? Quote Link to comment Share on other sites More sharing options...
Sporadic Posted January 5, 2018 Share Posted January 5, 2018 hello i have add zeropad, it works but in my game the main loop is slow down ( / 2 ) ! i use it like this : basic_r_indx=1 basic_r_size=0 Input_SetNormalPadMode RLOCATE 0,16:RPRINT "input?" do ZEROPAD() if zero_left_pad band Input_Pad_Left THEN RLOCATE 0,24:RPRINT "ok!" loop i do something wrong or is it normal ?? I have had (on some computers) VJ run slower when using Zeropad. It's usually fine on real hardware. Quote Link to comment Share on other sites More sharing options...
F.L Posted January 5, 2018 Author Share Posted January 5, 2018 Ok, thanks ! The most important is the real hardware I have bought a jaguar but what a pity that an everdrive doesn't exist for jaguar ! Quote Link to comment Share on other sites More sharing options...
Sporadic Posted January 5, 2018 Share Posted January 5, 2018 (edited) Ok, thanks ! The most important is the real hardware I have bought a jaguar but what a pity that an everdrive doesn't exist for jaguar ! An SD cart is being worked on, but you can also get Skunkboards again. Search AtariAge posts and you will find plenty of information about them. https://www.sellmyretro.com/offer/details/skunkboard-flash-cardridge-for-jaguar-27561 They are great for development purposes. Edited January 5, 2018 by Sporadic 1 Quote Link to comment Share on other sites More sharing options...
F.L Posted January 7, 2018 Author Share Posted January 7, 2018 hello a very big update of the rom today : - new diplaying method of sprites and theirs palettes - new displaying method of backgrounds - first sound added with zerosquare !! (sword sfx) thanks to sporadic and all who helped me again ! caution, with this new update, the rom doesn't works with virtual jaguar anymore (too slowly #30 fps) but it runs perfectly with project tempest (an old but simply emulator) i have added in attached files the zip with the new rom and PT.exe inside (no install is needed, just launch pt and load the rom ) i hope this new update will works on a real jaguar without glitches or stange sound ! if someone could test, it would be nice !! see ya for the next update with all sfx barbarianJAGUARbeta.zip 4 Quote Link to comment Share on other sites More sharing options...
F.L Posted January 11, 2018 Author Share Posted January 11, 2018 Still adding sfx... I have a question : how to make a nice .mod music like in the example doger ? Is it complicate ? I have searched a wav2mod but i do't find this... Quote Link to comment Share on other sites More sharing options...
Sporadic Posted January 11, 2018 Share Posted January 11, 2018 Zero sound engine doesn't support mod files. You're better off using an MP3 or wav and then in RB+ tell it you want to use muLaw in the assets txt. It sounds great even at lower frequencies. 3 Quote Link to comment Share on other sites More sharing options...
ggn Posted January 12, 2018 Share Posted January 12, 2018 From the audio tutorial post here's a small side-by-side comparisons of the two audio engines: U-235 Can play .mod files: yes (4 channel ones) Can play samples: yes, up to 4 raw PCM samples alongside with the .mod Fine control of samples: yes - pitch and volume Supports μLaw compressed samples: no Supports mouse input: no (it probably can, never tested) Zerosquare Can play .mod files: no Can play samples: yes, up to 4 simultaneously Fine control of samples: no - fire and forget affair Supports μLaw compressed samples: yes Supports mouse input: yes 1 Quote Link to comment Share on other sites More sharing options...
F.L Posted January 12, 2018 Author Share Posted January 12, 2018 Yes i know that zerosquare engine dont support mod but the original music of the game is very long. Converting the mp3 or ogg with rb+ it will be impossible. (Files too big) I have the music in midi format but its not supported.... If i could convert it in mod format, i will come back to u235 to play it. The most important is that the rom runs well on real hardwarep 1 Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted January 12, 2018 Share Posted January 12, 2018 Yes i know that zerosquare engine dont support mod but the original music of the game is very long. Converting the mp3 or ogg with rb+ it will be impossible. (Files too big) I have the music in midi format but its not supported.... If i could convert it in mod format, i will come back to u235 to play it. The most important is that the rom runs well on real hardwarep Making .MOD music isn't as trivial as running a file through a converter, it requires a musician who is familiar with how trackers work and is willing to help out. Or you could just randomly find something online and use that. Careful though, not all trackers are made equally, some have extended commands and vary in how well they support them. Linko's player is pretty good, it'll play most 4 track MODs that support the standard commands pretty well. For ease of use/sanity/etc. though I'd suggest finding some public domain audio, chop it up to find a nice loop and use zero's player at least to begin with. There's plenty of room in a 4MB ROM! 1 Quote Link to comment Share on other sites More sharing options...
ggn Posted January 13, 2018 Share Posted January 13, 2018 Also, there's tons of royalty free music out there licensed under Creative Commons or some other similar permissive license. From our tests you can squeeze around 1 minute of audio in about 1mb if you compress it using μLaw and still sound great. 2 Quote Link to comment Share on other sites More sharing options...
F.L Posted January 13, 2018 Author Share Posted January 13, 2018 hello i only want to use the original music. i have added the gameover music because this music is not long you can hear it in the new 0.53 beta it works fine but it was a little too slow so i have replaced the frequency 46168/9233 by 46168/10233 it is a good frequency/method ? now i will add the intro music. i have a question again : how to stop the sfx ? in the tutorial post, it mention len=0, so i must do this : SNDZEROPLAY(1, strptr(sfx_tete), (strptr(sfx_tete_end)-strptr(sfx_tete)+3) and 0x0, 46168/10233, Zero_Audio_8bit_muLaw|0) ? thanks in advance Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted January 13, 2018 Share Posted January 13, 2018 Zeroplayer can only reply at frequencies that evenly divide into 46168 So: 46168 Hz (/1) 23084 Hz (/2) 15389 Hz (/3) 11542 Hz (/4) 9233 Hz (/5) etc.. 4 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.