Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

6. Pd for iOS > Improving the User Interface

Improving the User Interface

While the current version is already enough to illustrate the way libpd handles the communication between Pd and our app, it is not yet terribly useful. After all, the pitch values go by so fast that is hard to read them, and even if we could follow the output, we would still need to know the meaning of MIDI note values by heart in order to make sense of them.

For a more intuitive display, we create a custom view class, PitchView, that shows an analog representation of pitch values (see the code examples below). (In order to create the new class, open a context menu for the GuitarTuner group, select “New File… Objective-C Class” and choose UIView as the superclass.) The new view shows a neighborhood of the target pitch, with the target pitch marked by a green line down the center. If the measured pitch is within a few semitones of the target pitch, a blue line will indicate its current value. If it is outside the displayed range, the view will display a red bar on the left or on the right.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint