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?
Offline
Change Scratch-Objects >> SoundMedia >> loadFile: to this.
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
sparks wrote:
Sorry, It didn't work
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