Join Dan Gookin for an in-depth discussion in this video Building an interface by using NCurses, part of Code Clinic: C.
- The ncurses library has been around a long time.…It allows you to program full-screen…and real-time keyboard interaction…in the Unix terminal environment,…which includes the cygwin shell for Windows.…Many full-screen terminal programs,…including the popular vi editor,…are written by using ncurses.…In the spirit of text-only C, I chose ncurses…as my Theremin program's interface.…You can obtain the ncurses library…from invisible-island.net.…The main() function in my Theremin C code…initializes the ncurses screen, color output,…and other settings.…
The screen size is calculated,…as are increments for the frequency.…So this code works, no matter how large…the terminal window is.…An endless while loop monitors input.…When the Enter key is pressed, the loop breaks.…Otherwise, the mouse location is read.…The tone() function generates a sine wave…for PortAudio.…The frequency is calculated based…on the mouse's vertical position, or mort.y.…The horizontal position, mort.x, sets the volume…or, more correctly, the amplitude.…
Dan introduces challenges and then provides an overview of his solutions in C. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Skill Level Beginner
1. Problem One: Exploring Lake Pend Oreille
2. Problem Two: Image Analysis
3. Problem Three: Eight Queens
4. Problem Four: Accessing Peripherals
5. Problem Five: Recursion and Directories
6. Problem Six: Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.