<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">I know this is a late reply, but I never tire of learning more about the sound system in Squeak. Maybe Stéphane could wite some swiki articles on that subject. It would be extraordinarily useful to a lot of us experimenters. <br><br><div dir="ltr">/*—————————————————-*/<div>Sent from my iPhone<div><a href="https://boincstats.com/signature/-1/user/51616339056/sig.png">https://boincstats.com/signature/-1/user/51616339056/sig.png</a></div><div><span style="background-color: rgba(255, 255, 255, 0);">See https://objectnets.net and https://objectnets.org</span></div></div><div><span style="background-color: rgba(255, 255, 255, 0);">https://datascilv.com and https://datascilv.org</span></div></div><div dir="ltr"><br><blockquote type="cite">On Jun 6, 2021, at 23:43, Marcel Taeumel <marcel.taeumel@hpi.de> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
                                        Hi Stéphane.<div><br></div><div>> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">From a musical perspective, there is always some reverb. Nobody plays a</span></div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">> concerto in an anechoic chamber. So you can think of the default reverb</span><br style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">> setting as the sound of the Squeak room itself - when just playing</span><br style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">> sounds like, for a game, it is nicer to have one. And when we need</span><br style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">> Squeak to behave like an anechoic chamber, we can just turn the reverb off.</span><div class="mb_sig"></div>
                                        <div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Aha! Thanks for this explanation. :-)</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 31.05.2021 09:36:10 schrieb Stéphane Rollandin <lecteur@zogotounga.net>:</p><div style="font-family:Arial,Helvetica,sans-serif">>       FMSound brass1 play
<br>> 
<br>> And I have to tell that, both with default and without reverb, I can hear the abrupt end of the sound very clearly. 
<br>Well without reverb there is a definitely non-musical harsh noise. With 
<br>reverb on, the sound still does stop abruptly, but more musically. This 
<br>makes all the difference to me.
<br>
<br>But I do agree that overall the FMSounds releases are not graceful :)
<br>
<br>
<br>> IMHO it does not make a large difference, except for the fact that a pure tone should not have any reverb by definition.
<br>
<br>A FMSound is not a pure tone. A pure tone is a sinusoid, which ends with 
<br>a clear click (a very non-musical noise).
<br>
<br>Now anyway the reverb is used only when playing a sound, not when 
<br>processing it - here it is not part of the FMSound itself: you will not 
<br>see the reverb in the waveform or the spectrogram.
<br>
<br> From a musical perspective, there is always some reverb. Nobody plays a 
<br>concerto in an anechoic chamber. So you can think of the default reverb 
<br>setting as the sound of the Squeak room itself - when just playing 
<br>sounds like, for a game, it is nicer to have one. And when we need 
<br>Squeak to behave like an anechoic chamber, we can just turn the reverb off.
<br>
<br>> 
<br>> I am not an expert in sounds at all, but couldn't it be a more elegant solution to adjust the envelopes of the problematic sounds instead and to extend their release phase?
<br>> 
<br>> I changed #brass1 like this:
<br>> 
<br>>  | snd p env |
<br>>  snd := FMSound new modulation: 0 ratio: 1.
<br>>  p := OrderedCollection new.
<br>>  - p add: 0@0.0; add: 30@0.8; add: 90@1.0; add: 120@0.9; add: 220@0.7; add: 320@0.9; add: 360@0.0.
<br>>  + p add: 0@0.0; add: 30@0.8; add: 90@1.0; add: 120@0.9; add: 220@0.7; add: 320@0.9; add: 440@0.0.
<br>>  snd addEnvelope: (VolumeEnvelope points: p loopStart: 4 loopEnd: 6).
<br>> 
<br>>  p := OrderedCollection new.
<br>>  p add: 0@0.5; add: 60@1.0; add: 120@0.8; add: 220@0.65; add: 320@0.8; add: 360@0.0.
<br>>  env := Envelope points: p loopStart: 3 loopEnd: 5.
<br>>  env target: snd; updateSelector: #modulation:; scale: 5.0.
<br>>  snd addEnvelope: env.
<br>> 
<br>>  (snd setPitch: 220.0 dur: 1.0 loudness: 0.5) play
<br>> 
<br>> The only difference is that I moved the last envelope point 80 ms to the right. I can't hear any "plop" now any longer.
<br>
<br>Right, but the duration of the sound cannot be considered to be one 
<br>second anymore - it is much closer to 0.9 seconds (where it was around 
<br>0.95 before, so already too short).
<br>
<br>See the attached pictures: SoundElementEditor1.png is the current 
<br>waveform, SoundElementEditor2.png the one you propose. See how it ends 
<br>prematurely?
<br>
<br>I would say 390@0.0 for the last point is better. It still sounds good, 
<br>but does not shorten the sound as much.
<br>
<br>For composition, it is important that a sound lasts as long as it claims 
<br>to last. Else, the phrasing articulations cannot be right - you would 
<br>hear a staccato when a legato is asked for.
<br>
<br>So a sound release should happen after the sound nominal duration (which 
<br>is not the case at the moment)
<br>
<br>
<br>> My proposal is to turn off reverb in the SoundPlayer by default and to adjust the most problematic FMSounds manually instead. What do you think? :-)
<br>
<br>My counter-proposal would be to keep the default reverb and give it the 
<br>settings it has in muO :)
<br>
<br>And then, if you want to tweak some sounds, have their nominal duration 
<br>respected. So I would vote for having releases after nominal duration, 
<br>but this means a mechanism would then be needed to differentiate the 
<br>nominal duration from the duration you get from the raw number of samples.
<br>
<br>This mechanism exists in muO.
<br>
<br>In fact it is rather difficult for me to give any specific piece of 
<br>advice about how music should be handled in Squeak proper, because my 
<br>own way to do this has been to implement a much vaster and deeper 
<br>framework where many different perspectives work together. Not to say it 
<br>is perfect, but it is thorough - one thing lead to another and I could 
<br>talk for hours...
<br>
<br>
<br>Best,
<br>
<br>Stef
<br><br></div></blockquote></div><span></span><br></div></blockquote></body></html>