I've decided I want to get a feel for what my app is doing and at what
rate by, literally, listening to it. I want to put in some brief beeps into strategic locations. But sound is an area where I have exactly zero experience. I want the sounds to play but with minimal impact on the running program; i.e., I'm willing to make the beeps very short, but even a 10ms beep (would I even be able to hear that?) would slow the program down. And yet, if I tried to play them in the background, they will not be in-sync with with the real-time state of the app. I suppose another option would be to record the events I'm interested in and their time and play them back later, but I'm more interested in the *real-time* state. Finally, how can I play any sound at all with Squeak and Cog on Linux? When I try some of the demo sounds on FMSound, there is no sound and I see this message in the console: sound: /dev/dsp: No such file or directory Of course, no other apps on this machine have any trouble playing sounds, so is something simply pointing in the wrong place? Thanks. |
squeak -help reports:
Available drivers: vm-sound-null vm-sound-ALSA vm-sound-OSS But when I try: squeak -vm sound=ALSA my.image and try to play a sound I get this on the console: sound_Start(default) soundStart: snd_add_pcm_handler: Function not implemented On Thu, Sep 11, 2014 at 2:42 PM, Chris Muller <[hidden email]> wrote: > I've decided I want to get a feel for what my app is doing and at what > rate by, literally, listening to it. I want to put in some brief > beeps into strategic locations. > > But sound is an area where I have exactly zero experience. I want the > sounds to play but with minimal impact on the running program; i.e., > I'm willing to make the beeps very short, but even a 10ms beep (would > I even be able to hear that?) would slow the program down. > > And yet, if I tried to play them in the background, they will not be > in-sync with with the real-time state of the app. I suppose another > option would be to record the events I'm interested in and their time > and play them back later, but I'm more interested in the *real-time* > state. > > Finally, how can I play any sound at all with Squeak and Cog on Linux? > When I try some of the demo sounds on FMSound, there is no sound and > I see this message in the console: > > sound: /dev/dsp: No such file or directory > > Of course, no other apps on this machine have any trouble playing > sounds, so is something simply pointing in the wrong place? > > Thanks. |
Hi Chris,
in the scratch start script on the Raspberry Pi it says: VMOPTIONS="$VMOPTIONS -vm-sound-alsa" Only have SSH Access to my Pi but I know Scratch plays sound while Squeak doesn't on the Pi. Re your other question: It's said that musicians can distinguish two sounds starting 6 ms apart as two different sounds which kind of implies that the untrained ear hears them as one sound. Otherwise you should be able to hear such a short sound but IIRC the human ear decides in the first 100 ms what instrument it hears. So I assume it will be hard to distinguish different sounds as short as 10 ms. I suggest you create wav files in Squeak and play them back via VLC to find out what you hear. AbstractSound is your friend here. I can go dig in my old code if you need help. Cheers Herbert Am 11.09.2014 um 21:47 schrieb Chris Muller: > squeak -help reports: > > Available drivers: > vm-sound-null > vm-sound-ALSA > vm-sound-OSS > > But when I try: > > squeak -vm sound=ALSA my.image > > and try to play a sound I get this on the console: > > sound_Start(default) > soundStart: snd_add_pcm_handler: Function not implemented > > > On Thu, Sep 11, 2014 at 2:42 PM, Chris Muller <[hidden email]> wrote: >> I've decided I want to get a feel for what my app is doing and at what >> rate by, literally, listening to it. I want to put in some brief >> beeps into strategic locations. >> >> But sound is an area where I have exactly zero experience. I want the >> sounds to play but with minimal impact on the running program; i.e., >> I'm willing to make the beeps very short, but even a 10ms beep (would >> I even be able to hear that?) would slow the program down. >> >> And yet, if I tried to play them in the background, they will not be >> in-sync with with the real-time state of the app. I suppose another >> option would be to record the events I'm interested in and their time >> and play them back later, but I'm more interested in the *real-time* >> state. >> >> Finally, how can I play any sound at all with Squeak and Cog on Linux? >> When I try some of the demo sounds on FMSound, there is no sound and >> I see this message in the console: >> >> sound: /dev/dsp: No such file or directory >> >> Of course, no other apps on this machine have any trouble playing >> sounds, so is something simply pointing in the wrong place? >> >> Thanks. |
In reply to this post by Chris Muller-3
Hey, got too curious myself.
Here's a snippet I found in a Workspace. AudioSample data was just a class of mine which could create diverse audio samples used for measurements. All was done in 3.8. dats := AudioSampleData multiSineArray asFloatArray. dats /= dats max. dats *= 32000. nd := Array new: dats size * 2. dats withIndexDo: [:ea :ind| nd at: 2* ind put: ea asInteger; at: 2 * ind - 1 put: ea asInteger]. ss := (SampledSound new setSamples: nd samplingRate: 48000) ss play. ss duration dats:= nil. nd:= nil. ss := nil. SoundPlayer stopReverb SoundPlayer shutDown Here's one writing a wav file: success ifTrue: [(SampledSound samples: inputData samplingRate: sampleRate) storeWAVOnFileNamed: anotherString.] Hope that helps a bit. Cheers, Herbert |
In reply to this post by Chris Muller-3
On 9/11/14, 4:42 PM, "Chris Muller" <[hidden email]> wrote: > I've decided I want to get a feel for what my app is doing and at what > rate by, literally, listening to it. I want to put in some brief > beeps into strategic locations. > > But sound is an area where I have exactly zero experience. I want the > sounds to play but with minimal impact on the running program; i.e., > I'm willing to make the beeps very short, but even a 10ms beep (would > I even be able to hear that?) would slow the program down. > > And yet, if I tried to play them in the background, they will not be > in-sync with with the real-time state of the app. I suppose another > option would be to record the events I'm interested in and their time > and play them back later, but I'm more interested in the *real-time* > state. > > Finally, how can I play any sound at all with Squeak and Cog on Linux? > When I try some of the demo sounds on FMSound, there is no sound and > I see this message in the console: > > sound: /dev/dsp: No such file or directory > > Of course, no other apps on this machine have any trouble playing > sounds, so is something simply pointing in the wrong place? > > Thanks. You can do in FunSqueak 4.6 alpha, also listen .mp3 and play the old Heads singing. See first video on https://www.youtube.com/watch?v=VKDUP9xQY4c Still fighting with very old issues as MorphicWrappers load but can't work as previous FunSqueak 4.2. Anyway I upload complete image and Cog3060 for mac with all same plugins as Squeak 4.5 All in one this weekend. Edgar |
In reply to this post by Chris Muller-3
On Thu, Sep 11, 2014 at 02:47:55PM -0500, Chris Muller wrote:
> > On Thu, Sep 11, 2014 at 2:42 PM, Chris Muller <[hidden email]> wrote: > > I've decided I want to get a feel for what my app is doing and at what > > rate by, literally, listening to it. I want to put in some brief > > beeps into strategic locations. > > > > But sound is an area where I have exactly zero experience. I want the > > sounds to play but with minimal impact on the running program; i.e., > > I'm willing to make the beeps very short, but even a 10ms beep (would > > I even be able to hear that?) would slow the program down. > > > > And yet, if I tried to play them in the background, they will not be > > in-sync with with the real-time state of the app. I suppose another > > option would be to record the events I'm interested in and their time > > and play them back later, but I'm more interested in the *real-time* > > state. > > > > Finally, how can I play any sound at all with Squeak and Cog on Linux? > > When I try some of the demo sounds on FMSound, there is no sound and > > I see this message in the console: > > > > sound: /dev/dsp: No such file or directory > > > > Of course, no other apps on this machine have any trouble playing > > sounds, so is something simply pointing in the wrong place? > > squeak -help reports: > > Available drivers: > vm-sound-null > vm-sound-ALSA > vm-sound-OSS > > But when I try: > > squeak -vm sound=ALSA my.image > > and try to play a sound I get this on the console: > > sound_Start(default) > soundStart: snd_add_pcm_handler: Function not implemented > Sound works fine on my trusty SuSE box, but not at all on my user-friendly but generally untrustworthy Ubuntu laptop. What kind of system are you using? Sound systems have been changing on Linux distributions, and I suspect that we may be falling behind in our support for this. Dave |
On Thu, Sep 11, 2014 at 6:38 PM, David T. Lewis <[hidden email]> wrote:
> On Thu, Sep 11, 2014 at 02:47:55PM -0500, Chris Muller wrote: >> >> On Thu, Sep 11, 2014 at 2:42 PM, Chris Muller <[hidden email]> wrote: >> > I've decided I want to get a feel for what my app is doing and at what >> > rate by, literally, listening to it. I want to put in some brief >> > beeps into strategic locations. >> > >> > But sound is an area where I have exactly zero experience. I want the >> > sounds to play but with minimal impact on the running program; i.e., >> > I'm willing to make the beeps very short, but even a 10ms beep (would >> > I even be able to hear that?) would slow the program down. >> > >> > And yet, if I tried to play them in the background, they will not be >> > in-sync with with the real-time state of the app. I suppose another >> > option would be to record the events I'm interested in and their time >> > and play them back later, but I'm more interested in the *real-time* >> > state. >> > >> > Finally, how can I play any sound at all with Squeak and Cog on Linux? >> > When I try some of the demo sounds on FMSound, there is no sound and >> > I see this message in the console: >> > >> > sound: /dev/dsp: No such file or directory >> > >> > Of course, no other apps on this machine have any trouble playing >> > sounds, so is something simply pointing in the wrong place? >> >> squeak -help reports: >> >> Available drivers: >> vm-sound-null >> vm-sound-ALSA >> vm-sound-OSS >> >> But when I try: >> >> squeak -vm sound=ALSA my.image >> >> and try to play a sound I get this on the console: >> >> sound_Start(default) >> soundStart: snd_add_pcm_handler: Function not implemented >> > > Sound works fine on my trusty SuSE box, but not at all on my user-friendly > but generally untrustworthy Ubuntu laptop. What kind of system are you using? I'm using one of the most popular Linux distros, Ubuntu. I tried the -vm-sound-alsa switch to the vm (instead of -vm sound=ALSA) but the same message is produced on the console when I try to "FMSound pluckedElecBass play". sound_Start(default) soundStart: snd_add_pcm_handler: Function not implemented Does this mean that Cog does not support sound? Using "-vm sound=OSS".... ..... WAIT!!! .... Success!!! I managed to get a sound out of Cog by: 1) copying so.vm-sound-pulse from my interpreter VM lib directory to Cog's lib directory 2) renaming so.vm-sound-pulse to vm-sound-pulse 3) setting execute permissions on vm-sound-pulse With that, I can actually get sound out of Squeak.. And, now, when I do squeak -help, "vm-sound-pulse" is now listed. Eliot, do you think we could eventually include this driver in your Cog releases? > Sound systems have been changing on Linux distributions, and I suspect that > we may be falling behind in our support for this. > > Dave > > |
In reply to this post by Chris Muller-3
> I've decided I want to get a feel for what my app is doing and at what > rate by, literally, listening to it. I want to put in some brief > beeps into strategic locations... I want the sounds to play but with > minimal impact on the running program... Perhaps that means doing the equivalent of sending a remote message: to make a sound, send a special packet to a sound server running elsewhere with its own resources (e.g., another machine). -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) |
In reply to this post by Chris Muller-3
On Fri, Sep 12, 2014 at 8:44 AM, Chris Muller <[hidden email]> wrote:
I've no objection. Any one want to volunteer to get this working for the Cog builds?
best, Eliot
|
In reply to this post by David T. Lewis
On Thu, Sep 11, 2014 at 07:38:10PM -0400, David T. Lewis wrote:
> On Thu, Sep 11, 2014 at 02:47:55PM -0500, Chris Muller wrote: > > > > On Thu, Sep 11, 2014 at 2:42 PM, Chris Muller <[hidden email]> wrote: > > > I've decided I want to get a feel for what my app is doing and at what > > > rate by, literally, listening to it. I want to put in some brief > > > beeps into strategic locations. > > > > > > But sound is an area where I have exactly zero experience. I want the > > > sounds to play but with minimal impact on the running program; i.e., > > > I'm willing to make the beeps very short, but even a 10ms beep (would > > > I even be able to hear that?) would slow the program down. > > > > > > And yet, if I tried to play them in the background, they will not be > > > in-sync with with the real-time state of the app. I suppose another > > > option would be to record the events I'm interested in and their time > > > and play them back later, but I'm more interested in the *real-time* > > > state. > > > > > > Finally, how can I play any sound at all with Squeak and Cog on Linux? > > > When I try some of the demo sounds on FMSound, there is no sound and > > > I see this message in the console: > > > > > > sound: /dev/dsp: No such file or directory > > > > > > Of course, no other apps on this machine have any trouble playing > > > sounds, so is something simply pointing in the wrong place? > > > > squeak -help reports: > > > > Available drivers: > > vm-sound-null > > vm-sound-ALSA > > vm-sound-OSS > > > > But when I try: > > > > squeak -vm sound=ALSA my.image > > > > and try to play a sound I get this on the console: > > > > sound_Start(default) > > soundStart: snd_add_pcm_handler: Function not implemented > > > > Sound works fine on my trusty SuSE box, but not at all on my user-friendly > but generally untrustworthy Ubuntu laptop. What kind of system are you using? My apologies to Ubuntu, it seems that I neglected to install the sound development libraries on my Ubuntu laptop before compiling the VM. That done, sound works fine with the -vm-sound-pulse driver on Ubuntu. So now I can explore the sound projects in Edgar's FunSqueak. Those voices in the DecTalk duet sound like Cartman from South Park, gotta love it :-) > > Sound systems have been changing on Linux distributions, and I suspect that > we may be falling behind in our support for this. > The -vm-sound-ALSA driver fails on my Ubuntu with the "Function not implemented" message that Chris reported, which suggests that we are in need of some work to upgrade to the latest ALSA runtimes. I'm using Ian's latest CMake build process. There may be some issues in the Cog build, but I think these are related to the build process as opposed to sound support in the VM itself. Dave |
In reply to this post by ccrraaiigg
On Sat, Sep 13, 2014 at 4:55 AM, Craig Latta <[hidden email]> wrote:
> >> I've decided I want to get a feel for what my app is doing and at what >> rate by, literally, listening to it. I want to put in some brief >> beeps into strategic locations... I want the sounds to play but with >> minimal impact on the running program... > > Perhaps that means doing the equivalent of sending a remote > message: to make a sound, send a special packet to a sound server > running elsewhere with its own resources (e.g., another machine). That's a good idea. Sending the remote message might be able to be done in a shorter time than playing the sound itself. I assume you're imagining a particular context for doing that which maybe lightweight enough to do that (e.g., Flow?). I'm very interested in that and also your Spoon project.. To scratch my immediate itch I think I'll simply make the sounds as short as possible, play them in real-time, and with the ability to toggle them on/off. My goal is to understand what is the server doing at the very moment. |
On 14.09.2014, at 20:57, Chris Muller <[hidden email]> wrote: > On Sat, Sep 13, 2014 at 4:55 AM, Craig Latta <[hidden email]> wrote: >> >>> I've decided I want to get a feel for what my app is doing and at what >>> rate by, literally, listening to it. I want to put in some brief >>> beeps into strategic locations... I want the sounds to play but with >>> minimal impact on the running program... >> >> Perhaps that means doing the equivalent of sending a remote >> message: to make a sound, send a special packet to a sound server >> running elsewhere with its own resources (e.g., another machine). > > That's a good idea. Sending the remote message might be able to be > done in a shorter time than playing the sound itself. I assume you're > imagining a particular context for doing that which maybe lightweight > enough to do that (e.g., Flow?). I'm very interested in that and also > your Spoon project.. To scratch my immediate itch I think I'll simply > make the sounds as short as possible, play them in real-time, and with > the ability to toggle them on/off. My goal is to understand what is > the server doing at the very moment. - Bert - smime.p7s (5K) Download Attachment |
In reply to this post by David T. Lewis
> My apologies to Ubuntu, it seems that I neglected to install the sound > development libraries on my Ubuntu laptop before compiling the VM. That > done, sound works fine with the -vm-sound-pulse driver on Ubuntu. Could you please make this binary available somewhere ? Best, Stef |
Hi Stéphane,
I am travelling, so I cannot post anything now. But I will send you a copy of the missing vm-sound modules as soon as I can. I prefer not to post a compiled VM, because I think this should come from squeakvm.org/unix if possible. That said, I had not realized that we were missing some sound modules from the last official build, so we should make this available as a fix. Are you able to compile programs on your own Linux box? It's really quite easy to make an interpreter VM nowadays, and I would be happy show you how to do this if you are willing to give it a try. Dave > >> My apologies to Ubuntu, it seems that I neglected to install the sound >> development libraries on my Ubuntu laptop before compiling the VM. That >> done, sound works fine with the -vm-sound-pulse driver on Ubuntu. > > Could you please make this binary available somewhere ? > > Best, > > Stef > > |
Apologies for the confusion but to summarize what I found:
- The 32-bit standard interpreter VM for Linux on squeakvm.org has all of the usual vm-sound-* modules, and should work as expected. http://squeakvm.org/unix/release/Squeak-4.10.2.2614-linux_i386.tar.gz - The 64-bit standard interpreter VM for Linux on squeakvm.org is missing some of the vm-sound-* modules. For this reason, if you downloaded an interpreter VM for your 64-bit Linux system, you may not have sound. http://squeakvm.org/unix/release/Squeak-4.10.2.2614-linux_x86_64.tar.gz - If you have the 64-bit intepreter VM, you should be able to replace it with the 32-bit interpreter VM if you need sound. Or, if you prefer to keep the 64-bit VM, you may be able to add the attached vm-sound modules from a VM that I compiled on my PC. YMMV, absolutely no guarantees. - For Cog, there may be a problem with the build procedure that is causing problems with the vm-sound-* modules. I do not yet know the reason, although you may be able to use the vm-sound-* modules from the 32-bit interpreter VM (I think there was a success report for this earlier in this thread). HTH, Dave On Mon, Sep 15, 2014 at 11:57:05AM -0400, David T. Lewis wrote: > Hi St?phane, > > I am travelling, so I cannot post anything now. But I will send you a copy > of the missing vm-sound modules as soon as I can. > > I prefer not to post a compiled VM, because I think this should come from > squeakvm.org/unix if possible. That said, I had not realized that we were > missing some sound modules from the last official build, so we should make > this available as a fix. > > Are you able to compile programs on your own Linux box? It's really quite > easy to make an interpreter VM nowadays, and I would be happy show you how > to do this if you are willing to give it a try. > > Dave > > > > >> My apologies to Ubuntu, it seems that I neglected to install the sound > >> development libraries on my Ubuntu laptop before compiling the VM. That > >> done, sound works fine with the -vm-sound-pulse driver on Ubuntu. > > > > Could you please make this binary available somewhere ? > > > > Best, > > > > Stef > > > > > 4.13.15-2920-64bit-vm-sound-modules.zip (63K) Download Attachment |
On Mon, Sep 15, 2014 at 5:24 PM, David T. Lewis <[hidden email]> wrote: Apologies for the confusion but to summarize what I found: There is no "problem" with the pulse sound build on linux in Cog because... no one added it to the Cog tree. It fell throguh the cacks when the Qwaq VM diverged. Ian Piumarta added it in September 2009 at which time Cog was internal. HTH, best, Eliot
|
On 16.09.2014, at 03:37, Eliot Miranda <[hidden email]> wrote:
... and for more historical context: the pulse audio driver was written by Derek O'Connell for Etoys and Scratch on OLPC, made necessary by the maddening tendency of Linux audio interfaces changing every other year. - Bert - smime.p7s (5K) Download Attachment |
Free forum by Nabble | Edit this page |