Re: [squeak-dev] Re: How can I listen to my app?

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

Re: [squeak-dev] Re: How can I listen to my app?

Eliot Miranda-2
 


On Fri, Sep 12, 2014 at 8:44 AM, Chris Muller <[hidden email]> wrote:
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?

I've no objection.  Any one want to volunteer to get this working for the Cog builds?

> Sound systems have been changing on Linux distributions, and I suspect that
> we may be falling behind in our support for this.
>
> Dave
>
>




--
best,
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: How can I listen to my app?

Eliot Miranda-2
 
and why is no one willing to step up and get the pulse driver working in the Cog VM?

On Mon, Sep 15, 2014 at 8:57 AM, David T. Lewis <[hidden email]> 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
>
>






--
best,
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: How can I listen to my app?

David T. Lewis
 
>  and why is no one willing to step up and get the pulse driver working in
> the Cog VM?
>

I'm assuming (but I do not know) that it is a problem in the old autotools
build, since it is working in the CMake build.

Holger Hans Peter Freyther sent a set of patches to update it:

http://lists.squeakfoundation.org/pipermail/vm-dev/2014-September/016489.html

The discussion was focused on FreeBSD, but the autotools build for Cog
does not work on my newer Ubuntu system either, so I'm thinking that this
should be of general interest for the Cog build process.

Maybe that takes care of the problem for sound too?

Dave

> On Mon, Sep 15, 2014 at 8:57 AM, David T. Lewis <[hidden email]>
> 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
>> >
>> >
>>
>>
>>
>>
>
>
> --
> best,
> Eliot
>


Reply | Threaded
Open this post in threaded view
|

re: How can I listen to my app?

ccrraaiigg
In reply to this post by Eliot Miranda-2
 

> ...and why is no one willing to step up and get the pulse driver
> working in the Cog VM?

     Until you wrote that, I was happily using a PortAudio-linked plugin
and unaware that there was a problem. :)


-C

--
Craig Latta
netjam.org
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: How can I listen to my app?

Eliot Miranda-2
In reply to this post by Eliot Miranda-2
 


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:

- 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).

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,

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
> >
> >
>






--
best,
Eliot
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: How can I listen to my app?

Bert Freudenberg
 

On 16.09.2014, at 03:37, Eliot Miranda <[hidden email]> wrote:



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:

- 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).

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. 

... 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
Reply | Threaded
Open this post in threaded view
|

re: How can I listen to my app?

ccrraaiigg
 

> ... 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.

     Yep, this is why I've enjoyed linking my audio plugins with
PortMedia (which includes PortAudio and PortMIDI) since 2002. It's used
and developed by people doing real daily studio work, on several platforms.


-C

--
Craig Latta
netjam.org
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)