Re: Question about Audio Buffer/Timing

Jeremy Landry <[email protected]> Sun, 18 Mar 2018 12:47:30 -0700
Newsgroups gmane.comp.lang.smalltalk.squeak.squeakland,gmane.comp.lang.smalltalk.squeak.general
Message-ID <CAMYa41mEd4m_n7sz+YeO4+_vZGgku30nufSbQXy=MO487so_zQ@mail.gmail.com>
--===============5927835357240902333==
Content-Type: multipart/alternative; boundary="001a113ecc4cae1c950567b51c59"

--001a113ecc4cae1c950567b51c59
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I haven't gotten the Evnvelope editor morph to work properly yet, but I'm
sure it will when *I* stop being lame (so far, I've got a 0/2 record with
squeak/etoys...so likely I'm doing something wrong here!)

On Sat, Mar 17, 2018 at 9:29 AM, karl ramberg <[email protected]> wrote=
:

> I fixed so EnvelopeEditorMorph can open without giving a error in
> http://source.squeak.org/trunk/MorphicExtras-kfr.225.mcz
>
> Best,
> Karl
>
> On Sat, Mar 17, 2018 at 2:13 PM, karl ramberg <[email protected]>
> wrote:
>
>> Hi,
>> ScorePlayerMorph is the class that has best support for making music.( F=
M
>> synthesizer)
>>
>> Try this do it:
>> | n score | n :=3D 3.
>> score :=3D (MIDIScore new tracks: ((1 to: n) collect: [:i | Array new]);
>> trackInfo: ((1 to: n) collect: [:i | 'Instrument' , i printString]);
>> tempoMap: nil; ticksPerQuarterNote: 96).
>> ScorePlayerMorph openOn: score title: 'empty score'
>>
>> In the opened ScorePlayerMorph click on PianoRoll.
>> Right click on the opened PianoRollScore and select 'add keyboard' in th=
e
>> menu.
>> When you click on the opened keyboard it records to the PianoRollScore
>>
>> You can select different instuments in the ScorePlayerMorph.
>> Muting the different instruments in  ScorePlayerMorph to add/edit  the
>> PianoRollScore=C2=A8
>> Clicking on 'oboe1' you get a meny to select different FM synth premade
>> instruments.
>> The bottom of that menu give you 'edit oboe1'
>>
>> Selecting this will give you a DNU because the image does not have class
>> ScaleMorph anymore.
>> It can be found in old images and filed out. There where some licensing
>> issues and I think maybe the
>> author passed away before the class could be re licensed.
>>
>> Anyway, enjoy :-)
>>
>>
>> These tools funktion but have MANY rough edges and a lot can be done to
>> improve them.
>>
>> Best,
>> Karl
>>
>>
>> On Sat, Feb 24, 2018 at 5:56 PM, Jeremy Landry <[email protected]> wrote=
:
>>
>>> What can I do to make new music in Etoys, then?  According to FLOSS
>>> manual, there's nothing for recording...?  The purpose of the sequencer=
 was
>>> to generate new music...this is basically the goal here...and to do so
>>> without using an a MIDI instrument (well, a physical one, anyway...a
>>> simulated one is fine!)
>>>
>>> On Sat, Feb 24, 2018 at 2:27 AM, karl ramberg <[email protected]>
>>> wrote:
>>>
>>>> Etoys ticking is not precise enough to do music timing.
>>>> Ticking might be offset by other task the system is doing.
>>>> You should use the ScorePlayerMorph for music.
>>>>
>>>> Best,
>>>> Karl
>>>>
>>>> On Thu, Feb 22, 2018 at 9:55 PM, Jeremy Landry <[email protected]>
>>>> wrote:
>>>>
>>>>> Maybe clicking the sequencer squares to look like this will make more
>>>>> sense when you play it back:
>>>>> https://imgur.com/a/ZHsaS
>>>>>
>>>>> Setting the script to tick should be obvious what the problem is: not
>>>>> only is the playback not timed at the same interval as the script
>>>>> tick-rate, but it will 'skip' sometimes and omit playback.  What you =
should
>>>>> hear is nonstop, fairly consistent drum smacks, like a drum roll.  In=
stead,
>>>>> you'll hear it roll a little, stop quickly, then start rolling again,=
 stop
>>>>> quickly, and almost at random.  Does this help open up the problem?  =
It's
>>>>> not really about music here, just about timing and consistency of
>>>>> triggering sounds on a timer...sometimes they do sound off, sometimes=
 they
>>>>> dont, sometimes they're in-time, sometimes they're not.  If you speed=
 up
>>>>> the ticks per second, you can hear that 'invisible metronome' I menti=
oned
>>>>> earlier, there seems to be an 'always running' object that only looks=
 for
>>>>> new sounds to play at a regular interval, if the trigger doesn't make=
 that
>>>>> window, then it gets dropped seemingly...it's like it's aliasing the
>>>>> instructions or something...
>>>>>
>>>>> Hope this helps, and I appreciate you helping looking into it!
>>>>>
>>>>>
>>>>> On Thu, Feb 22, 2018 at 12:03 PM, Bob Arning <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> I'm not enough of a musician to really know if it's behaving or not.
>>>>>> These are drums, so it's not a continuous sound. When I set the scri=
pt to
>>>>>> ticking, I do hear an occasional glitch that my well be due to garba=
ge
>>>>>> collection -- it's possible that tweaking some gc parameters might r=
educe
>>>>>> this. Perhaps a youtube posting with the sound you are hearing would=
 let me
>>>>>> compare it to what I'm hearing.
>>>>>>
>>>>>> On 2/22/18 2:33 PM, Jeremy Landry wrote:
>>>>>>
>>>>>> https://www.youtube.com/watch?v=3D_JlCCtHLHDk I forgot to post this =
in
>>>>>> the last message showing the more stable timing done with 'pure' squ=
eak
>>>>>> classes/methods.
>>>>>>
>>>>>> On Thu, Feb 22, 2018 at 11:32 AM, Jeremy Landry <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> https://drive.google.com/file/d/1nJlQ4huXcKZmTm6GADl40ZrWAEd
>>>>>>> 7Kv97/view?usp=3Dsharing
>>>>>>>
>>>>>>> This is a demo of the problem for ETOYS 5 (along with some other
>>>>>>> stuff there that shows what I've looked into, to some degree).  Hit=
ting
>>>>>>> play on the scriptor, you will hear a sequence that has awful timin=
g.  I
>>>>>>> don't expect 'sample perfect', zero latency or anything spectacular=
, but it
>>>>>>> would seem that if there's timers in the system, everything should =
adhere
>>>>>>> to it, or else not be called timers and something like,
>>>>>>> 'when-we-get-around-to-its'.  This video here demonstrates that Squ=
eak, at
>>>>>>> least, can do timing just fine and older versions have midi demos, =
but
>>>>>>> again, I'm using Etoys for a specific reason, so it's confusing me =
as to
>>>>>>> why the delays happen...
>>>>>>>
>>>>>>> Both sequencers are mouse interactive and playing with the script
>>>>>>> timer and setting blocks on/off can reveal this hidden metronome...=
maybe
>>>>>>> that IS the buffer?  I'm not sure...what's most puzzling is that so=
metimes
>>>>>>> it will sound right, and sometimes it won't...even if it wasn't cor=
rect,
>>>>>>> I'd probably be okay if it was consistently incorrect because I can
>>>>>>> actually work with consistency, so I guess if nothing else, that's =
what I'm
>>>>>>> trying to figure out how to get without making tile usage unavailab=
le for a
>>>>>>> sequencer built on etoys tiles...
>>>>>>>
>>>>>>> Thanks for all the efforts so far...I did notice some changing in
>>>>>>> the timing when I checked the preference there but also unchecked t=
he
>>>>>>> preference of stopSoundsWhenDone, just in case it was hiccuping by =
shutting
>>>>>>> down the sound stream then making a new one.  It didn't help, but I=
 had
>>>>>>> forgotten about these preferences.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Feb 22, 2018 at 10:57 AM, Bob Arning <[email protected]=
>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> There do seem to be some platform issues as to whether this will
>>>>>>>> really work. Some things you could do:
>>>>>>>>
>>>>>>>> - check the value of the Preference for #soundQuickStart -- make i=
t
>>>>>>>> true if not already
>>>>>>>>
>>>>>>>> - put some code into the SoundPlayer method to tell you if
>>>>>>>> quickStart is being requested and if not honored, why
>>>>>>>>
>>>>>>>> On 2/22/18 1:22 PM, Jeremy Landry wrote:
>>>>>>>>
>>>>>>>> Thanks for the crossover.  I am subscribed, but generally shy away
>>>>>>>> from posting there as it seems out of my league and my main intere=
st is in
>>>>>>>> Etoys since, well, again, leagues and all that.  I know just enoug=
h ST to
>>>>>>>> break things, not build them!  :)
>>>>>>>>
>>>>>>>> So using the code from this message from Bob Arning:
>>>>>>>> *Bob Arning* arning315 at comcast.net
>>>>>>>> <squeak-dev%40lists.squeakfoundation.org?Subject=3DRe%3A%20%5Bsque=
ak-dev%5D%20%5Bsqueakland%5D%20Question%20about%20Audio%20Buffer/Timing&In-=
Reply-To=3D%3C269cdd30-7c77-6cab-22aa-591eee543b21%40comcast.net%3E>
>>>>>>>> *Thu Feb 22 15:49:07 UTC 2018*
>>>>>>>>
>>>>>>>>    - Previous message: [squeak-dev] [squeakland] Question about
>>>>>>>>    Audio Buffer/Timing
>>>>>>>>    <http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-Fe=
bruary/197505.html>
>>>>>>>>    - Next message: [squeak-dev] [squeakland] Question about Audio
>>>>>>>>    Buffer/Timing
>>>>>>>>    <http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-Fe=
bruary/197509.html>
>>>>>>>>    - *Messages sorted by:* [ date ]
>>>>>>>>    <http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-Fe=
bruary/date.html#197508>
>>>>>>>>     [ thread ]
>>>>>>>>    <http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-Fe=
bruary/thread.html#197508>
>>>>>>>>     [ subject ]
>>>>>>>>    <http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-Fe=
bruary/subject.html#197508>
>>>>>>>>     [ author ]
>>>>>>>>    <http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-Fe=
bruary/author.html#197508>
>>>>>>>>
>>>>>>>> ------------------------------
>>>>>>>>
>>>>>>>> SoundPlayer class gives a clue:
>>>>>>>>
>>>>>>>> resumePlaying: aSound quickStart: quickStart
>>>>>>>>      "Start playing the given sound without resetting it; it will =
resume
>>>>>>>> playing from where it last stopped. If quickStart is true, then tr=
y to
>>>>>>>> start playing the given sound immediately."
>>>>>>>>
>>>>>>>>
>>>>>>>> Just looking at it and taking a guess, it doesn't seem to be
>>>>>>>> *quite* the thing I was looking for.  I was thinking there's a met=
hod/class
>>>>>>>> variable with a value that could be changed to affect the system, =
rather
>>>>>>>> than 'poking in' every thing I want to play when I want to play it
>>>>>>>> individually because the ultimate effect is that Etoys PLAYSOUND:S=
OUND tile
>>>>>>>> will work as normal and this seems that it would have to be used i=
nstead of
>>>>>>>> the tiles...I have no idea if this is possible, but I'll also dig =
around
>>>>>>>> the class browser in Etoys, maybe I'll stumble into something, but=
 so far,
>>>>>>>> as I noted, I only found the sound-buffer and sample rates, not th=
e imposed
>>>>>>>> delay method that I remember reading about.  I remember the reason=
ing it
>>>>>>>> was put in was to prevent accidental playing of sounds inside of a
>>>>>>>> single-frame repeat-tile...i.e. a repeat tile with any value other=
 than 1
>>>>>>>> and inside of it having a playsound:sound tile would overload the =
speakers
>>>>>>>> and make nasty noises because so many things are playing on top of=
 each
>>>>>>>> other. I actually WANT this.  Based on how sound plays now, you ca=
n hear an
>>>>>>>> 'invisible' metronome that makes sure all sounds are separated and=
 equally
>>>>>>>> spaced apart and in the case of repeat tiles, only seems to accept=
 the last
>>>>>>>> sound as valid/playable.
>>>>>>>>
>>>>>>>> Thanks for the help so far!  I'm not expecting a solution because =
I
>>>>>>>> don't know if one exists, but my thought is 'if it was done, it ca=
n be
>>>>>>>> undone'...and just looking at how to undo it!  :p
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Feb 22, 2018 at 9:59 AM, David T. Lewis <
>>>>>>>> [email protected]> wrote:
>>>>>>>>
>>>>>>>>> There is some follow up discussion happening on the squeak-dev
>>>>>>>>> list. I don't
>>>>>>>>> know if it helps, but you can read the posts here if you are not
>>>>>>>>> subscribed to
>>>>>>>>> that list:
>>>>>>>>>
>>>>>>>>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-
>>>>>>>>> February/197508.html
>>>>>>>>>
>>>>>>>>> HTH,
>>>>>>>>> Dave
>>>>>>>>>
>>>>>>>>> On Thu, Feb 22, 2018 at 10:27:18AM -0500, David T. Lewis wrote:
>>>>>>>>> > Hi Jeremy,
>>>>>>>>> >
>>>>>>>>> > I am copying this to the squeak-dev list in case someone there
>>>>>>>>> can offer
>>>>>>>>> > some guidance.
>>>>>>>>> >
>>>>>>>>> > Dave
>>>>>>>>> >
>>>>>>>>> >
>>>>>>>>> > On Wed, Feb 21, 2018 at 02:44:21PM -0800, Jeremy Landry wrote:
>>>>>>>>> > > Hi, I made a quick audio sequencer test in Etoys and found
>>>>>>>>> that there's a
>>>>>>>>> > > hidden 'timer' that limits the responsiveness of new sounds
>>>>>>>>> that go into
>>>>>>>>> > > the playback buffer (terminology isn't accurate, but hopefull=
y
>>>>>>>>> it makes
>>>>>>>>> > > sense to people).
>>>>>>>>> > >
>>>>>>>>> > > I found the sound buffer setting, but was wondering if there'=
s
>>>>>>>>> something
>>>>>>>>> > > else that limits how fast new sounds get added to the playbac=
k
>>>>>>>>> stream? I
>>>>>>>>> > > read somewhere (old-man-aphasia here) that some code was adde=
d
>>>>>>>>> to prevent
>>>>>>>>> > > overloading the buffer so surely there's a snippet of code I
>>>>>>>>> could add to a
>>>>>>>>> > > project to reverse this, if it's what is causing the delay?
>>>>>>>>> > >
>>>>>>>>> > > Thanks for any help finding the solution.
>>>>>>>>> >
>>>>>>>>> > > _______________________________________________
>>>>>>>>> > > squeakland mailing list
>>>>>>>>> > > squeakland-bD51WKytQuId/fn+uklp/[email protected]
>>>>>>>>> > > http://lists.squeakland.org/mailman/listinfo/squeakland
>>>>>>>>> >
>>>>>>>>> > _______________________________________________
>>>>>>>>> > squeakland mailing list
>>>>>>>>> > squeakland-bD51WKytQuId/fn+uklp/[email protected]
>>>>>>>>> > http://lists.squeakland.org/mailman/listinfo/squeakland
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> squeakland mailing listsqueakland-bD51WKytQuId/fn+uklp/[email protected]://lists=
.squeakland.org/mailman/listinfo/squeakland
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> squeakland mailing list
>>>>>>>> squeakland-bD51WKytQuId/fn+uklp/[email protected]
>>>>>>>> http://lists.squeakland.org/mailman/listinfo/squeakland
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> squeakland mailing list
>>>>> squeakland-bD51WKytQuId/fn+uklp/[email protected]
>>>>> http://lists.squeakland.org/mailman/listinfo/squeakland
>>>>>
>>>>>
>>>>
>>>
>>
>

--001a113ecc4cae1c950567b51c59
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I haven&#39;t gotten the Evnvelope editor morph to work pr=
operly yet, but I&#39;m sure it will when *I* stop being lame (so far, I&#3=
9;ve got a 0/2 record with squeak/etoys...so likely I&#39;m doing something=
 wrong here!)</div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote=
">On Sat, Mar 17, 2018 at 9:29 AM, karl ramberg <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">I=
 fixed so EnvelopeEditorMorph can open without giving a error in=C2=A0

<a href=3D"http://source.squeak.org/trunk/MorphicExtras-kfr.225.mcz" rel=3D=
"noreferrer" style=3D"color:rgb(17,85,204);font-family:arial,sans-serif;fon=
t-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-=
caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-ind=
ent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-=
color:rgb(255,255,255)" target=3D"_blank">http://source.squeak.org/trunk<wb=
r>/MorphicExtras-kfr.225.mcz</a>

<div><br></div><div>Best,</div><div>Karl</div></div><div class=3D"HOEnZb"><=
div class=3D"h5"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">=
On Sat, Mar 17, 2018 at 2:13 PM, karl ramberg <span dir=3D"ltr">&lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</=
a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Hi,=
<div>ScorePlayerMorph is the class that has best support for making music.(=
 FM synthesizer)</div><div><br></div><div>Try this do it:<br></div><div><di=
v><span style=3D"white-space:pre-wrap">	</span>| n score | n :=3D 3.</div><=
div><span style=3D"white-space:pre-wrap">	</span>score :=3D (MIDIScore new =
tracks: ((1 to: n) collect: [:i | Array new]);</div><div><span style=3D"whi=
te-space:pre-wrap">		</span>trackInfo: ((1 to: n) collect: [:i | &#39;Instr=
ument&#39; , i printString]);</div><div><span style=3D"white-space:pre-wrap=
">		</span>tempoMap: nil; ticksPerQuarterNote: 96).</div><div><span style=
=3D"white-space:pre-wrap">	</span>ScorePlayerMorph openOn: score title: &#3=
9;empty score&#39;</div></div><div><br></div><div>In the opened ScorePlayer=
Morph click on PianoRoll.</div><div>Right click on the opened PianoRollScor=
e and select &#39;add keyboard&#39; in the menu.</div><div>When you click o=
n the opened keyboard it records to the PianoRollScore</div><div><br></div>=
<div>You can select different instuments in the ScorePlayerMorph.</div><div=
>Muting the different instruments in=C2=A0

<span style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;font-size:s=
mall;font-style:normal;font-variant-ligatures:normal;font-variant-caps:norm=
al;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;t=
ext-transform:none;white-space:normal;word-spacing:0px;background-color:rgb=
(255,255,255);text-decoration-style:initial;text-decoration-color:initial;f=
loat:none;display:inline">ScorePlayerMorph</span>

 to add/edit=C2=A0 the PianoRollScore=C2=A8</div><div>Clicking on &#39;oboe=
1&#39; you get a meny to select different FM synth premade instruments.</di=
v><div>The bottom of that menu give you &#39;edit oboe1&#39;</div><div><br>=
</div><div>Selecting this will give you a DNU because the image does not ha=
ve class ScaleMorph anymore.</div><div>It can be found in old images and fi=
led out. There where some licensing issues and I think maybe the=C2=A0</div=
><div>author passed away before the class could be re licensed.=C2=A0</div>=
<div><br></div><div>Anyway, enjoy :-)=C2=A0</div><div><br></div><div><br></=
div><div>These tools funktion but have MANY rough edges and a lot can be do=
ne to improve them.</div><div><br></div><div>Best,</div><div>Karl</div><div=
><br></div></div><div class=3D"m_777010532917070739HOEnZb"><div class=3D"m_=
777010532917070739h5"><div class=3D"gmail_extra"><br><div class=3D"gmail_qu=
ote">On Sat, Feb 24, 2018 at 5:56 PM, Jeremy Landry <span dir=3D"ltr">&lt;<=
a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>=
&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0=
 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">What =
can I do to make new music in Etoys, then?=C2=A0 According to FLOSS manual,=
 there&#39;s nothing for recording...?=C2=A0 The purpose of the sequencer w=
as to generate new music...this is basically the goal here...and to do so w=
ithout using an a MIDI instrument (well, a physical one, anyway...a simulat=
ed one is fine!)</div><div class=3D"m_777010532917070739m_13761572839085353=
02HOEnZb"><div class=3D"m_777010532917070739m_1376157283908535302h5"><div c=
lass=3D"gmail_extra"><br><div class=3D"gmail_quote">On Sat, Feb 24, 2018 at=
 2:27 AM, karl ramberg <span dir=3D"ltr">&lt;<a href=3D"mailto:karlramberg@=
gmail.com" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Etoys ticking is not preci=
se enough to do music timing.<div>Ticking might be offset by other task the=
 system is doing.<br><div>You should use the ScorePlayerMorph for music.</d=
iv></div><div><br></div><div>Best,</div><div>Karl</div></div><div class=3D"=
m_777010532917070739m_1376157283908535302m_6851049898053500012HOEnZb"><div =
class=3D"m_777010532917070739m_1376157283908535302m_6851049898053500012h5">=
<div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On Thu, Feb 22, 2=
018 at 9:55 PM, Jeremy Landry <span dir=3D"ltr">&lt;<a href=3D"mailto:hakyo=
[email protected]" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br>=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>Maybe clicking the seq=
uencer squares to look like this will make more sense when you play it back=
:=C2=A0</div><div><a href=3D"https://imgur.com/a/ZHsaS" target=3D"_blank">h=
ttps://imgur.com/a/ZHsaS</a><br></div><div><br></div><div>Setting the scrip=
t to tick should be obvious what the problem is: not only is the playback n=
ot timed at the same interval as the script tick-rate, but it will &#39;ski=
p&#39; sometimes and omit playback.=C2=A0 What you should hear is nonstop, =
fairly consistent drum smacks, like a drum roll.=C2=A0 Instead, you&#39;ll =
hear it roll a little, stop quickly, then start rolling again, stop quickly=
, and almost at random.=C2=A0 Does this help open up the problem?=C2=A0 It&=
#39;s not really about music here, just about timing and consistency of tri=
ggering sounds on a timer...sometimes they do sound off, sometimes they don=
t, sometimes they&#39;re in-time, sometimes they&#39;re not.=C2=A0 If you s=
peed up the ticks per second, you can hear that &#39;invisible metronome&#3=
9; I mentioned earlier, there seems to be an &#39;always running&#39; objec=
t that only looks for new sounds to play at a regular interval, if the trig=
ger doesn&#39;t make that window, then it gets dropped seemingly...it&#39;s=
 like it&#39;s aliasing the instructions or something...</div><div><br></di=
v><div>Hope this helps, and I appreciate you helping looking into it!=C2=A0=
=C2=A0</div><div><br></div></div><div class=3D"m_777010532917070739m_137615=
7283908535302m_6851049898053500012m_6505211406727498863HOEnZb"><div class=
=3D"m_777010532917070739m_1376157283908535302m_6851049898053500012m_6505211=
406727498863h5"><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">O=
n Thu, Feb 22, 2018 at 12:03 PM, Bob Arning <span dir=3D"ltr">&lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</=
a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 =20
   =20
 =20
  <div text=3D"#000000" bgcolor=3D"#FFFFFF">
    <p><font face=3D"Georgia">I&#39;m not enough of a musician to really kn=
ow
        if it&#39;s behaving or not. These are drums, so it&#39;s not a
        continuous sound. When I set the script to ticking, I do hear an
        occasional glitch that my well be due to garbage collection --
        it&#39;s possible that tweaking some gc parameters might reduce
        this. Perhaps a youtube posting with the sound you are hearing
        would let me compare it to what I&#39;m hearing.</font><br>
    </p><div><div class=3D"m_777010532917070739m_1376157283908535302m_68510=
49898053500012m_6505211406727498863m_313355801356882249h5">
    <br>
    <div class=3D"m_777010532917070739m_1376157283908535302m_68510498980535=
00012m_6505211406727498863m_313355801356882249m_-50921442851577088moz-cite-=
prefix">On 2/22/18 2:33 PM, Jeremy Landry
      wrote:<br>
    </div>
    <blockquote type=3D"cite">
      <div dir=3D"ltr"><a href=3D"https://www.youtube.com/watch?v=3D_JlCCtH=
LHDk" target=3D"_blank">https://www.youtube.com/watch?<wbr>v=3D_JlCCtHLHDk<=
/a>
        I forgot to post this in the last message showing the more
        stable timing done with &#39;pure&#39; squeak classes/methods.<br>
      </div>
      <div class=3D"gmail_extra"><br>
        <div class=3D"gmail_quote">On Thu, Feb 22, 2018 at 11:32 AM,
          Jeremy Landry <span dir=3D"ltr">&lt;<a href=3D"mailto:hakyoku@gma=
il.com" target=3D"_blank">[email protected]</a>&gt;</span>
          wrote:<br>
          <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bord=
er-left:1px #ccc solid;padding-left:1ex">
            <div dir=3D"ltr"><a href=3D"https://drive.google.com/file/d/1nJ=
lQ4huXcKZmTm6GADl40ZrWAEd7Kv97/view?usp=3Dsharing" target=3D"_blank">https:=
//drive.google.com/file/<wbr>d/1nJlQ4huXcKZmTm6GADl40ZrWAEd<wbr>7Kv97/view?=
usp=3Dsharing</a><br>
              <div><br>
              </div>
              <div>This is a demo of the problem for ETOYS 5 (along with
                some other stuff there that shows what I&#39;ve looked into=
,
                to some degree).=C2=A0 Hitting play on the scriptor, you wi=
ll
                hear a sequence that has awful timing.=C2=A0 I don&#39;t ex=
pect
                &#39;sample perfect&#39;, zero latency or anything spectacu=
lar,
                but it would seem that if there&#39;s timers in the system,
                everything should adhere to it, or else not be called
                timers and something like, &#39;when-we-get-around-to-its&#=
39;.=C2=A0
                This video here demonstrates that Squeak, at least, can
                do timing just fine and older versions have midi demos,
                but again, I&#39;m using Etoys for a specific reason, so
                it&#39;s confusing me as to why the delays happen...</div>
              <div><br>
              </div>
              <div>Both sequencers are mouse interactive and playing
                with the script timer and setting blocks on/off can
                reveal this hidden metronome...maybe that IS the
                buffer?=C2=A0 I&#39;m not sure...what&#39;s most puzzling i=
s that
                sometimes it will sound right, and sometimes it
                won&#39;t...even if it wasn&#39;t correct, I&#39;d probably=
 be okay
                if it was consistently incorrect because I can actually
                work with consistency, so I guess if nothing else,
                that&#39;s what I&#39;m trying to figure out how to get wit=
hout
                making tile usage unavailable for a sequencer built on
                etoys tiles...</div>
              <div><br>
              </div>
              <div>Thanks for all the efforts so far...I did notice some
                changing in the timing when I checked the preference
                there but also unchecked the preference of
                stopSoundsWhenDone, just in case it was hiccuping by
                shutting down the sound stream then making a new one.=C2=A0
                It didn&#39;t help, but I had forgotten about these
                preferences.</div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>=C2=A0=C2=A0</div>
              <div><br>
              </div>
              <div><br>
              </div>
            </div>
            <div class=3D"m_777010532917070739m_1376157283908535302m_685104=
9898053500012m_6505211406727498863m_313355801356882249m_-50921442851577088H=
OEnZb">
              <div class=3D"m_777010532917070739m_1376157283908535302m_6851=
049898053500012m_6505211406727498863m_313355801356882249m_-5092144285157708=
8h5">
                <div class=3D"gmail_extra"><br>
                  <div class=3D"gmail_quote">On Thu, Feb 22, 2018 at 10:57
                    AM, Bob Arning <span dir=3D"ltr">&lt;<a href=3D"mailto:=
[email protected]" target=3D"_blank">[email protected]</a>&gt;</spa=
n>
                    wrote:<br>
                    <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div text=3D"#000000" bgcolor=3D"#FFFFFF">
                        <p><font face=3D"Georgia">There do seem to be some
                            platform issues as to whether this will
                            really work. Some things you could do:</font></=
p>
                        <p><font face=3D"Georgia">- check the value of the
                            Preference for #soundQuickStart -- make it
                            true if not already</font></p>
                        <p><font face=3D"Georgia">- put some code into the
                            SoundPlayer method to tell you if quickStart
                            is being requested and if not honored, why</fon=
t><br>
                        </p>
                        <div>
                          <div class=3D"m_777010532917070739m_1376157283908=
535302m_6851049898053500012m_6505211406727498863m_313355801356882249m_-5092=
1442851577088m_-1939768682591439961h5"> <br>
                            <div class=3D"m_777010532917070739m_13761572839=
08535302m_6851049898053500012m_6505211406727498863m_313355801356882249m_-50=
921442851577088m_-1939768682591439961m_4959563591284099764moz-cite-prefix">=
On
                              2/22/18 1:22 PM, Jeremy Landry wrote:<br>
                            </div>
                            <blockquote type=3D"cite">
                              <div dir=3D"ltr">Thanks for the crossover.=C2=
=A0
                                I am subscribed, but generally shy away
                                from posting there as it seems out of my
                                league and my main interest is in Etoys
                                since, well, again, leagues and all
                                that.=C2=A0 I know just enough ST to break
                                things, not build them!=C2=A0 :)
                                <div><br>
                                </div>
                                <div>So using the code from this message
                                  from Bob Arning:</div>
                                <div> <b>Bob Arning</b><span><span>=C2=A0</=
span></span><a href=3D"mailto:squeak-dev%40lists.squeakfoundation.org?Subje=
ct=3DRe%3A%20%5Bsqueak-dev%5D%20%5Bsqueakland%5D%20Question%20about%20Audio=
%20Buffer/Timing&amp;In-Reply-To=3D%3C269cdd30-7c77-6cab-22aa-591eee543b21%=
40comcast.net%3E" title=3D"[squeak-dev] [squeakland]
                                    Question about Audio Buffer/Timing" tar=
get=3D"_blank">arning315 at
                                    comcast.net<span>=C2=A0</span></a><br>
                                  <i>Thu Feb 22 15:49:07 UTC 2018</i><span>=
</span>
                                  <ul>
                                    <li>Previous message:<span>=C2=A0</span=
><a href=3D"http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-Feb=
ruary/197505.html" target=3D"_blank">[squeak-dev]
                                        [squeakland] Question about
                                        Audio Buffer/Timing</a></li>
                                    <li>Next message:<span>=C2=A0</span><a =
href=3D"http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-Februar=
y/197509.html" target=3D"_blank">[squeak-dev]
                                        [squeakland] Question about
                                        Audio Buffer/Timing</a></li>
                                    <li><b>Messages sorted by:</b><span>=C2=
=A0</span><a href=3D"http://lists.squeakfoundation.org/pipermail/squeak-dev=
/2018-February/date.html#197508" target=3D"_blank">[ date ]</a><span>=C2=A0=
</span><a href=3D"http://lists.squeakfoundation.org/pipermail/squeak-dev/20=
18-February/thread.html#197508" target=3D"_blank">[ thread
                                        ]</a><span>=C2=A0</span><a href=3D"=
http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-February/subjec=
t.html#197508" target=3D"_blank">[ subject
                                        ]</a><span>=C2=A0</span><a href=3D"=
http://lists.squeakfoundation.org/pipermail/squeak-dev/2018-February/author=
.html#197508" target=3D"_blank">[ author
                                        ]</a></li>
                                  </ul>
                                  <hr>
                                  <pre style=3D"color:rgb(0,0,0);font-style=
:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:=
400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:n=
one;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-styl=
e:initial;text-decoration-color:initial">SoundPlayer class gives a clue:

resumePlaying: aSound quickStart: quickStart
 =C2=A0=C2=A0=C2=A0 &quot;Start playing the given sound without resetting i=
t; it will resume=20
playing from where it last stopped. If quickStart is true, then try to=20
start playing the given sound immediately.&quot;
</pre>
                                  <br class=3D"m_777010532917070739m_137615=
7283908535302m_6851049898053500012m_6505211406727498863m_313355801356882249=
m_-50921442851577088m_-1939768682591439961m_4959563591284099764gmail-Apple-=
interchange-newline">
                                  Just looking at it and taking a guess,
                                  it doesn&#39;t seem to be *quite* the
                                  thing I was looking for.=C2=A0 I was
                                  thinking there&#39;s a method/class
                                  variable with a value that could be
                                  changed to affect the system, rather
                                  than &#39;poking in&#39; every thing I wa=
nt to
                                  play when I want to play it
                                  individually because the ultimate
                                  effect is that Etoys PLAYSOUND:SOUND
                                  tile will work as normal and this
                                  seems that it would have to be used
                                  instead of the tiles...I have no idea
                                  if this is possible, but I&#39;ll also di=
g
                                  around the class browser in Etoys,
                                  maybe I&#39;ll stumble into something, bu=
t
                                  so far, as I noted, I only found the
                                  sound-buffer and sample rates, not the
                                  imposed delay method that I remember
                                  reading about.=C2=A0 I remember the
                                  reasoning it was put in was to prevent
                                  accidental playing of sounds inside of
                                  a single-frame repeat-tile...i.e. a
                                  repeat tile with any value other than
                                  1 and inside of it having a
                                  playsound:sound tile would overload
                                  the speakers and make nasty noises
                                  because so many things are playing on
                                  top of each other. I actually WANT
                                  this.=C2=A0 Based on how sound plays now,
                                  you can hear an &#39;invisible&#39; metro=
nome
                                  that makes sure all sounds are
                                  separated and equally spaced apart and
                                  in the case of repeat tiles, only
                                  seems to accept the last sound as
                                  valid/playable.</div>
                                <div><br>
                                </div>
                                <div>Thanks for the help so far!=C2=A0 I&#3=
9;m
                                  not expecting a solution because I
                                  don&#39;t know if one exists, but my
                                  thought is &#39;if it was done, it can be
                                  undone&#39;...and just looking at how to
                                  undo it!=C2=A0 :p=C2=A0=C2=A0</div>
                                <div><br>
                                </div>
                                <div><br>
                                </div>
                              </div>
                              <div class=3D"gmail_extra"><br>
                                <div class=3D"gmail_quote">On Thu, Feb 22,
                                  2018 at 9:59 AM, David T. Lewis <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">lewis=
@mail.msen.com</a>&gt;</span>
                                  wrote:<br>
                                  <blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There is
                                    some follow up discussion happening
                                    on the squeak-dev list. I don&#39;t<br>
                                    know if it helps, but you can read
                                    the posts here if you are not
                                    subscribed to<br>
                                    that list:<br>
                                    <br>
                                    <a href=3D"http://lists.squeakfoundatio=
n.org/pipermail/squeak-dev/2018-February/197508.html" rel=3D"noreferrer" ta=
rget=3D"_blank">http://lists.squeakfoundation.<wbr>org/pipermail/squeak-dev=
/2018-<wbr>February/197508.html</a><br>
                                    <br>
                                    HTH,<br>
                                    Dave<br>
                                    <div class=3D"m_777010532917070739m_137=
6157283908535302m_6851049898053500012m_6505211406727498863m_313355801356882=
249m_-50921442851577088m_-1939768682591439961m_4959563591284099764HOEnZb">
                                      <div class=3D"m_777010532917070739m_1=
376157283908535302m_6851049898053500012m_6505211406727498863m_3133558013568=
82249m_-50921442851577088m_-1939768682591439961m_4959563591284099764h5"><br=
>
                                        On Thu, Feb 22, 2018 at
                                        10:27:18AM -0500, David T. Lewis
                                        wrote:<br>
                                        &gt; Hi Jeremy,<br>
                                        &gt;<br>
                                        &gt; I am copying this to the
                                        squeak-dev list in case someone
                                        there can offer<br>
                                        &gt; some guidance.<br>
                                        &gt;<br>
                                        &gt; Dave<br>
                                        &gt;<br>
                                        &gt;<br>
                                        &gt; On Wed, Feb 21, 2018 at
                                        02:44:21PM -0800, Jeremy Landry
                                        wrote:<br>
                                        &gt; &gt; Hi, I made a quick
                                        audio sequencer test in Etoys
                                        and found that there&#39;s a<br>
                                        &gt; &gt; hidden &#39;timer&#39; th=
at
                                        limits the responsiveness of new
                                        sounds that go into<br>
                                        &gt; &gt; the playback buffer
                                        (terminology isn&#39;t accurate, bu=
t
                                        hopefully it makes<br>
                                        &gt; &gt; sense to people).<br>
                                        &gt; &gt;<br>
                                        &gt; &gt; I found the sound
                                        buffer setting, but was
                                        wondering if there&#39;s something<=
br>
                                        &gt; &gt; else that limits how
                                        fast new sounds get added to the
                                        playback stream? I<br>
                                        &gt; &gt; read somewhere
                                        (old-man-aphasia here) that some
                                        code was added to prevent<br>
                                        &gt; &gt; overloading the buffer
                                        so surely there&#39;s a snippet of
                                        code I could add to a<br>
                                        &gt; &gt; project to reverse
                                        this, if it&#39;s what is causing
                                        the delay?<br>
                                        &gt; &gt;<br>
                                        &gt; &gt; Thanks for any help
                                        finding the solution.<br>
                                        &gt;<br>
                                        &gt; &gt;
                                        ______________________________<wbr>=
_________________<br>
                                        &gt; &gt; squeakland mailing
                                        list<br>
                                        &gt; &gt; <a href=3D"mailto:squeakl=
and-bD51WKytQuId/fn+uklp/[email protected]" target=3D"_blank">squeakland-bD51WKytQuId/fn+uklp/[email protected]<=
wbr>g</a><br>
                                        &gt; &gt; <a href=3D"http://lists.s=
queakland.org/mailman/listinfo/squeakland" rel=3D"noreferrer" target=3D"_bl=
ank">http://lists.squeakland.org/ma<wbr>ilman/listinfo/squeakland</a><br>
                                        &gt;<br>
                                        &gt;
                                        ______________________________<wbr>=
_________________<br>
                                        &gt; squeakland mailing list<br>
                                        &gt; <a href=3D"mailto:squeakland@l=
ists.squeakland.org" target=3D"_blank">squeakland-bD51WKytQuId/fn+uklp/[email protected]<wbr>g=
</a><br>
                                        &gt; <a href=3D"http://lists.squeak=
land.org/mailman/listinfo/squeakland" rel=3D"noreferrer" target=3D"_blank">=
http://lists.squeakland.org/ma<wbr>ilman/listinfo/squeakland</a><br>
                                      </div>
                                    </div>
                                  </blockquote>
                                </div>
                                <br>
                              </div>
                              <br>
                              <fieldset class=3D"m_777010532917070739m_1376=
157283908535302m_6851049898053500012m_6505211406727498863m_3133558013568822=
49m_-50921442851577088m_-1939768682591439961m_4959563591284099764mimeAttach=
mentHeader"></fieldset>
                              <br>
                              <pre>______________________________<wbr>_____=
____________
squeakland mailing list
<a class=3D"m_777010532917070739m_1376157283908535302m_6851049898053500012m=
_6505211406727498863m_313355801356882249m_-50921442851577088m_-193976868259=
1439961m_4959563591284099764moz-txt-link-abbreviated" href=3D"mailto:squeak=
land-bD51WKytQuId/fn+uklp/[email protected]" target=3D"_blank">squeakland-bD51WKytQuId/fn+uklp/[email protected]=
<wbr>g</a>
<a class=3D"m_777010532917070739m_1376157283908535302m_6851049898053500012m=
_6505211406727498863m_313355801356882249m_-50921442851577088m_-193976868259=
1439961m_4959563591284099764moz-txt-link-freetext" href=3D"http://lists.squ=
eakland.org/mailman/listinfo/squeakland" target=3D"_blank">http://lists.squ=
eakland.org/ma<wbr>ilman/listinfo/squeakland</a>
</pre>
                            </blockquote>
                            <br>
                          </div>
                        </div>
                      </div>
                      <br>
                      ______________________________<wbr>_________________<=
br>
                      squeakland mailing list<br>
                      <a href=3D"mailto:squeakland-bD51WKytQuId/fn+uklp/[email protected]" ta=
rget=3D"_blank">squeakland-bD51WKytQuId/fn+uklp/[email protected]<wbr>g</a><br>
                      <a href=3D"http://lists.squeakland.org/mailman/listin=
fo/squeakland" rel=3D"noreferrer" target=3D"_blank">http://lists.squeakland=
.org/ma<wbr>ilman/listinfo/squeakland</a><br>
                      <br>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
squeakland mailing list<br>
<a href=3D"mailto:squeakland-bD51WKytQuId/fn+uklp/[email protected]" target=3D"_blank">squeak=
land-bD51WKytQuId/fn+uklp/[email protected]<wbr>g</a><br>
<a href=3D"http://lists.squeakland.org/mailman/listinfo/squeakland" rel=3D"=
noreferrer" target=3D"_blank">http://lists.squeakland.org/ma<wbr>ilman/list=
info/squeakland</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>

--001a113ecc4cae1c950567b51c59--


--===============5927835357240902333==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18Kc3F1ZWFrbGFu
ZCBtYWlsaW5nIGxpc3QKc3F1ZWFrbGFuZEBsaXN0cy5zcXVlYWtsYW5kLm9yZwpodHRwOi8vbGlz
dHMuc3F1ZWFrbGFuZC5vcmcvbWFpbG1hbi9saXN0aW5mby9zcXVlYWtsYW5kCg==

--===============5927835357240902333==--