| Also - Poll DOES send a '/tr' message.
Josh On Sep 19, 2010, at 9:17 AM, Chad McKinney wrote: Hi Peter,Check out SendTrig and SendReply. Using either of those classes you could do all the above things, also you might want to check out Tartini instead of Pitch. If you're interested in only notated rhythm, (say for a drum part or something) you could use Onset.kr. Sounds fun, I hope it works out for you. Best,
Chad On Sun, Sep 19, 2010 at 8:49 AM, Peter O'Doherty <mail@xxxxxxxxxxxxxxxxx> wrote:
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/
****************************************** /* Joshua D. Parmenter http://www.realizedsound.net/josh/
“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono */
|