This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-04-28 05:28:04

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

on-line off-line sound differences

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

 

#2 2007-05-04 22:12:18

johnm
Scratcher
Registered: 2007-03-08
Posts: 100+

Re: on-line off-line sound differences

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

 

#3 2007-05-05 12:29:24

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: on-line off-line sound differences

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

 

#4 2007-05-06 21:39:30

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: on-line off-line sound differences

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


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

#5 2007-05-07 11:08:12

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: on-line off-line sound differences

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

 

#6 2007-05-10 13:26:34

greglh
Scratcher
Registered: 2007-05-10
Posts: 2

Re: on-line off-line sound differences

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

 

#7 2007-06-04 02:26:13

Krystof
Scratcher
Registered: 2007-04-12
Posts: 12

Re: on-line off-line sound differences

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

 

#8 2007-06-04 09:57:35

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: on-line off-line sound differences

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

 

#9 2008-07-24 03:27:28

oliverl
Scratcher
Registered: 2008-07-24
Posts: 1

Re: on-line off-line sound differences

<move( 3 )steps><turn cw( 360 )degrees><turn cw( 360 )degrees><go to x sad  z )y sad  <glide( 3 )secs to x sad  z )y sad  <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

 

#10 2008-07-24 03:34:48

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: on-line off-line sound differences

oliverl wrote:

<move( 3 )steps><turn cw( 360 )degrees><turn cw( 360 )degrees><go to x sad  z )y sad  <glide( 3 )secs to x sad  z )y sad  <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!


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#11 2008-07-25 11:34:37

registeel
Scratcher
Registered: 2008-04-27
Posts: 500+

Re: on-line off-line sound differences

Paddle2See wrote:

oliverl wrote:

<move( 3 )steps><turn cw( 360 )degrees><turn cw( 360 )degrees><go to x sad  z )y sad  <glide( 3 )secs to x sad  z )y sad  <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

 

Board footer