Skip to content

Commit

Permalink
Revert "stop after next loop+fade (#1494)" (#1506)
Browse files Browse the repository at this point in the history
This reverts commit 5e9b780.
  • Loading branch information
tehn authored Jan 29, 2022
1 parent 42522e7 commit 5a0124e
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 19 deletions.
1 change: 0 additions & 1 deletion crone/osc-methods.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ osc methods:
/set/param/cut/rec_level [if]
/set/param/cut/pre_level [if]
/set/param/cut/rec_flag [if]
/set/param/cut/rec_once [if]
/set/param/cut/play_flag [if]
/set/param/cut/rec_offset [if]
/set/param/cut/position [if]
Expand Down
1 change: 0 additions & 1 deletion crone/src/Commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ namespace crone {

// params
SET_CUT_REC_FLAG,
SET_CUT_REC_ONCE,
SET_CUT_PLAY_FLAG,

SET_CUT_RATE,
Expand Down
6 changes: 1 addition & 5 deletions crone/src/OscInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,6 @@ void OscInterface::addServerMethods() {
Commands::softcutCommands.post(Commands::Id::SET_CUT_REC_FLAG, argv[0]->i, argv[1]->f);
});

addServerMethod("/set/param/cut/rec_once", "if", [](lo_arg **argv, int argc) {
if (argc < 2) { return; }
Commands::softcutCommands.post(Commands::Id::SET_CUT_REC_ONCE, argv[0]->i, argv[1]->f);
});

addServerMethod("/set/param/cut/play_flag", "if", [](lo_arg **argv, int argc) {
if (argc < 2) { return; }
Commands::softcutCommands.post(Commands::Id::SET_CUT_PLAY_FLAG, argv[0]->i, argv[1]->f);
Expand Down Expand Up @@ -480,6 +475,7 @@ void OscInterface::addServerMethods() {
Commands::softcutCommands.post(Commands::Id::SET_CUT_VOICE_SYNC, argv[0]->i, argv[1]->i, argv[2]->f);
});


///////////////////////////////////////////
/// FIXME: fade curve calculations are now per-voice,
/// so these methods won't work at all without modification.
Expand Down
7 changes: 0 additions & 7 deletions crone/src/SoftcutClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,6 @@ void crone::SoftcutClient::handleCommand(Commands::CommandPacket *p) {
case Commands::Id::SET_CUT_REC_FLAG:
cut.setRecFlag(idx_0, value > 0.f);
break;
case Commands::Id::SET_CUT_REC_ONCE:
cut.setRecOnceFlag(idx_0,true);
if (value >= 0.f) {
clamp(value, 0.f, bufDur);
cut.cutToPos(idx_0,value);
}
break;
case Commands::Id::SET_CUT_PLAY_FLAG:
cut.setPlayFlag(idx_0, value > 0.f);
break;
Expand Down
4 changes: 0 additions & 4 deletions lua/core/softcut.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ SC.pre_level = function(voice,amp) _norns.cut_param("pre_level",voice,amp) end
-- @tparam int voice : voice number (1-?)
-- @tparam int state : off/on (0,1)
SC.rec = function(voice,state) _norns.cut_param("rec_flag",voice,state) end
-- set to record one loop.
-- @tparam int voice : voice number (1-?)
-- @tparam float pos : position in seconds to initiate loop (optional). if omitted, then next cut will start
SC.rec_once = function(src, pos) _norns.cut_param("rec_once",src,pos or -1) end
--- set record head offset
SC.rec_offset = function(voice,value) _norns.cut_param("rec_offset",voice,value) end
--- set play position
Expand Down

0 comments on commit 5a0124e

Please sign in to comment.