Advice on Using BASIC for Instrument Control & Audio Playback

In summary, if you are looking to target a hobby market with a windows only program, Visual Basic 2005 is the language for you. If you need to record and play back audio, use Windows' built in features or consider Iron Python. Lastly, if you are looking to target a market with older or less powerful machines, learn Iron Python or another language.
  • #1
Averagesupernova
Science Advisor
Gold Member
4,419
1,193
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
  • #2
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.
 
  • #3
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.
 
  • #4
VB.Net is definitely the language for you then
 
  • #5
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.
 
  • #6
I think vb.net can be compiled to machine code.
 
  • #7
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.
 

What is BASIC?

BASIC, which stands for Beginner's All-Purpose Symbolic Instruction Code, is a high-level programming language that was developed in the 1960s. It was designed to be easy to learn and use, making it a popular choice for beginners and non-experts in programming.

Why would I use BASIC for instrument control and audio playback?

BASIC is a versatile language that can be used for a variety of tasks, including instrument control and audio playback. It allows for quick and easy development of programs, making it a good choice for tasks that require fast execution and real-time control.

Is BASIC still relevant for instrument control and audio playback?

While BASIC may not be as widely used as it once was, it is still a viable option for instrument control and audio playback. Many modern versions of BASIC, such as Visual Basic, have been updated to include more advanced features and functionality.

What are the advantages of using BASIC for instrument control and audio playback?

One of the main advantages of using BASIC for instrument control and audio playback is its simplicity. BASIC is a relatively easy language to learn and use, making it a good choice for those who are new to programming or have limited experience. Additionally, BASIC is a fast and efficient language, making it suitable for real-time applications.

Are there any limitations to using BASIC for instrument control and audio playback?

While BASIC can be a useful language for instrument control and audio playback, it does have some limitations. It may not be the best choice for more complex tasks or projects that require a high level of precision. Additionally, there may be other programming languages that offer more advanced features and functionality for these types of tasks.

Similar threads

Replies
9
Views
1K
  • Computing and Technology
Replies
2
Views
534
  • Computing and Technology
2
Replies
44
Views
3K
  • DIY Projects
Replies
7
Views
2K
  • STEM Academic Advising
Replies
12
Views
1K
  • Introductory Physics Homework Help
Replies
12
Views
736
Replies
15
Views
1K
  • Programming and Computer Science
Replies
10
Views
2K
  • Programming and Computer Science
Replies
15
Views
1K
  • Computing and Technology
Replies
9
Views
2K
Back
Top