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

November Scratch release

Sun Nov 29, 2015 4:34 am

All being well the November update of Raspbian should bring with it a new release of Scratch. The biggest change from my perspective is a new Closed Polymorphic Inline Cache system in the VM that is part of some other work which should boost performance a little. But that's in the bowels of them VM and not likely to be a big wow to most people even if it was a couple of weeks of major brain-boiling work.

No, the bit most people will have reason to get excited is that the system can at last make use of the MIDI general instrument list to make rather better triangle, tubular bell, tympani or tinkling noises. There are two caveats-
A) you will need to run a small shell script to install about 150 Mb of the sound-font files. For general release it was decided that a large chunk of such files wasn't really of interest to everyone.
B) the sound quality through the headphone socket really isn't great, not this is a huge surprise. There's nothing that I know of that can be done with Scratch since the sounds are generated from the timidity synthesizer and ALSA. However the sound through the hdmi and a decent sound system is pretty damn good.

There's also a modest list of assorted bug fixes that got released, so you should now get a more useful IP address when using the mesh network server, the PiFace inputs should not jitter all the time, Sprite local variables should appear correctly, etc.

For the new release I hope to improve the performance still more, specifically for the tools such as the painter that are a bit annoying on single core machines (0) , get the sound recording working (if you have a set up sound input of course!), extend the list of supported devices in the gpioserver, and maybe unify relativity and quantum toffee.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

dlivingstone
Posts: 17
Joined: Mon Dec 30, 2013 10:19 pm

Re: November Scratch release

Sun Nov 29, 2015 11:23 pm

Great news.
I was trying out the gpioserver examples - working well, but a little quirk in my own simple LED test program that a broadcast to switch off a LED doesnt always seem to have an effect - perhaps when the delay after switching the LED on is quite small?
E.g. I had a very short script that ended with a broadcast message to switch off a LED, to no effect. Duplicating the last instruction and running that on its own worked perfectly.

More notably, the scratch.ini setting suggested on the Scratch gpio documentation page doesn't seem to work - simply results in Scratch reporting an error at start up. Is this a common error??

^All above on the latest Jessie release.

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

Re: November Scratch release

Mon Nov 30, 2015 4:57 am

dlivingstone wrote:Great news.
I was trying out the gpioserver examples - working well, but a little quirk in my own simple LED test program that a broadcast to switch off a LED doesnt always seem to have an effect - perhaps when the delay after switching the LED on is quite small?
Hmm. Two things come to mind;
a) the scripts can run pretty damn fast and I have had cases where I thought nothing was happening and ended up finding it was simply too short a time 'on' to notice.
b) I was going say that maybe it turned on and back off before the gpioserver got a chance to notice but that simply isn't how it works and I need to slap myself for such a silly thought.
c) maybe you were distracted by oooohhh shiny! ? I know, desperate gambit.

If you could post the script that might help me work out what is happening; just use the 'save picture pf scripts' menu option in the script editor.
dlivingstone wrote:More notably, the scratch.ini setting suggested on the Scratch gpio documentation page doesn't seem to work - simply results in Scratch reporting an error at start up. Is this a common error??.
It had better not be. Post your .scratch.ini file as well if possible. Oh, and if you can cause the problem deliberately, check your directory for a SqueakDebug.log file and include that is you can find it. Often provides some extra clues.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: November Scratch release

Mon Nov 30, 2015 5:00 am

Ack, I forgot an additional facility I added to this release; some people have asked about increasing the font sizes for presentations or t help with visual acuity problems etc, so you can now add a line to your '.scratch.ini' file
e.g.
fontscale=1.5
Would attempt to scale up all fonts by 50% I don't recommend much outside the range of 0.7 to 1.5 to be honest; things can get a bit ugly looking. But hopefully this will help.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

dlivingstone
Posts: 17
Joined: Mon Dec 30, 2013 10:19 pm

Re: November Scratch release

Mon Nov 30, 2015 1:47 pm

Hi Tim,

will grab the screens and upload when I can
There was no .scratch.ini file in my home folder initially, so I created a new one containing only the single line to set the gpioserver on - happy to send the script though.

Hopefully a little time this evening...

As a 'for info', I was running this on a revision 1 (or was it 1.1? Again I can check tonight!) model B - don't know if that makes a difference?

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

Re: November Scratch release

Mon Nov 30, 2015 5:57 pm

dlivingstone wrote:Hi Tim,

will grab the screens and upload when I can
There was no .scratch.ini file in my home folder initially, so I created a new one containing only the single line to set the gpioserver on - happy to send the script though.
Yes please - just in case there is a hidden character or something weird. Always best to test with there closest possible situation.
dlivingstone wrote:As a 'for info', I was running this on a revision 1 (or was it 1.1? Again I can check tonight!) model B - don't know if that makes a difference?
I really hope not. But I can test on B/+/2/A+ here to make sure.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

dlivingstone
Posts: 17
Joined: Mon Dec 30, 2013 10:19 pm

Re: November Scratch release

Tue Dec 01, 2015 12:27 am

I plugged in the Pi earlier... it was still wired up from yesterday. Ran the scratch program, and this time the LED complied and switched itself off... honestly, no idea, it didn't do that yesterday (it stayed on, tested on two different GPIO pins) - so in one way good, but for debugging purposes not very helpful!

Anyway the very simple script in in the image below:
gpio-led-on-off.png
gpio-led-on-off.png (4.26 KiB) Viewed 3213 times
The other attached image shows the error message I get when setting up the .scratch.ini file. I'll have to set up the pi again to get the actual ini file, as I forgot to copy it off... doh!
Attachments
2015-11-29-210059_1036x772_scrot.png
2015-11-29-210059_1036x772_scrot.png (39.25 KiB) Viewed 3205 times

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

Re: November Scratch release

Tue Dec 01, 2015 2:00 am

dlivingstone wrote: ... the very simple script in in the image below:
gpio-led-on-off.png
Yup, that should work just fine . A 1 second delay with the led on ought to be visible.
dlivingstone wrote:The other attached image shows the error message I get when setting up the .scratch.ini file. I'll have to set up the pi again to get the actual ini file, as I forgot to copy it off... doh!
I'm completely unable to replicate this so far. My .scratch.ini (has to be in the /home/pi directory remember - I didn't the first time!) is
gpioserver=1
and I've also tried
gpioserver = 1
in case I had failed to handle whitespace. I also tried adding a CR to the end incase a blank line caused problems, but nothing so far.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: November Scratch release

Tue Dec 01, 2015 7:09 pm

I forgot to point to the script to install the MIDI general instrument support - I'll get it on the main Doc section eventually but for now you can use - (and since a .sh file is not allowed on the forum you'll have to unzip it)
timidityinstall.sh.zip
(1.27 KiB) Downloaded 238 times
Many thanks to Kazuhiro Abe, Manabu Sugiura and Hisashi Hoshino for getting the basics working nicely.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

dlivingstone
Posts: 17
Joined: Mon Dec 30, 2013 10:19 pm

Re: November Scratch release

Tue Dec 01, 2015 10:54 pm

The comment about whitespaces after the line helped... I had two CRs.
Removed those and the error disappeared.
All working now...

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

Re: November Scratch release

Tue Dec 01, 2015 11:47 pm

dlivingstone wrote:The comment about whitespaces after the line helped... I had two CRs.
Removed those and the error disappeared.
All working now...
D'oh! I didn't test what happened with multiple blank lines; it works for a single blank line...
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: November Scratch release

Mon Dec 07, 2015 6:20 pm

timrowledge wrote: D'oh! I didn't test what happened with multiple blank lines; it works for a single blank line...
Fixed for the next release
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: November Scratch release

Mon Dec 07, 2015 9:06 pm

timrowledge wrote:I forgot to point to the script to install the MIDI general instrument support - I'll get it on the main Doc section eventually but for now you can use - (and since a .sh file is not allowed on the forum you'll have to unzip it)
timidityinstall.sh.zip
Currently it seems this got messed up in the last stages of the release and the alsa config stuff has moved from /etc/modprobe.d to somewhere not yet known by me. More details later.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

katrrose
Posts: 1
Joined: Sun Dec 27, 2015 8:57 pm

Re: November Scratch release

Sun Dec 27, 2015 9:10 pm

Log into 'Terminal' then type in: sudo nano /boot/configuration. txt

This takes you to a crucial system file (be careful!)

Now go down to the buffer settings where it says #buffer width #buffer height

Change the buffer width and height to match your screen size

The text about the buffer width is prefixed by a '#' as is the text about the height - remove those '#'s to activate the fixed screen size.

'Ctrl' and 'x' out
'Y' to save
'Enter' to save under the same file name

See this video for info on how to remove borders.
https://youtu.be/uRLYYWv5EVs

NoMod_Programming
Posts: 8
Joined: Mon Nov 02, 2015 8:16 pm

Re: November Scratch release

Sat Jan 23, 2016 12:27 am

Just an internal bug report:
When adding a new ScratchSkin with a different height and width for hat blocks (and after resetting the Dictionary "ArchHatForms"), the hat block's top forms are drawn incorrectly:
Image
This can be fixed by changing the mode for painting them top area from "paint" to "blend". Then the drawing will be done correctly.

Forris
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 276
Joined: Fri Jan 06, 2012 7:46 pm

Re: November Scratch release

Fri Feb 05, 2016 12:38 pm

Hi Tim.

Have you had any luck with adding support for the HR-04 ultrasonic sensor yet, please?

I'm currently putting together a few 'show & tell' projects for my son's primary school and I'd like to use this sensor. I've rewritten my ScratchGPIO projects for GPIOServer, but it seems I can't do this with the HR-04 projects. This is a shame as, although I'm a big fan of ScratchGPIO myself, I was hoping to be able to use just the one version of Scratch on the Pi's that the school is (hopefully) getting, to cut down on confusion.

Thanks, Darren.

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

Re: November Scratch release

Fri Feb 05, 2016 6:44 pm

Forris wrote:Have you had any luck with adding support for the HR-04 ultrasonic sensor yet, please?
Sadly not. Well, not that does anyone any good; the issue is the way wiringPi does timing.. .or something like that. The best I've been able to get so far is very unstable results with a plausible precision of about 4ft. Not terribly useful!

A bit like decent support for PWM servos, some lower level work is needed; I suggest email-bombing the foundation to ask for these things and then I'll get properly tasked.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Return to “Scratch”