View RSS Feed

neuroasis

Visualizing Procyon Settings

Rate this Entry
In my quest to master programming on the Procyon I have found it necessary to create tools to assist in intelligent design. To this end I have been developing a spreadsheet that graphs the waveforms that are created by the various options available in the Editor. This is a preview release for the purpose of trial and feedback.

At this time, it only visualizes the Sine waveform. Triangle is very close to this. Square is in development but the Duty Cycle is proving to be a challenge.

There are a couple of things that one must know to effectively understand what they are looking at with the graphs. The first is that 127 is the baseline. At 127 at 0 amplitude the LED is off. The closer the graphed point gets to 127 the less bright the LED will be. It seems from experimentation that actually in the Procyon the wave is rectified. So the negative cycle is mirrored into the positive.

At the moment, 2 complete cycles are displayed. They are calculated in a 2 second time frame. So for extreme frequency settings you may wish to calculate a fraction of the frequency to be able to display it in sufficient detail on the graph. Eventually, I will integrate these calculations into the program.

Also for DC offset only the portions of the wave that are above 127 trigger the LED to display.

As I have said this is an early release but I would very much appreciate feedback from people that decide to try it out. I will continue development and if you are an Excel master I would love function suggestions for Duty Cycle on the Square.

What I hope to achieve is a visual tool that we can post screenshots of the graphs to share and discuss the effect of settings. It would be a visual language of sorts to talk about the strategies and results for creating great Procyon sessions.

That is the hardest part I have found in programming, having some idea of how the LEDs are interacting and combining to produce output.

Here is the link for version 0.11 . It is a Microsoft Excel spreadsheet.

Submit "Visualizing Procyon Settings" to Facebook Submit "Visualizing Procyon Settings" to Google Submit "Visualizing Procyon Settings" to Digg Submit "Visualizing Procyon Settings" to del.icio.us Submit "Visualizing Procyon Settings" to StumbleUpon

Updated 05-25-2011 at 08:07 AM by neuroasis

Categories
AVS , Light and Sound , Technology

Comments

  1. Andy's Avatar
    Neat the way it works, but it sure looks complicated. The graphs look nice!

    Are you sure that a phase setting of 180 is 180 degrees? I haven't looked at the docs, but since a max is 255, I would have thought 255 = 360 degrees so 127 = 180 degrees, but I could be wrong...

    Where is the segment length set?
  2. neuroasis's Avatar
    Right. I still had the Phase setting as degrees. That has been fixed now. Please download again. I really wish it would display as degrees in the editor. It complicates matters to do all these conversions to the 0-255 scale.

    No segment length setting yet. Just think about it in terms of viewing 2 cycles of the waveform. For visualization purposes to gauge the interaction, the exact position of a key point at a specific time is not as high on the priority scale as seeing the shape of the waves.

    I will add these calculations to select time for the next version.
  3. Andy's Avatar
    You mean 2 seconds of waveform?

    What is the trouble you're having with duty cycle on the square wave?
  4. neuroasis's Avatar
    Right 2 secs.

    In Excel, you are calculating for the value at a point along a series of segments to plot it. In this spreadsheet there are 200 segments. A Square Wave is simply a Min and Max value of the plotted point. So you are rounding up to the Amplitude setting or rounding down to 0. That is fairly straight forward.

    However, when you introduce a Duty Cycle calculation into the mix now you have to have some fraction of the values adjusted. So Duty Cycle is basically 'turning off' or 'turning on' a known subset of the values. Because I am basing the calculation on that of a Sine wave and then rounding the values it is challenging to make these adjustments for any given cell.

    When using Excel you are thinking in a very different way than straight formula calculations. (or at least I am) There is quite a bit of trickery involved to get the desired result out of the functions that are available.

    I am not saying I am doing it the very best way that it could be done but that is why I have released it. If there are better ways I am totally open to it.

    I have added a Procyon Sandbox with Reversals to our shared folder. The Square wave graph is in the last columns.
  5. neuroasis's Avatar
    Quote Originally Posted by Andy
    You mean 2 seconds of waveform?
    It is not really 2 seconds exactly. It is 2 cycles of a 1Hz frequency waveform. Of course that would be 2 seconds. However, at other frequency settings especially those with interpolation like the wave starts at 4Hz and ends a 1Hz it is showing the full waveform created by the morph compressed into this 2 second (or 2 cycles at 1Hz) period. Is the term period more accurate?

    For this reason I am saying that this program is really just visually showing the shapes of the waves and how they interact. The actual value at any given moment of time is not being considered yet.
  6. neuroasis's Avatar
    Ok so you have helped me to rethink what I am trying to do. I want to show the overall shape of the waveform. 2 periods are required to show the effects of interpolation. The total time duration is not really important. It is only important that the graph represents 2 periods of the lowest Hz wave. If that is 2Hz then the graph should show 2 cycles of the 2Hz wave and all larger Hz settings are compared to this.

    That should show the full shape of the wave regardless of the duration. Now the x axis shows the wave shape at fractions of the period.

    I have now adjusted the calculations to consider the lowest Hz setting. I have also turned off the Labels on the Horizontal Axis as they are not really relevant. Because the scale of the horizontal axis is automatically calculated now, Excel shows some padding to the right of the graph.

    This is version 0.11 .
    Updated 05-25-2011 at 08:08 AM by neuroasis
  7. Robert Austin's Avatar
    What a monumental effort! Very cool, and I've been throwing a variety of values at it. One think I've noticed is, the DC offset on the Procyon becomes fully on at 255, but shows as still having a wide duty cycle on your spreadsheet, though it correctly shows the waveform clipping. Basically, at 255 the bottom of the waveform will have risen to meet the top, flat-lining there. Thanks for your work on this!
  8. neuroasis's Avatar
    Thanks Robert! That is a symptom of the waveform not being rectified. For DC offset I am simply adding it to final value which raises it along the Y axis. Could you verify if the waveform output of the Procyon is rectified or not? I will continue to think on how to approach this. Suggestions are very welcomed..
    Updated 05-25-2011 at 11:57 AM by neuroasis
  9. Jules's Avatar
    Hi, I'm new here and don't know anything about Procyon programming, but I do know something about electronics. I'm not sure if you know that square waves are in fact constructed from sinewaves? Vis: --VVV--VVV--VVV-- . It also happens that the Procyon is designed to play sine waves only via audio. Not sure about the glasses. See here: http://www.mindplacesupport.com/foru...ble-on-Procyon. It also happens that the waveform shown above could also be turned into isocronic beats which apparently are more effective, but little research has been done on them. Anyone know if we can convert these: http://www.iso-tones.com/ ?
  10. neuroasis's Avatar
    Hello Jules and welcome to the forum. Thank you for your comment. Yes I do realize that a square wave can be generated from a sine wave by adding harmonics. An added third harmonic and fifth harmonic can create an approximation but it is really all odd harmonics that generate the true square (and a duty cycle of 50%).
    What I am discussing is how it is plotted in Excel. I am not using Fourier transform equations because of the deep complexity (and honestly they are over my head). If you have some experience plotting these in Excel I am very interested. As mentioned earlier Excel has its own way of doing things with regards to generating dynamic graphs so I am hacking it around a bit to output a reasonable facsimile of the waveform that is driving the on/off cycles of the LEDs.
    My graphs are not displaying audio.
    Most (or even all) past LED Light glasses used in AVS were simple pulse waveforms (full on, full off accounting for amplitude). The Procyon introduced ramping with sine and triangle waveforms driving the display. So that is what I am modeling. But more so the interaction between the 3 colors (RGB) that combine to produce a full range of the spectrum. In practice it can be somewhat difficult to estimate the effect of settings. This way we can study and work with static graphs to increase our understanding.
    As far as isochronic tones go, and this is in the audio realm, the Procyon can produce them in the editor. You can use the settings from one of the light channels to modulate the audio. The right and left sides of the stereo image are independent so you could use a different modulation source (again one of the light channels) on each of them. You can also program binaural beats by a frequency variance in the two channels which would produce the entrainment beat as 250Hz L and 260Hz R would produce a 10Hz beat.
    Concerning the website you reference, you wouldn't be able to convert those files but you can create sessions with similar settings or you could use that audio along with any of the Mindplace machines and program the lights to follow them or even experimentally overlay different entrainments. All these would depend on knowing the original settings or possibly even determining them from spectral analysis.
    Once again, your suggestions, help and comments are much appreciated!
    Updated 05-27-2011 at 10:58 PM by neuroasis
  11. Jules's Avatar
    Hi neuroasis,

    Thanks for your comments. If you are interested in Fourier Transforms in Excel, apparently it isn't too difficult as it has tools to do this: http://excelunusual.com/archive/2011...form-tutorial/ and: http://www.brainmapping.org/NITP/PNA...urierExcel.htm. Unfortunately, I have no experience of plotting Fourier transforms in Excel or otherwise!

    Keep up the good work!
    Updated 05-28-2011 at 09:32 AM by Jules
  12. neuroasis's Avatar
    This tool has been superseded and surpassed by the excellent implementation by MarkT Visual Segment Developer here: http://www.mindplacesupport.com/foru...ore-you-upload .

    Thanks for your efforts in this area MarkT. I know how hard it was. I was attempting to do it using strictly cross-platform Excel functions so I could use it on my Mac. But Visual Basic for Applications turned out to the be the way. Great job.. check it out everyone if you haven't already.
  13. MarkT's Avatar
    Thanks for the kind words Scott. I appreciate the feedback and yes, it was HAAAARRRRDDDD (but, fun ... Laughing out loud). I was just lucky enough to have the career circumstances in life that gave me the VBA skills to leverage in this project. I actually like Mac's better; but, I've been forced to work with PC's (ha, ha).

    Take care.