![]() |
New games every week!
Advent Begins...
Blog
29th December 2024
What do you mean, it isn't Advent?
-=-=- I have a list of tasks that I wrote mid-October. A list of things that I could happily do once the Typing Tutor was done, and I'd successfully freed up the whole of December, because I wouldn't have to do any Advent games. Fat load of good that did me. So, the list still stands, and if I'm going to get any of it done, I might as well squeeze it in wherever I can. Yesterday, then, I made a start on JSE Task 4, which is titled.. How about "Sound"?JSE's a form of BASIC, and the Sound command as I'd like to implement it, is one from the Amstrad CPC days. It's coupled with ENV and ENT, both of which are so alarmingly complicated that I'm still looking at them and going "WTF!" 40 years on. But I had a little play with the concept yesterday. Instead of pre-made waveforms, the Sound command would generate sounds on-the-fly, and would allow a teensy bit more variation in the sorts of sounds that JSE games would make. .. To a degree. It depends entirely on how well I can code a functioning Sound commandset. So, let's start with a basic command, then, yeah? ![]() ... With a little ChatGPT magic, things actually took shape a fair bit quicker than I expected them to, but still several hours worth of back+fro'ing to get it into a vaguely useable setup. laser: { type: 'square', freqStart: 880, freqEnd: 440, attack: 0.02, decay: 0.1 }, jump: { type: 'triangle', freqStart: 440, freqEnd: 660, attack: 0, decay: 0.1, sustain: 0.3, release: 0.3 }, coin: { type: 'square', freqStart: 1200, freqEnd: 2000, attack: 0, decay: 0.1, sustain:0.3, release:0.3, step: 1, steprepeat: 0, steptime: 0.05 }, explosion: { type: 'noise', attack: 0.01, decay: 0.5 }, neenaw: { type: 'square', freqStart: 500, freqEnd: 400, attack: 0, decay: 0.1, step: 1, steprepeat: 2, steptime: 0.1 }, weewaw: { type: 'square', freqStart: 400, freqEnd: 800, attack: 0, decay: 0.1, wavetime: 0.02 } : Download What the engine can make from the sounds defined above. (Don't worry, I'll make it less scary!!) Currently these are hardcoded into an array, but I should be able to extend the JSE language to allow you to define new sounds, and from there define ADSR values, pitch shifting, repeats and other such thing, then just use something like PlaySound("name",pitch, volume, pan) Technically it should work. I think.. I just need to test it out on something slow so I can be sure that the generation of sounds doesn't make things really bad, speed wise. And then once that's done, it's one of the many many tasks on my giant advent list that are done. Hurray!! Look out for a JSE update in the next wee short while, though I'll probably do a "Can you all stress test this, please!" test edition first. A.I. CornerNo lyrics, today. I threw the sound clip above directly into Suno, asked it to extend it with the prompt "retro sound effect, videogame, 8-bit, chiptune, title screen, funk", and this is what came out of it. Suno really is a powerful bugger. : Download | Suno Link Alternative version : Download | Suno Link Sung by Suno ![]() "Cartoon Derek checks an item off the top of his 178 item checklist." by Replicate/Flux > Reveal 🔎 Views 113, Upvotes 6
Daily Blog
,
Jse
New games every week!
|