current_hardware = np.array([[hc.GPIOLEN],
[sample_rate],
[_MIN_FREQUENCY],
[_MAX_FREQUENCY],
[_CUSTOM_CHANNEL_MAPPING],
[_CUSTOM_CHANNEL_FREQUENCIES],
[CHUNK_SIZE],
[-1]], dtype=object)
>>> ca = np.load(".OhComeAllYeFaitfull.mp3.sync.npz")
>>> ca.files
['std', 'cache_matrix', 'cached_hardware', 'mean']
>>> s = ca['std']
>>> c = ca['cache_matrix']
>>> ch = ca['cached_hardware']
>>> m = ca['mean']
>>> ch
array([[8],
[44100],
[20.0],
[15000.0],
[0],
[0],
[2048],
[-1]], dtype=object)
--
http://www.lightshowpi.com/
---
You received this message because you are subscribed to a topic in the Google Groups "LightshowPi Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lightshowpi-dev/ttOr-DMWEJU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lightshowpi-d...@googlegroups.com.
To post to this group, send email to lightsh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightshowpi-dev/59b5b83e-a8b5-45cb-9d6f-c1fa36b542ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to lightshowpi-dev+unsubscribe@googlegroups.com.
To post to this group, send email to lightshowpi-dev@googlegroups.com.
current_hardware = np.array([hc.GPIOLEN,
sample_rate,
_MIN_FREQUENCY,
_MAX_FREQUENCY,
_CUSTOM_CHANNEL_MAPPING,
_CUSTOM_CHANNEL_FREQUENCIES,
CHUNK_SIZE,
-1], dtype=object)
To unsubscribe from this group and all its topics, send an email to lightshowpi-d...@googlegroups.com.
To post to this group, send email to lightsh...@googlegroups.com.
That is about what I did, I took the values of CHUNK_SIZE as defined, sample_rate = musicfile.getframerate(), etc... all from memory, and when I reload then I compare them the same way from the values stored in memory.current_hardware = np.array([hc.GPIOLEN,
sample_rate,
_MIN_FREQUENCY,
_MAX_FREQUENCY,
_CUSTOM_CHANNEL_MAPPING,
_CUSTOM_CHANNEL_FREQUENCIES,
CHUNK_SIZE,
-1], dtype=object)The channels I did not include because in play_song() it was never passed to the fft module. But everything came from memory, just before it would have been sent to the fft module.As for removing the config from the sync files that's not a problem. everything is in its own separate array. But it was my understanding that the cached matrix was derived from those specific settings. and if any of them changed the matrix was no longer valid, I'm a good programmer (not bragging, I know what I can do), but I do not know that much about how the fft calculations work, but I am starting to understand (slowly), and so I still have a lot of holes in my knowledge about fft. So you may have to talk me through a few points as they come up.Back to the point.Is the matrix only good for the input values listed in the config array, or is there a way to adapt then for different setup?
And the config array is a separate array, it is just stored in the same file. Same with the std and mean. I no longer stack them on the cache_matrix then remove them from the matrix. Separate arrays stored in the same file. But like I said it is only one way to do this, if you have a way your looking at for the future then walk me through it, I could do it a different way too, I just like to code doesn't matter much if it's my idea or someone else's, someone else's make it a challenge and that is the fun part for me. That is one of the reasons I wanted to have this discussion. I'm one person working on a small part of the project, it need to fit the project now and in the future and with the work others are doing.
You received this message because you are subscribed to the Google Groups "LightshowPi Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lightshowpi-d...@googlegroups.com.
To post to this group, send email to lightsh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightshowpi-dev/840be420-e074-4833-af0b-fa5b4637c317%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightshowpi-dev/237623d2-1396-4dd0-8208-a9693a2cf4e4%40googlegroups.com.
On Sun Dec 14 2014 at 11:10:10 PM Tom Enos <tom....@overclocked.net> wrote:That is about what I did, I took the values of CHUNK_SIZE as defined, sample_rate = musicfile.getframerate(), etc... all from memory, and when I reload then I compare them the same way from the values stored in memory.current_hardware = np.array([hc.GPIOLEN,
sample_rate,
_MIN_FREQUENCY,
_MAX_FREQUENCY,
_CUSTOM_CHANNEL_MAPPING,
_CUSTOM_CHANNEL_FREQUENCIES,
CHUNK_SIZE,
-1], dtype=object)The channels I did not include because in play_song() it was never passed to the fft module. But everything came from memory, just before it would have been sent to the fft module.As for removing the config from the sync files that's not a problem. everything is in its own separate array. But it was my understanding that the cached matrix was derived from those specific settings. and if any of them changed the matrix was no longer valid, I'm a good programmer (not bragging, I know what I can do), but I do not know that much about how the fft calculations work, but I am starting to understand (slowly), and so I still have a lot of holes in my knowledge about fft. So you may have to talk me through a few points as they come up.Back to the point.Is the matrix only good for the input values listed in the config array, or is there a way to adapt then for different setup?What do you mean by "config array" here? The currently cached matrix is only good for the input parameters to fft.calculate_levels. We could cache it at a bit higher level (e.g. the raw FFT output before calculating the level for each frequency bin), which would allow us to adapt more readily for pretty much any setup we throw at it, but would still require a "binning" process for each frequency bin, and calculation of mean / std.dev. / etc... which does take time, so not sure it would be worth doing that.
And the config array is a separate array, it is just stored in the same file. Same with the std and mean. I no longer stack them on the cache_matrix then remove them from the matrix. Separate arrays stored in the same file. But like I said it is only one way to do this, if you have a way your looking at for the future then walk me through it, I could do it a different way too, I just like to code doesn't matter much if it's my idea or someone else's, someone else's make it a challenge and that is the fun part for me. That is one of the reasons I wanted to have this discussion. I'm one person working on a small part of the project, it need to fit the project now and in the future and with the work others are doing.I feel that having the per-song overrides be it's own easily editable text file makes more sense, other than that - I like the idea of storing the sync file data in a binary format. We can of course make an editor for the parts of it that we feel would be human "editable" in the future.
_CONFIG = cm.CONFIG
_CONFIG = hc.cm.CONFIG
To unsubscribe from this group and all its topics, send an email to lightshowpi-dev+unsubscribe@googlegroups.com.
To post to this group, send email to lightshowpi-dev@googlegroups.com.
You received this message because you are subscribed to the Google Groups "LightshowPi Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lightshowpi-d...@googlegroups.com.
To post to this group, send email to lightsh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightshowpi-dev/4fc73f33-8963-4b90-8672-4f6977776cd8%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightshowpi-dev/237623d2-1396-4dd0-8208-a9693a2cf4e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "LightShow Pi Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lightshowpi-d...@googlegroups.com.
To post to this group, send email to lightsh...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lightshowpi-dev/dfd93c1e-8314-446b-a2dc-3dfafeeba900%40googlegroups.com.