RISC OS SOUND


15 posts
by Freddie570 » Tue Jan 08, 2013 6:27 am
Hi
The good old fashion VDU 7 beep command does not seem to work anymore!
I was wondering if this is because of the hardware?
I have some old BBC BASIC programs that use the various sound related commands, does this mean if I load them onto the RPi that they will not work? If so what changes do I need to make?

I am using an HDMI cable so do get some sound from *QSOUND commands, but not what I expected (or am I getting tone deaf!).

Many thanks for any help/advice.
Freddie.
Posts: 12
Joined: Thu Dec 20, 2012 2:33 am
by skywalker » Tue Jan 08, 2013 6:33 am
VDU 7 works for me in the ShellCLI (global shell available via F12).
It doesn't work in a Task Window however.

In my experience a number of BASIC features don't work in a Task Window. For instance, I find it a shame that you don't seem to be able to use BASIC's own EDIT tool in a Task Window hosted BASIC session.
Posts: 28
Joined: Tue Nov 06, 2012 4:55 am
Location: Vancouver, Canada
by skywalker » Tue Jan 08, 2013 7:23 am
I guess it's not really a case of "BASIC features" so much as VDU (i.e. video terminal or 'screen driver') features. I would guess that the reason why EDIT doesn't work is that certain cursor addressing functions aren't operational in the Task Window... but then I'm certainly not a RISC OS expert.

VDU 7 is of course the ASCII BEL code, which must be interpreted by the output device. Again, the screen driver (as opposed to a window) is the thing that emits the sound when this code is written to it.
Posts: 28
Joined: Tue Nov 06, 2012 4:55 am
Location: Vancouver, Canada
by Tide » Tue Jan 08, 2013 11:15 am
Re Edit: you need the ARMBE 32-bit version

https://sites.google.com/site/jeffreyadoggett

Not sure it works on the pi but see for yourself
Posts: 93
Joined: Wed Sep 14, 2011 11:21 am
by fladda » Tue Jan 08, 2013 2:23 pm
The 32-bit version of the old Basic Editor still works fine on the RPi. From memory this started life as *BE on the BBC micro.

The RiscOS 'veneer' application is called !BEdit. The module that does all the work is called ArmBE.

I still use ArmBE on a daily basis, as I know by heart most of the keyboard shortcuts. However, for new users I would recommend using the excellent Basic editors that are available with the !StrongED and !Zap editors supplied with the latest RiscOS distro's.

Ralph
Posts: 12
Joined: Fri Jan 04, 2013 1:46 pm
by skywalker » Tue Jan 08, 2013 5:19 pm
fladda wrote:The 32-bit version of the old Basic Editor still works fine on the RPi.


There's still plenty of opportunity for me to be confused, as I'm a complete RISC OS n00b. However, I'm referring to the standard editor in BASIC that you get when you type "EDIT" at the BASIC prompt.

I'm certainly aware that there are many other great editors that are much better tools in general. Indeed, I use StrongED - mostly because it was 'in my face' when I booted up RISC OS on the Pi for the first time, having an icon on the desktop in the distribution image.

I don't find the lack of being able to use EDIT inhibiting in the sense of having no other options. Rather I was just a little disappointed that EDIT works in full-screen mode (i.e. in the ShellCLI), but that the Task Window does not emulate the screen environment enough to be able to run it effectively in there. It just seemed a shame that there was a lack of 'symmetry' between the screen environment and the Task Window environment for running some apps that apparently need to go text/cursor addressing etc.

This is not a big deal, but it was one of my first 'oh dear' moments - right after the elation of rediscovering my old friend BBC BASIC *and* the joy of having multiple such windowed sessions. It looked like the windowed BASIC sessions had all the capabilities of the full screen environment - until I tried EDIT. At this point the window filled with arbitrarily positioned bits of text and various strange characters, in the way that terminals do when sent incorrect control codes, and I needed to kill the task.

I know the Terminal Window does some cursor addressing as you can PRINT TAB(x,y) and get what you expect, but clearly some important VDU features are missing or broken.

Anyway, I can certainly put it down to "The Task Window isn't currently designed to do this and there are lots of better options anyway", but I would have experienced unbroken awe everything had worked perfectly in the Task Window :-)
Posts: 28
Joined: Tue Nov 06, 2012 4:55 am
Location: Vancouver, Canada
by neilf » Tue Jan 15, 2013 8:52 pm
The good old fashion VDU 7 beep command does not seem to work anymore!


Did you ever get your sound working again?

My two R-Pis seem to have developed the same problem. The system beep was loud and clear a couple of weeks ago but now they are both mute. Fiddling with the Configure sound app makes no difference. These two boards share a single SD card, so something must be stored on the card that is turning sound off.

Any ideas what it could be?
Posts: 70
Joined: Sun Nov 11, 2012 8:14 am
by neilf » Tue Jan 15, 2013 10:24 pm
The good old fashion VDU 7 beep command does not seem to work anymore!

Freddie, I’ve now solved my sound problem and it just might be relevant to your setup too (as well as other people's).

I my case I tried substituting a number of R-Pi boards, SD card images and headphone/speaker setups, but they all exhibited the same mute sound. Weird, as these boards/cards all had sound working perfectly a week or two back.

Then it struck me that the one change I’d made that was now common to all these setups was to try out an HDMI to VGA adapter last week, feeding into the VGA side of my monitor. This instead of the direct HDMI to DVI connection I was using before. So I reinstated the direct HDMI-DVI cable and bingo – sound was back!

I’m not sure why a VGA adapter kills sound output through the R-Pi headphone socket under Risc OS, but it appears it does.
Posts: 70
Joined: Sun Nov 11, 2012 8:14 am
by colin B » Tue Jan 15, 2013 11:18 pm
neilf wrote:
I’m not sure why a VGA adapter kills sound output through the R-Pi headphone socket under Risc OS, but it appears it does.


VGA doesn't have any capability for sound, unless someone has used the I2C and RES pins as a sound connection.
On a clear disk one can seek forever
Posts: 120
Joined: Sun Mar 04, 2012 12:23 pm
by neilf » Tue Jan 15, 2013 11:44 pm
VGA doesn't have any capability for sound, unless someone has used the I2C and RES pins as a sound connection.

Well yes, I know that.
The question remains. Why does use of a VGA adapter kill sound output on the headphone socket? It does this under RISC OS, but not apparently under linux.
Posts: 70
Joined: Sun Nov 11, 2012 8:14 am
by Burngate » Wed Jan 16, 2013 11:58 am
neilf wrote:Why does use of a VGA adapter kill sound output on the headphone socket? It does this under RISC OS, but not apparently under linux.

Maybe something to do with hdmi_drive=1 (DVI) or 2 (HDMI) in config.txt, and that Linux could be forcing the 3.5mm jack output.
The DVI monitor is telling the Pi it has no sound. The VGA adapter could be not saying that.
Wyszkowski's Second Law: Anything can be made to work if you fiddle with it long enough.
Brain surgery is easier than psychoanalysis
User avatar
Posts: 2931
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK
by polas » Wed Jan 16, 2013 12:06 pm
neilf wrote:Why does use of a VGA adapter kill sound output on the headphone socket? It does this under RISC OS, but not apparently under linux.


I had a similar problem - my HDMI to VGA adaptor did not have support for sound and I was trying everything to get it working. I found that on Linux it is possible to configure Alsa to use analog sound (the 3mm jack) rather than digital (the HDMI port) but there is no such software level configuration on ROS. I guess the RPi hardware must just direct all sound to the 3mm jack if no digital (HDMI) is present.

Unfortunately I could not change the hdmi_drive settings as this had to be equal to 2 (HDMI mode) for my adaptor to work so could not even go down the DVI route. The solution? I just upgraded my HDMI to VGA adaptor for a cheap £20 one which has a 3mm jack built into it, so now have sound coming through the HDMI cable and grab it from the adaptor itself which seemed like the only solution for me. I posted this information on the ROS open forum (http://www.riscosopen.org/forum/forums/11/topics/1579) just in case anybody might find it useful in the future as I could not find a definitive answer for ROS.

I wonder why the RPi does not send sound to the in built 3mm jack regardless? I guess there must be some reason.

Nick
Posts: 33
Joined: Tue Jan 15, 2013 9:52 am
by DavidS » Thu Jan 17, 2013 3:13 am
That is strange. I actually keep having the oppisite problem, my DVI monitor does support HDMI Sound (allowing a standard HDMI signal in all ways on the DVI port), though I have to use the analog sound output on my RPi as it refuses to push sound out to the monitor. I am guessing that it sees a DVI monitor and does not look further to see if it is HD-Sound capable?
ARM Assembly Language: For those that want: Simple, Powerful, Easy to learn, and Easy to debug.
User avatar
Posts: 1251
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
by polas » Thu Jan 17, 2013 9:07 am
DavidS wrote: I am guessing that it sees a DVI monitor and does not look further to see if it is HD-Sound capable?


Sorry if I am teaching you to such eggs here, but have you tried setting hdmi_drive=2 in your config.txt, as this should force it into HDMI mode which will send sound over the HDMI cable. It might be that it is seeing DVI and inferring that the drive=1 which will direct sound to the 3mm on board jack instead.

Nick
Posts: 33
Joined: Tue Jan 15, 2013 9:52 am
by helpful » Sat Jan 19, 2013 12:46 pm
skywalker wrote:Anyway, I can certainly put it down to "The Task Window isn't currently designed to do this and there are lots of better options anyway", but I would have experienced unbroken awe everything had worked perfectly in the Task Window :-)

Prepare yourself for unbroken awe :-) then download GraphTask from:

http://www.armclub.org.uk/free/

It gives full graphics support in a task window, including all those old screen modes that the Pi doesn't natively support.
User avatar
Posts: 46
Joined: Sun Oct 09, 2011 4:09 pm
Location: London