Stalking the Big One

Adapting an existing code base used for music transcription and spectrum analysis to forecast the near exact time of a major earthquake.

Similar projects worth following
Understanding Earthquake Initiation

Imagine overtightening a bolt, until it breaks. Many have likely done this more than they care to admit, resulting in one’s going through a learning curve whereby one acquires knowledge about tensile strength and shear strength of materials, and thus the implied existence of material properties such as yielding curves. If we model a system of faults as if they were collections of springs and masses, then we might try to compute the resonant frequency of such a system. Usually f0 = sqrt(k/m)/(2*pi), for the simplest type of oscillatory system. Yet, if we could suppose that k(t) = k'(t-t0)^2, then f(t) = (t-t0)*f0, so that if (df/dt) was constant or nearly constant and could be obtained empirically, then a possible time for t0, i.e., a possible time for a main seismic event can be computed.

So that in effect, what if the traditional approach to fracture propagation is completely wrong?

The method that I am here describing certainly seems to work for the Ridgecrest Earthquake sequence of July 4-5, 2019; that is to say if we use the data from the seismograph at Geyser Peak, Ca.  Perhaps the seismograph is picking up premonitory P waves which are efficiently filtered and amplified by the aquifer that feeds that particular Geyser.  If we assume then that that aquifer is fed and extends down into therefore from a geothermal, i.e., volcanic rock formation extending up to three miles below the surface of the earth, then the volume of the aquifer might easily contain several million acre feet of water.  Then if the geothermal source emits a gas such as sulfur dioxide or sulfur trioxide into the aquifer, those compounds could react with any naturally occurring Calcium Carbonate layers to produce Calcium Sulfate and Carbon Dioxide Gas.

Using a rule of thumb for water pressure of one pound per square inch for every two feet of depth, it is easy to see when the depth of the aquifer exceeds more than a few thousand feet, that the "critical pressure" of water, which is the pressure (usually over 3000 PSI) at which water no longer has a liquid or a vapor phase and a liquid phase.  One possibility therefore is that a foaming action occurs when faint P-waves from a distant earthquake pass though the aquifer, and that quite interestingly enough, this foaming action produces an hydro-acoustic signal which arises in a fashion similar to the method of using a pulse counting sigma delta analog to digital converter.  In effect, detecting premonitory P-waves which would otherwise be too weak to be detected using ordinary techniques, by in effect, counting bubbles!

This project therefore will attempt to examine existing public domain data available from and by using that data demonstrate how the rate of change of frequency of induced sympathetic vibrations can be used, or could have been used, or has been used (!) to forecast the near exact time of more than one major seismic event!  The next step of course would be to automate that process, so that ideally the computations that need to be performed with respect of future quakes can be performed, not so much with the latest Watson/NVIDIA?Deep Learning/AI one million CPU system, but rather, ideally on a more Hacktivist acceptable platform such as Propeller, or Arduino, or even Apple II.

For more information see the YouTube video uploaded by "Celluloid Daydream" entitled "Music Transcription using Spectrum Analyzer" for a demo of the existing codebase (actually uploaded in 2009) that will be adapted and repurposed with this new type of event detection model.  Also, if you know how to access the old Deja Archive on Google Groups, you can search for "glgorman earthquake" for some very OLD USENET posts, (which still exist!) and which describe the predictive P wave theory in further detail.  Note - this is NOT the shake alert system which warns only when the earthquake begins - this system attempts to identify when major temblors are particularly likely, months, weeks, days, and even hours before a foreseeable major event. 

Note as August 25. 2019 the Parallax Propeller 2 is not yet available, so I will be providing an alternative implementation of a suitable microcontroller-based event detection and analysis system in the near future.  In the meantime I will update with code snippets describing the core algorithms, etc., based on the existing Windows C++ code base.

Until then - remember these words as you're headed out West, tell only your friends and to hell with the rest!


The is the schematic that Logic Friday generated when I input the parameters for a [1,4,6,4,1] convolutional filter designed to perform low pass pre-filtering of bitstream data.

Portable Network Graphics (PNG) - 34.00 kB - 08/25/2019 at 10:25



This is the first part of the sigma delta DSP code base for use on a Parallax Propeller or similar microcontroller when performing initial pre-filtering of live data prior to performing any FFT based operations.

cpp - 8.86 kB - 08/25/2019 at 09:43


  • 1 × Microsoft Visual Studio.
  • 1 × Parallax Propeller protoypting supplies.
  • 1 × Diet Coke (see project log)

  • The Tortoise and Hare

    glgorman09/01/2019 at 19:33 0 comments

     If there are 3600 seconds in an hour, and 24 hours in a day, then there are 86400 seconds in one mean solar day, obviously - not counting the occasional leap second.  Multiply that on your favorite calculator by 36524 which is the number of days in 100 years, assuming that the century year is not a leap year - and you get 3,155,673,600 seconds.  Now press the reciprocal button on your favorite calculator and you will immediately see that by implication, if you have an earthquake fault that has a slip rate of one meter per century, then that will correspond to 3.169*10^-10 meters/second for the average slip rate of that particular fault, or approximately 3.17 Angstroms per second for each meter per century.  Which would mean that a typical active earthquake fault should radiate an acoustic signal associated with oscillations the associated Casimir field with a frequency which is proportional to the rate of slip and inversely proportional to any inter-ionic spacing for the various atoms and ions that have their respective fields go in and out of phase along any existing planes of fault slip.  Provided of course that the fault planes along a forming fracture plane have already formed, and yet they remain spatially proximal to the extent that the field gap is able to produce a signal.  Of course, once the main event is "just about to happen" if the fault gap increases to the point that the Casimir field dies off, then that would explain why the earth seems to fall silent, that is to say, just before the main shock.  This might also help to explain why at least for some earthquakes, the rate of change in frequency is linear in K,   or at least why it does not follow the normal equations of simple harmonic motion or classical wave mechanics.

    This will only get curiouser and curiouser if I attempt to more fully develop the theory, because on the one hand, on such a serious subject as whether Casimer's analysis is mathematically sound, because of what it would imply,  insofar is attempting to analyze earthquake initiation based on quantum mechanical principles; but then again, as soon as one mentions Casimar, it can also lead to dark energy, and whether wormholes are potentially traversable (according to none other than Hawking and  Thorne, see Wikipedia!), as well as who knows what other kind of rabbit holes.

    Yet that data is there for all to see …. and yes I will have a very interesting update on the hardware development side of this project in the next few days, along with additional source code.

    But of course - if the Casimer effect were to be coupled with a clock reaction, analogous to the so called "iodine clock" …. well, this is something I will explain later …  

  • The Joy of Underclocking!

    glgorman08/25/2019 at 11:33 0 comments

    In the source code that I have provided for the sigma-delta part of the DSP core that I am working with on the Parallax P1, I have discovered that if I do some extreme underclocking when I simulate the Analog to Digital conversion and subsequent filtering using the Song "White Wedding" by Billy Idol as a test, well it seems to add an interesting what should I call it - but maybe it is a sort of "don't forget to bring the rice" like sound effect to the music, let's say around 4 minutes or so into the song;  or else it sounds almost like adding a maraca to the existing track - playing in perfect lock step to the beat!   This could of course lead to an extremely simple beat detection hack, which combined with a polyphase filter tree and some event detection hysteresis! 

  • Is this the real life?

    glgorman08/25/2019 at 11:23 0 comments

    Reminder to myself.  Fire up the spectrum analyzer software and post a screen shot showing how the CD rip of the Queens Greatest Hits album has a very obvious second harmonic component of the 50Hz British power line frequency near the beginning of the song Bohemian Rhapsody, down of course at about -70db (FS), but very obvious if you know how to look for it.

    This may actually be important of course, because the experiments that I have been doing with FFT+DSP+sigma-delta seem to show that although low bit rate sigma-delta transcoding can suffer from noise bursts, as well as out of ban oscillations, which are characteristic of the convolutional nature of the algorithm, it does not seem to suffer from the so called "Cher effect" which MP3 suffers from at low bit rates, i.e., unwanted frequency shifting.  This would of course be important to know about, when analyzing signals that might contain evidence of visco-elastic failure mode.

    Note - that's visco-elastic failure, not DISCO-elastic!  Sorry, I couldn't resist!

  • We Interrupt this Program ...

    glgorman08/25/2019 at 11:12 0 comments

    This would be a good place to mention that the USGS spectrograms for various seismographs are available at, and they are of course in the public domain, for licensing purposes!  If you go to the USGS website you can normally find about 47 of them gong back about two weeks, however - if you know how to hack the URL you can usually find the older ones that are still up; like this July 5th spectrogram from Geyser Peak.

    Looking at the August 21st spectrum from the same seismograph, it is immediately obvious that there was some activity at around 5.5Hz, with some faint but very chaotic phase noise between 5 and 10 Hertz, and a magnitude 5 aftershock soon followed in the Ridgecrest area.

    Of course, going back to March 9th it is very interesting to examine the instabilities associated with the 5.5Hz and 7Jz signals that were present at that time.  is this the original premonitory signals?

    Also take a look at the signals from June, … etc., where that was a massive buildup of phase noise in the 5 to 10Hz range, easily detected from a distance of about 470 miles!

  • Tick tock, tick tock ... hickory dickory dock!

    glgorman08/25/2019 at 10:34 0 comments

    Here it is August 25, 2019 and I still don't have live P2 hardware to port my code base over to.  Still I venture on, and will continue to work with Windows 10/Visual Studio and the P1 hardware, as well as conducting experiments with the P1 stuff that I have so that when I do get the final hardware - it will be possible to simply configure the filtering and processing algorithms by, for example, simply describing the filter tree in XML or maybe in SCRATCH!  (even if that is a bit far out there!)

View all 5 project logs

  • 1
    Step 1

    1.  If you are active in Parallax propeller development, check out the Forums on parallax web site for the Discussion entitled "ADC Sampling Breakthrough" which is a part of the P2 development forums. in order that you may get some ideas with respect to what is involved in bringing up an entire DSP library from scratch., including ADC design, Verilog, etc. This is not for the faint of heart - and yet Parallax has been great, and most people, if they only knew - would probably say that they have the best tech support of any company, especially in that many of the features that are going into the forthcoming P2 are for all intents in purposes …. feature requests from the Hacktivist community, for things like HDMI, USB, high speed DSP, etc.

    2.  If you are not convinced how signals from an deep pressurized aquifer can detect seismic signals, grab a Diet Coke from the fridge, shake it vigorously, but do not open the can - or you will get your own Geyser!  Now hold the bottom of the can up to your ear, and listen to the bubbles forming and be reabsorbed inside the can.  Interestingly enough, it is not necessary to open the can to "get some sounds", it just simply works that way.  Of course, with a few million acre feet of high pressure sub-terraranan carbon dioxide steam, what should be happening is that when CO2 bubbles form in response to weak P-wave interactions, the bubbles that form will begin to rise, and when they rise they will expand, so that the production of said bubbles will be irreversible, at least for the CO2 that reaches the surface.  Thus just like a sigma delta ADC, all we need to do is count the bubbles, so to speak - and thereby recover a replica of the original P-wave modulation.  Fortunately, for us - the USGS does this part for us!

    3.  Viewing the spectrograms from Geyser Peak, among others, it is immediately obvious that prior to the July 4 and 5 earthquakes there was more a less a kind of "WOW" signal, for those that are familiar with that "other wow signal.", i.e., if yo know about that one.  One way to try to extract data from the spectrograms therefore is to just simply look at them and guess about what it might mean, or else we can try to turn the .png files that are available from USGS back into bitmaps, and then run some more additional analysis, other than what the government is already doing, such as looking at the signals as if we were trying to build a pitch to midi convertor for a Theremin or something similar.  

    4.  If it continues to work into the future, i.e. whenever there is the right build up of oscillations with an increasing amount of phase noise, etc., with an increase in frequency followed by a decrease in frequency of associated sympathetic oscillations indicating something like a material yielding curve for a system undergoing visco-elastic failure, then the rate of change of frequency on the f-downslope can be used to compute-estimate-forecast-predict the near exact TIME of a major seismic event, hours or perhaps even days in advance.

    5.  And if it doesn't work in general, elsewhere, when the method is applied correctly?  Well, hopefully I am going to be able to build some really interesting Euro-rack synth stuff for further adventures in dub-step, electro-punk, EDM, etc.  

View all instructions

Enjoy this project?



glgorman wrote 08/25/2019 at 10:36 point

Questions?  Comments?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates