tomwalters@0: % tool tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % tomwalters@0: % bleeck@3: % This external file is included as part of the 'aim-mat' distribution package bleeck@3: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org bleeck@3: tomwalters@0: tomwalters@0: function show_pitch_spiral(frame) tomwalters@0: tomwalters@0: cls; tomwalters@0: s=getallnotes; tomwalters@0: tomwalters@0: min_fre=abs(1000/frame.time_minus); tomwalters@0: max_fre=abs(1000/frame.time_plus); tomwalters@0: max_fre=2000; tomwalters@0: tomwalters@0: sp=spiral(min_fre,max_fre); tomwalters@0: sp=adddots(sp,s); tomwalters@0: tomwalters@0: frame.search_type='best_n'; tomwalters@0: frame.nr_search_maxima=50; tomwalters@0: tomwalters@0: [pitches,s]=findpitch(frame); tomwalters@0: tomwalters@0: sp=adddots(pitches,s); tomwalters@0: plot(sp); tomwalters@0: set(gca,'Position',[0 0.2 1 0.8]); tomwalters@0: % tomwalters@0: % % and the sum tomwalters@0: rect=[-0.04 0 1 0.2]; tomwalters@0: mysubplot(1,1,1,rect,1); tomwalters@0: tomwalters@0: nr_bins=24; tomwalters@0: tones=pitch_radar(sp,nr_bins); % here it is calculated tomwalters@0: h=plot(tones,'.-'); tomwalters@0: set(gca,'yticklabel','') tomwalters@0: axis([0.5 nr_bins+0.5 0 3]); tomwalters@0: tix=1:nr_bins/12:nr_bins; tomwalters@0: ti=['a ';'a#';'h ';'c ';'c#';'d ';'d#';'e ';'f ';'f#';'g ';'g#']; tomwalters@0: set(gca,'XTick',tix); tomwalters@0: set(gca,'XTickLabel',ti); tomwalters@0: tomwalters@0: tomwalters@0: return;