BBC BASIC
« Irregular timing on RPi ? »

Welcome Guest. Please Login or Register.
Jan 20th, 2018, 6:07pm


Cross-platform BBC BASIC (Win32, Linux x86, Android, Mac OS-X, Raspberry Pi)

« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: Irregular timing on RPi ?  (Read 717 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx Re: Irregular timing on RPi ?
« Reply #15 on: Aug 18th, 2017, 08:49am »

OK, progress. The claim that enabling the 'GL Driver' stops MIDI output working is false! What is actually happening is that enabling the GL driver creates a new sound 'card' called vc4hdmi which you can see by executing the following command in a terminal:

Code:
cat /proc/asound/cards 

Obviously, the creation of this new card means that the Virtual MIDI card you attempt to create using modprobe cannot use slot 1 - because that is now occupied - but needs to go at slot 2. In general, you need to know what sound card slots are already occupied before you can issue this command. Once this is appreciated MIDI output works perfectly with the GL Driver enabled (and thus BBC BASIC responding quickly).

Annoyingly I even reported the supposed GL Driver 'fault' at the Raspberry Pi forum. I should have been more sceptical from the beginning, since it was never plausible that it could have this effect. I suspect it was a case of copying code found on the web 'by rote' without actually understanding how it works - one of my pet hates! If and when I get around to writing a MIDI library I will attempt to make it adapt to what has gone before, for example whether the GL Driver is enabled or not.

Richard.
User IP Logged

hitsware
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 49
xx Re: Irregular timing on RPi ?
« Reply #16 on: Aug 18th, 2017, 2:55pm »

> I suspect it was a case of copying code
> found on the web 'by rote' without actually
> understanding how it works -
> one of my pet hates!

I hate it too but must do it often to achieve my objective.
For instance: Back with BBC4W everytime I wanted to do
Midi I had to copy and paste your midi setup routine without
an iota of understanding. I hated it but with my limited
knowledge (and aptitude) for computers had no choice.
And I continue to find myself in those situations.
User IP Logged

https://www.youtube.com/watch?v=ePhUBBGyVmI
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 689
xx Re: Irregular timing on RPi ?
« Reply #17 on: Aug 18th, 2017, 4:15pm »

on Aug 18th, 2017, 2:55pm, hitsware wrote:
I had to copy and paste your midi setup routine without an iota of understanding.

You could have looked up the Windows API functions it uses at MSDN, where everything would have been explained in great detail. It's sometimes a little harder to do the same for Linux API functions, because there isn't one central reference in the same way, but nevertheless Google will usually find it.

There is no reason at all not to understand code you are using, given the wealth of resources on the internet and the search engines that are so good at finding things. Two days ago I knew literally nothing at all about MIDI on Linux, but Google found everything I needed to know, and at no point did I find myself having to copy code that I didn't understand.

The most useful reference I found was here. It explains about the card index - which is how I discovered your mistake - device numbers and routing. It has allowed me to write BBC BASIC code (which will hopefully eventually go into MIDILIB) which is entirely self-contained - no need to issue commands in a terminal for example - and runs correctly whatever the pre-existing system configuration, whether timidity has already been run or not etc.

Richard.
User IP Logged

hitsware
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 49
xx Re: Irregular timing on RPi ?
« Reply #18 on: Aug 18th, 2017, 6:30pm »

You grossly underestimate my inaptitude ...... undecided
User IP Logged

https://www.youtube.com/watch?v=ePhUBBGyVmI
Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!


This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls