@@ -153,7 +153,7 @@ struct TrackMapEntry
153153 return base;
154154 }
155155 std::string key () const { return makeKey (artist, title, durationSec); }
156- bool hasValidKey () const { return artist. isNotEmpty () && title.isNotEmpty (); }
156+ bool hasValidKey () const { return title.isNotEmpty (); }
157157
158158 // ------------------------------------------------------------------
159159 // Trigger queries
@@ -579,6 +579,7 @@ struct EngineSettings
579579 bool trackMapEnabled = false ;
580580 bool midiClockEnabled = false ;
581581 juce::String oscBpmAddr = " /composition/tempocontroller/tempo" ;
582+ juce::String oscBpmCmd; // e.g. "Master 3.x at %BPM%" — if set, sends string instead of float
582583 bool oscBpmForward = false ;
583584 bool oscMixerForward = false ;
584585 bool midiMixerForward = false ;
@@ -618,6 +619,14 @@ struct EngineSettings
618619 int ltcOutputGain = 100 ;
619620 int thruOutputGain = 100 ;
620621
622+ // Audio BPM detection (for non-DJ sources)
623+ bool audioBpmEnabled = false ;
624+ juce::String audioBpmDevice = " " ;
625+ juce::String audioBpmType = " " ;
626+ int audioBpmChannel = -1 ; // -1 = stereo mix
627+ float audioBpmSmoothing = 0 .5f ; // 0.0=fast, 1.0=stable
628+ int audioBpmGain = 100 ; // 0-400 (percentage, same as LTC gain)
629+
621630 // FPS (0=23.976, 1=24, 2=25, 3=29.97, 4=30)
622631 int fpsSelection = 4 ;
623632
@@ -655,6 +664,7 @@ struct EngineSettings
655664 obj->setProperty (" trackMapEnabled" , trackMapEnabled);
656665 obj->setProperty (" midiClockEnabled" , midiClockEnabled);
657666 obj->setProperty (" oscBpmAddr" , oscBpmAddr);
667+ obj->setProperty (" oscBpmCmd" , oscBpmCmd);
658668 obj->setProperty (" oscBpmForward" , oscBpmForward);
659669 obj->setProperty (" oscMixerForward" , oscMixerForward);
660670 obj->setProperty (" midiMixerForward" , midiMixerForward);
@@ -692,6 +702,13 @@ struct EngineSettings
692702 obj->setProperty (" ltcOutputGain" , ltcOutputGain);
693703 obj->setProperty (" thruOutputGain" , thruOutputGain);
694704
705+ obj->setProperty (" audioBpmEnabled" , audioBpmEnabled);
706+ obj->setProperty (" audioBpmDevice" , audioBpmDevice);
707+ obj->setProperty (" audioBpmType" , audioBpmType);
708+ obj->setProperty (" audioBpmChannel" , audioBpmChannel);
709+ obj->setProperty (" audioBpmSmoothing" , (double )audioBpmSmoothing);
710+ obj->setProperty (" audioBpmGain" , audioBpmGain);
711+
695712 obj->setProperty (" fpsSelection" , fpsSelection);
696713 obj->setProperty (" fpsConvertEnabled" , fpsConvertEnabled);
697714 obj->setProperty (" outputFpsSelection" , outputFpsSelection);
@@ -739,6 +756,7 @@ struct EngineSettings
739756 trackMapEnabled = getBool (" trackMapEnabled" , getBool (" tcnetTrackMapEnabled" , false ));
740757 midiClockEnabled = getBool (" midiClockEnabled" , getBool (" tcnetMidiClock" , false ));
741758 oscBpmAddr = getString (" oscBpmAddr" , getString (" tcnetOscBpmAddr" , " /composition/tempocontroller/tempo" ));
759+ oscBpmCmd = getString (" oscBpmCmd" );
742760 oscBpmForward = getBool (" oscBpmForward" , getBool (" tcnetOscForward" , false ));
743761 oscMixerForward = getBool (" oscMixerForward" , false );
744762 midiMixerForward = getBool (" midiMixerForward" , false );
@@ -790,6 +808,14 @@ struct EngineSettings
790808 ltcOutputGain = clampGain (getInt (" ltcOutputGain" , 100 ));
791809 thruOutputGain = clampGain (getInt (" thruOutputGain" , 100 ));
792810
811+ audioBpmEnabled = getBool (" audioBpmEnabled" , false );
812+ audioBpmDevice = getString (" audioBpmDevice" );
813+ audioBpmType = getString (" audioBpmType" );
814+ audioBpmChannel = juce::jlimit (-1 , 127 , getInt (" audioBpmChannel" , -1 ));
815+ audioBpmSmoothing = (float )juce::jlimit (0.0 , 1.0 ,
816+ obj->getProperty (" audioBpmSmoothing" ).isVoid () ? 0.5 : (double )obj->getProperty (" audioBpmSmoothing" ));
817+ audioBpmGain = juce::jlimit (0 , 400 , getInt (" audioBpmGain" , 100 ));
818+
793819 fpsSelection = juce::jlimit (0 , 4 , getInt (" fpsSelection" , 4 ));
794820 fpsConvertEnabled = getBool (" fpsConvertEnabled" , false );
795821 outputFpsSelection = juce::jlimit (0 , 4 , getInt (" outputFpsSelection" , 4 ));
@@ -1035,6 +1061,13 @@ struct AppSettings
10351061 es.ltcOutputGain = clampGain (getInt (" ltcOutputGain" , 100 ));
10361062 es.thruOutputGain = clampGain (getInt (" thruOutputGain" , 100 ));
10371063
1064+ es.audioBpmEnabled = getBool (" audioBpmEnabled" , false );
1065+ es.audioBpmDevice = getString (" audioBpmDevice" );
1066+ es.audioBpmType = getString (" audioBpmType" );
1067+ es.audioBpmChannel = juce::jlimit (-1 , 127 , getInt (" audioBpmChannel" , -1 ));
1068+ es.audioBpmSmoothing = (float )juce::jlimit (0.0 , 1.0 , getDouble (" audioBpmSmoothing" , 0.5 ));
1069+ es.audioBpmGain = juce::jlimit (0 , 400 , getInt (" audioBpmGain" , 100 ));
1070+
10381071 es.fpsSelection = juce::jlimit (0 , 4 , getInt (" fpsSelection" , 4 ));
10391072 es.fpsConvertEnabled = getBool (" fpsConvertEnabled" , false );
10401073 es.outputFpsSelection = juce::jlimit (0 , 4 , getInt (" outputFpsSelection" , 4 ));
0 commit comments