If I edited for example core.rb to make a debug output, would the changes be directly applied?
I have been directly editing the app bundle code here on macOS which indeed affects the running app.
(Itās necessary to restart the app after changing that file every time though)
My intention was to insert something like print *args after def initialize in SPMap
Iāve been doing something similar, yes.
def initialize(*args)
fail "args: #{args}" if !args.first.is_a?(Hash)
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.
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
Yes, I cut down the built in example also.
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ā¦,
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
yes lets do that, see you then
use the discord channel
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ā¦
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.
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.