Problem with Example Sonic Dreams v3.3.2

If I edited for example core.rb to make a debug output, would the changes be directly applied?

1 Like

I have been directly editing the app bundle code here on macOS which indeed affects the running app.

1 Like

(Itā€™s necessary to restart the app after changing that file every time though)

1 Like

My intention was to insert something like print *args after def initialize in SPMap

1 Like

Iā€™ve been doing something similar, yes.

      def initialize(*args)
        fail "args: #{args}" if !args.first.is_a?(Hash)
1 Like

My assumption at the moment is that it is unnecessary to convert the arg to a hash if it is already a SPMap, so Iā€™m about to test that as a potential fix.

1 Like

I found out that a shorter piece to reproduce the error is

use_synth_defaults phase: 0.5, res: 0.5, cutoff: 80, release: 3.3, wave: 1
 use_merged_synth_defaults cutoff: 100

which reduces waiting time A LOT

1 Like

Yes, I cut down the built in example also.

1 Like

Sorry I have an appointment now, I will be back in about an hour just that you know

EDIT: but my print *args doesnt seem to workā€¦,

2 Likes

Letā€™s leave the rest of the discussion to a PM if you wish to do so anyway - weā€™ve spammed the forum enough already :wink:

2 Likes

yes lets do that, see you then

1 Like

use the discord channel :slight_smile:

Discord server about Sonic Pi @enkid0

Apologies. I didn;t wait long enough I had the crash too.
Iā€™ve been looking at the crash.
It appears to be that it doesnā€™t like successive calls to use_merge_defaults.
This crashes for example:

use_merge_defaults cutoff: 80
sleep 1
use merge_defaults_cutoff: 100

same if you use say amp: 1 instead of cutoff: 100 or indeed no arguments after use_merge_defaults by itself
I was trying on Mac releases.
Itā€™s OK on 3.2 release version, not ok on release 3.2.2 or 3.2.1beta
Going to have a look at the code.
Mac uses Ruby 2.6.4p104 bundled inside the app for 3.2.2 and 3.1 so I donā€™t think that it is the ruby version that is the problem.

EDIT
There were significant changes to the sound.rb file on 9th and 10th March which I think may be related to this. Replacing use of atom and hamster hash which I think may be highly relevant to this.
Iā€™ll try a build on either side of these to check.

Not sure thatā€™s the case because youā€™ll notice my version above is 2.7.1ā€¦

i do the test and wait long enough and i do have the problem too

Not only succesive calls to use_merge_defaults but also calling use_merge _defaults after use_synth defaults are a problem.

@ethancrawford has a proposed solution in the issues on SP github repository ā€œRENAMED issue with use_merged_synth_defaults and synth_defaults #2339ā€ that seems to do the job, (but not adopted yet). It works OK for me.

Iā€™m new to this but I do not think it just a ruby problem I get the same thing on my Win7 64 that Iā€™m running Sonic Win10 64 version . If that helps any. :slight_smile:

Thank you for your answer.
We now know that this behaviour is a bug and as far as I know there is also a fix being introduced into the code and probably shipped with the next release of Sonic Pi.