DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 21st August 2011
claytonl claytonl is offline
Port Guard
 
Join Date: Jan 2011
Posts: 12
Thanked 0 Times in 0 Posts
Default Writing a guitar tuner/metronome

So heres the situation, I love OpenBSD but theres no guitar tuner or metronome for it. I'm not a programmer but I understand some very basic C, and have a couple books. I thought it would be fun to try to write a guitar tuner and a metronome but I'm unsure of where to begin. As far as I know, I would have to use sndio for sound input and output, but is that all I would need? If so, where would I find resources on programming for it? I found one web page on caoua.org which led me to a couple man pages as well, but I feel its too complex for a beginner. Am I trying something too difficult for myself or is there a manual or some kind of resource aimed at someone like myself?
Reply With Quote
  #2   (View Single Post)  
Old 21st August 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,880
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by claytonl View Post
S...but theres no guitar tuner or metronome for it.
I don't quite know what kind of functionality you are expecting in a tuner, but a metronome application can be found in ports:

http://www.openbsd.org/cgi-bin/cvswe...e?annotate=1.2

Unfortunately, the OpenPorts site is down, so I cannot provide a link with more readable information.
Quote:
I'm not a programmer but I understand some very basic C, and have a couple books.
My suggestion would be to:
  • look at what applications can be found in the ports audio branch:

    http://www.openbsd.org/cgi-bin/cvsweb/ports/audio/

    ...& select something which appeals to your interests.
  • Install the ports tree, & build the application(s). Study the source code that is downloaded.
Quote:
Am I trying something too difficult for myself or is there a manual or some kind of resource aimed at someone like myself?
Such a resource does not exist for OpenBSD. You might find something oriented for Linux.

As for difficulty level, it depends upon your motivation, current knowledge, & amount of patience. If you expect to have something working in a week's time, you may need to re-evaluate your goals. If you are looking for something to do for several months, this may meet (& exceed...) your expectations.
Reply With Quote
  #3   (View Single Post)  
Old 21st August 2011
shep shep is offline
ISO Quartermaster
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 589
Thanked 9 Times in 9 Posts
Default

Another approach, instead of writing your own tuner from scratch, would be to port a guitar tuner to openbsd. One major difference between Linux and FreeBSD is the sound drivers so using an application already ported to BSD unix would be a good start. Since FreedBSD has more ported applications that OpenBSD I did a quick search and there is a guitar tuner ported to FreeBSD.
FreeBSD/gtkguitune

Last edited by shep; 21st August 2011 at 11:37 PM. Reason: grammer
Reply With Quote
  #4   (View Single Post)  
Old 21st August 2011
claytonl claytonl is offline
Port Guard
 
Join Date: Jan 2011
Posts: 12
Thanked 0 Times in 0 Posts
Default

Very interesting. For some reason I don't have that metronome in my ports, but I downloaded it and gave it a try. It sounds like a heart beat and I'd like for it to be different so I'll see what I can do. Good idea about porting gtkguitune too.

Just for the record, are the man pages for sio_open the only documentation I would need? Or would I just learn from reading code? Or both?
Reply With Quote
  #5   (View Single Post)  
Old 21st August 2011
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,880
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by claytonl View Post
For some reason I don't have that metronome in my ports...
My mistake. I absent-mindedly forgot to look at the revision history. audio/metronome was initially added to the ports collection in March. This was after OpenBSD 4.9 was tagged. This also means that audio/metronome targets OpenBSD 5.0.
Quote:
...but I downloaded it and gave it a try.
As stated in Section 15.3.2 of the FAQ, mixing versions of the ports tree to the version of the operating system installed is not supported. If you downloaded the ports tree to -current while using OpenBSD 4.9-release, this is mixing versions.
Quote:
Just for the record, are the man pages for sio_open the only documentation I would need? Or would I just learn from reading code? Or both?
Both.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing a simple script to edit text files and execute commands guitarscn Programming 11 24th August 2010 09:21 PM
c++: writing to the *this pointer? robbak Programming 2 23rd October 2009 06:12 PM
Writing Papers in FreeBSD kagayaki General software and network 4 14th July 2008 11:31 PM
FreeBSD 7.0 Writing large amount to USB Disc cause kernel panic pvree FreeBSD General 1 13th June 2008 02:50 AM
USB TV tuner compatible with FreeBSD harisman FreeBSD General 4 25th May 2008 02:02 PM


All times are GMT. The time now is 01:06 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick