Wookie Posted February 26, 2014 Share Posted February 26, 2014 I just saw the youtube video showing the Simpson's digitized sound demo and I was wondering how it was done. Has anybody played around with digitized sound effects on the Lynx? -wookie Quote Link to comment Share on other sites More sharing options...
LX.NET Posted February 26, 2014 Share Posted February 26, 2014 Not yet, but as far as i know HandyMusic supports streaming digitized sound directly from the cartridge. The HSPL offered the ability to include samples as well, but I believe that they are read in-memory. Not sure on this though. Check the samples I recently shared. One has digitized speech in it. BTW, did you see this post: http://atariage.com/forums/topic/208856-simpsons-for-the-lynx/ Quote Link to comment Share on other sites More sharing options...
GadgetUK Posted March 14, 2014 Share Posted March 14, 2014 I am interested in this as well. Quote Link to comment Share on other sites More sharing options...
enthusi Posted August 21, 2018 Share Posted August 21, 2018 A bit off date but on topic http://atariage.com/forums/topic/280409-music-player-test-with-a-little-gfx-to-swing-to/ Quote Link to comment Share on other sites More sharing options...
42bs Posted August 21, 2018 Share Posted August 21, 2018 A bit off date but on topic http://atariage.com/forums/topic/280409-music-player-test-with-a-little-gfx-to-swing-to/ Well, the dragnet demo :-) And BLL contains playback routines for packed and unpacked digi sound. Quote Link to comment Share on other sites More sharing options...
enthusi Posted August 21, 2018 Share Posted August 21, 2018 Yes, of course. This is only great (to me) since it is my code/player/converter :-) I enjoy coding the most, when all parts are my own. So no external libs/tools (to some extent at least). Quote Link to comment Share on other sites More sharing options...
LordKraken Posted August 21, 2018 Share Posted August 21, 2018 And BLL contains playback routines for packed and unpacked digi sound. What do you exactly mean by packed and unpacked? When playing digitalized sound in my game, I'm converting my samples to mono and the smallest bitrate I can (I think 8khz), and this is it (I keep a 8k buffer to dynamically load all sort of stuff, digi sound included... that means a maximum playing length of 2 top 3 seconds... ). But now you're saying there is the possibility to compress them? tell me more Thanks! Quote Link to comment Share on other sites More sharing options...
42bs Posted August 21, 2018 Share Posted August 21, 2018 I had a delta packer (lossy) for the samples using only 4 bit to define the delta between the current sample and the next one. The problem is: I cannot find the packer anymore When packing the sound you have to take the error into account. See sample.inc: *************** * packed Mono-Sample *************** PlayMono:: lda SmpSema bne .no_read dec SmpSema jsr ReadByte sta SmpTemp2 REPT 4 lsr ENDR tax clc lda tabelle,x adc SmpTemp sta SmpTemp sta $fd22 .cont1 inc DigiCount beq .next0 END_IRQ .next0 inc DigiCount+1 beq .next1 END_IRQ .next1 inc DigiCount+2 beq StopSampleIRQ END_IRQ .no_read stz SmpSema lda SmpTemp2 and #$f tax clc lda tabelle,x adc SmpTemp sta SmpTemp sta $fd22 END_IRQ tabelle DC.B 128,-64,-32,-16,-8,-4,-2,-1,0,1,2,4,8,16,32,64 Quote Link to comment Share on other sites More sharing options...
Irgendwer Posted August 30, 2018 Share Posted August 30, 2018 The problem is: I cannot find the packer anymore You mean this one: WAV2LSF.ZIP ? Quote Link to comment Share on other sites More sharing options...
sage Posted August 31, 2018 Share Posted August 31, 2018 does a mod player count as digital sound? Quote Link to comment Share on other sites More sharing options...
+karri Posted August 31, 2018 Share Posted August 31, 2018 In Always winter, never Christmas you can choose Elvis in the bar. He will sing Jailhouse rock as digitized sound at 4kHz. 1 Quote Link to comment Share on other sites More sharing options...
LordKraken Posted August 31, 2018 Share Posted August 31, 2018 (edited) Can someone explain to me how to create sample at 4khz? I can't go under 8khz mono, which leads to playing time of a just a couple of seconds with my 8kb buffer Edited August 31, 2018 by LordKraken Quote Link to comment Share on other sites More sharing options...
+karri Posted August 31, 2018 Share Posted August 31, 2018 (edited) You can just type in 4000 in Resample. The lowes preset value is 8000. When I make the Elvis tune I just wrote it all in C. If you want to know why I set isfrog=0 30 times so it is the delay for one sound value. int Bl17() { unsigned char *musa; unsigned int i; unsigned char j; unsigned char isfrog; musa = elvis; abc_samplemode(0); abc_setvolume(0, 255); for (i = 0; i < 21000; i++) { for (j = 0; j < 30; j++) { isfrog = 0; } abc_out(0, *musa); musa++; } abc_setvolume(0, 0); return 11; } And the ad-hoc audio modules: void abc_setvolume(char chan, int volume) { wanted_volume[chan] = (char) volume; VOLUME_REG(chan) = (char) volume; } void abc_out(char chan, char sample) { OUT_REG(chan) = sample; } void abc_samplemode(char chan) { // Disable count CTLB_REG(chan) = 0x0; CTLA_REG(chan) = 0x10; STEREO_REG = 0; } Edited August 31, 2018 by karri 1 Quote Link to comment Share on other sites More sharing options...
jum Posted March 25, 2019 Share Posted March 25, 2019 Here is an updated version of WAV2LSF with source and Windows .exe. Changes: - Added "-c" option that outputs the "LSF" sound data as a C file (.h or .c) (for easier workflow) - Made it a bit more user-friendly w.r.t usage "help" and error messages TODO: - Handle 16-bit WAV files (as some audio editors can't output 8-bit WAV) - Output "packed" sample data as C code - Include C and ASM code for packed sample player If needed, I can put it on my github. Coming soon: Final version of my Bezerk clone, faster and now with VOICE! (hence the detour into "updating" WAV2LSF). Credits to Bastian for the original WAV2LSF. wav2lsf_1.1.zip 2 Quote Link to comment Share on other sites More sharing options...
LordKraken Posted March 26, 2019 Share Posted March 26, 2019 Thanks Jum, will give it a try! 1 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.