Streaming sound from disk on a BBC Micro

Discuss all aspects of programming here. From 8-bit through to modern architectures.
Post Reply
User avatar
pixelblip
Posts: 1473
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Streaming sound from disk on a BBC Micro

Post by pixelblip » Thu Aug 08, 2019 7:41 pm

Hi
Do you think it's possible (or has anyone done it) streaming samples from disk on the BBC micro?
I know sample resolution is in 1 bit........I am just curious what could be achieved......and could it be done in Mode 2?
My aim might be to show some colour cycled pics with streaming audio. That could be fun.
I do appreciate the quality will be very poor but ....back in the day hearing any sampled sound was totally amazing........I do remember hearing a few demos back then and thought wow that's so cool.

I might also try a few pics with some Music 5000 music anyway.....maybe that might have to be Mode 7 pics....but this got me thinking....could it be done in Mode 2 with some sampled sound. Hmmmm :)

Thanks

Oh just found this so maybe it's a yes....
https://www.youtube.com/watch?v=TMEtjLur4uM
Last edited by pixelblip on Thu Aug 08, 2019 7:45 pm, edited 3 times in total.

User avatar
tricky
Posts: 3902
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Streaming sound from disk on a BBC Micro

Post by tricky » Thu Aug 08, 2019 8:07 pm

I think you would need some serious compression to play samples from a floppy, but bitshifters did get the teletext version of BadApple streaming of real hardware.

cmorley
Posts: 1140
Joined: Sat Jul 30, 2016 7:11 pm
Location: Oxford
Contact:

Re: Streaming sound from disk on a BBC Micro

Post by cmorley » Thu Aug 08, 2019 8:59 pm

I just did a speed test on my B with 8271 & a real floppy. It will read 32K in 4s. 4K/s would be enough to stream either chiptune and/or sampled sound... I suppose you can do work, poll, do work, poll to reduce interrupt overhead if need be.

It'd be fairly low bitrate & bit depth digital audio but not impossible.

Easier would be ADFS and a hard disk/BeebSCSI.

User avatar
pixelblip
Posts: 1473
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Streaming sound from disk on a BBC Micro

Post by pixelblip » Fri Aug 09, 2019 6:23 am

Thanks for doing those tests.
If anyone has done this before and has any code or routines or is up for this please let us know.
I can get by in basic but that’s about it.......it’s going to need some 6502 isnt it...maybe one day I’ll sit down and learn it :D
Thanks all

User avatar
tricky
Posts: 3902
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Streaming sound from disk on a BBC Micro

Post by tricky » Fri Aug 09, 2019 8:38 am

Bitshifters Bad Apple
How much audio do you need, as at 8KB/s A disk (or two) won't last too long.

steve3000
Posts: 2100
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: Streaming sound from disk on a BBC Micro

Post by steve3000 » Fri Aug 09, 2019 1:16 pm

I thought about whether streaming sampled sound would be possible back when I did my Bad Apple conversion, and although I didn't get round to writing any sound streaming code, I came to the conclusion that you would probably be able to do something interesting along these lines using a MMC/SD card interface...

User avatar
pixelblip
Posts: 1473
Joined: Wed Feb 04, 2015 7:19 pm
Location: London
Contact:

Re: Streaming sound from disk on a BBC Micro

Post by pixelblip » Fri Aug 09, 2019 5:14 pm

Thanks all.....
Not sure how long the clips would be. I guess it would more be a question of how many seconds can I get with say 5 mode 2 pictures on a floppy disk?
It doesn't have to be a floppy but I guess people would like it as an ssd or dsd ........
If each picture could have a loop of sound say 5 seconds each that would be cool.
Last edited by pixelblip on Fri Aug 09, 2019 5:15 pm, edited 1 time in total.

Post Reply