mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
websockets provide BBT
This commit is contained in:
parent
c9a1dfb928
commit
93987de09f
5 changed files with 24 additions and 5 deletions
|
|
@ -130,6 +130,7 @@ WebsocketsDispatcher::update_all_nodes (Client client)
|
||||||
|
|
||||||
update (client, Node::transport_tempo, transport ().tempo ());
|
update (client, Node::transport_tempo, transport ().tempo ());
|
||||||
update (client, Node::transport_time, transport ().time ());
|
update (client, Node::transport_time, transport ().time ());
|
||||||
|
update (client, Node::transport_bbt, transport ().bbt ());
|
||||||
update (client, Node::transport_roll, transport ().roll ());
|
update (client, Node::transport_roll, transport ().roll ());
|
||||||
update (client, Node::transport_record, transport ().record ());
|
update (client, Node::transport_record, transport ().record ());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,7 @@ bool
|
||||||
ArdourFeedback::poll () const
|
ArdourFeedback::poll () const
|
||||||
{
|
{
|
||||||
update_all (Node::transport_time, transport ().time ());
|
update_all (Node::transport_time, transport ().time ());
|
||||||
|
update_all (Node::transport_bbt, transport ().bbt ());
|
||||||
|
|
||||||
Glib::Threads::Mutex::Lock lock (mixer ().mutex ());
|
Glib::Threads::Mutex::Lock lock (mixer ().mutex ());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ namespace Node
|
||||||
const std::string strip_plugin_param_value = "strip_plugin_param_value";
|
const std::string strip_plugin_param_value = "strip_plugin_param_value";
|
||||||
const std::string transport_tempo = "transport_tempo";
|
const std::string transport_tempo = "transport_tempo";
|
||||||
const std::string transport_time = "transport_time";
|
const std::string transport_time = "transport_time";
|
||||||
|
const std::string transport_bbt = "transport_bbt";
|
||||||
const std::string transport_roll = "transport_roll";
|
const std::string transport_roll = "transport_roll";
|
||||||
const std::string transport_record = "transport_record";
|
const std::string transport_record = "transport_record";
|
||||||
} // namespace Node
|
} // namespace Node
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
#include "ardour/tempo.h"
|
#include "ardour/tempo.h"
|
||||||
|
|
||||||
#include "transport.h"
|
#include "transport.h"
|
||||||
|
|
@ -52,6 +54,16 @@ ArdourTransport::time () const
|
||||||
return static_cast<double>(t) / static_cast<double>(f);
|
return static_cast<double>(t) / static_cast<double>(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string
|
||||||
|
ArdourTransport::bbt () const
|
||||||
|
{
|
||||||
|
const samplepos_t t = session ().transport_sample ();
|
||||||
|
const Temporal::BBT_Time bbt_time = Temporal::TempoMap::fetch()->bbt_at (timepos_t (t));
|
||||||
|
std::ostringstream oss;
|
||||||
|
bbt_time.print_padded(oss);
|
||||||
|
return oss.str();
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ArdourTransport::roll () const
|
ArdourTransport::roll () const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
#ifndef _ardour_surface_websockets_transport_h_
|
#ifndef _ardour_surface_websockets_transport_h_
|
||||||
#define _ardour_surface_websockets_transport_h_
|
#define _ardour_surface_websockets_transport_h_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "component.h"
|
#include "component.h"
|
||||||
|
|
||||||
namespace ArdourSurface {
|
namespace ArdourSurface {
|
||||||
|
|
@ -35,6 +37,8 @@ public:
|
||||||
|
|
||||||
double time () const;
|
double time () const;
|
||||||
|
|
||||||
|
std::string bbt () const;
|
||||||
|
|
||||||
bool roll () const;
|
bool roll () const;
|
||||||
void set_roll (bool);
|
void set_roll (bool);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue