The drum sounds and synthesizer sounds are somewhat different in the squeak and java implementations.
I first noticed the problem in http://scratch.mit.edu/projects/kevin_karplus/2159
Offline
Hi, Kevin. Yes, the exact sounds are platform dependent. The instrument sounds are different between Windows, Mac, and the Java player on the website. That's because they use the underlying MIDI sound synthesizer on whatever platform they are running on and each platform has it's own set of instruments. A "violin" or "snare drum" on one platform may sound different from a "violin" or "snare" drum on another platform. The standard says what a given instrument or drum number is supposed to be, but how it sounds varies a lot. (The same is true of electronic keyboards--a Roland "violin" may not sound at all like a Yamaha "violin".)
I realize you probably understand all this. You may be suggesting that it would be better if we had our own synthesis engine (not too hard) and sound bank (very hard, unless there is a good one in the public domain).
Very nice project, by the way (the Karplus one). Very artistic use of animation and nice pairings of sound with animations.
Offline
If the problem were just that the underlying synthesizer was the OS-provided one, I wouldn't have noticed a difference, since I was using the same machine for both the Squeak and the java runs of the program.
I think that the Java applet is using a java-provided synthesize which is not the same as the OS-provided one (and possibly not as good). On another thread, it was recommended that I try downloading soundbanks for the java applets, but I saw no way to connect them up so that the java run by firefox on my Mac OS X 10.3.9 machine would see them.
Any suggestions?
(Thanks for the compliments on the Karplus name project---my son and I spent a fair amount of time on it in December. It is artistically our most ambitious project, though the programming was pretty straight-forward.)
Offline
I believe you just need to download the package with the sound bank from Sun and put it in the directory jre/lib/audio of your Java Runtime Environment.
http://java.sun.com/products/java-media/sound/soundbanks.html
Offline
The Mac OS X system does not appear to have a jre/lib/audio directory anywhere.
There is
Developer/Examples/Java/Applets/Animator/audio
Developer/Examples/Java/Applets/GraphLayout/audio
Developer/Examples/Java/Sound/JavaSoundDemo/audio
Developer/SDKs/MacOSX10.3.0.sdk/System/Frameworks.IOKit.framework/Versions/A/Headers/audio
Developer/Examples/CoreAudio/java/src/com/apple/audio
Apple Extras/Mac OS Runtime For Java/Apple Applet Runner/Applets/Animator/audio
Developer/Documentation/CoreAudio/Java/com/apple/audio
...
There is no directory called jre anywhere on the hard disk.
Have you looked at a Mac OS X 10.3 system to figure out where the java runtime is?
It does *not* seem to be set up the way you are expecting.
Offline
kevin_karplus wrote:
The Mac OS X system does not appear to have a jre/lib/audio directory anywhere.
There is
Developer/Examples/Java/Applets/Animator/audio
Developer/Examples/Java/Applets/GraphLayout/audio
Developer/Examples/Java/Sound/JavaSoundDemo/audio
Developer/SDKs/MacOSX10.3.0.sdk/System/Frameworks.IOKit.framework/Versions/A/Headers/audio
Developer/Examples/CoreAudio/java/src/com/apple/audio
Apple Extras/Mac OS Runtime For Java/Apple Applet Runner/Applets/Animator/audio
Developer/Documentation/CoreAudio/Java/com/apple/audio
...
There is no directory called jre anywhere on the hard disk.
Have you looked at a Mac OS X 10.3 system to figure out where the java runtime is?
It does *not* seem to be set up the way you are expecting.
Kevin, on a Mac the jre is burried in /System
In Mac OS 10.4 with java 1.5.0 the path is:
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/audio/
Though i noticed the soundbank-mid.gm is already installed, but if you're on OSX 10.3 and depending on the java version installed, your mileage may vary...
Last edited by greglh (2007-05-10 13:28:34)
Offline
to enourage my Indigenous students to compose and play their own,rather than commercial, copyrighted music, I am thinking of purchasing and connecting MIDI keyboard. Will I be able to record the music straight into Scratch like it is with speech? what is the best way to do it? What are other ways of achieving the same purpose?
Offline
There is currently no way to convert a MIDI recording to scratch.
Once the scratch sprite format is documented by the scratch team and made public, it would be a good exercise for a more advanced programmer to write a small java program to read in a MIDI file and convert it to a series of "play note", "play drum", and "wait" commands.
Offline
<move( 3 )steps><turn cw( 360 )degrees><turn cw( 360 )degrees><go to x z )y <glide( 3 )secs to x z )y <next costume><say[ I'm Oliver, What's your name ]for( 5 )secs><set instrument to( piano<play sound[ <play note( c )for( 5 )secss><when green flag clicked><turn cw( 180 )degrees><key[ z ]pressed?><if on edge, bounce>
Offline
oliverl wrote:
<move( 3 )steps><turn cw( 360 )degrees><turn cw( 360 )degrees><go to x z )y <glide( 3 )secs to x z )y <next costume><say[ I'm Oliver, What's your name ]for( 5 )secs><set instrument to( piano<play sound[ <play note( c )for( 5 )secss><when green flag clicked><turn cw( 180 )degrees><key[ z ]pressed?><if on edge, bounce>
Hi oliver1 - welcome to the Forums! However, please don't use them for a chat room, they are really not intended for that. Please use them for Scratch questions and comments. If you have a new question, please start a new thread. Thanks!
Offline
Paddle2See wrote:
oliverl wrote:
<move( 3 )steps><turn cw( 360 )degrees><turn cw( 360 )degrees><go to x z )y <glide( 3 )secs to x z )y <next costume><say[ I'm Oliver, What's your name ]for( 5 )secs><set instrument to( piano<play sound[ <play note( c )for( 5 )secss><when green flag clicked><turn cw( 180 )degrees><key[ z ]pressed?><if on edge, bounce>
Hi oliver1 - welcome to the Forums! However, please don't use them for a chat room, they are really not intended for that. Please use them for Scratch questions and comments. If you have a new question, please start a new thread. Thanks!
Sorry about changing the topic paddle2see but its "oliverl"
Offline