Echo when playing sounds

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

Echo when playing sounds

Levente Uzonyi-2
Hi,

Whenever I play a sound, it keeps echoing which is really annoying.
I experience it on windows and mac too.

Here's an example where it can be clearly heard:

| sound envelope |
sound := PluckedSound new.
envelope := VolumeEnvelope
  points: { 0@1.0. 10@1.0. 20@0.0 }
  loopStart: 2
  loopEnd: 2.
envelope target: sound; scale: 0.3.
sound
  addEnvelope: envelope;
  setPitch: 220 dur: 0.1 loudness: 0.3;
  play

Is it intentional, or is it a bug?


Cheers,
Levente


Reply | Threaded
Open this post in threaded view
|

Re: Echo when playing sounds

Josh Gargus
Try evaluating 'SoundPlayer stopReverb'.

Cheers,
Josh


On Dec 17, 2009, at 9:24 AM, Levente Uzonyi wrote:

> Hi,
>
> Whenever I play a sound, it keeps echoing which is really annoying. I experience it on windows and mac too.
>
> Here's an example where it can be clearly heard:
>
> | sound envelope |
> sound := PluckedSound new.
> envelope := VolumeEnvelope
> points: { 0@1.0. 10@1.0. 20@0.0 }
> loopStart: 2
> loopEnd: 2.
> envelope target: sound; scale: 0.3.
> sound
> addEnvelope: envelope;
> setPitch: 220 dur: 0.1 loudness: 0.3;
> play
>
> Is it intentional, or is it a bug?
>
>
> Cheers,
> Levente
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Echo when playing sounds

Levente Uzonyi-2
On Thu, 17 Dec 2009, Josh Gargus wrote:

> Try evaluating 'SoundPlayer stopReverb'.

It works, thanks. But it's strange that the same code gives no sound. I
have to increase the duration to hear any sound.


Levente

>
> Cheers,
> Josh
>
>
> On Dec 17, 2009, at 9:24 AM, Levente Uzonyi wrote:
>
>> Hi,
>>
>> Whenever I play a sound, it keeps echoing which is really annoying. I experience it on windows and mac too.
>>
>> Here's an example where it can be clearly heard:
>>
>> | sound envelope |
>> sound := PluckedSound new.
>> envelope := VolumeEnvelope
>> points: { 0@1.0. 10@1.0. 20@0.0 }
>> loopStart: 2
>> loopEnd: 2.
>> envelope target: sound; scale: 0.3.
>> sound
>> addEnvelope: envelope;
>> setPitch: 220 dur: 0.1 loudness: 0.3;
>> play
>>
>> Is it intentional, or is it a bug?
>>
>>
>> Cheers,
>> Levente
>>
>>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re[2]: Echo when playing sounds

Herbert König
Hello Levente,

LU> It works, thanks. But it's strange that the same code gives no sound. I
LU> have to increase the duration to hear any sound.

there is a preference "soundQuickStart" under media.

Otherwise I put some silence before and after my actual sound.

Is there something special you want to accomplish?


Cheers,

Herbert                            mailto:[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re[2]: Echo when playing sounds

Levente Uzonyi-2
On Thu, 17 Dec 2009, Herbert König wrote:

> Hello Levente,
>
> LU> It works, thanks. But it's strange that the same code gives no sound. I
> LU> have to increase the duration to hear any sound.
>
> there is a preference "soundQuickStart" under media.

That didn't make any difference. If the duration is less than ~0.12 the
sound doesn't play.


Levente

>
> Otherwise I put some silence before and after my actual sound.
>
> Is there something special you want to accomplish?
>
>
> Cheers,
>
> Herbert                            mailto:[hidden email]
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Echo when playing sounds

Bert Freudenberg
On 17.12.2009, at 22:06, Levente Uzonyi wrote:

>
> On Thu, 17 Dec 2009, Herbert König wrote:
>
>> Hello Levente,
>>
>> LU> It works, thanks. But it's strange that the same code gives no sound. I
>> LU> have to increase the duration to hear any sound.
>>
>> there is a preference "soundQuickStart" under media.
>
> That didn't make any difference. If the duration is less than ~0.12 the sound doesn't play.

That sounds like a bug. Which VM are you using?

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Echo when playing sounds

johnmci
Well if this is the macintosh VM (unix or carbon 3.x/4.x) then I suspect the playback of the first N milliseconds of sound is not *quite right*.

If possible the test case should be tried on the 5.x Squeak Macintosh VM because I rewrote the sound logic to use Apple's latest
suggested API and took great care to ensure playback was timely and *correct* for the first N milliseconds.


On 2009-12-17, at 2:03 PM, Bert Freudenberg wrote:

> On 17.12.2009, at 22:06, Levente Uzonyi wrote:
>>
>> On Thu, 17 Dec 2009, Herbert König wrote:
>>
>>> Hello Levente,
>>>
>>> LU> It works, thanks. But it's strange that the same code gives no sound. I
>>> LU> have to increase the duration to hear any sound.
>>>
>>> there is a preference "soundQuickStart" under media.
>>
>> That didn't make any difference. If the duration is less than ~0.12 the sound doesn't play.
>
> That sounds like a bug. Which VM are you using?
>
> - Bert -
>
>
>

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





Reply | Threaded
Open this post in threaded view
|

Re: Echo when playing sounds

Levente Uzonyi-2
In reply to this post by Bert Freudenberg
On Thu, 17 Dec 2009, Bert Freudenberg wrote:

> On 17.12.2009, at 22:06, Levente Uzonyi wrote:
>>
>> On Thu, 17 Dec 2009, Herbert König wrote:
>>
>>> Hello Levente,
>>>
>>> LU> It works, thanks. But it's strange that the same code gives no sound. I
>>> LU> have to increase the duration to hear any sound.
>>>
>>> there is a preference "soundQuickStart" under media.
>>
>> That didn't make any difference. If the duration is less than ~0.12 the sound doesn't play.
>
> That sounds like a bug. Which VM are you using?
>
A self built windows vm with the latest VMMaker fixes, but I tried it with
the latest official windows vm (3.11.5) and it's the same.


Levente

> - Bert -
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Echo when playing sounds

David T. Lewis
In reply to this post by Bert Freudenberg
On Thu, Dec 17, 2009 at 11:03:32PM +0100, Bert Freudenberg wrote:

> On 17.12.2009, at 22:06, Levente Uzonyi wrote:
> >
> > On Thu, 17 Dec 2009, Herbert K?nig wrote:
> >
> >> Hello Levente,
> >>
> >> LU> It works, thanks. But it's strange that the same code gives no sound. I
> >> LU> have to increase the duration to hear any sound.
> >>
> >> there is a preference "soundQuickStart" under media.
> >
> > That didn't make any difference. If the duration is less than ~0.12 the sound doesn't play.
>
> That sounds like a bug. Which VM are you using?
>

I have a very hazy recollection of someone on the vm-dev or etoys
list a few years ago discussing a sound player bug that had something
to do with 0 versus 1 based indexing and missing the zeroeth instance
of some buffer. Does anyone recall such a thing?

Dave