phyphox Forums
audio autocorrelation python - Printable Version

+- phyphox Forums (https://phyphox.org/forums)
+-- Forum: Discussion (https://phyphox.org/forums/forumdisplay.php?fid=1)
+--- Forum: General (https://phyphox.org/forums/forumdisplay.php?fid=3)
+--- Thread: audio autocorrelation python (/showthread.php?tid=1693)



audio autocorrelation python - Phage - 02-14-2023

Hello
I'm making this post because I'm having issues with a python script I'm trying to create using phyphox. I would like to use the audio autocorellation experiment on my phone and for my python script to find what note is beind detected. I think the name of the value next to musical note is called "semitonesRound". However my knowledge in python is limited and I do not know how to print the value found next to the musical note. Would anyone be so kind as to help me ?

My code so far:

PP_ADDRESS = "http://###.###"
PP_CHANNELS = ["semitonesRound"]

import requests

while True:
    url = PP_ADDRESS + "/get?" + ("&".join(PP_CHANNELS))
    data = requests.get(url=url).json()


RE: audio autocorrelation python - Jens Noriʇzsɔɥ - 02-17-2023

The text itself is not shared by the REST interface. Technically, you have identified the right buffer, however, it is used to map to a predefined text, see https://github.com/phyphox/phyphox-experiments/blob/master/audio_autocorrelation.phyphox

All these “[[musical_note_*]]” are taken from a translation list and “0” in “semitonesRound” corresponds to A440.