+karri Posted February 19, 2019 Share Posted February 19, 2019 (edited) I finally ported over HandyMusic to cc65. It is so different from anything I have experienced in Lynx sound earlier. A very strange and deterministic tool. Creating sound effects is easy but I still have not got my head around how the instruments work. It also has built in digitized sound that plays the samples directly from the cart. It also has a convenience function to load any tune directly from the cart to memory for playing. Is anyone else playing around with it? My big surprise is that it takes much less space than Chipper. Here is my first effort with HandyMusic to create a special track for an upcoming game. http://79.125.115.174/pics/untitled.mp3 It is still only the rhythm and no chord changes or melody. Perhaps it takes shape next week... Edited February 19, 2019 by karri 3 Quote Link to comment Share on other sites More sharing options...
Turbo Laser Lynx Posted February 19, 2019 Share Posted February 19, 2019 Sounds quite exciting! Btw I think you forgot to attach the tune (or I can't see it on mobile). Quote Link to comment Share on other sites More sharing options...
+karri Posted February 19, 2019 Author Share Posted February 19, 2019 (edited) I just cannot find out how to attach a sound clip in a sensible way The media-option turned it to flash For some reason only a http link seems to work somehow... Edited February 19, 2019 by karri Quote Link to comment Share on other sites More sharing options...
Turbo Laser Lynx Posted February 20, 2019 Share Posted February 20, 2019 I think you can zip un-attachable files and then attach them. I've had this problem too with .lnx files. Quote Link to comment Share on other sites More sharing options...
Igor Posted February 20, 2019 Share Posted February 20, 2019 That sounds cool, I remember talking to you about it, good you actually tried it out. I'm still using ABCmusic Quote Link to comment Share on other sites More sharing options...
LX.NET Posted February 20, 2019 Share Posted February 20, 2019 Karri, is there a place where we can find the source code for this? Quote Link to comment Share on other sites More sharing options...
+karri Posted February 20, 2019 Author Share Posted February 20, 2019 Karri, is there a place where we can find the source code for this? Yep. I just shared the source with you on bitbucket. There is a few special things on my source. It has 3 different sound engines HANDYMUSIC, CHIPPER and NOMUSIC. Currently I have activated HANDYMUSIC. The config file sets the HANDYMUSIC starting at A000. The sound effects have to be manually set in the config file AND they have to be set in the sounds directory Makefile as well. Otherwise the build fails. You also need python3 installed for getting the tile engines to work correctly at compile time. If you are on Windows you need to remove the wine code in from of all exe files. The game itself has not been released yet so please sshhhh. Quote Link to comment Share on other sites More sharing options...
Igor Posted February 20, 2019 Share Posted February 20, 2019 I think what Alex is after is this - http://www.tailchao.com/Audio/ http://www.tailchao.com/Audio/SASS.php http://www.tailchao.com/Audio/HandyMusic/HandyMusic_v1-40cx+.zip Quote Link to comment Share on other sites More sharing options...
+karri Posted February 21, 2019 Author Share Posted February 21, 2019 (edited) Yes. These are the ones I have ported to cc65. The original ones are for BLL and lyxass. The port also contains interrupt integration to the cc65 and use of the cart read routines available in cc65. So it is now fully compatible with C. You can call all HandyMusic routines from C-code like: HandyMusic_PlaySFX(TypewriterSFX); HandyMusic_StopAll(); HandyMusic_LoadPlayBGM(0); if (*PCMActive == 0) { openn((int)&SAMPLES1_FILENR); PlayPCMSample(1); } The SFX elements are arranged in an array so you index the SFX samples starting from 0. The music is stored on cart and you choose what to play starting with index 0. The digitized sound is still under work. I had problems with overlapping sound effects. As they are streamed out from the cart instead of from RAM I had to invent some new guards to make it work. The value of PCMActive is the real BACKUP register for timer 3. But now everything seems to work ok. PS. I just updated the sound sample in the first post. Now it contains all 3 elements: BGM (Background music) SFX (HandyMusic Sound Effects) PCM (Digitized speech) Edited February 21, 2019 by karri 2 Quote Link to comment Share on other sites More sharing options...
Nop90 Posted February 21, 2019 Share Posted February 21, 2019 Is it possible to use chipper for tunes (channels 0, 1 and 2) and PCM sample with HandyMusic (channel 3) in the same game? It would be great to use the original pcm SFX (just a bit downsampled) in my Xump port. Quote Link to comment Share on other sites More sharing options...
+karri Posted February 21, 2019 Author Share Posted February 21, 2019 (edited) Mixing Chipper and HandyMusic is not a good idea. But it is not so complicatred to push out digitized sound. In "Shaken, not stirred" I wanted the phrase "Oh James, that was awesome" to be spoken in case you solved the game. Due to being lazy I did it completely from C. lynx_load((int)&OOJAMES_FILENR); musa = ohjames; CTLB_REG(0) = 0x0; CTLA_REG(0) = 0x10; STEREO_REG = 0; VOLUME_REG(0) = (char) 255; for (i = 0; i < 15880; i++) { for (j = 0; j < 15; j++) { isfrog = 0; } OUT_REG(0) = (char)*musa; musa++; } VOLUME_REG(0) = (char) 255; The silly loop inside the bigger loop is just to have some delay to get the pitch of the sound right, Edited February 22, 2019 by karri 1 Quote Link to comment Share on other sites More sharing options...
TailChao Posted March 15, 2019 Share Posted March 15, 2019 Ah, I missed this. Thank you for doing the cc65 migration! I haven't looked at HandyMusic in several years, I do not know if I will be able to come back to it and do a v2.0 - but it's nice to see it still in use. Quote Link to comment Share on other sites More sharing options...
sage Posted March 15, 2019 Share Posted March 15, 2019 it is ... -> PM Quote Link to comment Share on other sites More sharing options...
+karri Posted March 15, 2019 Author Share Posted March 15, 2019 Ah, I missed this. Thank you for doing the cc65 migration! I haven't looked at HandyMusic in several years, I do not know if I will be able to come back to it and do a v2.0 - but it's nice to see it still in use. I am really impressed by the SASS language. Easy to work on sound effects and it is also stable. You can create a sound and forget about it. No need to change it later. One thing I would like to try out the PCM samples as part of my feelgood level. The idea is to create the tune Tequila. With the vocals at the end of the phrase. You seem to have this option available Quote Link to comment Share on other sites More sharing options...
Nop90 Posted March 15, 2019 Share Posted March 15, 2019 Mixing Chipper and HandyMusic is not a good idea. But it is not so complicatred to push out digitized sound. In "Shaken, not stirred" I wanted the phrase "Oh James, that was awesome" to be spoken in case you solved the game. Due to being lazy I did it completely from C. lynx_load((int)&OOJAMES_FILENR); musa = ohjames; CTLB_REG(0) = 0x0; CTLA_REG(0) = 0x10; STEREO_REG = 0; VOLUME_REG(0) = (char) 255; for (i = 0; i < 15880; i++) { for (j = 0; j < 15; j++) { isfrog = 0; } OUT_REG(0) = (char)*musa; musa++; } VOLUME_REG(0) = (char) 255; The silly loop inside the bigger loop is just to have some delay to get the pitch of the sound right, I can't make it play the sample, The output is only odd sounds. I exported the samples as raw PCM 8kHz mono 8bit signed (using audacity). Is it right? Also tryed 8bit unsigned, but it's the same.. Quote Link to comment Share on other sites More sharing options...
42bs Posted March 17, 2019 Share Posted March 17, 2019 That's the setup in playsmp.asm (from BLL): stz $fd25 stz $fd25+8 stz $fd25+16 stz $fd25+24 stz $fd50 lda #$F0 sta $fd40 sta $fd42 lda #$0F sta $fd41 sta $fd43 stz $fd50 lda #$ee sta $fd44 Maybe some registers were not setup correctly. Or the loop is too fast. You may want to try the HBL (6240Hz at 60FPS or 7800Hz at 75FPS) to put out the data. Quote Link to comment Share on other sites More sharing options...
sage Posted March 17, 2019 Share Posted March 17, 2019 Mixing Chipper and HandyMusic is not a good idea. As chipper exports HandyMusic script as well, thats not a problem 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted March 17, 2019 Author Share Posted March 17, 2019 As chipper exports HandyMusic script as well, thats not a problem I had no idea. This is very good news for me. It will save lots of time. 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.