Re: File error on open and sound reverb problem again
Mike Lee <[email protected]>
| Newsgroups | gmane.comp.lang.smalltalk.squeak.squeakland |
|---|---|
| Message-ID | <CAKoVBRXSMbPWAXbRoD2wm_qQy5KCJ-M9rL6ujWu_r5M+=+PrRQ@mail.gmail.com> |
Stephen, I've tested the file you modified on - Mac OS X 10.6.7 / Etoys 4.1.1 - Windows XP / Etoys 4.1.1 - Windows 7 / Etoys 4.1.1 - OLPC Sugar 11.3.0 / Etoys 113 The fix holds except that on Windows XP & 7, the reverb comes back intermittently. That is fine for now. I would like to find out how to "modify beep" myself (where to find the beep code) at some point so I can apply your code change to another file if needed. I can now proceed with having the volunteers help us on Mac and PC machines. I will also be able to load demo files on XO-1 and XO-1.5 laptops to do demos at the Zambian Embassy in Washington, D.C. I will credit the posters here in future announcements. Mike On Sat, Nov 12, 2011 at 11:13 PM, Steve Thomas <sthomas1-gQhbkF4bah9Wk0Htik3J/[email protected]> wrote: > Mike, > > Attached is a project that I think may solve your problem. I modified beep > to add the line highlighted below. > beep: anObject > "Play given sound or at least beep." > | sound | > SoundPlayer stopReverb. > anObject isString > ifTrue: > [sound := SoundService default playSoundNamedOrBeep: anObject. > (sound respondsTo: #stopGracefully) > ifTrue: [self costume setProperty: #playingSound toValue: sound]] > ifFalse: > [SoundPlayer resumePlaying: anObject quickStart: true] > > Also did some testing: > > 1) Open Etoys 4.1 build 2390 (Mac OSX 10.6.8) > 2) Open Preferences window > 3) Check soundReverb (NOT set, like that 1985 code ;)) > 4) Open Mike's project > 5) Check soundReverb Preference in Preference WIndow (NOT Set) > 6) Click TestSound Play Button (while Preference Window Open) > 7) Step 6 causes soundReverb Preference to be set > One way to get rid of the Reverb is to execute SoundPlayer stopReverb > The problem is how to do it when project starts/opens. > 1) Tried World script set to run on "opening" (Does NOT work, doesn't > execute when project opens) > 2) Tried Book Script set to run on "opening" (Does NOT work, doesn't execute > when project opens) > 3) Tried Page 1 Script set to run on "opening" (Does NOT work, doesn't > execute when project opens) > 4) Tried Page 2 Script set to run on "opening" (Does work, doesn't execute > when project opens) > > Stephen > On Sat, Nov 12, 2011 at 6:11 PM, Mike Lee <[email protected]> wrote: >> >> Bert, >> >> The reverb stayed as it was because I didn't understand that >> commenting out the initialization was going to just preserve the >> reverb toggle state. The reverb disable button on the Score Player was >> clicked the whole time. I toggled the button again, the reverb went >> away. Upon doing a save as and reopening, the reverb was still there. >> >> I captured the sequence through the System Browser in More detail: >> >> http://www.flickr.com/photos/curiouslee/6338769418/sizes/o/in/photostream/ >> >> Mike >> >> >> On Sat, Nov 12, 2011 at 6:03 PM, Bert Freudenberg <[email protected]> >> wrote: >> > Looks fine so far. The "line disappearing" after commenting it out is >> > fine, it just means the actual source could not be written since that's >> > read-only just like the image on your system. >> > >> > When you load that project now, and play a sound, the reverb should stay >> > as it was. Doesn't that work? Did you disable the reverb? >> > >> > - Bert - >> > >> > On 12.11.2011, at 19:02, Mike Lee <[email protected]> wrote: >> > >> >> I stepped through again following your steps exactly. Pressing cmd-s >> >> on my Macbook Pro running 10.6.7 and Etoys 4.1.1. inexplicably caused >> >> the quoted string to disappear. I went ahead and saved the Etoys >> >> project file, see screenshots: >> >> >> >> >> >> http://www.flickr.com/photos/curiouslee/6337954306/sizes/o/in/photostream/ >> >> >> >> Upon returning to the SoundPlayer class in the code browser, the >> >> original code is gone and replaced with different text. >> >> >> >> The reverb persists. >> >> >> >> To recap, others are telling me there may be a fix in 4.1.2 or 4.2, >> >> but for now it seems like I need to find a resolution to the reverb >> >> manually as I will be distributing 4.1.1 and 700 project files to 20 >> >> volunteers next Sunday. >> >> >> >> This sound reverb issue is undoubtedly some legacy decision that now >> >> must be persisted as a default because so many files expect the effect >> >> to be present. But, like so many aspects of the grandfather clock that >> >> Etoys is, it makes no sense. Imagine if a photo editing program tinted >> >> your images pink by default because some developer years ago thought >> >> that was cool. No other piece of authoring software I've encountered >> >> since I started using graphical computers in 1985 puts a filter effect >> >> on a media asset by default. >> >> >> >> Mike >> >> >> >> On Sat, Nov 12, 2011 at 6:19 AM, Bert Freudenberg >> >> <[email protected]> wrote: >> >>> On 12.11.2011, at 11:15, Mike Lee wrote: >> >>> >> >>>> After some hours of reading and clicking around, I finally got to the >> >>>> SoundPlayer initialize string in the class method. >> >>> >> >>> "diving into the byzantine bowels of Squeak Etoys and Smalltalk" - >> >>> very courageous ;) >> >>> >> >>> A better way to open a Squeak Browser in Etoys is via the XO's "view >> >>> source" key. No need to fiddle with preferences. On a Mac that's cmd-comma >> >>> and on PC ctrl-comma. >> >>> >> >>>> I added the quotes closed everything up >> >>> >> >>> You need to press cmd-s / ctrl-s to "accept" the method (possibly you >> >>> did but didn't mention it). It will ask for your initials (every change is >> >>> logged with a time stamp and author). >> >>> >> >>>> and was not able to save the Etoys file due to an error writing the >> >>>> image file. >> >>> >> >>> You normally don't want to save the image file. On many systems you >> >>> can't (as you discovered) because this modifies the Etoys application >> >>> itself. That menu entry is in the developer's world menu (accessible by >> >>> toggling the "etoy-friendly" preference you found). The view-source menu >> >>> leaves these out, which is why we recommend using that. >> >>> >> >>>> Perhaps this is what you mean by >> >>>> "attaching [the change] to the project," which I haven't a clue how >> >>>> to >> >>>> do. >> >>> >> >>> You don't need to do anything special, as long as you edited the >> >>> method while in the project that needs the change. Any method you accept in >> >>> a project is added to that project's changeset automatically. You just need >> >>> to save the project afterwards (and it will ask you if you want to include >> >>> the changes). >> >>> >> >>>> See my screenshots: >> >>>> >> >>>> >> >>>> http://www.flickr.com/photos/curiouslee/6337002318/sizes/o/in/photostream/ >> >>>> >> >>>> Mike >> >>> >> >>> Very nice, I could see exactly what you were doing (except I could not >> >>> guess which OS you were on). >> >>> >> >>> - Bert >> >>> >> >>>> On Fri, Oct 21, 2011 at 6:32 PM, karl ramberg <[email protected]> >> >>>> wrote: >> >>>>> I'm not sure what Halo changes Steve suggest... >> >>>>> Fix is quite easy if you know your way around the Etoys system. >> >>>>> Just comment out the SoundPlayer initialize in the class method, see >> >>>>> below. >> >>>>> A change set with this fix can be attached to the project. >> >>>>> >> >>>>> Karl >> >>>>> >> >>>>> >> >>>>> SoundPlayer class>>startUpWithSound: >> >>>>> startUpWithSound: aSound >> >>>>> "Start up the player process." >> >>>>> >> >>>>> + "SoundPlayer initialize." >> >>>>> - SoundPlayer initialize. >> >>>>> SoundPlayer >> >>>>> startPlayerProcessBufferSize: (BufferMSecs * >> >>>>> SamplingRate) // 1000 >> >>>>> rate: SamplingRate >> >>>>> stereo: Stereo >> >>>>> sound: aSound. >> >>>>> >> >>>>> On Fri, Oct 21, 2011 at 8:25 AM, Mike Lee <[email protected]> >> >>>>> wrote: >> >>>>>> Karl, >> >>>>>> >> >>>>>> Good to hear of the fix. If reverb is turned off in 4.2, or if I >> >>>>>> change it in the world Halo as Steve suggests, should we expert >> >>>>>> that >> >>>>>> the setting will be honored on prior versions--even if the file is >> >>>>>> changed and resaved? >> >>>>>> >> >>>>>> Mike >> >>>>>> >> >>>>>> On Fri, Oct 21, 2011 at 2:20 AM, karl ramberg >> >>>>>> <[email protected]> wrote: >> >>>>>>> I fixed an issue with reverb i that is included in Etoys 4.2. >> >>>>>>> SoundPlayer initializes everytime it is started and the reverb is >> >>>>>>> set >> >>>>>>> to true every time. >> >>>>>>> >> >>>>>>> Karl >> >>>>>>> >> >>>>>>> >> >>>>>>> On Fri, Oct 21, 2011 at 5:51 AM, Mike Lee <[email protected]> >> >>>>>>> wrote: >> >>>>>>>> Hi, >> >>>>>>>> >> >>>>>>>> The Lubuto Library Project to develop 700 Etoys lessons in Zambia >> >>>>>>>> is >> >>>>>>>> finally nearing completion after a year of work by teachers and >> >>>>>>>> students in Lusaka. There are 100 lessons in 7 Zambian languages >> >>>>>>>> plus >> >>>>>>>> 700 sound files that have to be associated with a button in the >> >>>>>>>> files. >> >>>>>>>> >> >>>>>>>> Now we have have enlisted a group of Washington, D.C.-area >> >>>>>>>> volunteers >> >>>>>>>> from the Special Libraries Association to help with a final >> >>>>>>>> finishing >> >>>>>>>> pass at the files. >> >>>>>>>> >> >>>>>>>> Though all the files were authored on OLPC XO laptops in Sugar >> >>>>>>>> using >> >>>>>>>> Etoys 3.x, we wish to do the final production on Etoys 4.1 on Mac >> >>>>>>>> and >> >>>>>>>> PC depending on what the volunteer has. The finished files need >> >>>>>>>> to >> >>>>>>>> open and function properly on Etoys 3.x and 4.x on all platforms. >> >>>>>>>> >> >>>>>>>> I have some initial questions regarding some problems working >> >>>>>>>> with the >> >>>>>>>> files across different versions of Etoys. >> >>>>>>>> >> >>>>>>>> 1) When I double-click to open the files from Zambia on Etoys 4.1 >> >>>>>>>> Mac, >> >>>>>>>> I get an error message that prevents the file from loading and >> >>>>>>>> makes >> >>>>>>>> it impossible to close Etoys without a force quit. I have seen >> >>>>>>>> this >> >>>>>>>> error before when I open older project files on new builds of >> >>>>>>>> Etoys on >> >>>>>>>> the XO. On Eotys 4.1 Mac, I can open the file from with Etoys. >> >>>>>>>> Here is >> >>>>>>>> a screen shot: >> >>>>>>>> >> >>>>>>>> http://www.flickr.com/photos/curiouslee/6265581802/in/photostream >> >>>>>>>> >> >>>>>>>> And here is a sample file on Dropbox: >> >>>>>>>> >> >>>>>>>> http://dl.dropbox.com/u/16590498/Citonga%201%20Afabeti%201.003.pr >> >>>>>>>> >> >>>>>>>> 2) The sound reverb problem persists. Opening up the Etoys 4.1 >> >>>>>>>> Score >> >>>>>>>> Player in the files authored in Etoys 3.x and clicking the >> >>>>>>>> Disable >> >>>>>>>> Reverb button doesn't work. >> >>>>>>>> >> >>>>>>>> Thanks in advance to whomever can provide some guidance. >> >>>>>>>> >> >>>>>>>> Mike >> >>>>>>>> _______________________________________________ >> >>>>>>>> squeakland mailing list >> >>>>>>>> [email protected] >> >>>>>>>> http://lists.squeakland.org/mailman/listinfo/squeakland >> >>>>>>>> >> >>>>>>> >> >>>>>> >> >>>>> >> >>>> _______________________________________________ >> >>>> squeakland mailing list >> >>>> [email protected] >> >>>> http://lists.squeakland.org/mailman/listinfo/squeakland >> >>> >> >>> >> >>> >> >>> >> > >> _______________________________________________ >> squeakland mailing list >> [email protected] >> http://lists.squeakland.org/mailman/listinfo/squeakland > >