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

#1 2011-04-11 14:23:34

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

stop downsampling and mono

When I import a sound into Scratch it downsamples it and converts it to mono. I understand this is to save space, but I really would like to find a way to keep it at the fullest quality. Does anyone  know where in the browser the command for downsampling is and how it might be stopped?


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#2 2011-04-11 17:54:58

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: stop downsampling and mono

bump  sad


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#3 2011-04-11 18:20:56

wcfs96
New Scratcher
Registered: 2011-03-10
Posts: 37

Re: stop downsampling and mono

Change Scratch-Objects >> SoundMedia >> loadFile: to this.

Code:

loadFile: fName
    "Read my samples from a sound file."

    | snd errorString sndName mergedBuf |
    (FileDirectory default fileExists: fName)
        ifFalse: [^ self inform: 'File not found' withDetails: fName].

    errorString _ nil.
    sndName _ FileDirectory localNameFor: fName.
    Utilities informUserDuring: [:bar |
        bar value: 'Reading ', sndName, '...'.
        [snd _ SampledSound fromFileNamed: fName] ifError: [:err :rcvr |
            snd _ nil.
            errorString _ err].

    ].

    errorString ifNotNil: [^ self error: errorString]. 
    self sound: snd.

Now in theory this should get rid of the converting to mono and downsampling, but it still reports the file size wrong. Yet that may be because it thinks it's been converted and everything yet it really hasn't.

Offline

 

#4 2011-04-12 06:49:25

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: stop downsampling and mono

Sorry, It didn't work  hmm  Thanks for trying. It still converted to mono, not sure if it downsampled or not.


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#5 2011-04-12 07:35:10

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: stop downsampling and mono

sparks wrote:

Sorry, It didn't work  hmm  Thanks for trying. It still converted to mono, not sure if it downsampled or not.

It does convert to mono but it isn't downsampled.

Offline

 

Board footer