├── modules-and-plug-ins ├── vamp-plugin │ ├── vamp-plugin.list │ ├── vamp-plugin.map │ ├── INSTALL.md │ ├── plugins.cpp │ ├── BTrackVamp.h │ └── Makefile ├── python-module │ ├── INSTALL.md │ ├── setup.py │ └── example.py └── max-external │ ├── Info.plist │ ├── README.md │ └── maxmspsdk.xcconfig ├── doc ├── html │ ├── bc_s.png │ ├── bc_sd.png │ ├── bdwn.png │ ├── nav_f.png │ ├── nav_g.png │ ├── nav_h.png │ ├── open.png │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ ├── closed.png │ ├── doxygen.png │ ├── ftv2cl.png │ ├── ftv2doc.png │ ├── ftv2mo.png │ ├── ftv2ns.png │ ├── nav_fd.png │ ├── nav_hd.png │ ├── sync_on.png │ ├── tab_ad.png │ ├── tab_bd.png │ ├── tab_hd.png │ ├── tab_sd.png │ ├── ftv2blank.png │ ├── ftv2link.png │ ├── ftv2mnode.png │ ├── ftv2node.png │ ├── ftv2pnode.png │ ├── splitbar.png │ ├── splitbard.png │ ├── sync_off.png │ ├── ftv2lastnode.png │ ├── ftv2splitbar.png │ ├── ftv2vertline.png │ ├── search │ │ ├── close.png │ │ ├── mag_sel.png │ │ ├── search_l.png │ │ ├── search_m.png │ │ ├── search_r.png │ │ ├── classes_0.js │ │ ├── classes_62.js │ │ ├── classes_1.js │ │ ├── files_1.js │ │ ├── all_4.js │ │ ├── all_66.js │ │ ├── functions_4.js │ │ ├── functions_66.js │ │ ├── all_3.js │ │ ├── all_64.js │ │ ├── classes_2.js │ │ ├── classes_6f.js │ │ ├── all_9.js │ │ ├── functions_3.js │ │ ├── functions_64.js │ │ ├── functions_9.js │ │ ├── pages_0.js │ │ ├── pages_62.js │ │ ├── all_75.js │ │ ├── all_b.js │ │ ├── all_0.js │ │ ├── files_62.js │ │ ├── functions_75.js │ │ ├── all_77.js │ │ ├── files_0.js │ │ ├── functions_0.js │ │ ├── functions_b.js │ │ ├── all_c.js │ │ ├── enums_1.js │ │ ├── enums_77.js │ │ ├── pages_67.js │ │ ├── all_7e.js │ │ ├── enums_0.js │ │ ├── enums_6f.js │ │ ├── functions_7e.js │ │ ├── all_63.js │ │ ├── functions_63.js │ │ ├── files_6f.js │ │ ├── files_2.js │ │ ├── all_d.js │ │ ├── all_70.js │ │ ├── all_73.js │ │ ├── all_8.js │ │ ├── functions_70.js │ │ ├── functions_c.js │ │ ├── functions_73.js │ │ ├── functions_8.js │ │ ├── functions_2.js │ │ ├── all_6.js │ │ ├── all_69.js │ │ ├── functions_6.js │ │ ├── functions_69.js │ │ ├── all_a.js │ │ ├── functions_a.js │ │ ├── functions_6f.js │ │ ├── functions_1.js │ │ ├── functions_62.js │ │ ├── all_2.js │ │ ├── searchdata.js │ │ ├── nomatches.html │ │ ├── all_5.js │ │ ├── functions_5.js │ │ ├── functions_7.js │ │ ├── all_67.js │ │ ├── functions_67.js │ │ ├── all_62.js │ │ ├── all_1.js │ │ ├── mag.svg │ │ ├── mag_d.svg │ │ ├── all_6f.js │ │ ├── close.svg │ │ ├── all_7.js │ │ ├── all_62.html │ │ ├── all_63.html │ │ ├── all_64.html │ │ ├── all_66.html │ │ ├── all_67.html │ │ ├── all_69.html │ │ ├── all_6f.html │ │ ├── all_70.html │ │ ├── all_73.html │ │ ├── all_75.html │ │ ├── all_77.html │ │ ├── all_7e.html │ │ ├── enums_6f.html │ │ ├── enums_77.html │ │ ├── files_62.html │ │ ├── files_6f.html │ │ ├── pages_62.html │ │ ├── pages_67.html │ │ ├── classes_62.html │ │ ├── classes_6f.html │ │ ├── functions_62.html │ │ ├── functions_63.html │ │ ├── functions_64.html │ │ ├── functions_66.html │ │ ├── functions_67.html │ │ ├── functions_69.html │ │ ├── functions_6f.html │ │ ├── functions_70.html │ │ ├── functions_73.html │ │ ├── functions_75.html │ │ ├── functions_7e.html │ │ ├── mag_sel.svg │ │ └── mag_seld.svg │ ├── ftv2folderopen.png │ ├── ftv2mlastnode.png │ ├── ftv2plastnode.png │ ├── ftv2folderclosed.png │ ├── doc.svg │ ├── docd.svg │ ├── menudata.js │ ├── folderclosed.svg │ ├── folderclosedd.svg │ ├── folderopend.svg │ ├── folderopen.svg │ ├── dir_e68e8157741866f444e17edd764ebbae.html │ ├── globals_enum.html │ ├── globals.html │ ├── classes.html │ ├── annotated.html │ ├── _onset_detection_function_8cpp.html │ ├── class_circular_buffer-members.html │ ├── dynsections.js │ ├── _b_track_8cpp.html │ ├── _circular_buffer_8h.html │ ├── files.html │ ├── index.html │ ├── _b_track_8h.html │ ├── class_onset_detection_function-members.html │ ├── dir_68267d1309a1af8e8297ef4c3efbcdba.html │ └── menu.js └── mainpage.dox ├── tests ├── main.cpp └── CMakeLists.txt ├── .gitignore ├── CMakeLists.txt ├── src ├── CMakeLists.txt └── CircularBuffer.h ├── libs └── kiss_fft130 │ ├── COPYING │ ├── kiss_fft.h │ ├── README │ └── _kiss_fft_guts.h └── README.md /modules-and-plug-ins/vamp-plugin/vamp-plugin.list: -------------------------------------------------------------------------------- 1 | _vampGetPluginDescriptor 2 | -------------------------------------------------------------------------------- /doc/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/bc_s.png -------------------------------------------------------------------------------- /doc/html/bc_sd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/bc_sd.png -------------------------------------------------------------------------------- /doc/html/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/bdwn.png -------------------------------------------------------------------------------- /doc/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/nav_f.png -------------------------------------------------------------------------------- /doc/html/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/nav_g.png -------------------------------------------------------------------------------- /doc/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/nav_h.png -------------------------------------------------------------------------------- /doc/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/open.png -------------------------------------------------------------------------------- /doc/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/tab_a.png -------------------------------------------------------------------------------- /doc/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/tab_b.png -------------------------------------------------------------------------------- /doc/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/tab_h.png -------------------------------------------------------------------------------- /doc/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/tab_s.png -------------------------------------------------------------------------------- /doc/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/closed.png -------------------------------------------------------------------------------- /doc/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/doxygen.png -------------------------------------------------------------------------------- /doc/html/ftv2cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2cl.png -------------------------------------------------------------------------------- /doc/html/ftv2doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2doc.png -------------------------------------------------------------------------------- /doc/html/ftv2mo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2mo.png -------------------------------------------------------------------------------- /doc/html/ftv2ns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2ns.png -------------------------------------------------------------------------------- /doc/html/nav_fd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/nav_fd.png -------------------------------------------------------------------------------- /doc/html/nav_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/nav_hd.png -------------------------------------------------------------------------------- /doc/html/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/sync_on.png -------------------------------------------------------------------------------- /doc/html/tab_ad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/tab_ad.png -------------------------------------------------------------------------------- /doc/html/tab_bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/tab_bd.png -------------------------------------------------------------------------------- /doc/html/tab_hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/tab_hd.png -------------------------------------------------------------------------------- /doc/html/tab_sd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/tab_sd.png -------------------------------------------------------------------------------- /doc/html/ftv2blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2blank.png -------------------------------------------------------------------------------- /doc/html/ftv2link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2link.png -------------------------------------------------------------------------------- /doc/html/ftv2mnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2mnode.png -------------------------------------------------------------------------------- /doc/html/ftv2node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2node.png -------------------------------------------------------------------------------- /doc/html/ftv2pnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2pnode.png -------------------------------------------------------------------------------- /doc/html/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/splitbar.png -------------------------------------------------------------------------------- /doc/html/splitbard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/splitbard.png -------------------------------------------------------------------------------- /doc/html/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/sync_off.png -------------------------------------------------------------------------------- /doc/html/ftv2lastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2lastnode.png -------------------------------------------------------------------------------- /doc/html/ftv2splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2splitbar.png -------------------------------------------------------------------------------- /doc/html/ftv2vertline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2vertline.png -------------------------------------------------------------------------------- /doc/html/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/search/close.png -------------------------------------------------------------------------------- /doc/html/ftv2folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2folderopen.png -------------------------------------------------------------------------------- /doc/html/ftv2mlastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2mlastnode.png -------------------------------------------------------------------------------- /doc/html/ftv2plastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2plastnode.png -------------------------------------------------------------------------------- /doc/html/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/search/mag_sel.png -------------------------------------------------------------------------------- /doc/html/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/search/search_l.png -------------------------------------------------------------------------------- /doc/html/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/search/search_m.png -------------------------------------------------------------------------------- /doc/html/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/search/search_r.png -------------------------------------------------------------------------------- /doc/html/ftv2folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adamstark/BTrack/HEAD/doc/html/ftv2folderclosed.png -------------------------------------------------------------------------------- /modules-and-plug-ins/vamp-plugin/vamp-plugin.map: -------------------------------------------------------------------------------- 1 | { 2 | global: vampGetPluginDescriptor; 3 | local: *; 4 | }; 5 | -------------------------------------------------------------------------------- /doc/html/search/classes_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['btrack_0',['BTrack',['../class_b_track.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/classes_62.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['btrack',['BTrack',['../class_b_track.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /tests/main.cpp: -------------------------------------------------------------------------------- 1 | #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN 2 | #define DOCTEST_CONFIG_COLORS_NONE 3 | #include "doctest.h" 4 | -------------------------------------------------------------------------------- /doc/html/search/classes_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['circularbuffer_0',['CircularBuffer',['../class_circular_buffer.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/files_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['circularbuffer_2eh_0',['CircularBuffer.h',['../_circular_buffer_8h.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['fixtempo_0',['fixTempo',['../class_b_track.html#a550829be9b4c58cd53195ec4900c7c71',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_66.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['fixtempo',['fixTempo',['../class_b_track.html#a550829be9b4c58cd53195ec4900c7c71',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['fixtempo_0',['fixTempo',['../class_b_track.html#a550829be9b4c58cd53195ec4900c7c71',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_66.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['fixtempo',['fixTempo',['../class_b_track.html#a550829be9b4c58cd53195ec4900c7c71',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['donotfixtempo_0',['doNotFixTempo',['../class_b_track.html#a22917ea231d2efd5670a764dd5a98983',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_64.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['donotfixtempo',['doNotFixTempo',['../class_b_track.html#a22917ea231d2efd5670a764dd5a98983',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/classes_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onsetdetectionfunction_0',['OnsetDetectionFunction',['../class_onset_detection_function.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/classes_6f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onsetdetectionfunction',['OnsetDetectionFunction',['../class_onset_detection_function.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['resize_0',['resize',['../class_circular_buffer.html#a09d74c64e5e9e0ee13c84663ba9523ea',1,'CircularBuffer']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['donotfixtempo_0',['doNotFixTempo',['../class_b_track.html#a22917ea231d2efd5670a764dd5a98983',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_64.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['donotfixtempo',['doNotFixTempo',['../class_b_track.html#a22917ea231d2efd5670a764dd5a98983',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_9.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['resize_0',['resize',['../class_circular_buffer.html#a09d74c64e5e9e0ee13c84663ba9523ea',1,'CircularBuffer']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/pages_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['btrack_20_2d_20a_20real_2dtime_20beat_20tracker_0',['BTrack - A Real-Time Beat Tracker',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/pages_62.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['btrack_20_2d_20a_20real_2dtime_20beat_20tracker',['BTrack - A Real-Time Beat Tracker',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_75.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['updatehopandframesize',['updateHopAndFrameSize',['../class_b_track.html#a70244e9a5aa8f860533fa56f942b7ede',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['updatehopandframesize_0',['updateHopAndFrameSize',['../class_b_track.html#adda9c1b3a9e3fc02accfacc9d144e33d',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['addsampletoend_0',['addSampleToEnd',['../class_circular_buffer.html#a8e6fa8bf39215a466876a7a2daa1ce22',1,'CircularBuffer']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/files_62.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['btrack_2ecpp',['BTrack.cpp',['../_b_track_8cpp.html',1,'']]], 4 | ['btrack_2eh',['BTrack.h',['../_b_track_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/functions_75.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['updatehopandframesize',['updateHopAndFrameSize',['../class_b_track.html#a70244e9a5aa8f860533fa56f942b7ede',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_77.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['windowtype',['WindowType',['../_onset_detection_function_8h.html#a476342970f954b62d70552bcbb5ee509',1,'OnsetDetectionFunction.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/files_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['btrack_2ecpp_0',['BTrack.cpp',['../_b_track_8cpp.html',1,'']]], 4 | ['btrack_2eh_1',['BTrack.h',['../_b_track_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/functions_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['addsampletoend_0',['addSampleToEnd',['../class_circular_buffer.html#a8e6fa8bf39215a466876a7a2daa1ce22',1,'CircularBuffer']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_b.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['updatehopandframesize_0',['updateHopAndFrameSize',['../class_b_track.html#adda9c1b3a9e3fc02accfacc9d144e33d',1,'BTrack']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['windowtype_0',['WindowType',['../_onset_detection_function_8h.html#a476342970f954b62d70552bcbb5ee509',1,'OnsetDetectionFunction.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/enums_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['windowtype_0',['WindowType',['../_onset_detection_function_8h.html#a476342970f954b62d70552bcbb5ee509',1,'OnsetDetectionFunction.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/enums_77.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['windowtype',['WindowType',['../_onset_detection_function_8h.html#a476342970f954b62d70552bcbb5ee509',1,'OnsetDetectionFunction.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/pages_67.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['gist_20_2d_20a_20real_2dtime_20audio_20analaysis_20library',['Gist - A Real-Time Audio Analaysis Library',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_7e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['_7eonsetdetectionfunction',['~OnsetDetectionFunction',['../class_onset_detection_function.html#aa01f8125c950f3def45154878107e503',1,'OnsetDetectionFunction']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/enums_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onsetdetectionfunctiontype_0',['OnsetDetectionFunctionType',['../_onset_detection_function_8h.html#a36dbf81d14d771e0712d0316ec06612b',1,'OnsetDetectionFunction.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/enums_6f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onsetdetectionfunctiontype',['OnsetDetectionFunctionType',['../_onset_detection_function_8h.html#a36dbf81d14d771e0712d0316ec06612b',1,'OnsetDetectionFunction.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_7e.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['_7eonsetdetectionfunction',['~OnsetDetectionFunction',['../class_onset_detection_function.html#aa01f8125c950f3def45154878107e503',1,'OnsetDetectionFunction']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | python-module/build 2 | unit-tests/Build 3 | xcuserdata 4 | .DS_Store 5 | 6 | *.o 7 | *.dylib 8 | 9 | *.xcworkspace 10 | 11 | modules-and-plug-ins/max-external/build 12 | modules-and-plug-ins/python-module/build 13 | build/ 14 | -------------------------------------------------------------------------------- /doc/html/search/all_63.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['calculateonsetdetectionfunctionsample',['calculateOnsetDetectionFunctionSample',['../class_onset_detection_function.html#a7b8fffe6221d3bd4f6cac82c17db0e92',1,'OnsetDetectionFunction']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_63.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['calculateonsetdetectionfunctionsample',['calculateOnsetDetectionFunctionSample',['../class_onset_detection_function.html#a7b8fffe6221d3bd4f6cac82c17db0e92',1,'OnsetDetectionFunction']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/files_6f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onsetdetectionfunction_2ecpp',['OnsetDetectionFunction.cpp',['../_onset_detection_function_8cpp.html',1,'']]], 4 | ['onsetdetectionfunction_2eh',['OnsetDetectionFunction.h',['../_onset_detection_function_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/files_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onsetdetectionfunction_2ecpp_0',['OnsetDetectionFunction.cpp',['../_onset_detection_function_8cpp.html',1,'']]], 4 | ['onsetdetectionfunction_2eh_1',['OnsetDetectionFunction.h',['../_onset_detection_function_8h.html',1,'']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/all_d.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['_7ebtrack_0',['~BTrack',['../class_b_track.html#a386413d90e57d0a2cf7f18413338bbaf',1,'BTrack']]], 4 | ['_7eonsetdetectionfunction_1',['~OnsetDetectionFunction',['../class_onset_detection_function.html#aa01f8125c950f3def45154878107e503',1,'OnsetDetectionFunction']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/all_70.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['processaudioframe',['processAudioFrame',['../class_b_track.html#abb7ce7253095e6f859ef7b30f06ce051',1,'BTrack']]], 4 | ['processonsetdetectionfunctionsample',['processOnsetDetectionFunctionSample',['../class_b_track.html#a6fab18732bef8c87152e93dec9e4f854',1,'BTrack']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/all_73.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['setonsetdetectionfunctiontype',['setOnsetDetectionFunctionType',['../class_onset_detection_function.html#a51fdab443155aaaa935956645e8f9131',1,'OnsetDetectionFunction']]], 4 | ['settempo',['setTempo',['../class_b_track.html#a96cf4088e40dff66ce15ada1f671a186',1,'BTrack']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/all_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['processaudioframe_0',['processAudioFrame',['../class_b_track.html#abb7ce7253095e6f859ef7b30f06ce051',1,'BTrack']]], 4 | ['processonsetdetectionfunctionsample_1',['processOnsetDetectionFunctionSample',['../class_b_track.html#a6fab18732bef8c87152e93dec9e4f854',1,'BTrack']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/functions_70.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['processaudioframe',['processAudioFrame',['../class_b_track.html#abb7ce7253095e6f859ef7b30f06ce051',1,'BTrack']]], 4 | ['processonsetdetectionfunctionsample',['processOnsetDetectionFunctionSample',['../class_b_track.html#a6fab18732bef8c87152e93dec9e4f854',1,'BTrack']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/functions_c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['_7ebtrack_0',['~BTrack',['../class_b_track.html#a386413d90e57d0a2cf7f18413338bbaf',1,'BTrack']]], 4 | ['_7eonsetdetectionfunction_1',['~OnsetDetectionFunction',['../class_onset_detection_function.html#aa01f8125c950f3def45154878107e503',1,'OnsetDetectionFunction']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/functions_73.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['setonsetdetectionfunctiontype',['setOnsetDetectionFunctionType',['../class_onset_detection_function.html#a51fdab443155aaaa935956645e8f9131',1,'OnsetDetectionFunction']]], 4 | ['settempo',['setTempo',['../class_b_track.html#a96cf4088e40dff66ce15ada1f671a186',1,'BTrack']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/functions_8.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['processaudioframe_0',['processAudioFrame',['../class_b_track.html#abb7ce7253095e6f859ef7b30f06ce051',1,'BTrack']]], 4 | ['processonsetdetectionfunctionsample_1',['processOnsetDetectionFunctionSample',['../class_b_track.html#a6fab18732bef8c87152e93dec9e4f854',1,'BTrack']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required (VERSION 3.12) 2 | project (BTrack VERSION 1.0.4) 3 | 4 | set (CMAKE_CXX_STANDARD 11) 5 | 6 | option (BUILD_TESTS "Build tests" OFF) 7 | 8 | add_subdirectory (src) 9 | 10 | if (BUILD_TESTS) 11 | enable_testing() 12 | add_subdirectory (tests) 13 | endif (BUILD_TESTS) 14 | 15 | set (CMAKE_SUPPRESS_REGENERATION true) 16 | 17 | -------------------------------------------------------------------------------- /doc/html/search/functions_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['calculateonsetdetectionfunctionsample_0',['calculateOnsetDetectionFunctionSample',['../class_onset_detection_function.html#a7b8fffe6221d3bd4f6cac82c17db0e92',1,'OnsetDetectionFunction']]], 4 | ['circularbuffer_1',['CircularBuffer',['../class_circular_buffer.html#a8c5de0e610bb50bac684f4707e23431c',1,'CircularBuffer']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /modules-and-plug-ins/vamp-plugin/INSTALL.md: -------------------------------------------------------------------------------- 1 | BTrack - Vamp Plug-in 2 | ================================= 3 | 4 | See the main README for other information including usage and license information. 5 | 6 | Installation 7 | ------------ 8 | 9 | On the command line, just type: 10 | 11 | make 12 | 13 | and then move the resulting 'btrack.dylib' to your Vamp plug-ins folder. 14 | -------------------------------------------------------------------------------- /doc/html/search/all_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['initialise_0',['initialise',['../class_onset_detection_function.html#a527d4f433d4f7bcd098b54190ee89297',1,'OnsetDetectionFunction::initialise(int hopSize, int frameSize)'],['../class_onset_detection_function.html#a3fb3c827993aa854b85f4d4c44460a29',1,'OnsetDetectionFunction::initialise(int hopSize, int frameSize, int onsetDetectionFunctionType, int windowType)']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_69.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['initialise',['initialise',['../class_onset_detection_function.html#ab3379d150c375e4a7e525f326ce5a2e6',1,'OnsetDetectionFunction::initialise(int hopSize_, int frameSize_)'],['../class_onset_detection_function.html#a4f9e1352bfdcd032bdd8193cc72489ba',1,'OnsetDetectionFunction::initialise(int hopSize_, int frameSize_, int onsetDetectionFunctionType_, int windowType_)']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_6.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['initialise_0',['initialise',['../class_onset_detection_function.html#a527d4f433d4f7bcd098b54190ee89297',1,'OnsetDetectionFunction::initialise(int hopSize, int frameSize)'],['../class_onset_detection_function.html#a3fb3c827993aa854b85f4d4c44460a29',1,'OnsetDetectionFunction::initialise(int hopSize, int frameSize, int onsetDetectionFunctionType, int windowType)']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_69.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['initialise',['initialise',['../class_onset_detection_function.html#ab3379d150c375e4a7e525f326ce5a2e6',1,'OnsetDetectionFunction::initialise(int hopSize_, int frameSize_)'],['../class_onset_detection_function.html#a4f9e1352bfdcd032bdd8193cc72489ba',1,'OnsetDetectionFunction::initialise(int hopSize_, int frameSize_, int onsetDetectionFunctionType_, int windowType_)']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/all_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['setonsetdetectionfunctiontype_0',['setOnsetDetectionFunctionType',['../class_onset_detection_function.html#ac607feee669f3d3f4015662eec717f6a',1,'OnsetDetectionFunction']]], 4 | ['settempo_1',['setTempo',['../class_b_track.html#a96cf4088e40dff66ce15ada1f671a186',1,'BTrack']]], 5 | ['size_2',['size',['../class_circular_buffer.html#ad452b3b0f7703927ce1f3befd8f7512f',1,'CircularBuffer']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/html/search/functions_a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['setonsetdetectionfunctiontype_0',['setOnsetDetectionFunctionType',['../class_onset_detection_function.html#ac607feee669f3d3f4015662eec717f6a',1,'OnsetDetectionFunction']]], 4 | ['settempo_1',['setTempo',['../class_b_track.html#a96cf4088e40dff66ce15ada1f671a186',1,'BTrack']]], 5 | ['size_2',['size',['../class_circular_buffer.html#ad452b3b0f7703927ce1f3befd8f7512f',1,'CircularBuffer']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories (doctest) 2 | include_directories (${BTrack_SOURCE_DIR}/src) 3 | include_directories (${BTrack_SOURCE_DIR}/libs/kiss_fft130) 4 | 5 | add_executable (Tests 6 | main.cpp 7 | ${BTrack_SOURCE_DIR}/libs/kiss_fft130/kiss_fft.c 8 | Test_BTrack.cpp 9 | ) 10 | 11 | target_link_libraries (Tests BTrack) 12 | target_compile_features (Tests PRIVATE cxx_std_17) 13 | add_test (NAME Tests COMMAND Tests) -------------------------------------------------------------------------------- /doc/html/search/functions_6f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onsetdetectionfunction',['OnsetDetectionFunction',['../class_onset_detection_function.html#a1af5db39698d413cbb892b3a6de7aee5',1,'OnsetDetectionFunction::OnsetDetectionFunction(int hopSize_, int frameSize_)'],['../class_onset_detection_function.html#ad2c23f2d1ac346da8289712df173b190',1,'OnsetDetectionFunction::OnsetDetectionFunction(int hopSize_, int frameSize_, int onsetDetectionFunctionType_, int windowType_)']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /doc/html/search/functions_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['beatdueincurrentframe_0',['beatDueInCurrentFrame',['../class_b_track.html#ac92eaea0e42dd18c79de10bf852d7f4a',1,'BTrack']]], 4 | ['btrack_1',['BTrack',['../class_b_track.html#a243ac408666ce0301fecd9b0a2a6f307',1,'BTrack::BTrack()'],['../class_b_track.html#a8bc0e4933dcec6ced684d69d9c9e5014',1,'BTrack::BTrack(int hopSize)'],['../class_b_track.html#a7196e2dcb729c1bd6e09a9494a6be1f4',1,'BTrack::BTrack(int hopSize, int frameSize)']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/functions_62.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['beatdueincurrentframe',['beatDueInCurrentFrame',['../class_b_track.html#ac92eaea0e42dd18c79de10bf852d7f4a',1,'BTrack']]], 4 | ['btrack',['BTrack',['../class_b_track.html#a243ac408666ce0301fecd9b0a2a6f307',1,'BTrack::BTrack()'],['../class_b_track.html#ac4dbda7c90ce1a3080def2d5da875171',1,'BTrack::BTrack(int hopSize_)'],['../class_b_track.html#afce9e207a2f6ff71d96125dee16797de',1,'BTrack::BTrack(int hopSize_, int frameSize_)']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /doc/html/search/all_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['calculateonsetdetectionfunctionsample_0',['calculateOnsetDetectionFunctionSample',['../class_onset_detection_function.html#a7b8fffe6221d3bd4f6cac82c17db0e92',1,'OnsetDetectionFunction']]], 4 | ['circularbuffer_1',['CircularBuffer',['../class_circular_buffer.html',1,'CircularBuffer'],['../class_circular_buffer.html#a8c5de0e610bb50bac684f4707e23431c',1,'CircularBuffer::CircularBuffer()']]], 5 | ['circularbuffer_2eh_2',['CircularBuffer.h',['../_circular_buffer_8h.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /doc/html/search/searchdata.js: -------------------------------------------------------------------------------- 1 | var indexSectionsWithContent = 2 | { 3 | 0: "abcdfgioprsuw~", 4 | 1: "bco", 5 | 2: "bco", 6 | 3: "abcdfgioprsu~", 7 | 4: "ow", 8 | 5: "b" 9 | }; 10 | 11 | var indexSectionNames = 12 | { 13 | 0: "all", 14 | 1: "classes", 15 | 2: "files", 16 | 3: "functions", 17 | 4: "enums", 18 | 5: "pages" 19 | }; 20 | 21 | var indexSectionLabels = 22 | { 23 | 0: "All", 24 | 1: "Classes", 25 | 2: "Files", 26 | 3: "Functions", 27 | 4: "Enumerations", 28 | 5: "Pages" 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /doc/html/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
No Matches
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/html/search/all_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['getbeattimeinseconds_0',['getBeatTimeInSeconds',['../class_b_track.html#aa66d0b9dfb4408e8cf84398f03b60a56',1,'BTrack']]], 4 | ['getcurrenttempoestimate_1',['getCurrentTempoEstimate',['../class_b_track.html#a17cea0a4dff3908660e4117e9a6c42bb',1,'BTrack']]], 5 | ['gethopsize_2',['getHopSize',['../class_b_track.html#ac06aa079977062bfa2930cdca45e69fb',1,'BTrack']]], 6 | ['getlatestcumulativescorevalue_3',['getLatestCumulativeScoreValue',['../class_b_track.html#a7ccb5059d0f00e3217ea686e4c1e156d',1,'BTrack']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /doc/html/search/functions_5.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['getbeattimeinseconds_0',['getBeatTimeInSeconds',['../class_b_track.html#aa66d0b9dfb4408e8cf84398f03b60a56',1,'BTrack']]], 4 | ['getcurrenttempoestimate_1',['getCurrentTempoEstimate',['../class_b_track.html#a17cea0a4dff3908660e4117e9a6c42bb',1,'BTrack']]], 5 | ['gethopsize_2',['getHopSize',['../class_b_track.html#ac06aa079977062bfa2930cdca45e69fb',1,'BTrack']]], 6 | ['getlatestcumulativescorevalue_3',['getLatestCumulativeScoreValue',['../class_b_track.html#a7ccb5059d0f00e3217ea686e4c1e156d',1,'BTrack']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /modules-and-plug-ins/python-module/INSTALL.md: -------------------------------------------------------------------------------- 1 | BTrack - Python Module 2 | ================================= 3 | 4 | See the main README for other information including usage and license information. 5 | 6 | Installation 7 | ------------ 8 | 9 | On the command line, type: 10 | 11 | python setup.py build 12 | 13 | and then: 14 | 15 | python setup.py install 16 | 17 | You may need to prefix the second command with 'sudo', depending upon your system configuration. 18 | 19 | 20 | Usage 21 | ----- 22 | 23 | See the example.py script for basic usage of the Python module. -------------------------------------------------------------------------------- /doc/html/search/functions_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onsetdetectionfunction_0',['OnsetDetectionFunction',['../class_onset_detection_function.html#a507e6258c5e703c989a6a58d2d8f4dcb',1,'OnsetDetectionFunction::OnsetDetectionFunction(int hopSize, int frameSize)'],['../class_onset_detection_function.html#a89f96562c098e118eb879672b43d4ed0',1,'OnsetDetectionFunction::OnsetDetectionFunction(int hopSize, int frameSize, int onsetDetectionFunctionType, int windowType)']]], 4 | ['operator_5b_5d_1',['operator[]',['../class_circular_buffer.html#a5b0c486a7eb76bae0d1a0d6e459d0f5a',1,'CircularBuffer']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories (${CMAKE_CURRENT_SOURCE_DIR}/src) 2 | include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../libs/kiss_fft130) 3 | include_directories (/opt/homebrew/include) 4 | 5 | # Find libsamplerate 6 | find_library(LIBSAMPLERATE_LIBRARIES NAMES samplerate) 7 | 8 | add_library ( 9 | BTrack STATIC 10 | BTrack.cpp 11 | BTrack.h 12 | OnsetDetectionFunction.cpp 13 | OnsetDetectionFunction.h 14 | CircularBuffer.h 15 | ) 16 | 17 | source_group (Source src) 18 | 19 | target_compile_definitions (BTrack PUBLIC -DUSE_KISS_FFT) 20 | 21 | # Link against libsamplerate 22 | target_link_libraries(BTrack PRIVATE ${LIBSAMPLERATE_LIBRARIES}) -------------------------------------------------------------------------------- /doc/html/search/all_67.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['getbeattimeinseconds',['getBeatTimeInSeconds',['../class_b_track.html#aa66d0b9dfb4408e8cf84398f03b60a56',1,'BTrack::getBeatTimeInSeconds(long frameNumber, int hopSize, int fs)'],['../class_b_track.html#a1ebb4312fed8cf1de5353fef68c0fe74',1,'BTrack::getBeatTimeInSeconds(int frameNumber, int hopSize, int fs)']]], 4 | ['getcurrenttempoestimate',['getCurrentTempoEstimate',['../class_b_track.html#a17cea0a4dff3908660e4117e9a6c42bb',1,'BTrack']]], 5 | ['gethopsize',['getHopSize',['../class_b_track.html#ac06aa079977062bfa2930cdca45e69fb',1,'BTrack']]], 6 | ['getlatestcumulativescorevalue',['getLatestCumulativeScoreValue',['../class_b_track.html#a7ccb5059d0f00e3217ea686e4c1e156d',1,'BTrack']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /doc/html/search/functions_67.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['getbeattimeinseconds',['getBeatTimeInSeconds',['../class_b_track.html#aa66d0b9dfb4408e8cf84398f03b60a56',1,'BTrack::getBeatTimeInSeconds(long frameNumber, int hopSize, int fs)'],['../class_b_track.html#a1ebb4312fed8cf1de5353fef68c0fe74',1,'BTrack::getBeatTimeInSeconds(int frameNumber, int hopSize, int fs)']]], 4 | ['getcurrenttempoestimate',['getCurrentTempoEstimate',['../class_b_track.html#a17cea0a4dff3908660e4117e9a6c42bb',1,'BTrack']]], 5 | ['gethopsize',['getHopSize',['../class_b_track.html#ac06aa079977062bfa2930cdca45e69fb',1,'BTrack']]], 6 | ['getlatestcumulativescorevalue',['getLatestCumulativeScoreValue',['../class_b_track.html#a7ccb5059d0f00e3217ea686e4c1e156d',1,'BTrack']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /doc/html/search/all_62.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['beatdueincurrentframe',['beatDueInCurrentFrame',['../class_b_track.html#ac92eaea0e42dd18c79de10bf852d7f4a',1,'BTrack']]], 4 | ['btrack',['BTrack',['../class_b_track.html',1,'BTrack'],['../class_b_track.html#a243ac408666ce0301fecd9b0a2a6f307',1,'BTrack::BTrack()'],['../class_b_track.html#ac4dbda7c90ce1a3080def2d5da875171',1,'BTrack::BTrack(int hopSize_)'],['../class_b_track.html#afce9e207a2f6ff71d96125dee16797de',1,'BTrack::BTrack(int hopSize_, int frameSize_)']]], 5 | ['btrack_2ecpp',['BTrack.cpp',['../_b_track_8cpp.html',1,'']]], 6 | ['btrack_2eh',['BTrack.h',['../_b_track_8h.html',1,'']]], 7 | ['btrack_20_2d_20a_20real_2dtime_20beat_20tracker',['BTrack - A Real-Time Beat Tracker',['../index.html',1,'']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /doc/html/search/all_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['beatdueincurrentframe_0',['beatDueInCurrentFrame',['../class_b_track.html#ac92eaea0e42dd18c79de10bf852d7f4a',1,'BTrack']]], 4 | ['btrack_1',['BTrack',['../class_b_track.html',1,'BTrack'],['../class_b_track.html#a243ac408666ce0301fecd9b0a2a6f307',1,'BTrack::BTrack()'],['../class_b_track.html#a8bc0e4933dcec6ced684d69d9c9e5014',1,'BTrack::BTrack(int hopSize)'],['../class_b_track.html#a7196e2dcb729c1bd6e09a9494a6be1f4',1,'BTrack::BTrack(int hopSize, int frameSize)']]], 5 | ['btrack_20_2d_20a_20real_2dtime_20beat_20tracker_2',['BTrack - A Real-Time Beat Tracker',['../index.html',1,'']]], 6 | ['btrack_2ecpp_3',['BTrack.cpp',['../_b_track_8cpp.html',1,'']]], 7 | ['btrack_2eh_4',['BTrack.h',['../_b_track_8h.html',1,'']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /doc/html/search/mag.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 14 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /doc/html/search/mag_d.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 14 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /doc/html/search/all_6f.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onsetdetectionfunction',['OnsetDetectionFunction',['../class_onset_detection_function.html',1,'OnsetDetectionFunction'],['../class_onset_detection_function.html#a1af5db39698d413cbb892b3a6de7aee5',1,'OnsetDetectionFunction::OnsetDetectionFunction(int hopSize_, int frameSize_)'],['../class_onset_detection_function.html#ad2c23f2d1ac346da8289712df173b190',1,'OnsetDetectionFunction::OnsetDetectionFunction(int hopSize_, int frameSize_, int onsetDetectionFunctionType_, int windowType_)']]], 4 | ['onsetdetectionfunction_2ecpp',['OnsetDetectionFunction.cpp',['../_onset_detection_function_8cpp.html',1,'']]], 5 | ['onsetdetectionfunction_2eh',['OnsetDetectionFunction.h',['../_onset_detection_function_8h.html',1,'']]], 6 | ['onsetdetectionfunctiontype',['OnsetDetectionFunctionType',['../_onset_detection_function_8h.html#a36dbf81d14d771e0712d0316ec06612b',1,'OnsetDetectionFunction.h']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /doc/html/search/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 12 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /doc/html/search/all_7.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['onsetdetectionfunction_0',['OnsetDetectionFunction',['../class_onset_detection_function.html',1,'OnsetDetectionFunction'],['../class_onset_detection_function.html#a507e6258c5e703c989a6a58d2d8f4dcb',1,'OnsetDetectionFunction::OnsetDetectionFunction(int hopSize, int frameSize)'],['../class_onset_detection_function.html#a89f96562c098e118eb879672b43d4ed0',1,'OnsetDetectionFunction::OnsetDetectionFunction(int hopSize, int frameSize, int onsetDetectionFunctionType, int windowType)']]], 4 | ['onsetdetectionfunction_2ecpp_1',['OnsetDetectionFunction.cpp',['../_onset_detection_function_8cpp.html',1,'']]], 5 | ['onsetdetectionfunction_2eh_2',['OnsetDetectionFunction.h',['../_onset_detection_function_8h.html',1,'']]], 6 | ['onsetdetectionfunctiontype_3',['OnsetDetectionFunctionType',['../_onset_detection_function_8h.html#a36dbf81d14d771e0712d0316ec06612b',1,'OnsetDetectionFunction.h']]], 7 | ['operator_5b_5d_4',['operator[]',['../class_circular_buffer.html#a5b0c486a7eb76bae0d1a0d6e459d0f5a',1,'CircularBuffer']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /modules-and-plug-ins/python-module/setup.py: -------------------------------------------------------------------------------- 1 | # setup.py 2 | # build command : python setup.py build build_ext --inplace 3 | from numpy.distutils.core import setup, Extension 4 | import os, numpy, platform 5 | 6 | if platform.machine() == 'arm64': 7 | include_path = '/opt/homebrew/include' 8 | library_path = '/opt/homebrew/lib' 9 | else: 10 | include_path = '/usr/local/include' 11 | library_path = '/usr/local/lib' 12 | 13 | name = 'btrack' 14 | sources = [ 15 | 'btrack_python_module.cpp', 16 | '../../src/OnsetDetectionFunction.cpp', 17 | '../../src/BTrack.cpp' 18 | ] 19 | 20 | sources.append ('../../libs/kiss_fft130/kiss_fft.c') 21 | 22 | include_dirs = [ 23 | numpy.get_include(), 24 | include_path 25 | ] 26 | 27 | include_dirs.append ('../../libs/kiss_fft130') 28 | 29 | setup(name = 'BTrack', 30 | include_dirs = include_dirs, 31 | ext_modules = [Extension(name, sources,libraries = ['fftw3','samplerate'],library_dirs = [library_path],define_macros=[ 32 | ('USE_FFTW', None)])] 33 | ) -------------------------------------------------------------------------------- /doc/html/search/all_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_64.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_66.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_67.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_69.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_6f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_70.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_75.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_77.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/all_7e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/enums_6f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/enums_77.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/files_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/files_6f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/pages_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/pages_67.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/classes_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/classes_6f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_64.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_66.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_67.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_69.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_6f.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_70.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_75.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/functions_7e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
Loading...
11 |
12 | 15 |
Searching...
16 |
No Matches
17 | 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/html/search/mag_sel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 13 | 15 | 21 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /doc/html/search/mag_seld.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 13 | 15 | 21 | 26 | 31 | 32 | -------------------------------------------------------------------------------- /modules-and-plug-ins/max-external/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${PRODUCT_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.cycling74.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | ${PRODUCT_VERSION} 15 | CFBundlePackageType 16 | iLaX 17 | CFBundleSignature 18 | max2 19 | CFBundleVersion 20 | 1.0 21 | 22 | CFBundleVersion 23 | ${PRODUCT_VERSION} 24 | CFBundleShortVersionString 25 | ${PRODUCT_VERSION} 26 | CFBundleLongVersionString 27 | ${PRODUCT_NAME} ${PRODUCT_VERSION}, Copyright 2013 Cycling '74 28 | 29 | CSResourcesFileMapped 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /modules-and-plug-ins/python-module/example.py: -------------------------------------------------------------------------------- 1 | # need scikits audiolab for reading audio files 2 | from scikits.audiolab import wavread 3 | 4 | # import numpy (needed to convert stereo audio to mono) 5 | import numpy as np 6 | 7 | # need to import btrack, our beat tracker 8 | import btrack 9 | 10 | # set the path to an audio file on your machine 11 | audioFilePath = "/path/to/your/audioFile.wav" 12 | 13 | # read the audio file 14 | audioData, fs, enc = wavread (audioFilePath) # extract audio from file 15 | 16 | # convert to mono if need be 17 | if (audioData[0].size == 2): 18 | print "converting to mono" 19 | audioData = np.average (audioData, axis = 1) 20 | 21 | # ========================================== 22 | # Usage A: track beats from audio 23 | beats = btrack.trackBeats (audioData) 24 | 25 | # ========================================== 26 | # Usage B: extract the onset detection function 27 | onsetDF = btrack.calculateOnsetDF (audioData) 28 | 29 | # ========================================== 30 | # Usage C: track beats from the onset detection function (calculated in Usage B) 31 | ODFbeats = btrack.trackBeatsFromOnsetDF (onsetDF) 32 | -------------------------------------------------------------------------------- /modules-and-plug-ins/vamp-plugin/plugins.cpp: -------------------------------------------------------------------------------- 1 | 2 | // This is a skeleton file for use in creating your own plugin 3 | // libraries. Replace MyPlugin and myPlugin throughout with the name 4 | // of your first plugin class, and fill in the gaps as appropriate. 5 | 6 | 7 | #include 8 | #include 9 | 10 | #include "BTrackVamp.h" 11 | 12 | 13 | // Declare one static adapter here for each plugin class in this library. 14 | 15 | static Vamp::PluginAdapter btrackVampAdapter; 16 | 17 | 18 | // This is the entry-point for the library, and the only function that 19 | // needs to be publicly exported. 20 | 21 | const VampPluginDescriptor * 22 | vampGetPluginDescriptor(unsigned int version, unsigned int index) 23 | { 24 | if (version < 1) return 0; 25 | 26 | // Return a different plugin adaptor's descriptor for each index, 27 | // and return 0 for the first index after you run out of plugins. 28 | // (That's how the host finds out how many plugins are in this 29 | // library.) 30 | 31 | switch (index) { 32 | case 0: return btrackVampAdapter.getDescriptor(); 33 | default: return 0; 34 | } 35 | } 36 | 37 | 38 | -------------------------------------------------------------------------------- /modules-and-plug-ins/max-external/README.md: -------------------------------------------------------------------------------- 1 | BTrack Max External: btrack~ 2 | ============================ 3 | 4 | 5 | Build Instructions 6 | ------------------ 7 | 8 | Edit the file maxmspsdk.xcconfig in this directory, setting the path to the c74support folder in your version of the Max SDK: 9 | 10 | 11 | C74SUPPORT = $(SRCROOT)/../../../SDKs/MaxSDK-6.1.4/c74support/ 12 | 13 | 14 | Also, to compile BTrack, you will require the following libraries: 15 | 16 | * FFTW 17 | * libsamplerate 18 | 19 | Documentation 20 | ------------- 21 | 22 | Please see the following two files for examples of how to use BTrack in Max: 23 | 24 | * btrack~.maxhelp 25 | * Beat Tracking Example.maxpat 26 | 27 | License 28 | ------- 29 | 30 | Copyright (c) 2014 Queen Mary University of London 31 | 32 | This program is free software: you can redistribute it and/or modify 33 | it under the terms of the GNU General Public License as published by 34 | the Free Software Foundation, either version 3 of the License, or 35 | (at your option) any later version. 36 | 37 | This program is distributed in the hope that it will be useful, 38 | but WITHOUT ANY WARRANTY; without even the implied warranty of 39 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 40 | GNU General Public License for more details. 41 | 42 | You should have received a copy of the GNU General Public License 43 | along with this program. If not, see . -------------------------------------------------------------------------------- /libs/kiss_fft130/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003-2010 Mark Borgerding 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | -------------------------------------------------------------------------------- /doc/html/doc.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/html/docd.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /modules-and-plug-ins/vamp-plugin/BTrackVamp.h: -------------------------------------------------------------------------------- 1 | 2 | // This is a skeleton file for use in creating your own plugin 3 | // libraries. Replace MyPlugin and myPlugin throughout with the name 4 | // of your first plugin class, and fill in the gaps as appropriate. 5 | 6 | 7 | // Remember to use a different guard symbol in each header! 8 | #ifndef _BTRACK_VAMP_H_ 9 | #define _BTRACK_VAMP_H_ 10 | 11 | #include 12 | #include "../../src/BTrack.h" 13 | 14 | using std::string; 15 | 16 | 17 | class BTrackVamp : public Vamp::Plugin 18 | { 19 | public: 20 | BTrackVamp(float inputSampleRate); 21 | virtual ~BTrackVamp(); 22 | 23 | string getIdentifier() const; 24 | string getName() const; 25 | string getDescription() const; 26 | string getMaker() const; 27 | int getPluginVersion() const; 28 | string getCopyright() const; 29 | 30 | InputDomain getInputDomain() const; 31 | size_t getPreferredBlockSize() const; 32 | size_t getPreferredStepSize() const; 33 | size_t getMinChannelCount() const; 34 | size_t getMaxChannelCount() const; 35 | 36 | ParameterList getParameterDescriptors() const; 37 | float getParameter(string identifier) const; 38 | void setParameter(string identifier, float value); 39 | 40 | ProgramList getPrograms() const; 41 | string getCurrentProgram() const; 42 | void selectProgram(string name); 43 | 44 | OutputList getOutputDescriptors() const; 45 | 46 | bool initialise(size_t channels, size_t stepSize, size_t blockSize); 47 | void reset(); 48 | 49 | FeatureSet process(const float *const *inputBuffers, 50 | Vamp::RealTime timestamp); 51 | 52 | FeatureSet getRemainingFeatures(); 53 | 54 | protected: 55 | // plugin-specific data and methods go here 56 | 57 | BTrack b; 58 | 59 | int m_stepSize; 60 | int m_blockSize; 61 | }; 62 | 63 | 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /doc/html/menudata.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the JavaScript code in this file. 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (C) 1997-2020 by Dimitri van Heesch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 9 | and associated documentation files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @licend The above is the entire license notice for the JavaScript code in this file 24 | */ 25 | var menudata={children:[ 26 | {text:"Main Page",url:"index.html"}, 27 | {text:"Classes",url:"annotated.html",children:[ 28 | {text:"Class List",url:"annotated.html"}, 29 | {text:"Class Index",url:"classes.html"}, 30 | {text:"Class Members",url:"functions.html",children:[ 31 | {text:"All",url:"functions.html"}, 32 | {text:"Functions",url:"functions_func.html"}]}]}, 33 | {text:"Files",url:"files.html",children:[ 34 | {text:"File List",url:"files.html"}, 35 | {text:"File Members",url:"globals.html",children:[ 36 | {text:"All",url:"globals.html"}, 37 | {text:"Enumerations",url:"globals_enum.html"}]}]}]} 38 | -------------------------------------------------------------------------------- /doc/mainpage.dox: -------------------------------------------------------------------------------- 1 | /** 2 | * \mainpage BTrack - A Real-Time Beat Tracker 3 | * 4 | * A real-time beat tracker, implemented in C++. 5 | * 6 | * Written by Adam Stark, Matthew Davies and Mark Plumbley. 7 | * 8 | * License 9 | * ------- 10 | * 11 | * BTrack is made available under the GNU General Public License, version 3. Please see the included LICENSE.txt for more details. 12 | * 13 | * Usage - C++ 14 | * ----------- 15 | * 16 | * **STEP 1** 17 | * 18 | * Include the BTrack header file as follows: 19 | * 20 | * #include "BTrack.h" 21 | * 22 | * **STEP 2** 23 | * 24 | * Instantiate the algorithm by one of the following: 25 | * 26 | * 27 | * // to use the default 512 hop size and 1024 frame size 28 | * BTrack b; 29 | * 30 | * or: 31 | * 32 | * // to specify a hop size (e.g. 512) and have a frame size of 2 x the hop size 33 | * BTrack b(512); 34 | * 35 | * or: 36 | * 37 | * // to specify both the hop size and frame size 38 | * BTrack b(512,1024); 39 | * 40 | * **STEP 3.1 - Audio Input** 41 | * 42 | * In the processing loop, fill a double precision array with one frame of audio samples (as determined in step 2): 43 | * 44 | * double *frame; 45 | * 46 | * // ! 47 | * // do something here to fill the frame with audio samples 48 | * // ! 49 | * 50 | * and then call: 51 | * 52 | * b.processAudioFrame(frame); 53 | * 54 | * and to check for beats, simply call: 55 | * 56 | * if (b.beatDueInCurrentFrame()) 57 | * { 58 | * // do something on the beat 59 | * } 60 | * 61 | * **STEP 3.2 - Onset Detection Function Input** 62 | * 63 | * The algorithm can process onset detection function samples. Given a double precision onset detection function sample called 'newSamples', at each step, call: 64 | * 65 | * b.processOnsetDetectionFunctionSample(newSample); 66 | * 67 | * and then check for beats with: 68 | * 69 | * if (b.beatDueInCurrentFrame()) 70 | * { 71 | * // do something on the beat 72 | * } 73 | * 74 | * For any questions, please email Adam Stark (email at http://www.adamstark.co.uk). 75 | */ -------------------------------------------------------------------------------- /doc/html/folderclosed.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/html/folderclosedd.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/CircularBuffer.h: -------------------------------------------------------------------------------- 1 | //======================================================================= 2 | /** @file CircularBuffer.h 3 | * @brief A circular buffer 4 | * @author Adam Stark 5 | * @copyright Copyright (C) 2008-2014 Queen Mary University of London 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program. If not, see . 19 | */ 20 | //======================================================================= 21 | 22 | #ifndef CircularBuffer_h 23 | #define CircularBuffer_h 24 | 25 | #include 26 | 27 | //======================================================================= 28 | /** A circular buffer that allows you to add new samples to the end 29 | * whilst removing them from the beginning. This is implemented in an 30 | * efficient way which doesn't involve any memory allocation as samples 31 | * are added to the end of the buffer 32 | */ 33 | class CircularBuffer 34 | { 35 | public: 36 | 37 | /** Constructor */ 38 | CircularBuffer() 39 | : writeIndex (0) 40 | { 41 | 42 | } 43 | 44 | /** Access the ith element in the buffer */ 45 | double &operator[] (int i) 46 | { 47 | int index = (i + writeIndex) % buffer.size(); 48 | return buffer[index]; 49 | } 50 | 51 | /** Add a new sample to the end of the buffer */ 52 | void addSampleToEnd (double v) 53 | { 54 | buffer[writeIndex] = v; 55 | writeIndex = (writeIndex + 1) % buffer.size(); 56 | } 57 | 58 | /** Resize the buffer */ 59 | void resize (int size) 60 | { 61 | buffer.resize (size); 62 | std::fill (buffer.begin(), buffer.end(), 0.0); 63 | writeIndex = 0; 64 | } 65 | 66 | /** Returns the size of the buffer */ 67 | int size() 68 | { 69 | return static_cast (buffer.size()); 70 | } 71 | 72 | private: 73 | 74 | std::vector buffer; 75 | int writeIndex; 76 | }; 77 | 78 | #endif /* CircularBuffer_hpp */ 79 | -------------------------------------------------------------------------------- /doc/html/folderopend.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /doc/html/folderopen.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | 11 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /modules-and-plug-ins/max-external/maxmspsdk.xcconfig: -------------------------------------------------------------------------------- 1 | // Xcode target configuration settings for the Max 6 SDK 2 | // Used as the basis for Xcode projects to build Max externals. 3 | // 4 | // Changes to the settings in this file will be applied to all SDK examples 5 | // To change settings for only one of the examples, override the settings using 6 | // Xcode's target inspector. 7 | // 8 | // by Timothy Place 9 | // Copyright © 2012, Cycling '74 10 | 11 | 12 | // Name & Version 13 | PRODUCT_NAME = $(PROJECT_NAME) 14 | PRODUCT_VERSION = 6.1.4 15 | //ARCHS = i386 x86_64 16 | ARCHS = x86_64 17 | 18 | 19 | // Paths 20 | 21 | // =========================================================================== 22 | // NOTE: SET PATH TO YOUR C74SUPPORT FOLDER IN YOUR MAX SDK HERE 23 | 24 | C74SUPPORT = $(SRCROOT)/../../../SDKs/MaxSDK-6.1.4/c74support/ 25 | 26 | // =========================================================================== 27 | 28 | HEADER_SEARCH_PATHS = "$(C74SUPPORT)/max-includes" "$(C74SUPPORT)/msp-includes" "$(C74SUPPORT)/jit-includes" 29 | FRAMEWORK_SEARCH_PATHS = "$(C74SUPPORT)/max-includes" "$(C74SUPPORT)/msp-includes" "$(C74SUPPORT)/jit-includes" 30 | DSTROOT = $(SRCROOT)/build 31 | // (This next path is relative to DSTROOT) 32 | INSTALL_PATH = / 33 | 34 | 35 | // Special Files 36 | GCC_PREFIX_HEADER = $(C74SUPPORT)/max-includes/macho-prefix.pch 37 | INFOPLIST_FILE = $(SRCROOT)/Info.plist 38 | 39 | 40 | // Architecture and Deployment 41 | ARCHS = i386 x86_64 42 | 43 | // The following section sets the Mac SDK version to be used. 44 | // For most projects this has little to no impact because there are no direct dependencies on OS function calls. 45 | // In those projects with OS function calls, it should be okay to use the most recent SDK version because the 46 | // MACOSX_DEPLOYMENT_TARGET will disable functionality that is unavailable in the older target OS. 47 | // For this reason, the SDKROOT variable is commented out, telling Xcode to use the default (which is the most recent SDK). 48 | // 49 | // If you do need to define the SDKROOT, different versions of Xcode have varying syntax and varying versions of the SDK present. 50 | 51 | // Xcode 3.x 52 | // SDKROOT = $(DEVELOPER_DIR)/SDKs/MacOSX10.5.sdk 53 | 54 | // Xcode 4.0 - Xcode 4.2 55 | // SDKROOT = $(DEVELOPER_DIR)/SDKs/MacOSX10.6.sdk 56 | 57 | // Xcode 4.3+ 58 | // SDKROOT = macosx10.6 59 | 60 | MACOSX_DEPLOYMENT_TARGET = 10.6 61 | 62 | 63 | // Compiler Version -- leave them all commented out to get the default version provided by Xcode 64 | // GCC_VERSION = 4.2 65 | // GCC_VERSION = com.apple.compilers.llvmgcc42 66 | // GCC_VERSION = com.apple.compilers.llvm.clang.1_0 67 | 68 | 69 | // Preprocessor Defines 70 | GCC_PREPROCESSOR_DEFINITIONS = "DENORM_WANT_FIX = 1" "NO_TRANSLATION_SUPPORT = 1" 71 | 72 | 73 | // Static Configuration (don't change these) 74 | WRAPPER_EXTENSION = mxo; 75 | WARNING_CFLAGS = -Wmost -Wno-four-char-constants -Wno-unknown-pragmas 76 | DEPLOYMENT_LOCATION = YES 77 | GENERATE_PKGINFO_FILE = YES 78 | 79 | 80 | // Flags to enforce some build-time checks for the symbols used while not actually performing a hard link 81 | C74_SYM_LINKER_FLAGS = @$(C74SUPPORT)/max-includes/c74_linker_flags.txt 82 | 83 | 84 | // hide all symbols by default 85 | // mark a function to be exported with the C74_EXPORT macro -- most likely this will only apply to the main() function 86 | OTHER_CFLAGS = -fvisibility=hidden 87 | -------------------------------------------------------------------------------- /doc/html/dir_e68e8157741866f444e17edd764ebbae.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: doc Directory Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 | 50 |
54 |
55 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |
Loading...
63 |
Searching...
64 |
No Matches
65 |
66 |
67 |
68 |
69 | 70 | 74 |
75 |
76 |
doc Directory Reference
77 |
78 |
79 |
80 | 81 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /doc/html/globals_enum.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: File Members 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 |
50 | 51 |
55 |
56 | 57 | 58 |
59 |
60 |
61 |
62 |
63 |
Loading...
64 |
Searching...
65 |
No Matches
66 |
67 |
68 |
69 |
70 | 71 |
72 |
Here is a list of all documented enums with links to the documentation:
76 |
77 | 78 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /doc/html/globals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: File Members 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 |
50 | 51 |
55 |
56 | 57 | 58 |
59 |
60 |
61 |
62 |
63 |
Loading...
64 |
Searching...
65 |
No Matches
66 |
67 |
68 |
69 |
70 | 71 |
72 |
Here is a list of all documented file members with links to the documentation:
76 |
77 | 78 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /libs/kiss_fft130/kiss_fft.h: -------------------------------------------------------------------------------- 1 | #ifndef KISS_FFT_H 2 | #define KISS_FFT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /* 14 | ATTENTION! 15 | If you would like a : 16 | -- a utility that will handle the caching of fft objects 17 | -- real-only (no imaginary time component ) FFT 18 | -- a multi-dimensional FFT 19 | -- a command-line utility to perform ffts 20 | -- a command-line utility to perform fast-convolution filtering 21 | 22 | Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c 23 | in the tools/ directory. 24 | */ 25 | 26 | #ifdef USE_SIMD 27 | # include 28 | # define kiss_fft_scalar __m128 29 | #define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) 30 | #define KISS_FFT_FREE _mm_free 31 | #else 32 | #define KISS_FFT_MALLOC malloc 33 | #define KISS_FFT_FREE free 34 | #endif 35 | 36 | 37 | #ifdef FIXED_POINT 38 | #include 39 | # if (FIXED_POINT == 32) 40 | # define kiss_fft_scalar int32_t 41 | # else 42 | # define kiss_fft_scalar int16_t 43 | # endif 44 | #else 45 | # ifndef kiss_fft_scalar 46 | /* default is float */ 47 | # define kiss_fft_scalar float 48 | # endif 49 | #endif 50 | 51 | typedef struct { 52 | kiss_fft_scalar r; 53 | kiss_fft_scalar i; 54 | }kiss_fft_cpx; 55 | 56 | typedef struct kiss_fft_state* kiss_fft_cfg; 57 | 58 | /* 59 | * kiss_fft_alloc 60 | * 61 | * Initialize a FFT (or IFFT) algorithm's cfg/state buffer. 62 | * 63 | * typical usage: kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL); 64 | * 65 | * The return value from fft_alloc is a cfg buffer used internally 66 | * by the fft routine or NULL. 67 | * 68 | * If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc. 69 | * The returned value should be free()d when done to avoid memory leaks. 70 | * 71 | * The state can be placed in a user supplied buffer 'mem': 72 | * If lenmem is not NULL and mem is not NULL and *lenmem is large enough, 73 | * then the function places the cfg in mem and the size used in *lenmem 74 | * and returns mem. 75 | * 76 | * If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough), 77 | * then the function returns NULL and places the minimum cfg 78 | * buffer size in *lenmem. 79 | * */ 80 | 81 | kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem); 82 | 83 | /* 84 | * kiss_fft(cfg,in_out_buf) 85 | * 86 | * Perform an FFT on a complex input buffer. 87 | * for a forward FFT, 88 | * fin should be f[0] , f[1] , ... ,f[nfft-1] 89 | * fout will be F[0] , F[1] , ... ,F[nfft-1] 90 | * Note that each element is complex and can be accessed like 91 | f[k].r and f[k].i 92 | * */ 93 | void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout); 94 | 95 | /* 96 | A more generic version of the above function. It reads its input from every Nth sample. 97 | * */ 98 | void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride); 99 | 100 | /* If kiss_fft_alloc allocated a buffer, it is one contiguous 101 | buffer and can be simply free()d when no longer needed*/ 102 | #define kiss_fft_free free 103 | 104 | /* 105 | Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up 106 | your compiler output to call this before you exit. 107 | */ 108 | void kiss_fft_cleanup(void); 109 | 110 | 111 | /* 112 | * Returns the smallest integer k, such that k>=n and k has only "fast" factors (2,3,5) 113 | */ 114 | int kiss_fft_next_fast_size(int n); 115 | 116 | /* for real ffts, we need an even size */ 117 | #define kiss_fftr_next_fast_size_real(n) \ 118 | (kiss_fft_next_fast_size( ((n)+1)>>1)<<1) 119 | 120 | #ifdef __cplusplus 121 | } 122 | #endif 123 | 124 | #endif 125 | -------------------------------------------------------------------------------- /doc/html/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: Class Index 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 |
50 | 51 |
55 |
56 | 57 | 58 |
59 |
60 |
61 |
62 |
63 |
Loading...
64 |
Searching...
65 |
No Matches
66 |
67 |
68 |
69 |
70 | 71 |
72 |
Class Index
73 |
74 |
75 |
B | C | O
76 |
77 |
78 |
B
79 |
BTrack
80 |
81 |
C
82 |
CircularBuffer
83 |
84 |
O
85 |
OnsetDetectionFunction
86 |
87 |
88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /doc/html/annotated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: Class List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 |
50 | 51 |
55 |
56 | 57 | 58 |
59 |
60 |
61 |
62 |
63 |
Loading...
64 |
Searching...
65 |
No Matches
66 |
67 |
68 |
69 |
70 | 71 |
72 |
Class List
73 |
74 |
75 |
Here are the classes, structs, unions and interfaces with brief descriptions:
76 | 77 | 78 | 79 | 80 |
 CBTrack
 CCircularBuffer
 COnsetDetectionFunction
81 |
82 |
83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /modules-and-plug-ins/vamp-plugin/Makefile: -------------------------------------------------------------------------------- 1 | 2 | ## Skeleton Makefile for Vamp plugin builds using command-line tools. 3 | ## This requires GNU make, which is what you get with OS/X, Linux, or 4 | ## MinGW/Cygwin on Windows. 5 | ## 6 | ## Rename this to Makefile, and edit as appropriate. 7 | ## This Makefile WILL NOT WORK until you have edited it as described 8 | ## below -- the Makefile as supplied does nothing useful at all! 9 | ## 10 | ## Various sets of options are provided, commented out -- just uncomment 11 | ## (remove the '#' characters for) the set that most closely resembles 12 | ## your own situation, and adjust to taste. Then run "gmake". 13 | ## 14 | ## (For Windows builds using MS Visual Studio, start instead with the 15 | ## VampExamplePlugins project found in the build directory of the SDK.) 16 | 17 | 18 | # Edit this to the base name of your plugin library 19 | # 20 | PLUGIN_LIBRARY_NAME := btrack 21 | 22 | # Edit this to list the .cpp or .c files in your plugin project 23 | # 24 | PLUGIN_SOURCES := BTrackVamp.cpp plugins.cpp ../../src/BTrack.cpp ../../src/OnsetDetectionFunction.cpp 25 | 26 | # Edit this to list the .h files in your plugin project 27 | # 28 | PLUGIN_HEADERS := BTrackVamp.h ../../src/BTrack.h ../../src/OnsetDetectionFunction.h ../../src/CircularBuffer.h 29 | # Edit this to the location of the Vamp plugin SDK, relative to your 30 | # project directory 31 | # 32 | VAMP_SDK_DIR := /usr/local/lib/vamp-sdk 33 | 34 | ## Uncomment these for an OS/X universal binary (32- and 64-bit Intel) 35 | ## supporting 10.5 or newer. Use this if you have OS/X 10.7 with the 36 | ## Xcode 4 command-line tools. 37 | 38 | CXX := g++ 39 | 40 | ## commented this out while I don't have both 32 and 64 bit versions of the libraries 41 | #CXXFLAGS := -mmacosx-version-min=10.11 -arch i386 -arch x86_64 -I$(VAMP_SDK_DIR) -Wall -fPIC 42 | CXXFLAGS := -mmacosx-version-min=10.11 -arch x86_64 -I$(VAMP_SDK_DIR) -I/usr/local/include -DUSE_FFTW -Wall -fPIC 43 | PLUGIN_EXT := .dylib 44 | LDFLAGS := $(CXXFLAGS) -dynamiclib -L/usr/local/lib -lsamplerate -lfftw3 -lstdc++ -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list 45 | 46 | 47 | ## Uncomment these for an OS/X universal binary (PPC and 32- and 48 | ## 64-bit Intel) supporting 10.5 or newer. Use this if you have OS/X 49 | ## 10.6 with the Xcode 3 command-line tools. 50 | 51 | # CXXFLAGS := -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch i386 -arch x86_64 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC 52 | # PLUGIN_EXT := .dylib 53 | # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list 54 | 55 | 56 | ## Uncomment these for an OS/X universal binary (PPC and 32- and 57 | ## 64-bit Intel) supporting 10.4 or newer. Use this if you have OS/X 58 | ## 10.4, 10.5 or 10.6 and you have the 10.4 SDK installed. 59 | 60 | # CXX := g++-4.0 61 | # CXXFLAGS := -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -I$(VAMP_SDK_DIR) -Wall -fPIC 62 | # PLUGIN_EXT := .dylib 63 | # LDFLAGS := $(CXXFLAGS) -dynamiclib -install_name $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -exported_symbols_list vamp-plugin.list 64 | 65 | 66 | ## Uncomment these for Linux using the standard tools: 67 | 68 | # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall -fPIC 69 | # PLUGIN_EXT := .so 70 | # LDFLAGS := -shared -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Wl,--version-script=vamp-plugin.map 71 | 72 | 73 | ## Uncomment these for a cross-compile from Linux to Windows using MinGW: 74 | 75 | # CXX := i586-mingw32msvc-g++ 76 | # CXXFLAGS := -I$(VAMP_SDK_DIR) -Wall 77 | # PLUGIN_EXT := .dll 78 | # LDFLAGS := --static-libgcc -Wl,-soname=$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) -shared $(VAMP_SDK_DIR)/libvamp-sdk.a 79 | 80 | 81 | ## Uncomment these for OpenSolaris using SunStudio compiler and GNU make: 82 | 83 | # CXX := CC 84 | # CXXFLAGS := -G -I$(VAMP_SDK_DIR) +w -KPIC 85 | # PLUGIN_EXT := .so 86 | # LDFLAGS := -G -h$(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT) $(VAMP_SDK_DIR)/libvamp-sdk.a -Qoption ld -Mvamp-plugin.map 87 | 88 | 89 | 90 | ## All of the above 91 | 92 | PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o) 93 | PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o) 94 | 95 | $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT): $(PLUGIN_OBJECTS) 96 | $(CXX) -o $@ $^ $(LDFLAGS) 97 | 98 | $(PLUGIN_OBJECTS): $(PLUGIN_HEADERS) 99 | 100 | clean: 101 | rm -f *.o 102 | 103 | -------------------------------------------------------------------------------- /doc/html/_onset_detection_function_8cpp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: src/OnsetDetectionFunction.cpp File Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 | 50 |
54 |
55 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |
Loading...
63 |
Searching...
64 |
No Matches
65 |
66 |
67 |
68 |
69 | 70 | 74 |
75 |
76 |
OnsetDetectionFunction.cpp File Reference
77 |
78 |
79 | 80 |

A class for calculating onset detection functions. 81 | More...

82 |
#include <math.h>
83 | #include "OnsetDetectionFunction.h"
84 |

Detailed Description

85 |

A class for calculating onset detection functions.

86 |
Author
Adam Stark
87 | 88 |

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

89 |

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

90 |

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

91 |
92 | 93 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | BTrack - A Real-Time Beat Tracker 2 | ================================= 3 | 4 | *by Adam Stark, Matthew Davies and Mark Plumbley.* 5 | 6 | ![Version](https://img.shields.io/badge/version-1.0.5-green.svg?style=flat-square) 7 | ![Licence](https://img.shields.io/badge/licence-GPLv3-blue.svg?style=flat-square) 8 | ![Language](https://img.shields.io/badge/language-C++-yellow.svg?style=flat-square) 9 | 10 | About BTrack 11 | ------------ 12 | 13 | BTrack is a causal beat tracking algorithm intended for real-time use. It is implemented in C++ with wrappers for Python and the Vamp plug-in framework. 14 | 15 | Full details of the working of the algorithm can be found in: 16 | 17 | * Musicians and Machines: Bridging the Semantic Gap in Live Performance, Chapter 3, A. M. Stark, PhD Thesis, Queen Mary, University of London, 2011. 18 | 19 | * Real-Time Beat-Synchronous Analysis of Musical Audio, A. M. Stark, M. E. P. Davies and M. D. Plumbley. In Proceedings of the 12th International Conference on Digital Audio Effects (DAFx-09), Como, Italy, September 1-4, 2009. 20 | 21 | BTrack is made available under the GNU General Public License, version 3. Please see the included LICENSE.txt for more details. 22 | 23 | Versions 24 | -------- 25 | 26 | ==== 1.0.5 ==== (18th August 2023) 27 | 28 | * Code improvements and modernisation 29 | * Move to CMake 30 | * Move to doctest for unit tests 31 | 32 | ==== 1.0.4 ==== (18th June 2016) 33 | 34 | * Added option of using Kiss FFT 35 | * Implementation changes to improve efficiency 36 | 37 | ==== 1.0.3 ==== (10th January 2016) 38 | 39 | * Fixed implementation error in complex spectral difference (thanks to @zbanks for pointing it out) 40 | * Small change to python module build script 41 | 42 | ==== 1.0.2 ==== (25th November 2014) 43 | 44 | * Added updated Max external project and associated files 45 | * Fixed a couple of bugs 46 | 47 | ==== 1.0.1 ==== (21st November 2014) 48 | 49 | * Moved to git & updated README 50 | * No implementation changes 51 | 52 | ==== 1.0.0 ==== (8th July 2014) 53 | 54 | * Many updates to stability and improvements to implementation 55 | 56 | ==== 0.9.0 ==== (circa 2008/2009) 57 | 58 | * This is the original version of the BTrack algorithm 59 | 60 | 61 | 62 | Usage - C++ 63 | ----------- 64 | 65 | **STEP 1** 66 | 67 | Include the BTrack header file as follows: 68 | 69 | #include "BTrack.h" 70 | 71 | **STEP 2** 72 | 73 | Instantiate the algorithm by one of the following: 74 | 75 | // to use the default 512 hop size and 1024 frame size 76 | BTrack b; 77 | 78 | or: 79 | 80 | // to specify a hop size (e.g. 512) and have a frame size of 2 x the hop size 81 | BTrack b(512); 82 | 83 | or: 84 | 85 | // to specify both the hop size and frame size 86 | BTrack b(512,1024); 87 | 88 | **STEP 3.1 - Audio Input** 89 | 90 | In the processing loop, fill a double precision array with one frame of audio samples (as determined in step 2): 91 | 92 | double *frame; 93 | 94 | // ! 95 | // do something here to fill the frame with audio samples 96 | // ! 97 | 98 | and then call: 99 | 100 | b.processAudioFrame(frame); 101 | 102 | and to check for beats, simply call: 103 | 104 | if (b.beatDueInCurrentFrame()) 105 | { 106 | // do something on the beat 107 | } 108 | 109 | **STEP 3.2 - Onset Detection Function Input** 110 | 111 | The algorithm can process onset detection function samples. Given a double precision onset detection function sample called 'newSample', at each step, call: 112 | 113 | b.processOnsetDetectionFunctionSample(newSample); 114 | 115 | and then check for beats with: 116 | 117 | if (b.beatDueInCurrentFrame()) 118 | { 119 | // do something on the beat 120 | } 121 | 122 | Requirements 123 | ------------ 124 | 125 | To compile BTrack, you will require the following libraries: 126 | 127 | * libsamplerate 128 | 129 | And either: 130 | 131 | * FFTW (add the flag -DUSE_FFTW) 132 | 133 | or: 134 | 135 | * Kiss FFT (included with project, use the flag -DUSE_KISS_FFT) 136 | 137 | Please ensure that if you are using these libraries that you have secured any required licences for your project. The licence on this library does not cover any third party licences. 138 | 139 | License 140 | ------- 141 | 142 | Copyright (c) 2014 Queen Mary University of London 143 | 144 | This program is free software: you can redistribute it and/or modify 145 | it under the terms of the GNU General Public License as published by 146 | the Free Software Foundation, either version 3 of the License, or 147 | (at your option) any later version. 148 | 149 | This program is distributed in the hope that it will be useful, 150 | but WITHOUT ANY WARRANTY; without even the implied warranty of 151 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 152 | GNU General Public License for more details. 153 | 154 | You should have received a copy of the GNU General Public License 155 | along with this program. If not, see . -------------------------------------------------------------------------------- /doc/html/class_circular_buffer-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 | 50 |
54 |
55 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |
Loading...
63 |
Searching...
64 |
No Matches
65 |
66 |
67 |
68 |
69 | 70 |
71 |
72 |
CircularBuffer Member List
73 |
74 |
75 | 76 |

This is the complete list of members for CircularBuffer, including all inherited members.

77 | 78 | 79 | 80 | 81 | 82 | 83 |
addSampleToEnd(double v)CircularBufferinline
CircularBuffer()CircularBufferinline
operator[](int i)CircularBufferinline
resize(int size)CircularBufferinline
size()CircularBufferinline
84 | 85 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /doc/html/dynsections.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the JavaScript code in this file. 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (C) 1997-2020 by Dimitri van Heesch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 9 | and associated documentation files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @licend The above is the entire license notice for the JavaScript code in this file 24 | */ 25 | function toggleVisibility(linkObj) 26 | { 27 | var base = $(linkObj).attr('id'); 28 | var summary = $('#'+base+'-summary'); 29 | var content = $('#'+base+'-content'); 30 | var trigger = $('#'+base+'-trigger'); 31 | var src=$(trigger).attr('src'); 32 | if (content.is(':visible')===true) { 33 | content.hide(); 34 | summary.show(); 35 | $(linkObj).addClass('closed').removeClass('opened'); 36 | $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); 37 | } else { 38 | content.show(); 39 | summary.hide(); 40 | $(linkObj).removeClass('closed').addClass('opened'); 41 | $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); 42 | } 43 | return false; 44 | } 45 | 46 | function updateStripes() 47 | { 48 | $('table.directory tr'). 49 | removeClass('even').filter(':visible:even').addClass('even'); 50 | $('table.directory tr'). 51 | removeClass('odd').filter(':visible:odd').addClass('odd'); 52 | } 53 | 54 | function toggleLevel(level) 55 | { 56 | $('table.directory tr').each(function() { 57 | var l = this.id.split('_').length-1; 58 | var i = $('#img'+this.id.substring(3)); 59 | var a = $('#arr'+this.id.substring(3)); 60 | if (l 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: src/BTrack.cpp File Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 | 50 |
54 |
55 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |
Loading...
63 |
Searching...
64 |
No Matches
65 |
66 |
67 |
68 |
69 | 70 | 74 |
75 |
76 |
BTrack.cpp File Reference
77 |
78 |
79 | 80 |

BTrack - a real-time beat tracker. 81 | More...

82 |
#include <cmath>
83 | #include <algorithm>
84 | #include <numeric>
85 | #include "BTrack.h"
86 | #include "samplerate.h"
87 | #include <iostream>
88 |

Detailed Description

89 |

BTrack - a real-time beat tracker.

90 |
Author
Adam Stark
91 | 92 |

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

93 |

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

94 |

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

95 |
96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /doc/html/_circular_buffer_8h.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: src/CircularBuffer.h File Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 | 50 |
54 |
55 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |
Loading...
63 |
Searching...
64 |
No Matches
65 |
66 |
67 |
68 |
69 | 70 | 74 |
75 |
76 |
77 | Classes
78 |
CircularBuffer.h File Reference
79 |
80 |
81 | 82 |

A circular buffer. 83 | More...

84 |
#include <vector>
85 |
86 |

Go to the source code of this file.

87 | 88 | 90 | 91 | 92 |

89 | Classes

class  CircularBuffer
 
93 |

Detailed Description

94 |

A circular buffer.

95 |
Author
Adam Stark
96 | 97 |

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

98 |

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

99 |

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

100 |
101 | 102 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /doc/html/files.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: File List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 |
50 | 51 |
55 |
56 | 57 | 58 |
59 |
60 |
61 |
62 |
63 |
Loading...
64 |
Searching...
65 |
No Matches
66 |
67 |
68 |
69 |
70 | 71 |
72 |
File List
73 |
74 |
75 |
Here is a list of all documented files with brief descriptions:
76 |
[detail level 12]
77 | 78 | 79 | 80 | 81 | 82 | 83 |
  src
 BTrack.cppBTrack - a real-time beat tracker
 BTrack.hBTrack - a real-time beat tracker
 CircularBuffer.hA circular buffer
 OnsetDetectionFunction.cppA class for calculating onset detection functions
 OnsetDetectionFunction.hA class for calculating onset detection functions
84 |
85 |
86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /doc/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: BTrack - A Real-Time Beat Tracker 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 |
50 | 51 |
55 |
56 | 57 | 58 |
59 |
60 |
61 |
62 |
63 |
Loading...
64 |
Searching...
65 |
No Matches
66 |
67 |
68 |
69 |
70 | 71 |
72 |
BTrack - A Real-Time Beat Tracker
73 |
74 |
75 |

A real-time beat tracker, implemented in C++.

76 |

Written by Adam Stark, Matthew Davies and Mark Plumbley.

77 |

78 | License

79 |

BTrack is made available under the GNU General Public License, version 3. Please see the included LICENSE.txt for more details.

80 |

81 | Usage - C++

82 |

STEP 1

83 |

Include the BTrack header file as follows:

    #include "BTrack.h"
 84 | 

STEP 2

85 |

Instantiate the algorithm by one of the following:

86 |
// to use the default 512 hop size and 1024 frame size
 87 | BTrack b; 
 88 | 

or:

// to specify a hop size (e.g. 512) and have a frame size of 2 x the hop size
 89 | BTrack b(512); 
 90 | 

or:

// to specify both the hop size and frame size
 91 | BTrack b(512,1024);
 92 | 

STEP 3.1 - Audio Input

93 |

In the processing loop, fill a double precision array with one frame of audio samples (as determined in step 2):

double *frame; 
 94 | 
 95 | // !
 96 | // do something here to fill the frame with audio samples
 97 | // !
 98 | 

and then call:

b.processAudioFrame(frame);
 99 | 

and to check for beats, simply call:

if (b.beatDueInCurrentFrame())
100 | {
101 |     // do something on the beat
102 | }
103 | 

STEP 3.2 - Onset Detection Function Input
104 |

105 |

The algorithm can process onset detection function samples. Given a double precision onset detection function sample called 'newSamples', at each step, call:

b.processOnsetDetectionFunctionSample(newSample);
106 | 

and then check for beats with:

if (b.beatDueInCurrentFrame())
107 | {
108 |     // do something on the beat
109 | }
110 | 

For any questions, please email Adam Stark (email at http://www.adamstark.co.uk).

111 |
112 |
113 | 114 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /doc/html/_b_track_8h.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: src/BTrack.h File Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 | 50 |
54 |
55 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |
Loading...
63 |
Searching...
64 |
No Matches
65 |
66 |
67 |
68 |
69 | 70 | 74 |
75 |
76 |
77 | Classes
78 |
BTrack.h File Reference
79 |
80 |
81 | 82 |

BTrack - a real-time beat tracker. 83 | More...

84 |
#include "OnsetDetectionFunction.h"
85 | #include "CircularBuffer.h"
86 | #include <vector>
87 |
88 |

Go to the source code of this file.

89 | 90 | 92 | 93 | 94 |

91 | Classes

class  BTrack
 
95 |

Detailed Description

96 |

BTrack - a real-time beat tracker.

97 |
Author
Adam Stark
98 | 99 |

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

100 |

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

101 |

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

102 |
103 | 104 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /doc/html/class_onset_detection_function-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: Member List 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 | 50 |
54 |
55 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |
Loading...
63 |
Searching...
64 |
No Matches
65 |
66 |
67 |
68 |
69 | 70 |
71 |
72 |
OnsetDetectionFunction Member List
73 |
74 |
75 | 76 |

This is the complete list of members for OnsetDetectionFunction, including all inherited members.

77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 |
calculateOnsetDetectionFunctionSample(double *buffer)OnsetDetectionFunction
initialise(int hopSize, int frameSize)OnsetDetectionFunction
initialise(int hopSize, int frameSize, int onsetDetectionFunctionType, int windowType)OnsetDetectionFunction
OnsetDetectionFunction(int hopSize, int frameSize)OnsetDetectionFunction
OnsetDetectionFunction(int hopSize, int frameSize, int onsetDetectionFunctionType, int windowType)OnsetDetectionFunction
setOnsetDetectionFunctionType(int onsetDetectionFunctionType)OnsetDetectionFunction
~OnsetDetectionFunction()OnsetDetectionFunction
86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /libs/kiss_fft130/README: -------------------------------------------------------------------------------- 1 | KISS FFT - A mixed-radix Fast Fourier Transform based up on the principle, 2 | "Keep It Simple, Stupid." 3 | 4 | There are many great fft libraries already around. Kiss FFT is not trying 5 | to be better than any of them. It only attempts to be a reasonably efficient, 6 | moderately useful FFT that can use fixed or floating data types and can be 7 | incorporated into someone's C program in a few minutes with trivial licensing. 8 | 9 | USAGE: 10 | 11 | The basic usage for 1-d complex FFT is: 12 | 13 | #include "kiss_fft.h" 14 | 15 | kiss_fft_cfg cfg = kiss_fft_alloc( nfft ,is_inverse_fft ,0,0 ); 16 | 17 | while ... 18 | 19 | ... // put kth sample in cx_in[k].r and cx_in[k].i 20 | 21 | kiss_fft( cfg , cx_in , cx_out ); 22 | 23 | ... // transformed. DC is in cx_out[0].r and cx_out[0].i 24 | 25 | free(cfg); 26 | 27 | Note: frequency-domain data is stored from dc up to 2pi. 28 | so cx_out[0] is the dc bin of the FFT 29 | and cx_out[nfft/2] is the Nyquist bin (if exists) 30 | 31 | Declarations are in "kiss_fft.h", along with a brief description of the 32 | functions you'll need to use. 33 | 34 | Code definitions for 1d complex FFTs are in kiss_fft.c. 35 | 36 | You can do other cool stuff with the extras you'll find in tools/ 37 | 38 | * multi-dimensional FFTs 39 | * real-optimized FFTs (returns the positive half-spectrum: (nfft/2+1) complex frequency bins) 40 | * fast convolution FIR filtering (not available for fixed point) 41 | * spectrum image creation 42 | 43 | The core fft and most tools/ code can be compiled to use float, double, 44 | Q15 short or Q31 samples. The default is float. 45 | 46 | 47 | BACKGROUND: 48 | 49 | I started coding this because I couldn't find a fixed point FFT that didn't 50 | use assembly code. I started with floating point numbers so I could get the 51 | theory straight before working on fixed point issues. In the end, I had a 52 | little bit of code that could be recompiled easily to do ffts with short, float 53 | or double (other types should be easy too). 54 | 55 | Once I got my FFT working, I was curious about the speed compared to 56 | a well respected and highly optimized fft library. I don't want to criticize 57 | this great library, so let's call it FFT_BRANDX. 58 | During this process, I learned: 59 | 60 | 1. FFT_BRANDX has more than 100K lines of code. The core of kiss_fft is about 500 lines (cpx 1-d). 61 | 2. It took me an embarrassingly long time to get FFT_BRANDX working. 62 | 3. A simple program using FFT_BRANDX is 522KB. A similar program using kiss_fft is 18KB (without optimizing for size). 63 | 4. FFT_BRANDX is roughly twice as fast as KISS FFT in default mode. 64 | 65 | It is wonderful that free, highly optimized libraries like FFT_BRANDX exist. 66 | But such libraries carry a huge burden of complexity necessary to extract every 67 | last bit of performance. 68 | 69 | Sometimes simpler is better, even if it's not better. 70 | 71 | FREQUENTLY ASKED QUESTIONS: 72 | Q: Can I use kissfft in a project with a ___ license? 73 | A: Yes. See LICENSE below. 74 | 75 | Q: Why don't I get the output I expect? 76 | A: The two most common causes of this are 77 | 1) scaling : is there a constant multiplier between what you got and what you want? 78 | 2) mixed build environment -- all code must be compiled with same preprocessor 79 | definitions for FIXED_POINT and kiss_fft_scalar 80 | 81 | Q: Will you write/debug my code for me? 82 | A: Probably not unless you pay me. I am happy to answer pointed and topical questions, but 83 | I may refer you to a book, a forum, or some other resource. 84 | 85 | 86 | PERFORMANCE: 87 | (on Athlon XP 2100+, with gcc 2.96, float data type) 88 | 89 | Kiss performed 10000 1024-pt cpx ffts in .63 s of cpu time. 90 | For comparison, it took md5sum twice as long to process the same amount of data. 91 | 92 | Transforming 5 minutes of CD quality audio takes less than a second (nfft=1024). 93 | 94 | DO NOT: 95 | ... use Kiss if you need the Fastest Fourier Transform in the World 96 | ... ask me to add features that will bloat the code 97 | 98 | UNDER THE HOOD: 99 | 100 | Kiss FFT uses a time decimation, mixed-radix, out-of-place FFT. If you give it an input buffer 101 | and output buffer that are the same, a temporary buffer will be created to hold the data. 102 | 103 | No static data is used. The core routines of kiss_fft are thread-safe (but not all of the tools directory). 104 | 105 | No scaling is done for the floating point version (for speed). 106 | Scaling is done both ways for the fixed-point version (for overflow prevention). 107 | 108 | Optimized butterflies are used for factors 2,3,4, and 5. 109 | 110 | The real (i.e. not complex) optimization code only works for even length ffts. It does two half-length 111 | FFTs in parallel (packed into real&imag), and then combines them via twiddling. The result is 112 | nfft/2+1 complex frequency bins from DC to Nyquist. If you don't know what this means, search the web. 113 | 114 | The fast convolution filtering uses the overlap-scrap method, slightly 115 | modified to put the scrap at the tail. 116 | 117 | LICENSE: 118 | Revised BSD License, see COPYING for verbiage. 119 | Basically, "free to use&change, give credit where due, no guarantees" 120 | Note this license is compatible with GPL at one end of the spectrum and closed, commercial software at 121 | the other end. See http://www.fsf.org/licensing/licenses 122 | 123 | A commercial license is available which removes the requirement for attribution. Contact me for details. 124 | 125 | 126 | TODO: 127 | *) Add real optimization for odd length FFTs 128 | *) Document/revisit the input/output fft scaling 129 | *) Make doc describing the overlap (tail) scrap fast convolution filtering in kiss_fastfir.c 130 | *) Test all the ./tools/ code with fixed point (kiss_fastfir.c doesn't work, maybe others) 131 | 132 | AUTHOR: 133 | Mark Borgerding 134 | Mark@Borgerding.net 135 | -------------------------------------------------------------------------------- /doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | BTrack - A Real-Time Beat Tracker: src Directory Reference 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 22 | 23 | 27 | 28 | 29 |
24 |
BTrack - A Real-Time Beat Tracker 25 |
26 |
30 |
31 | 32 | 33 | 38 | 39 | 40 | 48 | 49 | 50 |
54 |
55 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |
Loading...
63 |
Searching...
64 |
No Matches
65 |
66 |
67 |
68 |
69 | 70 | 74 |
75 |
76 |
src Directory Reference
77 |
78 |
79 | 80 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 |

81 | Files

 BTrack.cpp
 BTrack - a real-time beat tracker.
 
 BTrack.h
 BTrack - a real-time beat tracker.
 
 CircularBuffer.h
 A circular buffer.
 
 OnsetDetectionFunction.cpp
 A class for calculating onset detection functions.
 
 OnsetDetectionFunction.h
 A class for calculating onset detection functions.
 
98 |
99 | 100 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /doc/html/menu.js: -------------------------------------------------------------------------------- 1 | /* 2 | @licstart The following is the entire license notice for the JavaScript code in this file. 3 | 4 | The MIT License (MIT) 5 | 6 | Copyright (C) 1997-2020 by Dimitri van Heesch 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 9 | and associated documentation files (the "Software"), to deal in the Software without restriction, 10 | including without limitation the rights to use, copy, modify, merge, publish, distribute, 11 | sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all copies or 15 | substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING 18 | BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @licend The above is the entire license notice for the JavaScript code in this file 24 | */ 25 | function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { 26 | function makeTree(data,relPath) { 27 | var result=''; 28 | if ('children' in data) { 29 | result+='
    '; 30 | for (var i in data.children) { 31 | var url; 32 | var link; 33 | link = data.children[i].url; 34 | if (link.substring(0,1)=='^') { 35 | url = link.substring(1); 36 | } else { 37 | url = relPath+link; 38 | } 39 | result+='
  • '+ 40 | data.children[i].text+''+ 41 | makeTree(data.children[i],relPath)+'
  • '; 42 | } 43 | result+='
'; 44 | } 45 | return result; 46 | } 47 | var searchBoxHtml; 48 | if (searchEnabled) { 49 | if (serverSide) { 50 | searchBoxHtml='
'+ 51 | '
'+ 52 | '
 '+ 54 | ''+ 57 | '
'+ 58 | '
'+ 59 | '
'+ 60 | '
'; 61 | } else { 62 | searchBoxHtml='
'+ 63 | ''+ 64 | ' '+ 66 | ''+ 70 | ''+ 71 | ''+ 73 | ''+ 75 | ''+ 76 | '
'; 77 | } 78 | } 79 | 80 | $('#main-nav').before('
'+ 81 | ''+ 84 | ''+ 85 | '
'); 86 | $('#main-nav').append(makeTree(menudata,relPath)); 87 | $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); 88 | if (searchBoxHtml) { 89 | $('#main-menu').append('
  • '); 90 | } 91 | var $mainMenuState = $('#main-menu-state'); 92 | var prevWidth = 0; 93 | if ($mainMenuState.length) { 94 | function initResizableIfExists() { 95 | if (typeof initResizable==='function') initResizable(); 96 | } 97 | // animate mobile menu 98 | $mainMenuState.change(function(e) { 99 | var $menu = $('#main-menu'); 100 | var options = { duration: 250, step: initResizableIfExists }; 101 | if (this.checked) { 102 | options['complete'] = function() { $menu.css('display', 'block') }; 103 | $menu.hide().slideDown(options); 104 | } else { 105 | options['complete'] = function() { $menu.css('display', 'none') }; 106 | $menu.show().slideUp(options); 107 | } 108 | }); 109 | // set default menu visibility 110 | function resetState() { 111 | var $menu = $('#main-menu'); 112 | var $mainMenuState = $('#main-menu-state'); 113 | var newWidth = $(window).outerWidth(); 114 | if (newWidth!=prevWidth) { 115 | if ($(window).outerWidth()<768) { 116 | $mainMenuState.prop('checked',false); $menu.hide(); 117 | $('#searchBoxPos1').html(searchBoxHtml); 118 | $('#searchBoxPos2').hide(); 119 | } else { 120 | $menu.show(); 121 | $('#searchBoxPos1').empty(); 122 | $('#searchBoxPos2').html(searchBoxHtml); 123 | $('#searchBoxPos2').show(); 124 | } 125 | if (typeof searchBox!=='undefined') { 126 | searchBox.CloseResultsWindow(); 127 | } 128 | prevWidth = newWidth; 129 | } 130 | } 131 | $(window).ready(function() { resetState(); initResizableIfExists(); }); 132 | $(window).resize(resetState); 133 | } 134 | $('#main-menu').smartmenus(); 135 | } 136 | /* @license-end */ 137 | -------------------------------------------------------------------------------- /libs/kiss_fft130/_kiss_fft_guts.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2010, Mark Borgerding 3 | 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 7 | 8 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 10 | * Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. 11 | 12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13 | */ 14 | 15 | /* kiss_fft.h 16 | defines kiss_fft_scalar as either short or a float type 17 | and defines 18 | typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */ 19 | #include "kiss_fft.h" 20 | #include 21 | 22 | #define MAXFACTORS 32 23 | /* e.g. an fft of length 128 has 4 factors 24 | as far as kissfft is concerned 25 | 4*4*4*2 26 | */ 27 | 28 | struct kiss_fft_state{ 29 | int nfft; 30 | int inverse; 31 | int factors[2*MAXFACTORS]; 32 | kiss_fft_cpx twiddles[1]; 33 | }; 34 | 35 | /* 36 | Explanation of macros dealing with complex math: 37 | 38 | C_MUL(m,a,b) : m = a*b 39 | C_FIXDIV( c , div ) : if a fixed point impl., c /= div. noop otherwise 40 | C_SUB( res, a,b) : res = a - b 41 | C_SUBFROM( res , a) : res -= a 42 | C_ADDTO( res , a) : res += a 43 | * */ 44 | #ifdef FIXED_POINT 45 | #if (FIXED_POINT==32) 46 | # define FRACBITS 31 47 | # define SAMPPROD int64_t 48 | #define SAMP_MAX 2147483647 49 | #else 50 | # define FRACBITS 15 51 | # define SAMPPROD int32_t 52 | #define SAMP_MAX 32767 53 | #endif 54 | 55 | #define SAMP_MIN -SAMP_MAX 56 | 57 | #if defined(CHECK_OVERFLOW) 58 | # define CHECK_OVERFLOW_OP(a,op,b) \ 59 | if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \ 60 | fprintf(stderr,"WARNING:overflow @ " __FILE__ "(%d): (%d " #op" %d) = %ld\n",__LINE__,(a),(b),(SAMPPROD)(a) op (SAMPPROD)(b) ); } 61 | #endif 62 | 63 | 64 | # define smul(a,b) ( (SAMPPROD)(a)*(b) ) 65 | # define sround( x ) (kiss_fft_scalar)( ( (x) + (1<<(FRACBITS-1)) ) >> FRACBITS ) 66 | 67 | # define S_MUL(a,b) sround( smul(a,b) ) 68 | 69 | # define C_MUL(m,a,b) \ 70 | do{ (m).r = sround( smul((a).r,(b).r) - smul((a).i,(b).i) ); \ 71 | (m).i = sround( smul((a).r,(b).i) + smul((a).i,(b).r) ); }while(0) 72 | 73 | # define DIVSCALAR(x,k) \ 74 | (x) = sround( smul( x, SAMP_MAX/k ) ) 75 | 76 | # define C_FIXDIV(c,div) \ 77 | do { DIVSCALAR( (c).r , div); \ 78 | DIVSCALAR( (c).i , div); }while (0) 79 | 80 | # define C_MULBYSCALAR( c, s ) \ 81 | do{ (c).r = sround( smul( (c).r , s ) ) ;\ 82 | (c).i = sround( smul( (c).i , s ) ) ; }while(0) 83 | 84 | #else /* not FIXED_POINT*/ 85 | 86 | # define S_MUL(a,b) ( (a)*(b) ) 87 | #define C_MUL(m,a,b) \ 88 | do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ 89 | (m).i = (a).r*(b).i + (a).i*(b).r; }while(0) 90 | # define C_FIXDIV(c,div) /* NOOP */ 91 | # define C_MULBYSCALAR( c, s ) \ 92 | do{ (c).r *= (s);\ 93 | (c).i *= (s); }while(0) 94 | #endif 95 | 96 | #ifndef CHECK_OVERFLOW_OP 97 | # define CHECK_OVERFLOW_OP(a,op,b) /* noop */ 98 | #endif 99 | 100 | #define C_ADD( res, a,b)\ 101 | do { \ 102 | CHECK_OVERFLOW_OP((a).r,+,(b).r)\ 103 | CHECK_OVERFLOW_OP((a).i,+,(b).i)\ 104 | (res).r=(a).r+(b).r; (res).i=(a).i+(b).i; \ 105 | }while(0) 106 | #define C_SUB( res, a,b)\ 107 | do { \ 108 | CHECK_OVERFLOW_OP((a).r,-,(b).r)\ 109 | CHECK_OVERFLOW_OP((a).i,-,(b).i)\ 110 | (res).r=(a).r-(b).r; (res).i=(a).i-(b).i; \ 111 | }while(0) 112 | #define C_ADDTO( res , a)\ 113 | do { \ 114 | CHECK_OVERFLOW_OP((res).r,+,(a).r)\ 115 | CHECK_OVERFLOW_OP((res).i,+,(a).i)\ 116 | (res).r += (a).r; (res).i += (a).i;\ 117 | }while(0) 118 | 119 | #define C_SUBFROM( res , a)\ 120 | do {\ 121 | CHECK_OVERFLOW_OP((res).r,-,(a).r)\ 122 | CHECK_OVERFLOW_OP((res).i,-,(a).i)\ 123 | (res).r -= (a).r; (res).i -= (a).i; \ 124 | }while(0) 125 | 126 | 127 | #ifdef FIXED_POINT 128 | # define KISS_FFT_COS(phase) floor(.5+SAMP_MAX * cos (phase)) 129 | # define KISS_FFT_SIN(phase) floor(.5+SAMP_MAX * sin (phase)) 130 | # define HALF_OF(x) ((x)>>1) 131 | #elif defined(USE_SIMD) 132 | # define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) ) 133 | # define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) ) 134 | # define HALF_OF(x) ((x)*_mm_set1_ps(.5)) 135 | #else 136 | # define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase) 137 | # define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase) 138 | # define HALF_OF(x) ((x)*.5) 139 | #endif 140 | 141 | #define kf_cexp(x,phase) \ 142 | do{ \ 143 | (x)->r = KISS_FFT_COS(phase);\ 144 | (x)->i = KISS_FFT_SIN(phase);\ 145 | }while(0) 146 | 147 | 148 | /* a debugging function */ 149 | #define pcpx(c)\ 150 | fprintf(stderr,"%g + %gi\n",(double)((c)->r),(double)((c)->i) ) 151 | 152 | 153 | #ifdef KISS_FFT_USE_ALLOCA 154 | // define this to allow use of alloca instead of malloc for temporary buffers 155 | // Temporary buffers are used in two case: 156 | // 1. FFT sizes that have "bad" factors. i.e. not 2,3 and 5 157 | // 2. "in-place" FFTs. Notice the quotes, since kissfft does not really do an in-place transform. 158 | #include 159 | #define KISS_FFT_TMP_ALLOC(nbytes) alloca(nbytes) 160 | #define KISS_FFT_TMP_FREE(ptr) 161 | #else 162 | #define KISS_FFT_TMP_ALLOC(nbytes) KISS_FFT_MALLOC(nbytes) 163 | #define KISS_FFT_TMP_FREE(ptr) KISS_FFT_FREE(ptr) 164 | #endif 165 | --------------------------------------------------------------------------------