Skip to content

Commit

Permalink
works well
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Jun 29, 2021
1 parent d8b9ae2 commit 130f005
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions lib/Engine_MxSamples.sc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Engine_MxSamples : CroneEngine {
// MxSamples specific
var sampleBuffMxSamples;
var sampleBuffMxSamplesDelay;
var mxsamplesMaxVoices=30;
var mxsamplesMaxVoices=40;
var mxsamplesVoiceAlloc;
// MxSamples ^

Expand Down Expand Up @@ -119,9 +119,14 @@ Engine_MxSamples : CroneEngine {

this.addCommand("mxsamplesoff","i", { arg msg;
// lua is sending 1-index
mxsamplesVoiceAlloc.at(msg[1]).set(
\envgate,0,
);
var name=msg[1];
if (mxsamplesVoiceAlloc.at(name)!=nil,{
if (mxsamplesVoiceAlloc.at(name).isRunning==true,{
mxsamplesVoiceAlloc.at(name).set(
\envgate,0,
);
});
});
});

}
Expand Down
2 changes: 1 addition & 1 deletion lib/mx.samples.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local Formatters=require 'formatters'

local MxSamples={}

local MaxVoices=30
local MaxVoices=40
local delay_rates_names={"whole-note","half-note","quarter note","eighth note","sixteenth note","thirtysecond"}
local delay_rates={4,2,1,1/2,1/4,1/8,1/16}

Expand Down
2 changes: 1 addition & 1 deletion mx.samples.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- mx.samples v1.2.0
-- mx.samples v1.3.0
-- download and play samples
--
-- llllllll.co/t/mxsamples
Expand Down

0 comments on commit 130f005

Please sign in to comment.