The sound and midi problem in Scratch for Linux is partially solved:
1. Disable PulseAudio
2. Disable a sound server aRtS
The sound recording works fine.
Play sound (meow) - works
For MIDI playing:
Run timidity as midi-server (from root or sudo):
timidity -iADq -Os
Squeak for playback MIDI uses differents ports (130:0)
timidity reads out the data from port 128:0
List MIDI ports:
aconnect -i -o
We use aconnect (or kaconnect) for redirection:
aconnect 130:0 128:0
or
aconnect Squeak:0 TiMidity:0 (best variant)
Test:
Play drum (51) for 0.2 beats (only for argument=51. .82) - fine
Play note (59) for 0.5 beats - fine
The note:
Port MIDI Squeak is initialized at start Scratch (squeak), being immediately disabled!
MIDI is initialized at work PLAY DRUM or PLAY NOTE (and locale interface select !!!)
The Red Button (stop scripts) disables redirection MIDI.
The image Scratch.image for Scratch1.4 Beta7 (works and in the previous versions) was used. In Scratch 1.4RC external MIDI does not work - stirs patch Kazuhiro Abee.
Used squeak-3.10-1, in squeak-3.10-5 bug in play MP3
P.S. It's a "draft" variant.
Offline
The sound and midi problem in Scratch for Linux - next step:
1. Disable PulseAudio - not support on current version squeak-audio
2. Disable a sound server arTs (or use artsdsp in Scratch startup script)
3. Use startup script for the TiMidity ALSA sequencer interface (best variant -timidity automatically starting on boot system) or manual run timidity as midi-server (from root or sudo - very bad idea):
timidity -iADq -Os
Write this script and save as "midi_support". Set execute permission for this script.
#!/bin/sh
## MIDI support for Scratch
if egrep -q 'TiMidity' /proc/asound/seq/clients 2>/dev/null;
then
## loop, if squeak running
while ( ps -A | grep 'squeak' >/dev/null ); do
## if Squeak midi port exist?
if ( aconnect -i | egrep -q 'Squeak' >/dev/null);
then
if ! egrep -q 'Connecting To: 128:0' /proc/asound/seq/clients 2>/dev/null
then aconnect Squeak:0 TiMidity:0
fi
fi;
done
else echo "TiMidity server not run"
fi
4. Run Scratch startup script.
6. Run 'midi-support' script
7. Selecr language interface for Scratch (!!!) for creating MIDI-port (???)
8. Test: play sound, sound record and midi work fine.
My startup script for run Scratch:
/usr/bin/artsdsp /usr/share/Scratch/squeak/squeak -plugins /usr/share/Scratch/squeak /usr/share/Scratch/Scratch.image &
Scratch.image for Scratch1.4 Beta7 (works and in the previous versions).
Squeak - squeak-3.10-1.
My Linux: Mandriva 2009 (KDE 3.5)
Offline
New!
Skip step 1 and 2 in previous post - "Disable PulseAudio, Disable arTs".
Use next startup script -
/usr/bin/padsp /usr/share/Scratch/squeak/squeak -plugins /usr/share/Scratch/squeak /usr/share/Scratch/Scratch.image &
Offline
Do You Think You Can Run Scratch On My PSP? it has internet. I Never Tried The Linux Or 1.4 ?<change{bingbong1000}by(
Offline
I was able to get Scratch 1.4 on Kubuntu 9.04 Jaunty working (with drums and sound and everything) by manually extracting the squeak engine from the Linux 1.3 installer and dragging the Scratch.image file from my Windows 1.4 installation and (from a command line) running './squeak Scratch.image'.
I haven't tested sharing a project or remote sensor connections tho.
UPDATE: THIS DOES NOT WORK!!!! When you try to open a project, you get a walkback, even when I used an OS X image and Scratch.ini
Last edited by HaiTek (2009-07-08 16:02:17)
Offline
Hi all. I have OpenSuse 11.1. I was going to try to install scratch using source code. It was little confusing, so I tried to check, maybe, Yast will have scratch install. And it had. So to install scratch on suse just use Yast.
About sound. I don't know if uninstalling of pulseaudio helps, but in my case, I had to uninstall pulseaudio, because it brokes sound in all applications.
Pity, but it is only 1.3 version of scratch. I wander, do I miss a lot by not having 1.4 version?
Offline
ftp://ftp.linuxcenter.ru/pub/Mandriva/EduMandriva/educontrib/2009.0/i586/scratch-1.3.1-2mdv2009.0.i586.rpm
ftp://ftp.linuxcenter.ru/pub/Mandriva/EduMandriva/educontrib/2009.0/i586/scratch-1.4.0-1edm2009.0.i586.rpm
ftp://ftp.linuxcenter.ru/pub/Mandriva/EduMandriva/educontrib/2009.1/i586/non-free/release/scratch-1.4.0-2edm2009.1.i586.rpm
ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/Education/openSUSE_11.0/noarch/scratch-1.3.1-3.3.noarch.rpm
Offline
scratch-1.4.0_0.0-2_i386.deb on ubuntu jaunty - sound issues
I installed scratch-1.4.0_0.0-2_i386.deb on my dell mini 9 with ubuntu 9.04 (jaunty) today. I also had to install timidity.
Using the startscript scratch included
#!/bin/sh if [ -f /usr/bin/timidity ]; then ## if TiMidity not run if ! egrep -q 'TiMidity' /proc/asound/seq/clients 2>/dev/null ## Run timidity as server-mode then if timidity -iADq -Os | egrep -q '128' ## if use midi port not 128:0 then echo 'MIDI port - Ok' else echo 'MIDI port not supported' fi fi else echo "TiMidity not found - MIDI off" fi ## run scratch /usr/share/scratch/App/squeak -plugins /usr/share/scratch/Plugins /usr/share/scratch/Scratch.image "${@}"
I get no sound at all - not even
[blocks]<play sound[ meow )>[/blocks]
works - I just don't hear anything. Instead I get this error-message in the Linux-terminal:
soundStart: snd_add_pcm_handler: Function not implemented
When I use the old startscript - not sure whether it was included with sratch 1.4 RC or with the scratch-1.3-installer:
#!/bin/sh # This script is a squeakvm wrapper to load Scratch image. # Reza Iskandar Achmad <reza@chipset.or.id> #------------------------------------------------------------ aoss_wrapper=`which aoss` exec $aoss_wrapper /usr/share/scratch/App/squeak \ -plugins /usr/share/scratch/Plugins \ -vm-sound-OSS \ /usr/share/scratch/Scratch.image "${@}" # Should check to see if Alsa is present, and if so use the wrapper. # otherwise, just use OSS.
sound works fine - even the midi-blocks
[blocks]
<play note( )for( )secss>
<play drum( )for( )secss>
[/blocks]
I guess not even timidity is needed for that.
There's a huge delay though, but this may be an issue of the atom-cpu on the netbook.
Offline
gromko wrote:
ftp://ftp.linuxcenter.ru/pub/Mandriva/EduMandriva/educontrib/2009.0/i586/scratch-1.3.1-2mdv2009.0.i586.rpm
ftp://ftp.linuxcenter.ru/pub/Mandriva/EduMandriva/educontrib/2009.0/i586/scratch-1.4.0-1edm2009.0.i586.rpm
ftp://ftp.linuxcenter.ru/pub/Mandriva/EduMandriva/educontrib/2009.1/i586/non-free/release/scratch-1.4.0-2edm2009.1.i586.rpm
ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/Education/openSUSE_11.0/noarch/scratch-1.3.1-3.3.noarch.rpm
Are those... what I think they are?
I've been trying t convert Scratch to RPM FOREVER now.
Offline
mschlager wrote:
When I use the old startscript - not sure whether it was included with sratch 1.4 RC or with the scratch-1.3-installer:
Code:
#!/bin/sh # This script is a squeakvm wrapper to load Scratch image. # Reza Iskandar Achmad <reza@chipset.or.id> #------------------------------------------------------------ aoss_wrapper=`which aoss` exec $aoss_wrapper /usr/share/scratch/App/squeak \ -plugins /usr/share/scratch/Plugins \ -vm-sound-OSS \ /usr/share/scratch/Scratch.image "${@}" # Should check to see if Alsa is present, and if so use the wrapper. # otherwise, just use OSS.sound works fine - even the midi-blocks
[blocks]
<play note( )for( )secss>
<play drum( )for( )secss>
[/blocks]
I guess not even timidity is needed for that.
There's a huge delay though, but this may be an issue of the atom-cpu on the netbook.
Hi Mschlager -
Thanks for trying this out!
I think I'll update the package to use the old script by Reza, and to request that aoss be installed (also necessary for this approach to work). Playback does work on my machine (albeit delayed), but pressing record causes Scratch / Squeak to crash with error:
lightnin@Holdfast:~$ ./scratch-oss
squeak: /home/shiro/Squeak-3.10-4/platforms/unix/vm-sound-OSS/sqUnixSoundOSS.c:355: dspOpen: Assertion `dsp->fd < 0' failed.
Aborted
By the way, we decided to fake midi playback in the latest image, so we aren't really using timidity... I'll take out the dependency before I build the next package.
Offline
Ok, I've just made a new package that uses ye olde OSS plugin. Sound playback appears to work, if a bit delayed.
http://info.scratch.mit.edu/Linux_installer
Anyone out there with experience working with sound in Linux? We sure could use some help. See the "Known Issues" section of page above.
Offline
11weirdo7 wrote:
Just a quick question from a non-coder:
This is for Linux, but it also says "Ubuntu". My laptop's Linux OS is Fedora, will this still work?
Thanks in advance.
I'll give a little background in case it's useful. Different Linux distributions use different packaging formats. The one we've created is for Ubuntu Linux (which is based on Debian Linux, so it should work for that variety too). The installer package ends in .deb. To install it on a Fedora system, you'll want to convert the package to Fedora's package format, called .rpm. There's a piece of software called alien thats supposed to help you do just that. You can find it here:
http://kitenet.net/~joey/code/alien/
We've never tried it though. If you do, please let us know how it goes!
Offline
This is a reply for the fist post. This seems familiar since I had this before and I used this website that really helped me a lot. http://info.scratch.mit.edu/Linux_installer/How_to_Build_the_Scratch_Installer_for_Linux
Kristine
fast slim
Last edited by kskristinesmith (2009-08-02 02:38:44)
Offline
What is the status on scratch for linux? I heard that they were making it, but that was almost a year ago.
Offline
I can't install the .deb file, running ubuntu 9.04. I don't have internet on that machine, so im copying everything onto a disc and putting it into the machine. I then tried the "original" way of doing it, and thats getting squeak, then getting the .image, but it still wont work.
Offline
tcb wrote:
I can't install the .deb file, running ubuntu 9.04. I don't have internet on that machine, so im copying everything onto a disc and putting it into the machine. I then tried the "original" way of doing it, and thats getting squeak, then getting the .image, but it still wont work.
are you typing in exactly this:
sudo dpkg -i <name of deb>.deb
Offline