Sunday, May 15, 2022

Crossing West Point

The title doesn't say much, but West Point is a peninsula in Seattle with a lighthouse, right on the cape of the Magnolia district. As I did today, when I go around the point from the south beach to the north, I think of this as a kind of passage. I try to go into the water for a swim at or before the middle right where the lighthouse is. It's as if I were somehow undergoing a baptism to purify myself for passage to that other side (a symbolism like the Jordan).

Once I'm on the north side, off in the distance I can see Golden Gardens park NE of there. Often when I'm at Golden Gardens I look across and see the lighthouse at West Point. But how here's the lighthouse nearer and solider than ever. The walk along the north shore contains a lot of flashbacks, mainly because I've been through there so many times.



Sunday, April 17, 2022

 Celebrating Easter with my fine chocolate cigar, I'm hearing this great Joe Reisman and his orchestra's version of Come Saturday Morning. The only thing that can compete with this is the original Sandpiper's version of it. It could be that the easy-listening sound of this is the only thing that delayed my eventual discovery of the great sound of the vector of classical to romantic music (Mozart, Beethovern, Dvorak etc.). Is Apple Music great or what?

Another one the Sandpipers did that put them on my radar is I'll Remember You. These are available to those who have Apple Music. I heard this arrangement originally on an easy-listening station format that has long-since been replaced by the jaded music that followed.

A great source of the easy-listening sound is the music of the Jobim sound of Bossa Nova, such as "Meditation". There is a version I heard of it on KYTN FM95 around 1977-78 that I never heard anywhere else, which I'm dying to locate. It sounds like a small trio with a guitar, string bass, vibraphone and percussion. But there are innumerable versions of that song that don't come even close.

Apple music has a great lineup worth getting signed up for that if your are an apple user, provided that they don't try to slim down their format to the jaded top40 sound of "computer rock" (auto tuning) like the FM radio market has already done.

As a musician I intend to continue to arrange and compose such that I don't outlive the most enriching sounds of music. For singing purposes, I find barbershop the most concentrated source of satisfying harmonization. Anyone who likes to harmonize: don't overlook this great resource.

Tuesday, April 14, 2020

A Safari devotee now messing with Chrome

Well, on my Macbook Mojave I just downloaded Chrome because the bandlab.com, which just started playing with, supports this browser but not Safari.

But now that I have Chrome on my mac, I may as well start studying its intricacies. It gives me the chance to study the behavior of my Herman web video game on browsers other than Safari.

One of the problems I came up with is an error on the support of the Web Audio API that stated: "The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page." When I went to a webpage of mine that uses the webaudio oscillator, it worked, but when I back-spaced to a previous page that used same, I got this error. On Safari this didn't happen. As an owner of a website, I consider it a good idea to mess with other major browsers. As Safari uses the Webkit engine, currently Chrome seems to use Blink. How this affects the performance of webpages that use Web Audio I haven't yet studied.

As much as I'd like to think that Safari can walk on water and be the only browser that I ever need to use on my mac, as  webmaster it's good to experiment with other browsers. Experimentation like this can help me work with more platform-indepentant code on my website.

Friday, April 10, 2020

Will corona virus really produce a "new normal"?

Much discussion about the corona virus has implied that the prolonged state of isolation and social distancing will create a new economy based on virtual stores, social activity and fellowship based in social media, and similar things. We fear a new Orwellian reality where augmented reality eliminates the need to have public parks, access to the smell of the ocean or even a view of the sky.

But if you remember the way the human spirit has been reacting through even our era, everyone is talking about refurbishing older experiences, like going to a drive-in movie instead of watching a movie on Netflix, or going to a real park instead of watching a 360Video (even though I find those fantastic), or having a real chorus perform a live barbershop concert (even though I am a proud user of apps like A Cappella and Band Lab) in a park amphitheater. As soon as we come to the end of the corona virus scare and the munchkins know they can safely come out from the bushes and meet Dorothy, it is inevitable that the human spirit will remember whatever was lost during this event. It will rebel by reviving those lost brick & mortar moments, those sweet smells of the woods and salty smells of the ocean. Remember that even in the pop culture where these things are often forgotten, it doesn't take a lot of people to remind us all what we have lost track of to get people back to recapturing those things.

This is why I don't think that restaurant dining, solitary beach walks, theatre performances, and the cinema are going anywhere. Okay, maybe I do live in Seattle, and that's how we think here. But we must also remember that, in the internet age, information travels fast, and our insights are bound to germinate elsewhere where people have yet to discover that they were real Seattlites at heart even if they live in a place where it still rules.

from my heart,
Billy Gard

Thursday, December 12, 2019

My discovery of Web Audio

It seems most modern web browsers now come packed with a built-in sound-synthesizer. You control this Web Audio API directly using Javascript. You can make it play a simple waveform (sine, sawtooth, triangular, square or custom) that plays as long as you want.

Using this you can, for example, display a playable piano on your webpage.

I've used it to create the tones on my harmony page which plays samples of chord tunings, chord progressions, intervals and scales. It replaces the pre-recorded audio files, and the MIDI files that predated those.

Now I found the additional ability of Web Audio to load a sound file, decode it, and put it in a buffer where it may be played at an exact time. This may sound redundant in a browser that already has the <audio> node. But the Web Audio feature plays the sounds instantly, while the <Audio> node seems to be bedeviled by a slight delay before it begins playing. In contexts like a video game this matters. This also makes background music loop seemlessly rather than having a slight gap before the music repeats.

In Web Audio, you create a "Source" node, which may be an oscillator (the one which generates its own waveform), or a buffer (which stores preloaded audio). You can play it simply by connecting this node to a "Destination" (which is typically your sound output on your computer) and starting it. If you want to be able to change the volume, you instead connect the Source node to a "Gain" node, and the Gain node to the Destination node. You set the volume in the Gain node. The sound’s sample value is multiplied by the gain’s value. This means that the default gain value of 1 plays the sound unmodified. 0 is silent. Using values greater than 1 results in overloaded sound, with clipping. Negative values invert the waveform (which by itself doesn’t affect how it sounds).

I had a recent bug where the 1 seemed to play the sound normally, but 0 just played it a little quieter. And -1 made it silent! That didn't make any sense to me, until I found the bug. In addition to adding the Gain to my chain of nodes:

Source -> Gain -> Destination

I forgot to delete the original statement connecting the Source directly to the Destination:

Source -> Destination

So I guess the sound arrived at the destination twice, both directly from the Source, and through the Gain control as well. I'm guessing the sound I heard at a volume of 1 may have been louder than it would otherwise be since it received the same audio sample twice. 0 muted the audio going through Gain, but the audio using the direct route played unmodified. Thus the slighly quiter sound. Setting the volume to -1 gave the Gain-controlled sound a negative amplitude, which cancelled out the unmodified audio, creating silence. That's my take on what was going on.

So if you wish to add a Gain node to your audio chain, remember to delete the Source -> Destination code before using Source -> Gain -> Destination.

It's true a computer does exactly what you tell it to. But if you give ambiguous instructions, the results will be unpredictable.

Monday, May 28, 2018

Laurel and Yanny

What would give me more of an occastion to pipe up here than the Laural/Yanny craze?

As it happens, the original audio behind all this is a pronunciation clip at vocabulary.com for "laurel".  Look up that word there and click to hear it in its original form.

It all started when a student who was studying for a literature class went to the website and looked up "laurel". But when she played the word, she thought she heard "yanny". The rest is internet virus history.

Now you have the inside story that the sound was not computer generated. It was a for-real person saying "laurel". When I sometimes hear "yanny" in certain listening conditions, that sounds much more synthesized, as if by a cartoon mouse.

I loaded the clip into Audacity, and pasted the clip into a track 5 times in a row. The first one was the original pitch, and each one after that was a full step lower. The first one was unmistakably "laurel". By the 5th clip (sometimes earlier depending on my concentration) I was hearing "yanny".

I also adjusted the original clip with Audacity's equalizer to hear the higher frequencies. This also produced "yanny".

I've been recently wondering if we were in the original speaker's presence when he said it, would anyone hear "yanny"? My own observations are that if you say "laurel" a few times, you may come to notice the presence of the higher overtones that are being heard as "yanny". The particular tone color of a person's voice, as well as the number of processes the sound goes through before we hear the recording, affects how emphasized these higher overtones get.

You can find more about this at
https://www.wired.com/story/yanny-and-laurel-true-history/

to see an interview with Jay Aubrey Jones (voice of "laurel"), go to
https://www.cnn.com/videos/us/2018/05/24/laurel-yanny-reveals-what-he-said-sot-ots.hln