{"action":"opened","issue":{"url":"https://api.github.com/repos/karlstav/cava/issues/15","labels_url":"https://api.github.com/repos/karlstav/cava/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/karlstav/cava/issues/15/comments","events_url":"https://api.github.com/repos/karlstav/cava/issues/15/events","html_url":"https://github.com/karlstav/cava/issues/15","id":72059154,"number":15,"title":"questions about the output","user":{"login":"livibetter","id":30909,"avatar_url":"https://avatars.githubusercontent.com/u/30909?v=3","gravatar_id":"","url":"https://api.github.com/users/livibetter","html_url":"https://github.com/livibetter","followers_url":"https://api.github.com/users/livibetter/followers","following_url":"https://api.github.com/users/livibetter/following{/other_user}","gists_url":"https://api.github.com/users/livibetter/gists{/gist_id}","starred_url":"https://api.github.com/users/livibetter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/livibetter/subscriptions","organizations_url":"https://api.github.com/users/livibetter/orgs","repos_url":"https://api.github.com/users/livibetter/repos","events_url":"https://api.github.com/users/livibetter/events{/privacy}","received_events_url":"https://api.github.com/users/livibetter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-30T04:24:15Z","updated_at":"2015-04-30T04:24:15Z","closed_at":null,"body":"Although it says:\r\n\r\n> This program is not intended for scientific use.\r\n\r\nBut I begin to wonder the output. It all started with #9.\r\n\r\nI don't have any tools that can generate test audio, so I generated on my own (see below), an 1kHz, s16le, 2ch, raw PCM audio, `1000hz-s16le-2c-5sec.raw`, using [wave](https://github.com/efferifick/wave):\r\n\r\n```sh\r\n% echo $((44100*5)) 1 1000 | wave -r 44100 > 1000hz-f32le-1c-5sec.raw\r\n% # aplay -f FLOAT_LE -r 44100 -c 1 -q 1000hz-f32le-1c-5sec.raw\r\n% ffmpeg -f f32le -acodec pcm_f32le -ac 1 -i 1000hz-f32le-1c-5sec.raw -f s16le -acodec pcm_s16le -filter_complex \"[0:a][0:a]amerge=inputs=2[aout]\" -map \"[aout]\" -ac 2 1000hz-s16le-2c-5sec.raw\r\n```\r\n\r\nI commented out the parts in db805718e21c7cd8054bcb7b5ab94d9153c29c0a that I think they would be affecting: L568-570 and L595-606. I may miss some, but from the output of ALSA input, I get rid of them enough.\r\n\r\n## FIFO\r\nHere is the output of `./cava -i fifo -p 1000hz-s16le-2c-5sec.raw`:\r\n\r\n![2015-04-30--11 27 00](https://cloud.githubusercontent.com/assets/30909/7405892/e13238e4-ef2b-11e4-897d-5f9610f32d32.png)\r\n\r\n## ALSA\r\nAnd output of `./cava -i alsa -d pulse` with playback by `aplay -f S16_LE -r 44100 -c 2 -q 1000hz-s16le-2c-5sec.raw` in background:\r\n\r\n![2015-04-30--10 30 51](https://cloud.githubusercontent.com/assets/30909/7405426/da7f8440-ef24-11e4-9284-f16526a86647.png)\r\n\r\n## Questions\r\n\r\nBoth peaks did indicate the 1kHz, when I changed the frequency, they shifted, so I believe that does show, but there should not have anything but a peak in FIFO.\r\n\r\n* Is FIFO processing correctly?\r\n\r\n  Both outputs of inputs should look more or less the same, right? Did I feed in right format of data?\r\n\r\n  Below 1k, the leftmost three peaks, there is something interfering, they look related, but I can't tell what it is.\r\n\r\n (Forgot almost everything I learned in signal processing. Sorry, professors!)\r\n\r\n* What are the frequency bands, exactly in the output we see?\r\n\r\n   The locations of the peaks don't look right at all\r\n\r\n  If the output is equally dividing 50-12kHz, 1kHz should be about one 12th of window width from the left. But both are close to the center.\r\n\r\n  From what I can see, in `-i alsa`, the rightmost frequency/bar in output is somewhere around 9kHz.\r\n\r\n  Is it log scale? 1k almost in middle, 10k almost at right, that sounds about right, doesn't it?"}}