This GitLab instance reached the end of its service life. It won't be possible to create new users or projects.

Please read the deprecation notice for more information concerning the deprecation timeline

Visit migration.git.tu-berlin.de (internal network only) to import your old projects to the new GitLab platform 📥

Commit 15ee68c7 by Henrik von Coler

Added PD patch for controlling the AM example!

parent f5696a78
#N canvas 1920 58 1920 1022 10;
#X obj 233 180 osc~;
#X obj 233 203 snapshot~;
#X obj 322 185 metro 10;
#X obj 322 144 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X floatatom 233 116 5 0 0 0 - - -, f 5;
#X floatatom 233 283 5 0 0 0 - - -, f 5;
#X obj 913 751 netsend -u -b;
#X obj 913 614 list prepend send;
#X obj 913 637 list trim;
#X msg 1010 671 connect 10.11.12.1 6666;
#X msg 1011 714 disconnect;
#X obj 1010 647 loadbang;
#X floatatom 559 346 5 0 0 0 - shift -, f 5;
#X obj 612 395 loadbang;
#X obj 233 248 * 1000;
#X text 299 119 modulate index;
#X msg 612 418 set shift;
#X obj 612 441 oscformat -f shift;
#X text 555 319 shift;
#X obj 233 305 s shift;
#X floatatom 310 222 5 0 0 0 - - -, f 5;
#X connect 0 0 1 0;
#X connect 1 0 14 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
#X connect 4 0 0 0;
#X connect 5 0 19 0;
#X connect 7 0 8 0;
#X connect 8 0 6 0;
#X connect 9 0 6 0;
#X connect 10 0 6 0;
#X connect 11 0 9 0;
#X connect 12 0 17 0;
#X connect 13 0 16 0;
#X connect 14 0 5 0;
#X connect 16 0 17 0;
#X connect 17 0 7 0;
#X connect 20 0 14 1;
......@@ -18,9 +18,9 @@ OscMan::OscMan(YamlMan *yaml_manager)
{
port = yaml_manager->return_port();
cout << "Receiving OSC on port: " << port << std::endl;
// set defaults
f_m = 100;
f_c = 200;
idx = 10;
......
......@@ -36,43 +36,30 @@ private:
/// the IP port to be opened
int port;
///
/// a server thread
lo::ServerThread *st;
/// the carrier frequency
double f_c;
/// the modulation frequency
double f_m;
/// the modulation index
double idx;
/// the master gain
double gain;
// -------------------------------------------------------------------------
// All the callback functions
// -------------------------------------------------------------------------
///
////// \brief OscMan::gain_callback
////// \param path
////// \param types
////// \param argv
////// \param argc
////// \param data
////// \param user_data
////// \return
static int mod_callback(const char *path, const char *types, lo_arg ** argv,
int argc, void *data, void *user_data);
///
/// \brief car_callback
/// \param path
/// \param types
/// \param argv
/// \param argc
/// \param data
/// \param user_data
/// \return
///
static int car_callback(const char *path, const char *types, lo_arg ** argv,
int argc, void *data, void *user_data);
......@@ -92,23 +79,33 @@ public:
///
/// \brief OscMan::OscMan
/// The constructor
/// \brief OscMan
/// constructor
/// \param yaml_manager
///
OscMan(YamlMan *yaml_manager);
///
/// \brief get_carrier
/// \return the carrier frequency
double get_carrier();
///
/// \brief OscMan::get_gain
/// \return the gain value [double]
/// \brief get_mod
/// \return th modulation frequency
///
double get_mod();
///
/// \brief get_idx
/// \return the modulation index
///
double get_idx();
///
/// \brief get_gain
/// \return the master gain
///
double get_gain();
};
......
......@@ -46,12 +46,12 @@ private:
///
/// \brief path3
///
/// The OSC path used for the third parameter
std::string path3;
///
/// \brief path4
///
/// The OSC path used for the fourth parameter
std::string path4;
public:
......@@ -66,23 +66,26 @@ public:
int return_port();
/// \brief return_path_1
/// Returns the first OSC path used
///
///
/// \return The OSC path.
/// \return getter for path #1
string return_path_1();
/// \brief return_path_2
/// Returns the second OSC path used
///
///
/// \return The OSC path.
/// \return getter for path #2
string return_path_2();
///
/// \brief return_path_3
/// \return
/// getter for path #3
string return_path_3();
///
/// \brief return_path_4
/// \return
/// getter for path #4
string return_path_4();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment