Advice on Using BASIC for Instrument Control & Audio Playback

Click For Summary

Discussion Overview

The discussion revolves around the use of BASIC, specifically Visual Basic, for instrument control and audio playback in a Windows environment. Participants explore the capabilities and limitations of BASIC and its variants, particularly in relation to specific application requirements such as audio recording, serial port usage, and resource management on older PCs.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant shares their extensive experience with various versions of BASIC and expresses a need for functionality that may exceed BASIC's capabilities, particularly regarding audio playback and system control.
  • Another participant suggests transitioning to VB.Net 2005 for better access to Windows functions, noting that it is a significantly redesigned language with object-oriented features.
  • There is a suggestion that Iron Python could also be a suitable alternative, with an emphasis on the benefits of learning multiple programming languages for problem-solving.
  • A participant highlights the importance of being able to terminate applications and reboot the PC as key requirements for the user's project.
  • Concerns are raised about the necessity of distributing the .NET runtime with applications, which could pose challenges for users with limited resources.
  • Discussion includes a clarification that VB.Net can be compiled to machine code, which may alleviate some concerns regarding runtime distribution.
  • Participants note differences between BASIC variants, specifically the ability of QuickBasic to create executable files compared to QBasic.

Areas of Agreement / Disagreement

Participants generally agree that VB.Net is a suitable choice for the user's needs, but there are differing opinions on the implications of using .NET, particularly regarding resource requirements and the necessity of the runtime. The discussion remains unresolved on the best approach considering these factors.

Contextual Notes

Limitations include uncertainty about the compatibility of Visual Basic 2005 with older machines and the implications of the .NET runtime size on resource-constrained PCs.

Averagesupernova
Science Advisor
Gold Member
Messages
4,914
Reaction score
1,564
Ok I suspect it may be pointless to post here considering the bad rap that BASIC gets. I have a fair amount of BASIC experience in instrument control. I started out with Commodore BASIC and moved up through QBASIC and Quick BASIC (yes there is a difference) and through Visual BASIC 6.0. BASIC is the only language I know. I've been told that it is or at least has been the number one choice of languages for instrument control. I have to admit it has pretty much done everything I need it to. However, I have run into a situation where I need to do a few things that I'm not sure if BASIC can handle. I'm considering Visual Basic 2005.


1) I need to record and play back a short audio track from time to time. Also needs to use the serial port. From what I can tell on Microsoft's site this is not a problem.

2) It would be nice, but not necessary to be able to make the PC reboot from within the application.

3) It would be nice to be able to terminate other applications from within this application.

4) The application would require a very small amount of PC resources and is aimed at a hobby market. It seems that this market demographic boasts a large number of surplus computers at a very affordable price. I can't tell so far whether Visual Basic 2005 allows its applications to run on older machines. Web site doesn't say.

I'm not against learning C, in fact, would really like to but I don't feel like I have the time to do it right now. I don't really buy into the stuff about BASIC being a crappy language because it allows for so many sloppy habits. As far as I am concerned a good programmer should recognize sloppy habits and avoid this type of coding regardless of what language. I'll agree, it is a limited language by nature, but that is a shortcoming of the programmer not recognizing this fact (quite possibly me) and trying to do the equivalent of driving a Yugo into a sharp turn at 120 MPH. It's just something it wasn't designed to do. Kind of a ballsy statement from a lowly BASIC programmer, but I still stand by it.

So, what should I do? You know the requirements and I don't really have the time to learn a new language at this time. Please consider this.
 
Last edited:
Computer science news on Phys.org
Well, if this is a windows only program, I would move to VB.Net 2005. that gives you access to all the functions of windows and makes it easier to do the stuff you want to do.

Know this though that VB.NET is almost a new language. it is basic based, but the OO features have been greatly redesigned and the language feels much more cohesive.

Though, I would also say that moving to Iron Python in .Net would be an equally well suited move and it would be a better language :-D

oh, and If I were you, I would learn a few other languages just for variety. it is always good to know different ways to do things so you can attack the problem better.
 
Thanks computergeek. It is a windows only program for now at least. As stated earlier I am not against learning new languages but programming is not a primary job function. It is something I have a knack for in the context of the hardware I design that IS the primary job function. I am mostly interested in the terminating of other applications and rebooting the PC from within my written applications. All the other stuff that goes along with the application I intend to write I've done in the past.

P.S. I wish I actually did have the time to learn some new languages. Thanks again.
 
VB.Net is definitely the language for you then
 
Don't you have to distribute the .net runtime with your application though? This may be a problem if you are targetting PCs with not many resources, as you state in the OP.

IIRC, the runtime is about 20MB in size.
 
I think vb.net can be compiled to machine code.
 
VB 6.0 would make a .exe file and I would hope the later versions could as well. Incidentally, that is one of the many differences between QBasic and QuickBasic. QuickBasic could make a .exe where QBasic could not.
 

Similar threads

Replies
17
Views
7K
  • · Replies 44 ·
2
Replies
44
Views
6K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 21 ·
Replies
21
Views
3K
Replies
7
Views
9K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
12
Views
3K
Replies
15
Views
5K