Importing wav files

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Importing wav files

K. K. Subramaniam
Hi,

How do I import a wav file into Squeak? The filelist dialog doesn't recognize
wav files as sound files. The SoundRecorder widget only generates sound tiles
but cannot export/import wav :-(

TIA .. Subbu

_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Importing wav files

Brian Brown-2
waveStream := FileStream oldFileOrNoneNamed: self audioFilename.

(SampledSound fromWaveStream: waveStream) play.


- Brian
On Sep 21, 2007, at 10:56 AM, subbukk wrote:

> Hi,
>
> How do I import a wav file into Squeak? The filelist dialog doesn't  
> recognize
> wav files as sound files. The SoundRecorder widget only generates  
> sound tiles
> but cannot export/import wav :-(
>
> TIA .. Subbu
>
> _______________________________________________
> Squeakland mailing list
> [hidden email]
> http://squeakland.org/mailman/listinfo/squeakland


_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Importing wav files

JOHN VOIKLIS
In reply to this post by K. K. Subramaniam
Hello Subbu,

In order to import a WAVE file (at least for pre-OLPC Squeak), you
would need to run (i.e., "do") the following Smalltalk code (replacing
"variableName", "soundFile", and "soundName" with your own appropriate
values):

variableName := SampledSound fromWaveFileNamed: 'soundFile.wav'.
SampledSound addLibrarySoundNamed: 'soundName'
                samples: variableName samples
                samplingRate: variableName originalSamplingRate.

After which you can call the sound named "soundName" from either the
eToys or Smalltalk interface. Note that, in order to make the sound a
permanent part of the Squeak image, you will need to save the image.

I hope this helps (and is still relevant to the current version of Squeak).

All best,

John

On 9/21/07, subbukk <[hidden email]> wrote:

> Hi,
>
> How do I import a wav file into Squeak? The filelist dialog doesn't recognize
> wav files as sound files. The SoundRecorder widget only generates sound tiles
> but cannot export/import wav :-(
>
> TIA .. Subbu
>
> _______________________________________________
> Squeakland mailing list
> [hidden email]
> http://squeakland.org/mailman/listinfo/squeakland
>

_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Importing wav files

Karl-19
In reply to this post by K. K. Subramaniam
subbukk wrote:
> Hi,
>
> How do I import a wav file into Squeak? The filelist dialog doesn't recognize
> wav files as sound files. The SoundRecorder widget only generates sound tiles
> but cannot export/import wav :-(
Sound import is well hidden in Squeak. But it is possible:
(SampledSound fromWaveFileNamed: 'c:\windows\media\chimes.wav') play

I have been looking at these classes lately and have been thinking at
different solutions. One thing I was wondering about is whether
filedialogs are abounded in OLPC and just drag and drop supported ? And
there is no sound library tool which could reference all sounds present
in the Etoys sound tiles. How should such a tool be implemented ? Like a
book ?

Karl

_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Importing wav files

Bert Freudenberg
On Sep 21, 2007, at 22:05 , karl wrote:

> subbukk wrote:
>> Hi,
>>
>> How do I import a wav file into Squeak? The filelist dialog  
>> doesn't recognize wav files as sound files. The SoundRecorder  
>> widget only generates sound tiles but cannot export/import wav :-(
> Sound import is well hidden in Squeak. But it is possible:
> (SampledSound fromWaveFileNamed: 'c:\windows\media\chimes.wav') play
>
> I have been looking at these classes lately and have been thinking  
> at different solutions. One thing I was wondering about is whether  
> filedialogs are abounded in OLPC

Yes - at least for the time being. There may be dialogs for selecting  
media from the Journal later but those have not been implemented by  
the Sugar developers, yet, and may not be implemented before the  
first release.

> and just drag and drop supported ?

Yes. We should add some visual representation for a dropped sound  
file, which supports play back. Like a very simple sound tile with  
just the name on it and a tiny play button. I think that would be  
preferable to opening a WaveEditor (even if that was fixed), although  
we might do this as a quick fix.

> And there is no sound library tool which could reference all sounds  
> present in the Etoys sound tiles. How should such a tool be  
> implemented ? Like a book ?

Maybe a parts bin with all these little tiles? Or like the object  
catalog where we have sorting and filtering options? That would be a  
nice contribution. The core developers must focus on fixing bugs and  
implement missing support now (it's only one month to First  
Deployment), but I for one welcome such improvements from others.

- Bert -



_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Importing wav files

Brad Fuller-2
In reply to this post by K. K. Subramaniam


----- Original Message ----
Wrom: GJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOW
To: Squeakland list <[hidden email]>
Sent: Saturday, September 22, 2007 10:32:14 AM
Subject: Re: [Squeakland] Importing wav files


>> and just drag and drop supported ?

>Yes. We should add some visual representation for a dropped sound  
>file, which supports play back. Like a very simple sound tile with  
>just the name on it and a tiny play button. I think that would be  
>preferable to opening a WaveEditor (even if that was fixed), although  
>we might do this as a quick fix.

It is definitely preferable as the default with just a simple playback button with the name of the file
(a simple timeline would be good to see:
http://bradfuller.com/web/index.php?option=com_content&task=view&id=28&Itemid=1
for an example)

In Squeak 3.8, dropping an mp3/wav on the desktop results in a SoundPlayer morph. But, in 3.9 a file dialog pops up when dropping an mp3/wav. Not that this is a squeakland issues, I just thought I'd bring it up and wish that the drag/drop externally worked in 3.9/3.10





_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Importing wav files

K. K. Subramaniam
In reply to this post by Bert Freudenberg
On Saturday 22 September 2007 8:02 pm, Bert Freudenberg wrote:
> > And there is no sound library tool which could reference all sounds
> > present in the Etoys sound tiles. How should such a tool be
> > implemented ? Like a book ?
>
> Maybe a parts bin with all these little tiles? Or like the object
> catalog where we have sorting and filtering options? That would be a
> nice contribution. The core developers must focus on fixing bugs and
> implement missing support now (it's only one month to First
> Deployment), but I for one welcome such improvements from others.
Squeak does not have a generic mechanism for browsing non-text collections
like sound, video or even projects contained within an image. I like the
catalog idea with some extensions. The browser manages a collection of tags
each of which represent a collection. Then it could display the tag names in
the top pane with a 'more ...' button. A selected collection tag could be
iterated in the bottom pane. Collections could register their tags with the
catalog browser and allow operations for iterations, icons, tiles, morphs,
players, editors etc.

The file/directory browser is also a catalog browser except that the
collection is generated on the fly (by a file or directory open operation)
and transient (i.e. not saved in an image but disposed by close operation). A
directory would be tagged collection of Morphs. A mime detector would attempt
to match a file into an existing morph (e.g. wav, flv, mpg, .image etc.).

Any ideas to get me started? .. Subbu

_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

RE : Importing wav files

Dreyfuss Pierre-André (EDUM)

Hi,

You can donwload this project
http://ofset.org:8000/super/uploads/traitementSons.015.pr
It contains just a change set adding some feature to the sound recorder.

The halo's menu has two new items:
Load SoundFile and Remove Sound from Librairy.

Load SoundFile open a file browser window and let you see aiff and wave sounds.
Sound loaded behave  the same as recorded sound.

To put it in the sound library just hit the tile button.

You can ignore the button install , it will load French translation for menu items and some messages.

To get a soundrecorder  in English, just throw  away the french one, change the language to English and get a new one from object catalog.

For another language, just change the language to yours, edit the script install in the World's viewer and run it. It is important to change the language first since translations are added to the current language.
For the olpc team:

Feel free to add this changes to the OLPC image if you like it.(And add mp3 by the way (if possible ))
Regards

-------- Message d'origine--------
De: [hidden email] de la part de subbukk
Date: mar. 25/09/2007 06:12
À: [hidden email]
Objet : Re: [Squeakland] Importing wav files
 
On Saturday 22 September 2007 8:02 pm, Bert Freudenberg wrote:
> > And there is no sound library tool which could reference all sounds
> > present in the Etoys sound tiles. How should such a tool be
> > implemented ? Like a book ?
>
> Maybe a parts bin with all these little tiles? Or like the object
> catalog where we have sorting and filtering options? That would be a
> nice contribution. The core developers must focus on fixing bugs and
> implement missing support now (it's only one month to First
> Deployment), but I for one welcome such improvements from others.
Squeak does not have a generic mechanism for browsing non-text collections
like sound, video or even projects contained within an image. I like the
catalog idea with some extensions. The browser manages a collection of tags
each of which represent a collection. Then it could display the tag names in
the top pane with a 'more ...' button. A selected collection tag could be
iterated in the bottom pane. Collections could register their tags with the
catalog browser and allow operations for iterations, icons, tiles, morphs,
players, editors etc.

The file/directory browser is also a catalog browser except that the
collection is generated on the fly (by a file or directory open operation)
and transient (i.e. not saved in an image but disposed by close operation). A
directory would be tagged collection of Morphs. A mime detector would attempt
to match a file into an existing morph (e.g. wav, flv, mpg, .image etc.).

Any ideas to get me started? .. Subbu

_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland


_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: RE : Importing wav files

Karl-19
Hi,
I have just started a kind of unification of the sound stuff and made
some progress.
I made a SoundTool (Which I should rename SoundLibraryTool) that lists
the sounds in the sound library. You can also open a WaveEditor on the
sounds and you get a tile when you click on the sound.

I have made a SoundPlayerMorph that pops up when a wav or aif is dropped
on Squeak. With SoundPlayerMorph you can get a tile of the sound without
adding it to the library. You can add the sound to the library or edit
it in WaveEditor.

There are also other fixes to the sound classes.

A few notes on your post:

FileDialogs are not part of the etoys image any longer.
MP3 files are quite big and external MP3 files is maybe the best
solution on the OLPC.

Karl


Dreyfuss Pierre-André (EDU) wrote:

> Hi,
>
> You can donwload this project
> http://ofset.org:8000/super/uploads/traitementSons.015.pr
> It contains just a change set adding some feature to the sound recorder.
>
> The halo's menu has two new items:
> Load SoundFile and Remove Sound from Librairy.
>
> Load SoundFile open a file browser window and let you see aiff and wave sounds.
> Sound loaded behave  the same as recorded sound.
>
> To put it in the sound library just hit the tile button.
>
> You can ignore the button install , it will load French translation for menu items and some messages.
>
> To get a soundrecorder  in English, just throw  away the french one, change the language to English and get a new one from object catalog.
>
> For another language, just change the language to yours, edit the script install in the World's viewer and run it. It is important to change the language first since translations are added to the current language.
> For the olpc team:
>
> Feel free to add this changes to the OLPC image if you like it.(And add mp3 by the way (if possible ))
> Regards
>
> -------- Message d'origine--------
> De: [hidden email] de la part de subbukk
> Date: mar. 25/09/2007 06:12
> À: [hidden email]
> Objet : Re: [Squeakland] Importing wav files
>  
> On Saturday 22 September 2007 8:02 pm, Bert Freudenberg wrote:
>  
>>> And there is no sound library tool which could reference all sounds
>>> present in the Etoys sound tiles. How should such a tool be
>>> implemented ? Like a book ?
>>>      
>> Maybe a parts bin with all these little tiles? Or like the object
>> catalog where we have sorting and filtering options? That would be a
>> nice contribution. The core developers must focus on fixing bugs and
>> implement missing support now (it's only one month to First
>> Deployment), but I for one welcome such improvements from others.
>>    
> Squeak does not have a generic mechanism for browsing non-text collections
> like sound, video or even projects contained within an image. I like the
> catalog idea with some extensions. The browser manages a collection of tags
> each of which represent a collection. Then it could display the tag names in
> the top pane with a 'more ...' button. A selected collection tag could be
> iterated in the bottom pane. Collections could register their tags with the
> catalog browser and allow operations for iterations, icons, tiles, morphs,
> players, editors etc.
>
> The file/directory browser is also a catalog browser except that the
> collection is generated on the fly (by a file or directory open operation)
> and transient (i.e. not saved in an image but disposed by close operation). A
> directory would be tagged collection of Morphs. A mime detector would attempt
> to match a file into an existing morph (e.g. wav, flv, mpg, .image etc.).
>
> Any ideas to get me started? .. Subbu
>
> _______________________________________________
> Squeakland mailing list
> [hidden email]
> http://squeakland.org/mailman/listinfo/squeakland
>
>
> _______________________________________________
> Squeakland mailing list
> [hidden email]
> http://squeakland.org/mailman/listinfo/squeakland
>
>  


_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: RE : Importing wav files

Scott Wallace
Hi, Karl and Pierre-André,

Thank you both for this work!

We now have three different bodies of code afoot that address sound  
issues -- the recent code from the two of you, and also some not-yet-
published code of our own concerning sound-library management.

Within the next two weeks, we'll scrutinize all this code, integrate  
as appropriate, and put the result out as an etoys2.2 update.

Meanwhile, further tweaks and further discussions remain most  
welcome.  Thanks again to all!

Cheers,

   -- Scott


On Sep 25, 2007, at 11:18 AM, karl wrote:

> Hi,
> I have just started a kind of unification of the sound stuff and  
> made some progress.
> I made a SoundTool (Which I should rename SoundLibraryTool) that  
> lists the sounds in the sound library. You can also open a  
> WaveEditor on the sounds and you get a tile when you click on the  
> sound.
>
> I have made a SoundPlayerMorph that pops up when a wav or aif is  
> dropped on Squeak. With SoundPlayerMorph you can get a tile of the  
> sound without adding it to the library. You can add the sound to  
> the library or edit it in WaveEditor.
>
> There are also other fixes to the sound classes.
>
> A few notes on your post:
>
> FileDialogs are not part of the etoys image any longer.
> MP3 files are quite big and external MP3 files is maybe the best  
> solution on the OLPC.
>
> Karl
>
>
> Dreyfuss Pierre-André (EDU) wrote:
>> Hi,
>>
>> You can donwload this project
>> http://ofset.org:8000/super/uploads/traitementSons.015.pr
>> It contains just a change set adding some feature to the sound  
>> recorder.
>>
>> The halo's menu has two new items:
>> Load SoundFile and Remove Sound from Librairy.
>>
>> Load SoundFile open a file browser window and let you see aiff and  
>> wave sounds.
>> Sound loaded behave  the same as recorded sound.
>>
>> To put it in the sound library just hit the tile button.
>>
>> You can ignore the button install , it will load French  
>> translation for menu items and some messages.
>>
>> To get a soundrecorder  in English, just throw  away the french  
>> one, change the language to English and get a new one from object  
>> catalog.
>>
>> For another language, just change the language to yours, edit the  
>> script install in the World's viewer and run it. It is important  
>> to change the language first since translations are added to the  
>> current language.
>> For the olpc team:
>>
>> Feel free to add this changes to the OLPC image if you like it.
>> (And add mp3 by the way (if possible ))
>> Regards
>>
>> -------- Message d'origine--------
>> De: [hidden email] de la part de subbukk
>> Date: mar. 25/09/2007 06:12
>> À: [hidden email]
>> Objet : Re: [Squeakland] Importing wav files
>>  On Saturday 22 September 2007 8:02 pm, Bert Freudenberg wrote:
>>
>>>> And there is no sound library tool which could reference all sounds
>>>> present in the Etoys sound tiles. How should such a tool be
>>>> implemented ? Like a book ?
>>>>
>>> Maybe a parts bin with all these little tiles? Or like the object
>>> catalog where we have sorting and filtering options? That would be a
>>> nice contribution. The core developers must focus on fixing bugs and
>>> implement missing support now (it's only one month to First
>>> Deployment), but I for one welcome such improvements from others.
>>>
>> Squeak does not have a generic mechanism for browsing non-text  
>> collections like sound, video or even projects contained within an  
>> image. I like the catalog idea with some extensions. The browser  
>> manages a collection of tags each of which represent a collection.  
>> Then it could display the tag names in the top pane with a  
>> 'more ...' button. A selected collection tag could be iterated in  
>> the bottom pane. Collections could register their tags with the  
>> catalog browser and allow operations for iterations, icons, tiles,  
>> morphs, players, editors etc.
>>
>> The file/directory browser is also a catalog browser except that  
>> the collection is generated on the fly (by a file or directory  
>> open operation) and transient (i.e. not saved in an image but  
>> disposed by close operation). A directory would be tagged  
>> collection of Morphs. A mime detector would attempt to match a  
>> file into an existing morph (e.g. wav, flv, mpg, .image etc.).
>>
>> Any ideas to get me started? .. Subbu
>>
>> _______________________________________________
>> Squeakland mailing list
>> [hidden email]
>> http://squeakland.org/mailman/listinfo/squeakland


_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Importing wav files

Brad Fuller-2
Scott,

Will you make it available so we can move it into the main Squeak image?

On Thu September 27 2007, Scott Wallace wrote:

> Hi, Karl and Pierre-André,
>
> Thank you both for this work!
>
> We now have three different bodies of code afoot that address sound
> issues -- the recent code from the two of you, and also some not-yet-
> published code of our own concerning sound-library management.
>
> Within the next two weeks, we'll scrutinize all this code, integrate
> as appropriate, and put the result out as an etoys2.2 update.
>
> Meanwhile, further tweaks and further discussions remain most
> welcome.  Thanks again to all!
>
> Cheers,
>
>    -- Scott
>
> On Sep 25, 2007, at 11:18 AM, karl wrote:
> > Hi,
> > I have just started a kind of unification of the sound stuff and
> > made some progress.
> > I made a SoundTool (Which I should rename SoundLibraryTool) that
> > lists the sounds in the sound library. You can also open a
> > WaveEditor on the sounds and you get a tile when you click on the
> > sound.
> >
> > I have made a SoundPlayerMorph that pops up when a wav or aif is
> > dropped on Squeak. With SoundPlayerMorph you can get a tile of the
> > sound without adding it to the library. You can add the sound to
> > the library or edit it in WaveEditor.
> >
> > There are also other fixes to the sound classes.
> >
> > A few notes on your post:
> >
> > FileDialogs are not part of the etoys image any longer.
> > MP3 files are quite big and external MP3 files is maybe the best
> > solution on the OLPC.
> >
> > Karl
> >
> > Dreyfuss Pierre-André (EDU) wrote:
> >> Hi,
> >>
> >> You can donwload this project
> >> http://ofset.org:8000/super/uploads/traitementSons.015.pr
> >> It contains just a change set adding some feature to the sound
> >> recorder.
> >>
> >> The halo's menu has two new items:
> >> Load SoundFile and Remove Sound from Librairy.
> >>
> >> Load SoundFile open a file browser window and let you see aiff and
> >> wave sounds.
> >> Sound loaded behave  the same as recorded sound.
> >>
> >> To put it in the sound library just hit the tile button.
> >>
> >> You can ignore the button install , it will load French
> >> translation for menu items and some messages.
> >>
> >> To get a soundrecorder  in English, just throw  away the french
> >> one, change the language to English and get a new one from object
> >> catalog.
> >>
> >> For another language, just change the language to yours, edit the
> >> script install in the World's viewer and run it. It is important
> >> to change the language first since translations are added to the
> >> current language.
> >> For the olpc team:
> >>
> >> Feel free to add this changes to the OLPC image if you like it.
> >> (And add mp3 by the way (if possible ))
> >> Regards
> >>
> >> -------- Message d'origine--------
> >> De: [hidden email] de la part de subbukk
> >> Date: mar. 25/09/2007 06:12
> >> À: [hidden email]
> >> Objet : Re: [Squeakland] Importing wav files
> >>
> >>  On Saturday 22 September 2007 8:02 pm, Bert Freudenberg wrote:
> >>>> And there is no sound library tool which could reference all sounds
> >>>> present in the Etoys sound tiles. How should such a tool be
> >>>> implemented ? Like a book ?
> >>>
> >>> Maybe a parts bin with all these little tiles? Or like the object
> >>> catalog where we have sorting and filtering options? That would be a
> >>> nice contribution. The core developers must focus on fixing bugs and
> >>> implement missing support now (it's only one month to First
> >>> Deployment), but I for one welcome such improvements from others.
> >>
> >> Squeak does not have a generic mechanism for browsing non-text
> >> collections like sound, video or even projects contained within an
> >> image. I like the catalog idea with some extensions. The browser
> >> manages a collection of tags each of which represent a collection.
> >> Then it could display the tag names in the top pane with a
> >> 'more ...' button. A selected collection tag could be iterated in
> >> the bottom pane. Collections could register their tags with the
> >> catalog browser and allow operations for iterations, icons, tiles,
> >> morphs, players, editors etc.
> >>
> >> The file/directory browser is also a catalog browser except that
> >> the collection is generated on the fly (by a file or directory
> >> open operation) and transient (i.e. not saved in an image but
> >> disposed by close operation). A directory would be tagged
> >> collection of Morphs. A mime detector would attempt to match a
> >> file into an existing morph (e.g. wav, flv, mpg, .image etc.).
> >>
> >> Any ideas to get me started? .. Subbu
> >>
> >> _______________________________________________
> >> Squeakland mailing list
> >> [hidden email]
> >> http://squeakland.org/mailman/listinfo/squeakland
>
> _______________________________________________
> Squeakland mailing list
> [hidden email]
> http://squeakland.org/mailman/listinfo/squeakland



_______________________________________________
Squeakland mailing list
[hidden email]
http://squeakland.org/mailman/listinfo/squeakland