Hook up sound from jsbeeb#117
Conversation
|
I've marked this as a draft because the error needs fixing, but I'm not really a JS dev and I'm stumped as to how to debug it - I don't see anything in the browser's JS console. @mattgodbolt Any ideas? The styling of the "audio-warning" probably needs sorting out too, but that's only cosmetic at least. |
|
I'll have a poke about at the weekend! Thanks for taking a look |
|
Probably worth a chat with @8bitkick as to whether no sound was a very deliberate choice too |
|
Any thoughts, Dom? FWIW I doubt it was deliberate - even just thinking about writing code for BBCMicrobot, the bot used to support sound and that code is still there if you select jsbeeb as the emulator to use, but sound has not yet been implemented when using beebjit as the emulator, which is the hard-wired default. The main obstacle there is lack of support for recording audio from a headless beebjit - I did try to implement that but the patch had some problems that I probably needed help to resolve and sadly I never got any response: scarybeasts/beebjit#48 |
|
Another data point - 8bitkick's old editor supported sound from the emulator. |
This patch does get us working sound, but during loading a modal full-window error pops up: Uncaught runtime errors: ERROR The operation was aborted. Clicking the X in the top right continues to a working owlet. I've failed to work out where this is coming from. Fixes mattgodbolt#80
@mattgodbolt Did you get anywhere poking this? I had another poke myself, commenting out various things and monkey patching stub functions over things and even adding (I've also rebased onto current main to make sure this wasn't caused by something we'd already fixed recently - if that's unhelpful feel free to |
|
I'm sorry @ojwb I did not in fact look... I'll try and take a look next week (this week is a write-off). Sorry! |
|
I'm still failing on this: it has progressed to "sticky note on my monitor" priority, but in fair warnings I've been prepping an important talk for next week...after that things get a little free-er |
|
@ojwb I'm finally taking a look... and it seems to "just work" ™️ for me locally on Chrome... but not firefox! I'll dig about :) |
|
I'm going to try and get the latest jsbeeb in and update all the deps, then dig into this! |
|
ok ... merged... which brings in some jsbeeb worklet fixes BUT probably means we need to move over to |
|
Well sad me is hitting some apparent bugs in |
|
Seems you've at least identified the problem I was hitting (and more generally updated owlet to work with current jsbeeb). One thing I noticed: Is I can't seem to see either |
|
that's interesting: it's possible the music 5000 stuff's broken in jsbeeb. I've been going around in circles trying to fix this in owlet :\ |
|
oh that's just a typo. so the magic is:
|
|
it's just that doesn't seem to work across project boundaries properly |
|
I tried a couple more workaround bit keep hitting new snags. Argh! I'm sorry :( |
|
Been plugging away a bit more and I'm starting to run out of ideas. This might be the thing that forces me to publish a "proper" jsbeeb package though :D |
|
I was pointed to this thread (thanks ojwb). Shame there's no sound - I wonder whether people could write tiny compressed programs to play great audio if it gets fixed? I remember on my old BBC we had a Digitised Sound demo that played a bit of Video Killed The Radio Star repeatedly (a few bars starting from one of the bits that goes Ohhw-ah-ohhw... then a few vocals from the male voice, repeated over and over) - basically a 4 second loop from the start of 0:44 to the end of 0:47 over and over (or a similar-sounding part): https://www.youtube.com/watch?v=W8r-tXRLazs&t=44 Then there's Spy Hunter, the game I always think of when I remember digitised sound on the BBC Micro. Kinda reminds me of Bart vs. the Space Mutants on the NES - that game had digitised voice effects for Bart: "Eat my shorts" and "Cool man". Having looked at the BBC Micro Bot website, I'm seriously impressed with what people have done in tiny amounts of code. I've seen where people encode machine code in Base64, run a quick loop to decode it then CALL it. I notice the Owlet and the Bot both accept code compressed in base2048 format, but base65536 should probably be accepted too as it has a better compression ratio. Sorry, rambling a bit. Thanks! Don't worry if any of these suggestions are too awkward or not worth doing for whatever reason. EDIT: Ah, what's this? It says no clashes, but is that right? I don't know enough about this sort of programming I'm afraid. #135 Matt |

This patch does get us working sound, but during loading a modal full-window error pops up:
Uncaught runtime errors:
ERROR
The operation was aborted.
Clicking the X in the top right continues to a working owlet. I've failed to work out where this is coming from.
Fixes #80