industrialkitten
Posts: 15
Joined: Sat Apr 13, 2019 5:17 pm
Location: UK

Scratch 1.4 sound problem.

Mon Apr 22, 2019 6:36 pm

I am having a horrible problem with my Pi B whereby any audio file played in Scratch 1.4 has a long echo after it.This applies to any of the sounds included with Scratch and the effect is worse with shorter sounds ( the "pop" sound is like it has been played 3 times, quickly, but slightly quieter each time afterwards).

With the music notes, there is just a strong "woo" noise with each note. It changes the sound pitch when changing notes, but the sound doesn't match the name of the instrument it is set to. I have tried with the terminal commands:

sudo apt-get update
/usr/share/scratch/timidityinstall.sh
sudo reboot

and it looks to be installing, but then says it is the latest version already and I needed to reboot. I rebooted anyway and afterwards still get the same annoying problem. Tried 3 times and the same happens everytime. It seems there is no fix to this problem that I can find, but if someone can suggest the correct way to fix the problem with it would be greatly appreciated as it is very annoying.

Thanks.

timrowledge
Posts: 1271
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Scratch 1.4 sound problem.

Mon Apr 22, 2019 11:10 pm

There has long been a problem with balancing sounds in Scratch on the Pi; it seems to work ok on other platforms.
The issue normally appears to revolve around the 'reverb' mixing setting within the Scratch system. Having reverb turned on can make for some annoying sounds - but only in some cases, just to be more frustrating - whereas turning it off can result in short sounds (like 'pop') simply not getting produced. It's possible that kernel/sound-system changes since the last release at the end if 2016 might have improved this.

You can work around it with some rather fiddly poking. Is this enough of an issue that you are prepared to spend 20 minutes or so doing strange things in a language you've probably never seen before?
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

industrialkitten
Posts: 15
Joined: Sat Apr 13, 2019 5:17 pm
Location: UK

Re: Scratch 1.4 sound problem.

Tue Apr 23, 2019 9:40 am

timrowledge wrote:
Mon Apr 22, 2019 11:10 pm
There has long been a problem with balancing sounds in Scratch on the Pi; it seems to work ok on other platforms.
The issue normally appears to revolve around the 'reverb' mixing setting within the Scratch system. Having reverb turned on can make for some annoying sounds - but only in some cases, just to be more frustrating - whereas turning it off can result in short sounds (like 'pop') simply not getting produced. It's possible that kernel/sound-system changes since the last release at the end if 2016 might have improved this.

You can work around it with some rather fiddly poking. Is this enough of an issue that you are prepared to spend 20 minutes or so doing strange things in a language you've probably never seen before?
Thanks for the reply. I would like to have the sounds working properly and be able to use them and would be prepared to try to fix it, just don't really know what needs fixing and how to fix it.

timrowledge
Posts: 1271
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Scratch 1.4 sound problem.

Tue Apr 23, 2019 5:56 pm

Ok, I’ll see about writing it up for you. Though I find myself thinking that maybe I should just make a new release anyway and include a configuration option for this. We have a new slightly faster VM that would be nice to put out anyway.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

industrialkitten
Posts: 15
Joined: Sat Apr 13, 2019 5:17 pm
Location: UK

Re: Scratch 1.4 sound problem.

Tue Apr 23, 2019 7:46 pm

timrowledge wrote:
Tue Apr 23, 2019 5:56 pm
Ok, I’ll see about writing it up for you. Though I find myself thinking that maybe I should just make a new release anyway and include a configuration option for this. We have a new slightly faster VM that would be nice to put out anyway.
Thanks very much. Hope it is possible to fix.

timrowledge
Posts: 1271
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Scratch 1.4 sound problem.

Mon May 20, 2019 11:12 pm

Here's an experimental new version for you to try out; unzip it and move it to /usr/share/scratch.
http://www.rowledge.org/tim/squeak/file ... .image.zip
The /usr/bin/scratch shell script (which handles the menu item for Scratch on the desktop) should pick it up as the newest image file available and run it ok.
To test out the reverb preference, make a simple text file in your user home directory (ie /home/pi) named 'scratch.ini' and insert a line
soundreverb=0
to stop the reverb effect and
soundreverb=1 to enable it.

If this doesn't solve the problem then it would seem likely to be a lower-level issue needing to be brought up with Pi Central, so let's hope...
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

industrialkitten
Posts: 15
Joined: Sat Apr 13, 2019 5:17 pm
Location: UK

Re: Scratch 1.4 sound problem.

Wed May 22, 2019 7:50 pm

timrowledge wrote:
Mon May 20, 2019 11:12 pm
Here's an experimental new version for you to try out; unzip it and move it to /usr/share/scratch.
http://www.rowledge.org/tim/squeak/file ... .image.zip
The /usr/bin/scratch shell script (which handles the menu item for Scratch on the desktop) should pick it up as the newest image file available and run it ok.
To test out the reverb preference, make a simple text file in your user home directory (ie /home/pi) named 'scratch.ini' and insert a line
soundreverb=0
to stop the reverb effect and
soundreverb=1 to enable it.

If this doesn't solve the problem then it would seem likely to be a lower-level issue needing to be brought up with Pi Central, so let's hope...
Thanks for the new version - downloaded, unzipped to the home/pi folder and then tried to copy to usr/share/scratch. It tried to copy and then said I did not have permission to put it there.

Went back to home/pi and opened the image file from there. Tried the sound and there was no sound, but expect it would have to be in the folder I can't put it in to work properly. Have not yet tried the scratch.ini.

timrowledge
Posts: 1271
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Scratch 1.4 sound problem.

Thu May 23, 2019 10:00 pm

Try using

Code: Select all

sudo cp {theimage} /usr/share/scratch
- that should get around the permissions issue.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

industrialkitten
Posts: 15
Joined: Sat Apr 13, 2019 5:17 pm
Location: UK

Re: Scratch 1.4 sound problem.

Sat May 25, 2019 9:10 am

timrowledge wrote:
Thu May 23, 2019 10:00 pm
Try using

Code: Select all

sudo cp {theimage} /usr/share/scratch
- that should get around the permissions issue.
Used this and the image is now copied to the correct folder. Opened Scratch from the menu and the latest version opened correctly. There is now sound but still with the same problem as before. Tried making a "scratch.ini" file and setting the soundreverb=0. It made no noticeable difference. Was really hoping this would solve the problem.

timrowledge
Posts: 1271
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Scratch 1.4 sound problem.

Thu May 30, 2019 4:53 pm

Sorry for the delayed reply -
well, that's annoying. I hoped the issue would be nice and simple to fix :-)

Please tell us about exactly which sonds you are having problems with and exactly how you are listening to them. Via hdmi to speakers on a monitor? Headphones plugged into the lineout jack? Sound HAT of some sort?

If you can, record the sound and upload a file so I can hear the effect myself. Any information you can think of relating to the sound and how it is being used might help. Have you tried playing any (or ideally, the same) sounds on your Pi directly - via one of the linux sound player doohickeys? It's not impossible it is unrelated to Scratch itself.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

industrialkitten
Posts: 15
Joined: Sat Apr 13, 2019 5:17 pm
Location: UK

Re: Scratch 1.4 sound problem.

Thu May 30, 2019 5:03 pm

timrowledge wrote:
Thu May 30, 2019 4:53 pm
Sorry for the delayed reply -
well, that's annoying. I hoped the issue would be nice and simple to fix :-)

Please tell us about exactly which sonds you are having problems with and exactly how you are listening to them. Via hdmi to speakers on a monitor? Headphones plugged into the lineout jack? Sound HAT of some sort?

If you can, record the sound and upload a file so I can hear the effect myself. Any information you can think of relating to the sound and how it is being used might help. Have you tried playing any (or ideally, the same) sounds on your Pi directly - via one of the linux sound player doohickeys? It's not impossible it is unrelated to Scratch itself.
I am having the problem with all the sounds included with Scratch, and all the pianos/instruments/drums as well. Haven't tried importing or recording sounds to Scratch. I played music from a USB stick and it sounded normal, no echo. I will try importing said music to Scratch and see how it sounds. I am using these speakers: https://www.argos.co.uk/product/8651774 , connected to the powered USB of the monitor and the audio lineout of the Pi.

industrialkitten
Posts: 15
Joined: Sat Apr 13, 2019 5:17 pm
Location: UK

Re: Scratch 1.4 sound problem.

Fri May 31, 2019 12:27 pm

Today I played the sound "DrumSet1.mp3" in LXMusic and it finished properly, with no echo at the end. Then played it in Scratch and it has a quite noticeable short echo at the end. I could not test with the default "Meow" sound (in Scratch, the echo on this makes it sound awful), because LXMusic and VLC both have a problem with cutting the end off of the short audio files, I was unable to hear weather it finished properly.

timrowledge
Posts: 1271
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Scratch 1.4 sound problem.

Sat Jun 01, 2019 5:58 pm

I've been trying out some sounds on one of my Pis to see if I can replicate your problem; and the answer is no, I can't.
Even with reverb on, the only sound that is really noticeably affected is the cat meow. Pretty much any other noise is ok. Turning reverb off makes little difference except to the meow. This is puzzling.

I'm using a pair of random junk-pile powered speakers connected via the headphone socket. They even look pretty similar to the ones you are using!

The only thing I can think of now is that at one point the sound output from the headphone socket was, to put it mildy, terrible, especially for quiet sounds. That was at least a year, possibly two ago though, so I hope you've updated your Raspbian since then!

Just to be clear - did you mean that you have used a USB sound out dongle and Scratch sounds were ok through it?
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

industrialkitten
Posts: 15
Joined: Sat Apr 13, 2019 5:17 pm
Location: UK

Re: Scratch 1.4 sound problem.

Sat Jun 01, 2019 8:51 pm

timrowledge wrote:
Sat Jun 01, 2019 5:58 pm
I've been trying out some sounds on one of my Pis to see if I can replicate your problem; and the answer is no, I can't.
Even with reverb on, the only sound that is really noticeably affected is the cat meow. Pretty much any other noise is ok. Turning reverb off makes little difference except to the meow. This is puzzling.

I'm using a pair of random junk-pile powered speakers connected via the headphone socket. They even look pretty similar to the ones you are using!

The only thing I can think of now is that at one point the sound output from the headphone socket was, to put it mildy, terrible, especially for quiet sounds. That was at least a year, possibly two ago though, so I hope you've updated your Raspbian since then!

Just to be clear - did you mean that you have used a USB sound out dongle and Scratch sounds were ok through it?
Odd. I wonder if it is specific to my Pi or batch of Pis? I hear a small echo at the end of almost all sounds in Scratch, and there is almost no difference with the reverb on or off in scratch.ini (currently I have it off, just because it is supposed to make it better). I have had no issues using the same speakers with a Windows PC and a Chromebox and have played the Meow from the online version of Scratch. It did not echo, so I know it is not the speakers themselves. Only had my Pi about 6 months and made a new SD card with the latest Raspbian when I got it. I regularly run the sudo apt-get update, sudo apt-get dist-upgrade, so I am always running a new-ish version.

As for the USB, I meant that I played music from a USB flash drive on the Pi, and it sounded fine. I do have a USB soundcard somewhere which I might try.

timrowledge
Posts: 1271
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Scratch 1.4 sound problem.

Sun Jun 02, 2019 11:59 pm

I simply can't hear any problems with sounds on any of my Pi's. I don't know what to suggest next.Maybe record the sounds on your phone and post the sound file (you'd have to at least zip it to be able to upload it here) somewher. Maybe if I hear it I will recognise some symptom?
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

industrialkitten
Posts: 15
Joined: Sat Apr 13, 2019 5:17 pm
Location: UK

Re: Scratch 1.4 sound problem.

Mon Jun 03, 2019 5:43 pm

timrowledge wrote:
Sun Jun 02, 2019 11:59 pm
I simply can't hear any problems with sounds on any of my Pi's. I don't know what to suggest next.Maybe record the sounds on your phone and post the sound file (you'd have to at least zip it to be able to upload it here) somewher. Maybe if I hear it I will recognise some symptom?
Here is the sound file:
https://instaud.io/private/0145726c6634 ... 7988454a41

These are the order of the sounds played:
1- Meow
2- DirtyWhir
3- Hand Clap
4- Pop

5- Play Drum 48 for 0.2 beats
6- Play Note 60 for 0.5 beats

Mind because something loud at the end.

Hope you can hear the echo at the end of each sound and how the drum and note sound awful.

timrowledge
Posts: 1271
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Scratch 1.4 sound problem.

Tue Jun 04, 2019 12:27 am

OK, yes I hear the reverb for the file sounds, but it all sounds pretty ok to me other than that. The last two are clear indications that the 'timidity' midi stuff isn't installed; if it were they'd actually be the standard numbered MIDI noises nad changing the drum or instrument would be very hearable.

So the question is why the modified system didn't stop the reverb for you. I'll do a bit more digging.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Return to “Scratch”