|
11-08-01
REALbasic Audio Barber Pole by
Erick Tejkowski
This week we'll go on a mind-bending trip into the realm of audio illusions. Using a few simple
commands and an interface that you can build in minutes, we'll look at, er listen to, an unusual
audio phenomenon, made famous by Roger Shepard.
Background
The renowned scientist, Roger Shepard, figured out
a neat audio trick that involves a sequence of musical tones. When played in succession, these notes seem to forever increase in pitch, though
they aren't really doing so. Some have termed it an "audio barber pole". Whatever you call it, it's pretty weird (and I know how much ResEx readers like weird).
So, this week we'll put together a simple project that demonstrates this nifty trick.
Build the Interface
Launch REALbasic and open the default window: Window1. Add the following controls to the window:
- Two PushButtons - Label them "Go" and "Stop" respectively
- Two Timers - Set the Mode of both to 0 (zero) and give both equal Periods (e.g. 1000 works fine)
- One NotePlayer
Arrange the interface however you wish, but it might look like this:
Add the Code
With our interface built, double click the Window Editor to open the Code Editor. Select Edit-New Property and create two new properties:
Next navigate to the Action event of PushButton1 and enter the following code:
Then, navigate to the Action event of PushButton2 and enter this code:
To the Action event of Timer1 add this bit of source code:
Finally, type this code into the Action event of Timer2:
Conclusion
When you're done, select Debug-Run to hear the mysterious rising tones. If you'd like to download this week's example instead of typing it in, you
can download the completed project.
See you next week!
11-06-01
REALbasic News
by
Erick Tejkowski
New REALbasic 4 Alpha
REAL Software has released another alpha version of their forthcoming REALbasic 4.
Some of the interesting tidbits in this one include:
- Sound Pan and Volume
- Picture: HorizontalResolution and VerticalResolution
- Dictionary class
REALbasic Newbie?
Tom Cunningham has posted some new projects for beginners.
Fun stuff!
da' Bevel Button
Ian Devaney has created a useful class called dBevelButton 1.0.
It adds a host of features to existing bevelbuttons. Check it out!
Think Smart
JacobQL has released version 1.2 of SmartLaunch.
SmartLaunch is a MacOS utility for launching applications. It works somewhat like
Internet Explorer 5. If you type part of the name of the application a list
will show all applications on your local hard drives with names containing
the text you've written. Oh, and it's Made with REALbasic.
RBScript Unleashed
If you're still scratching your head over what RBScript can do, then don't miss
Travis Hill's Notify Ally. It is a utility that will notify people when a product comes in stock, when
a website changes, or whatever else people can dream up. It can send text
to a phone, email, or just put a message on the screen. They use a wizard
that generates some simple RBScripts (called "Allies" in the sense of this
product) and can edit them from there. It is all pretty standard, but there
are some extra subs and functions that the scripts may call to handle HTTP
and the like. The site is at:
Have Mouse, will Wheel..
Will Cosgrove has put together an interesting RB plugin,
called Carbon Events Plugin.
It does three things only available through Carbon Events:
- allows access to a toolbar button
- allows access to scroll wheel support
- live window resizing.
|