Commit 90ad6440 authored by Florent Jacquemard's avatar Florent Jacquemard
Browse files

fix conflict after merge beta into master

parents 7a68dfca cae21b02
[submodule "extern/pybind11"]
path = extern/pybind11
url = https://github.com/pybind/pybind11.git
branch = stable
# Main CMakeList.txt for qparse
# Main CMakeList.txt for qparselib
# the project qparse uses c++ compiler
project (qparse CXX)
project (qparselib CXX)
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.1)
# uses c++11 facility
set(CMAKE_CXX_FLAGS "-MMD -MP -std=c++11")
# uses c++14 facility
set(CMAKE_CXX_STANDARD 14)
####
......@@ -19,18 +19,21 @@ find_library (LIBMEI_LIBRARY NAMES mei)
if (LIBMEI_INCLUDE_DIR AND LIBMEI_LIBRARY)
message ("-- Found libmei: ${LIBMEI_INCLUDE_DIR}/mei/,${LIBMEI_LIBRARY}")
link_libraries(-lmei)
else (LIBMEI_INCLUDE_DIR AND LIBMEI_LIBRARY)
message(FATAL_ERROR "Could not find mei library. See https://github.com/DDMAL/libmei/")
endif (LIBMEI_INCLUDE_DIR AND LIBMEI_LIBRARY)
####
# /usr/include/ is here for OSX 10.15 Catalina
#set(CMAKE_OSX_SYSROOT "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk")
# flags for OSX 10.15 Catalina
#set(CMAKE_CXX_FLAGS "-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk")
#set(CMAKE_CPP_FLAGS "-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk")
####
## tell to cmake directories where headers file located
include_directories(
include
lib/midifile
)
## standard header directories
include_directories(/usr/local/include /usr/include)
......@@ -59,47 +62,535 @@ add_definitions(
-DTARGET_MEI=5
)
## include files for sub-projects
include_directories(
## create library located in sub-projects
add_subdirectory(
extern/midifile
)
## declare targets
add_executable(squant2
src/targets/quant/squant2.cpp
src/general/config.cpp
src/general/trace.cpp
src/general/util.cpp
src/general/hash.cpp
src/general/Rational.cpp
src/segment/AMTU.cpp
src/segment/MTU.cpp
src/segment/RTU.cpp
src/segment/Interval.cpp
src/segment/AlignedInterval.cpp
src/segment/IntervalTree.cpp
src/segment/IntervalHeap.cpp
src/segment/MusEvent.cpp
src/segment/Point.cpp
src/segment/MusPoint.cpp
src/segment/VMusPoint.cpp
src/segment/InputSegment.cpp
src/segment/InputSegmentMono.cpp
src/segment/import/InputSegmentMIDI.cpp
src/segment/VoicingMono.cpp
src/segment/import/InputSegmentSerial.cpp
src/segment/InputEnv.cpp
src/segment/Voicing.cpp
src/segment/DuraList.cpp
src/weight/Weight.cpp
src/weight/WeightDom.cpp
src/weight/FloatWeight.cpp
src/weight/Distance.cpp
src/weight/GaussianDistance.cpp
src/weight/ViterbiWeight.cpp
src/weight/TropicalWeight.cpp
src/schemata/Label.cpp
src/schemata/SymbLabel.cpp
src/schemata/import/SchemaFileIn.cpp
src/schemata/State.cpp
src/schemata/Transition.cpp
src/schemata/SWTA.cpp
src/schemata/import/SWTAFileIn.cpp
src/schemata/Production.cpp
src/parsing/ParsingEnv.cpp
src/parsing/Ranked.cpp
src/parsing/KeyS.cpp
src/parsing/KeySI.cpp
src/parsing/KeySIP.cpp
src/parsing/KeySIR.cpp
src/parsing/KeySIO.cpp
src/parsing/RunFilterMode.cpp
src/parsing/RunFilter.cpp
src/parsing/Ranked.cpp
src/scoremodel/musical/Ambitus.cpp
src/scoremodel/musical/Clef.cpp
src/scoremodel/musical/MeterSig.cpp
src/scoremodel/musical/KeySig.cpp
src/scoremodel/musical/Event.cpp
src/scoremodel/musical/Score.cpp
src/scoremodel/musical/MeasureStack.cpp
src/scoremodel/musical/MeasureStacked.cpp
src/scoremodel/musical/Part.cpp
src/scoremodel/musical/PartEng.cpp
src/scoremodel/musical/Measure.cpp
src/scoremodel/musical/Voice.cpp
src/scoremodel/musical/Sequence.cpp
src/scoremodel/musical/AtomicEvent.cpp
src/scoremodel/musical/Note.cpp
src/scoremodel/musical/GraceNote.cpp
src/scoremodel/musical/Rest.cpp
src/scoremodel/musical/Chord.cpp
src/scoremodel/musical/GraceChord.cpp
src/scoremodel/musical/Trill.cpp
src/scoremodel/musical/Sequencm.cpp
src/scoremodel/musical/SpanningElement.cpp
src/scoremodel/engraving/CMND.cpp
src/scoremodel/engraving/Staffed.cpp
src/scoremodel/engraving/StaffDef.cpp
src/scoremodel/engraving/StaffRange.cpp
src/scoremodel/engraving/Stem.cpp
src/scoremodel/engraving/Notehead.cpp
src/scoremodel/engraving/Beam.cpp
src/scoremodel/engraving/TupletLabel.cpp
src/scoremodel/engraving/Arpeggio.cpp
src/scoremodel/engraving/Union.cpp
src/scoremodel/engraving/Node.cpp
src/scoremodel/engraving/Inner.cpp
src/scoremodel/engraving/Root.cpp
src/scoremodel/engraving/Tuplet.cpp
src/scoremodel/engraving/Decorated.cpp
src/scoremodel/engraving/Leaf.cpp
src/scoremodel/engraving/Continuation.cpp
src/scoremodel/engraving/Tied.cpp
src/scoremodel/engraving/Dot.cpp
src/scoremodel/engraving/LeafEvent.cpp
src/scoremodel/engraving/SingleNote.cpp
src/scoremodel/engraving/PitchedNote.cpp
src/scoremodel/engraving/SingleGraceNote.cpp
src/scoremodel/engraving/LeafNote.cpp
src/scoremodel/engraving/LeafRest.cpp
src/scoremodel/engraving/LeafChord.cpp
src/scoremodel/engraving/LeafHarmonic.cpp
src/scoremodel/engraving/LeafSpace.cpp
src/scoremodel/engraving/Multi.cpp
src/scoremodel/engraving/Ornament.cpp
src/scoremodel/engraving/Appogiatura.cpp
src/scoremodel/engraving/HPosition.cpp
src/scoremodel/engraving/VPosition.cpp
src/scoremodel/engraving/Local.cpp
src/scoremodel/engraving/Articulation.cpp
src/scoremodel/engraving/Mordent.cpp
src/scoremodel/engraving/Gruppetto.cpp
src/scoremodel/engraving/LocalTrill.cpp
src/scoremodel/engraving/Dynamic.cpp
src/scoremodel/engraving/Jump.cpp
src/scoremodel/engraving/Fermata.cpp
src/scoremodel/engraving/Breath.cpp
src/scoremodel/engraving/ClefChange.cpp
src/scoremodel/engraving/TempoChange.cpp
src/scoremodel/engraving/Spanning.cpp
src/scoremodel/engraving/Line.cpp
src/scoremodel/engraving/Slur.cpp
src/scoremodel/engraving/Volta.cpp
src/scoremodel/engraving/Octava.cpp
src/scoremodel/engraving/Pedal.cpp
src/scoremodel/engraving/VolChange.cpp
src/scoremodel/engraving/SpanningTrill.cpp
src/scoremodel/engraving/Glissando.cpp
src/scoremodel/engraving/Osc.cpp
src/scoremodel/engraving/Vibrato.cpp
src/scoremodel/pitchspell/Pitch.cpp
src/scoremodel/pitchspell/AccidentState.cpp
src/scoremodel/pitchspell/AEVisitor.cpp
src/scoremodel/pitchspell/PitchEnum.cpp
src/scoremodel/pitchspell/PS0.cpp
src/scoremodel/pitchspell/PSConfig.cpp
src/scoremodel/pitchspell/PSshortest.cpp
src/scoremodel/import/ScoringEnv.cpp
src/scoremodel/import/ScoreBuilder.cpp
src/scoremodel/export/SMVisitor.cpp
src/scoremodel/export/SMPrinter.cpp
src/scoremodel/export/SMMEI.cpp
src/trees/RT.cpp
src/trees/PointedRT.cpp
src/trees/LRT.cpp
src/trees/MRT.cpp
src/trees/import/RTStringIn.cpp
src/trees/export/RTPrint.cpp
src/trees/export/LRTPrint.cpp
src/trees/export/LRTFileOut.cpp
src/scoremodel/pitchspell/Spiral.cpp
src/segment/export/MIDIOutput.cpp
src/trees/TreePosition.cpp
)
target_compile_options(squant2 PUBLIC
-MMD -MP
)
target_include_directories(squant2 PUBLIC
extern/midifile
src/general
src/segment
src/segment/import
src/segment/export
src/segment
src/weight
src/schemata
src/schemata/import
src/parsing
src/parsing/export
src/scoremodel/musical
src/scoremodel/engraving
src/scoremodel/pitchspell
src/scoremodel/rewriting
src/scoremodel/import
src/scoremodel/export
src/trees
src/trees/import/
src/trees/export/
)
target_link_libraries(squant2
-lmei
midifile
)
add_executable(equiv2
src/targets/equiv/equiv2.cpp
src/general/config.cpp
src/general/trace.cpp
src/general/util.cpp
src/general/hash.cpp
src/general/Rational.cpp
src/segment/MTU.cpp
src/segment/RTU.cpp
src/segment/Interval.cpp
src/segment/AlignedInterval.cpp
src/segment/IntervalTree.cpp
src/segment/IntervalHeap.cpp
src/segment/MusEvent.cpp
src/segment/Point.cpp
src/segment/MusPoint.cpp
src/segment/InputSegment.cpp
src/segment/InputSegmentMono.cpp
src/segment/DuraList.cpp
src/segment/ValueList.cpp
src/segment/import/DuraFile.cpp
src/segment/import/ValueFile.cpp
src/segment/InputEnv.cpp
src/weight/Weight.cpp
src/weight/WeightDom.cpp
src/weight/FloatWeight.cpp
src/weight/ViterbiWeight.cpp
src/weight/TropicalWeight.cpp
src/weight/CountingWeight.cpp
src/schemata/Label.cpp
src/schemata/SymbLabel.cpp
src/schemata/State.cpp
src/schemata/Production.cpp
src/schemata/Transition.cpp
src/schemata/SWTA.cpp
src/schemata/import/SchemaFileIn.cpp
src/schemata/import/SWTAFileIn.cpp
src/parsing/ParsingEnv.cpp
src/parsing/KeyS.cpp
src/parsing/KeySV.cpp
src/parsing/Ranked.cpp
src/parsing/RunFilterMode.cpp
src/parsing/RunFilter.cpp
src/scoremodel/musical/Ambitus.cpp
src/scoremodel/musical/Clef.cpp
src/scoremodel/musical/MeterSig.cpp
src/scoremodel/musical/KeySig.cpp
src/scoremodel/musical/Event.cpp
src/scoremodel/musical/Score.cpp
src/scoremodel/musical/MeasureStack.cpp
src/scoremodel/musical/MeasureStacked.cpp
src/scoremodel/musical/Part.cpp
src/scoremodel/musical/PartEng.cpp
src/scoremodel/musical/Measure.cpp
src/scoremodel/musical/Voice.cpp
src/scoremodel/musical/Sequence.cpp
src/scoremodel/musical/AtomicEvent.cpp
src/scoremodel/musical/Note.cpp
src/scoremodel/musical/GraceNote.cpp
src/scoremodel/musical/Rest.cpp
src/scoremodel/musical/Chord.cpp
src/scoremodel/musical/GraceChord.cpp
src/scoremodel/musical/Trill.cpp
src/scoremodel/musical/Sequencm.cpp
src/scoremodel/musical/SpanningElement.cpp
src/scoremodel/engraving/CMND.cpp
src/scoremodel/engraving/Staffed.cpp
src/scoremodel/engraving/StaffDef.cpp
src/scoremodel/engraving/StaffRange.cpp
src/scoremodel/engraving/Stem.cpp
src/scoremodel/engraving/Notehead.cpp
src/scoremodel/engraving/Beam.cpp
src/scoremodel/engraving/TupletLabel.cpp
src/scoremodel/engraving/Arpeggio.cpp
src/scoremodel/engraving/Union.cpp
src/scoremodel/engraving/Node.cpp
src/scoremodel/engraving/Inner.cpp
src/scoremodel/engraving/Root.cpp
src/scoremodel/engraving/Tuplet.cpp
src/scoremodel/engraving/Decorated.cpp
src/scoremodel/engraving/Leaf.cpp
src/scoremodel/engraving/Continuation.cpp
src/scoremodel/engraving/Tied.cpp
src/scoremodel/engraving/Dot.cpp
src/scoremodel/engraving/LeafEvent.cpp
src/scoremodel/engraving/SingleNote.cpp
src/scoremodel/engraving/PitchedNote.cpp
src/scoremodel/engraving/SingleGraceNote.cpp
src/scoremodel/engraving/LeafNote.cpp
src/scoremodel/engraving/LeafRest.cpp
src/scoremodel/engraving/LeafChord.cpp
src/scoremodel/engraving/LeafHarmonic.cpp
src/scoremodel/engraving/LeafSpace.cpp
src/scoremodel/engraving/Multi.cpp
src/scoremodel/engraving/Ornament.cpp
src/scoremodel/engraving/Appogiatura.cpp
src/scoremodel/engraving/HPosition.cpp
src/scoremodel/engraving/VPosition.cpp
src/scoremodel/engraving/Local.cpp
src/scoremodel/engraving/Articulation.cpp
src/scoremodel/engraving/Mordent.cpp
src/scoremodel/engraving/Gruppetto.cpp
src/scoremodel/engraving/LocalTrill.cpp
src/scoremodel/engraving/Dynamic.cpp
src/scoremodel/engraving/Jump.cpp
src/scoremodel/engraving/Fermata.cpp
src/scoremodel/engraving/Breath.cpp
src/scoremodel/engraving/ClefChange.cpp
src/scoremodel/engraving/TempoChange.cpp
src/scoremodel/engraving/Spanning.cpp
src/scoremodel/engraving/Line.cpp
src/scoremodel/engraving/Slur.cpp
src/scoremodel/engraving/Volta.cpp
src/scoremodel/engraving/Octava.cpp
src/scoremodel/engraving/Pedal.cpp
src/scoremodel/engraving/VolChange.cpp
src/scoremodel/engraving/SpanningTrill.cpp
src/scoremodel/engraving/Glissando.cpp
src/scoremodel/engraving/Osc.cpp
src/scoremodel/engraving/Vibrato.cpp
src/scoremodel/pitchspell/Pitch.cpp
src/scoremodel/pitchspell/AccidentState.cpp
src/scoremodel/pitchspell/AEVisitor.cpp
src/scoremodel/pitchspell/PitchEnum.cpp
src/scoremodel/pitchspell/PS0.cpp
src/scoremodel/pitchspell/PSConfig.cpp
src/scoremodel/pitchspell/PSshortest.cpp
src/scoremodel/import/ScoringEnv.cpp
src/scoremodel/import/ScoreBuilder.cpp
src/scoremodel/export/SMVisitor.cpp
src/scoremodel/export/SMPrinter.cpp
src/scoremodel/export/SMMEI.cpp
src/trees/RT.cpp
src/trees/LRT.cpp
src/trees/import/RTStringIn.cpp
src/trees/export/RTPrint.cpp
src/trees/export/LRTPrint.cpp
src/trees/export/LRTFileOut.cpp
)
target_compile_options(equiv2 PUBLIC
-MMD -MP
)
target_include_directories(equiv2 PUBLIC
src/general
src/weight
src/schemata
src/schemata/import
src/schemata/export
src/segment
src/table
src/parsers
src/input
src/segment/import
src/segment/export
src/parsing
src/output
src/scoremodel
)
src/scoremodel/musical
src/scoremodel/engraving
src/scoremodel/pitchspell
src/scoremodel/rewriting
src/scoremodel/import
src/scoremodel/export
src/trees
src/trees/import/
src/trees/export/
)
## compile sub-projects
add_subdirectory(src)
add_subdirectory(lib/midifile)
target_link_libraries(equiv2
-lmei
)
## common include files
## obsolete
## include_directories(src/targets/quant/scripts)
## sub-projects are given to LD as archive files
## The ORDER IS IMPORTANT. (each project possibly depends on lower projects)
set(CMAKE_COMMON_SRC
midifile
qparselib
)
## declare targets
add_executable(squant src/targets/quant/squant.cpp)
target_link_libraries( squant ${CMAKE_COMMON_SRC} )
add_executable(equiv1
src/V1/targets/equiv/equiv1.cpp
src/general/Rational.cpp
src/general/config.cpp
src/V1/schemata/import/WCFGFileIn.cpp
src/general/trace.cpp
src/general/hash.cpp
src/general/util.cpp
src/segment/MTU.cpp
src/segment/Point.cpp
src/segment/MusPoint.cpp
src/scoremodel/pitchspell/Pitch.cpp
src/scoremodel/pitchspell/Spiral.cpp
src/segment/MusEvent.cpp
src/segment/Interval.cpp
src/segment/AlignedInterval.cpp
src/segment/IntervalTree.cpp
src/segment/IntervalHeap.cpp
src/segment/InputSegment.cpp
src/weight/Weight.cpp
src/weight/WeightDom.cpp
src/weight/FloatWeight.cpp
src/weight/TropicalWeight.cpp
src/weight/ViterbiWeight.cpp
src/weight/CountingWeight.cpp
src/schemata/Label.cpp
src/schemata/SymbLabel.cpp
src/schemata/State.cpp
src/schemata/Production.cpp
src/V1/schemata/WCFG.cpp
src/V0/schemata/ValueWCFG.cpp
src/V0/schemata/CountingWCFG.cpp
src/schemata/import/SchemaFileIn.cpp
src/parsing/RunFilterMode.cpp
src/V1/table/Ptr.cpp
src/V1/table/PtrS.cpp
src/V1/table/PtrSK.cpp
src/V1/parsers/ParserInputlessKbest.cpp
src/segment/InputEnv.cpp
src/trees/TreePosition.cpp
src/trees/RT.cpp
src/trees/LRT.cpp
src/trees/import/RTStringIn.cpp
src/trees/export/RTPrint.cpp
src/trees/export/LRTPrint.cpp
src/trees/export/LRTFileOut.cpp
src/trees/export/LilyPond.cpp
src/V1/output/Onsets.cpp
src/segment/DuraList.cpp
src/segment/ValueList.cpp
src/segment/DurationTree.cpp
src/segment/import/DuraFile.cpp
src/scoremodel/musical/MeterSig.cpp
src/V1/targets/equiv/equiv1.cpp
)
target_compile_options(equiv1 PUBLIC
-MMD -MP
)
target_include_directories(equiv1 PUBLIC
src/general
src/V1/general
src/V1/input
src/segment
src/segment/import
src/segment/export
src/weight
src/schemata
src/schemata/import
src/V1/schemata
src/V1/schemata/import
src/V0/schemata
src/trees
src/trees/import/
src/trees/export/
src/V1/output
src/V0/output
src/scoremodel/musical
src/scoremodel/engraving
src/scoremodel/pitchspell
src/scoremodel/rewriting
src/scoremodel/import
src/scoremodel/export
src/V1/table
src/parsing
src/V1/parsers
)
add_executable(equiv src/targets/equiv/equiv.cpp)
target_link_libraries( equiv ${CMAKE_COMMON_SRC} )
#target_link_libraries(equiv1
#
#)
add_executable(schemas
src/targets/schema/schemas.cpp
src/general/trace.cpp
src/general/util.cpp
src/parsing/RunFilterMode.cpp
src/general/config.cpp
src/general/hash.cpp
src/general/Rational.cpp
src/segment/RTU.cpp
src/segment/MTU.cpp
src/segment/AMTU.cpp
src/scoremodel/pitchspell/Pitch.cpp
src/segment/MusEvent.cpp
src/segment/Point.cpp
src/segment/MusPoint.cpp
src/segment/IntervalTree.cpp
src/segment/IntervalHeap.cpp
src/segment/InputSegment.cpp
src/segment/Interval.cpp
src/segment/AlignedInterval.cpp
src/weight/Weight.cpp
src/weight/WeightDom.cpp
src/weight/FloatWeight.cpp
src/weight/TropicalWeight.cpp
src/weight/ViterbiWeight.cpp
src/weight/CountingWeight.cpp
src/schemata/Label.cpp
src/schemata/State.cpp
src/schemata/SymbLabel.cpp
src/schemata/Transition.cpp
src/schemata/SWTA.cpp
src/schemata/import/SWTAFileIn.cpp
src/schemata/CountingSWTA.cpp
src/schemata/import/SchemaFileIn.cpp
src/schemata/Production.cpp
src/segment/InputEnv.cpp
src/scoremodel/musical/MeterSig.cpp
src/scoremodel/engraving/CMND.cpp
src/scoremodel/export/SMVisitor.cpp
src/trees/TreePosition.cpp
src/trees/RT.cpp
src/V0/schemata/SubdivisionSchema.cpp
src/trees/export/APTED.cpp
src/scoremodel/pitchspell/Spiral.cpp
src/trees/export/LilyPond.cpp
)
target_compile_options(schemas PUBLIC
-MMD -MP
)
target_include_directories(schemas PUBLIC
src/general
src/weight
src/schemata
src/schemata/import
src/segment
src/segment/import
src/scoremodel/musical
src/scoremodel/engraving
src/scoremodel/import
src/scoremodel/export
src/V0/schemata
src/trees
src/trees/import/
src/trees/export/
src/parsing
# src/V1/output
)
#target_link_libraries(schemas
#
#)
add_executable(schemas src/targets/schema/schemas.cpp)
target_link_libraries( schemas ${CMAKE_COMMON_SRC} )
add_executable(midiutil src/targets/midi/midiutil.cpp)
target_link_libraries( midiutil ${CMAKE_COMMON_SRC} )
#add_executable(midiutil src/targets/midi/midiutil.cpp)
#add_executable(meiutil src/targets/mei/meiutil.cpp)
#target_link_libraries( meiutil ${CMAKE_COMMON_SRC} )
......@@ -33,7 +33,7 @@ Each of the following `targets` produces a command line utility,
either for applying the quantization procedure or for the construction and management of automatas or transcription input.
* **squant**
* **squanty**
Transcription of an input given by a text or a MIDI file wrt a given automaton
(stored in a file and called schema).
Various output possible, including MEI score file and quantized MIDI file.
......
qparse
Rhythm quantization library based on k-best parsing algorithms
there are 3 targets:
- quant (command line)
rhythm quantification (from schema and input segment)
- equiv (command line)
enumeration of rhythm in a given schema equivalent to a given ratio seq.
schemas (command line)
management of schemas (read, write, normalize)
source dir. schemas/
* target quant *
example command line:
target quant
pathto/quant -a test/schema/schema-02.txt -penalty -i test/input/input-14Desain.txt -v 5 -output output-14Desain.mei -bar 3
quant -v 4 -a test/schema/schema-03.txt -i ../corpus/MIDI.perf/103-SaintSaens-elephant_FJ.mid -config params.ini -norest -barsec 3.0 -o ~/Documents/workspace/scorelib/app/media/103-SaintSaens-elephant.mei
quant -a test/schema/schema-03.txt -i ../corpus/MIDI.perf/304-Bach-polonaise-DA-edit.mid -config params.ini -norest -v 5 -barsec 3.0 -barbeat 3 -o ~/Documents/workspace/scorelib/app/media/304-Bach-polonaise-DA.mei
gForge INRIA
https://gforge.inria.fr/projects/qparse
github