Cabbage Logo
Back to Cabbage Site

Tuner for Cabbage on Android

Anyone tried using the tuner.csd on the Android version? I’ve been trying to build on it a bit to try to get any idea of how I might make a tuner which detects/displays the first few overtones/partials in a sound, but can’t seem to get the original code displaying the fundamental correctly. Tuner2.csd (8.8 KB)
tuner.csd (7.2 KB)

I don’t really have much time to look at this right now, but does Iain’s instrument work Ok? So basically, what you are looking for is a tuner that also displays some kind of spectrum? If so, then you may want to use a combination of a pitch-tracker opcode and some other pvs stuff. You could use pvspitchin the same way Iain does to get the main pitch, and then you could write the contents of each frequency bin to a function table. I do this in one of my Unity experiments. I use pvsanal to analyse some incoming data, and then I write the contents of each band to a function table. You could then draw the contents of the function table using a gentable widget.

Check out what I’m doing here:

I write data to a function table and then use the data to position objects around a game.

1 Like

I may have stumbled upon my own answer. Too many chnset’s for this “puny” phone memory to handle.

Ah, that shouldn’t be too much of an issue? But I think drawing a waveform might be. For a moment I forgot we were talking about Android :frowning:

Iain’s instrument works great… on my Windows 7 desktop. And printing the values to the console on Csound for Android works pretty well, with a couple tweaks on the original code. I’ve tweaked the Cabbage widgets to look right on my phone, and it seems like all the information is being calculated fine, until it gets to the chnset bits for the widget labels and checkboxes… then nothing. I do think I’ll end up using pvsanal and whatnot, eventually. I’m looking to make a tuner that will work fairly efficiently for tuning a handpan… which would require figuring out what the fundamental tone being tested is… and then how far off the two natural overtones above that are, from the octave and compound fifth.