BBC BASIC
« I must be missing something simple .......... »

Welcome Guest. Please Login or Register.
Mar 31st, 2018, 10:42pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Cross-platform BBC BASIC (Windows, Linux x86, Mac OS-X, Android, iOS, Raspberry Pi)
BBC BASIC Resources
BBC BASIC Help Documentation
BBC BASIC for Windows Home Page
BBC BASIC Programmers' Reference
BBC BASIC Beginners' Tutorial
BBC BASIC for SDL 2.0 Home Page
BBC BASIC Discussion Group

« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 locked  Author  Topic: I must be missing something simple ..........  (Read 1998 times)
hitsware
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 51
xx Re: I must be missing something simple ..........
« Reply #30 on: Aug 12th, 2017, 8:45pm »

Yep !
I just tried the same routine in Ruby as well as Sonic-Pi
the ' system ' commands themselves (away from BBCB)
take mucho tiempo. ( ~ 1/4 sec. )
I'll have to find another way to write to Timidity ......

edit: My guess was pretty good ...... 0.33 sec.
Code:
      TIME=0
      SYS "system","amidi -p hw:1,0 -S'90 #{hmn} 7F'"
      SYS "system","amidi -p hw:1,0 -S'B0 7B 0'"
      x=TIME
      PRINT x
 
User IP Logged

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


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: I must be missing something simple ..........
« Reply #31 on: Aug 12th, 2017, 9:09pm »

on Aug 12th, 2017, 8:45pm, hitsware wrote:
I'll have to find another way to write to Timidity ......

Did you not read my latest message (posted 15 minutes before yours)? Running the amidi commands in the background speeds them up hugely here (although obviously there's a danger of them 'overlapping', depending on how reliably timidity manages to serialise them).

But since the GL Driver appears to be incompatible with MIDI sound, and without it BBC BASIC is unusably slow (I tried, but it's impossible), you will have no choice but to find an alternative approach.

Perhaps you might consider returning to BBC BASIC when Raspbian Stretch is released and (hopefully) the GL Driver is stable and doesn't break other things.

Richard.
User IP Logged

hitsware
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 51
xx Re: I must be missing something simple ..........
« Reply #32 on: Aug 12th, 2017, 9:51pm »

on Aug 12th, 2017, 9:09pm, Richard Russell wrote:
Did you not read my latest message (posted 15 minutes before yours)? Running the amidi commands in the background speeds them up hugely here (although obviously there's a danger of them 'overlapping', depending on how reliably timidity manages to serialise them).

But since the GL Driver appears to be incompatible with MIDI sound, and without it BBC BASIC is unusably slow (I tried, but it's impossible), you will have no choice but to find an alternative approach.

Perhaps you might consider returning to BBC BASIC when Raspbian Stretch is released and (hopefully) the GL Driver is stable and doesn't break other things.

Richard.

How does one "run commands in the backround" ?
It's not the BBC BASIC as much as the 'system' commands
They bog down even Sonic-Pi which is quite good time-wise
By another approach, I mean an address (file) to write to rather
than making the 'system' commands.
probably something like " /dev/snd/midiC1D0 "
see: https://wiki.archlinux.org/index.php/Timidity
User IP Logged

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


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: I must be missing something simple ..........
« Reply #33 on: Aug 12th, 2017, 10:25pm »

on Aug 12th, 2017, 9:51pm, hitsware wrote:
How does one "run commands in the backround" ?

It's documented in the BB4W manual under *RUN. Apparently you can't see, or haven't bothered to read, my post (it's reply #29 in the thread) which contains a complete program demonstrating it. It plays the notes very quickly.

Quote:
It's not the BBC BASIC as much as the 'system' commands

'system' commands aren't slow, certainly not in the sort of timescale relevant to music. The issue appears to be that the amidi command takes quite a time before it returns. Running it in the background means that you don't need to wait until it returns, but with the risks outlined in my previous post.

I'm locking this thread now before it drives me completely mad. angry

Richard.
User IP Logged

hitsware
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 51
xx Re: I must be missing something simple ..........
« Reply #34 on: Aug 12th, 2017, 10:45pm »

Sorry ....... My seeing eye reading dog must have been distracted rolleyes
User IP Logged

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

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls