-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e22b9df
commit 6921875
Showing
20 changed files
with
510 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
# o.scofo~ | ||
# OScofo | ||
|
||
**O**pen **SCO**re **FO**llower (o.scofo~) is a PureData object designed for contemporary music applications. This project aims to encourage collaboration among researchers and musicians for contemporary music. Here's what you need to know: | ||
**O**pen **SCO**re **FO**llower (OScofo) is a PureData object designed for contemporary music applications. This project aims to encourage collaboration among researchers and musicians for contemporary music. Here's what you need to know: | ||
|
||
## Goal | ||
|
||
The goal of *o.scofo~* is to provide a simple, accessible tool for real-time score following. By keeping the software lightweight, it can be easily run on the web using the [pd4web](https://charlesneimog.github.io/pd4web/) platform, now the we can use PureData on Web Browsers. So finally we have something that can be run for rehearsals one click distance (without externals, OSs incompatibility, etc). | ||
The goal of *OScofo* is to provide a simple, accessible tool for real-time score following. By keeping the software lightweight, it can be easily run on the web using the [pd4web](https://charlesneimog.github.io/pd4web/) platform, now the we can use PureData on Web Browsers. So finally we have something that can be run for rehearsals one click distance (without externals, OSs incompatibility, etc). | ||
|
||
## Collaboration and Contribution | ||
|
||
I invite researchers and developers to contribute to the *o.scofo~* project. By sharing the source code, I am trying to provide access to the theories and mathematical formulas that drive the software. This transparency is inspired by the amazing tools like IEM, SPARTA, and of course, PureData. My main aim is artistic, maybe your research can help me and a lot of others composers. | ||
I invite researchers and developers to contribute to the *OScofo* project. By sharing the source code, I am trying to provide access to the theories and mathematical formulas that drive the software. This transparency is inspired by the amazing tools like IEM, SPARTA, and of course, PureData. My main aim is artistic, maybe your research can help me and a lot of others composers. | ||
|
||
## Technical Foundations | ||
|
||
*o.scofo~* uses several concepts developed by many researches: | ||
*OScofo* uses several concepts developed by many researches: | ||
|
||
* **Score Language**: Based on the `scofo` (by Miller Puckette) and `antescofo~` (by Arshia Cont) language. | ||
* **Pitch Comparison**: Utilizes the Kullback-Leibler (KL) Divergence method for pitch comparison as presented by Arshia Cont in 2008 and 2010. | ||
* **Rhythm Synchronization**: Integrates theories of rhythm synchronization developed by Edward Large and Mari Riess Jones (1999) and Edward Large and Caroline Palmer (2002), as presented for Cont (2010). | ||
* **Descriptors**: Employs descriptors from Willian Brent's timbreIDLib project for analyzing and identifying timbral characteristics. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,104 @@ | ||
#pragma once | ||
#include "../OScofo.hpp" | ||
|
||
#include "OScofo/mdp.hpp" | ||
#include "OScofo/mir.hpp" | ||
#include "OScofo/score.hpp" | ||
#include "OScofo/states.hpp" | ||
// ───────────────────────────────────── | ||
OScofo::OScofo(float Sr, float WindowSize, float HopSize) | ||
: m_MDP(Sr, WindowSize, HopSize), m_MIR(Sr, WindowSize, HopSize) { | ||
m_States = States(); | ||
m_Desc = Description(); | ||
} | ||
|
||
// ╭─────────────────────────────────────╮ | ||
// │ Set Functions │ | ||
// ╰─────────────────────────────────────╯ | ||
void OScofo::SetPitchTemplateSigma(double Sigma) { | ||
m_MDP.SetPitchTemplateSigma(Sigma); | ||
m_MDP.UpdatePitchTemplate(); | ||
} | ||
|
||
// ───────────────────────────────────── | ||
void OScofo::SetHarmonics(int Harmonics) { | ||
m_MDP.SetHarmonics(Harmonics); | ||
m_MDP.UpdatePitchTemplate(); | ||
} | ||
|
||
// ───────────────────────────────────── | ||
void OScofo::SetTimeCouplingStrength(double TimeCouplingStrength) { | ||
m_MDP.SetTimeCouplingStrength(TimeCouplingStrength); | ||
} | ||
|
||
// ───────────────────────────────────── | ||
void OScofo::SetTimeAccumFactor(double TimeAccumFactor) { | ||
m_MDP.SetTimeAccumFactor(TimeAccumFactor); | ||
} | ||
|
||
// ───────────────────────────────────── | ||
void OScofo::SetdBTreshold(double dB) { | ||
m_MDP.SetdBTreshold(dB); | ||
} | ||
|
||
// ───────────────────────────────────── | ||
void OScofo::SetTunning(double Tunning) { | ||
m_MDP.SetTunning(Tunning); | ||
m_Score.SetTunning(Tunning); | ||
} | ||
|
||
// ───────────────────────────────────── | ||
void OScofo::SetCurrentEvent(int Event) { | ||
m_MDP.SetCurrentEvent(Event); | ||
} | ||
|
||
// ╭─────────────────────────────────────╮ | ||
// │ Get Functions │ | ||
// ╰─────────────────────────────────────╯ | ||
int OScofo::GetEventIndex() { | ||
return 0; // TODO: Implement yet | ||
} | ||
|
||
// ───────────────────────────────────── | ||
std::string OScofo::GetError() { | ||
return m_Error; | ||
} | ||
|
||
// ───────────────────────────────────── | ||
float OScofo::GetLiveBPM() { | ||
return m_MDP.GetLiveBPM(); | ||
} | ||
|
||
// ╭─────────────────────────────────────╮ | ||
// │ Helpers Functions │ | ||
// ╰─────────────────────────────────────╯ | ||
bool OScofo::ScoreIsLoaded() { | ||
return m_Score.ScoreIsLoaded(); | ||
} | ||
|
||
// ╭─────────────────────────────────────╮ | ||
// │ Main Functions │ | ||
// ╰─────────────────────────────────────╯ | ||
bool OScofo::ParseScore(std::string ScorePath) { | ||
LOGE() << "OScofo::ParseScore"; | ||
m_Score.Parse(m_States, ScorePath); | ||
LOGE() << "Score has " << m_States.size() << " states"; | ||
|
||
for (int i = 0; i < m_States.size(); i++) { | ||
if (!m_States[i].Valid) { | ||
m_Error = std::string("Error on line ") + std::to_string(m_States[i].Line) + ": " + | ||
m_States[i].Error; | ||
return false; | ||
} | ||
} | ||
m_MDP.SetScoreStates(m_States); | ||
m_MDP.UpdatePhaseValues(); | ||
return true; | ||
} | ||
|
||
// ───────────────────────────────────── | ||
bool OScofo::ProcessBlock(std::vector<double> &AudioBuffer) { | ||
if (!m_Score.ScoreIsLoaded()) { | ||
return true; | ||
} | ||
|
||
m_MIR.GetDescription(AudioBuffer, m_Desc); | ||
// m_MDP.GetEvent(m_Desc); | ||
|
||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.