[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] Pitch tracking
Hi,
I have a couple of questions concerning Pitch. Using the code below I
get the frequency and midi information in the following format:
freq: 440
[ /tr, 1001, 69, 440 ]
freq: 272.809
[ /tr, 1001, 60, 272.80856323242 ]
Is there any way to "trim" this to print only freq and midi in a form
such as: 440 69 ?
Is there any way to store the polled frequency information to allow it
to be exported to, for example, excel?
Is it possible to convert the "copy" channel to a midi file, including
attack info?
(Yes, I'm looking for a method to created a rough transcription of an
audio file.)
Thanks,
Peter
(
SynthDef("pitchFollow1",{|t_poll = 0|
var in, amp, freq, hasFreq, out, original, copy;
in = PlayBuf.ar(1, c.bufnum, loop:0);
# freq, hasFreq = Pitch.kr(in, ampThreshold: 0.01, median: 7);
original = PlayBuf.ar(1, c.bufnum, loop: 0) * 2;
copy = SinOsc.ar(freq, 0, 0.2);
Poll.kr(Impulse.kr(10), freq, "freq", freq.cpsmidi, "midi");
Out.ar(0, [original, copy]);
}).play(s);
)
--
-> Peter O'Doherty
-> http://www.peterodoherty.net
-> mail@xxxxxxxxxxxxxxxxx
**** rhizoradio
**** live every sunday at 18:00 (CET) on DFM
**** http://dfm.nu
**** http://rhizoradio.net
**** podcast: http://www.peterodoherty.net/rhizoradio/rhizoradio.xml
*************************************************
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/