Re: Playing (MIDI) sounds from Java applet (Shepard's Tones)
From: Cedric (snamaur_at_hotmail.com)
Date: 10/17/03
- Next message: Kathy Benson: "Re: Can't find Javax"
- Previous message: Rick: "Using java Applets"
- In reply to: SOB-like MIDIs: "Playing (MIDI) sounds from Java applet (Shepard's Tones)"
- Next in thread: Nathan Zumwalt: "Re: Playing (MIDI) sounds from Java applet (Shepard's Tones)"
- Reply: Nathan Zumwalt: "Re: Playing (MIDI) sounds from Java applet (Shepard's Tones)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 Oct 2003 03:23:13 -0700
> The applet for endlessly rising/falling scale
> (auditory illusion)
> on this page is fantastic!
>
> http://www.cs.ubc.ca/nest/imager/contributions/flinn/Illusions/ST/st.html
>
>
> How is this done?
> (I'm assuming it uses MIDI.)
>
Sorry, but it uses .AU files ( download and use Jode, then you got:
...
public void init(AppletStarter appletstarter) {
applet = appletstarter;
URL url = appletstarter.getCodeBase();
int i = 1;
STone2 = new AudioClip[12];
for (int i_0_ = 0; i_0_ < 12; i_0_++) {
appletstarter.setLabel("Loading audio clip " + i + " of 36 ...");
i++;
String string = "st-c2/st" + (i_0_ + 1) + ".au";
STone2[i_0_] = appletstarter.getAudioClip(url, string);
if (STone2[i_0_] == null)
System.out.println("Couldn't load audio clip " + url + string);
}
STone3 = new AudioClip[12];
for (int i_1_ = 0; i_1_ < 12; i_1_++) {
appletstarter.setLabel("Loading audio clip " + i + " of 36 ...");
i++;
String string = "st-c3/st" + (i_1_ + 1) + ".au";
STone3[i_1_] = appletstarter.getAudioClip(url, string);
if (STone3[i_1_] == null)
System.out
.println("Couldn't create audio clip " + url + string);
}
STone6 = new AudioClip[12];
for (int i_2_ = 0; i_2_ < 12; i_2_++) {
appletstarter.setLabel("Loading audio clip " + i + " of 36 ...");
i++;
String string = "st-c6/st" + (i_2_ + 1) + ".au";
STone6[i_2_] = appletstarter.getAudioClip(url, string);
if (STone6[i_2_] == null)
System.out
.println("Couldn't create audio clip " + url + string);
}
appletstarter.appletLoaded();
}
...
)
Scooby-Ced
- Next message: Kathy Benson: "Re: Can't find Javax"
- Previous message: Rick: "Using java Applets"
- In reply to: SOB-like MIDIs: "Playing (MIDI) sounds from Java applet (Shepard's Tones)"
- Next in thread: Nathan Zumwalt: "Re: Playing (MIDI) sounds from Java applet (Shepard's Tones)"
- Reply: Nathan Zumwalt: "Re: Playing (MIDI) sounds from Java applet (Shepard's Tones)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]