hello
i tried the preset manager in hollyhock and found its not working the way its supposed to
when i use patches containing other patches.
in usine 5 i m having no problems with this.
has someone experienced the same or am i am doing something wrong?
cheers
mark
presetmanager in hollyhock question
Honestly I've never been able to integrate the Preset Manager into my current project (which is a drum sequencer, almost finished! I'm very excited to share with everyone).
The Preset Manager simply remains ignorant of the fact that there are multiple step sequencers and a sequenced switch to keep track of. That is, storing into a preset does not mean anything, as switching presets just carries over whatever is currently in the sequencers. Recalling a preset that had different values saved previously doesn't do anything, it just carries over the current values too.
Here is a 'Pattern Store' script I wrote in order to save the array values of the sequencers, in case it helps somehow:
The Preset Manager simply remains ignorant of the fact that there are multiple step sequencers and a sequenced switch to keep track of. That is, storing into a preset does not mean anything, as switching presets just carries over whatever is currently in the sequencers. Recalling a preset that had different values saved previously doesn't do anything, it just carries over the current values too.
Here is a 'Pattern Store' script I wrote in order to save the array values of the sequencers, in case it helps somehow:
Code: Select all
//////////////////////////
// Pattern Store
/////////////////////////
// parameters declaration
const PATTERNs = 8;
const STEPs = 32;
const IOs = 9;
var MEMs : integer;
type tStep = array [0..STEPs-1] of single;
type stepBank = array [0..IOs-1] of tStep;
var patternBank : array of stepBank;
var memory : array [0..(PATTERNs*IOs)-1] of tParameter;
var stepIn : array of integer;
var stepOut : array of integer;
var store : tParameter;
var load : tParameter;
var stepNum : tParameter;
var current : tParameter;
var copy : tParameter;
//var copys : tParameter;
var resetP : tParameter;
var resetA : tParameter;
var p,i,n,s : integer;
// initialisation : create parameters
procedure init;
begin
MEMs := PATTERNs * IOs;
writeln('length of all my MEMs '+inttostr(MEMs));
setArrayLength(patternBank,PATTERNS);
setArrayLength(stepIn,IOs);
setArrayLength(stepOut,IOs);
store := createParam('store',ptButton);
setIsOutput(store,false);
load := createParam('load',ptDataField);
setIsOutput(load,false);
copy := createParam('copy',ptSwitch);
setIsOutput(copy,false);
setIsSeparator(copy,true);
// copys := createParam('copy store',ptButton);
// setIsInput(copys,false);
stepNum := createParam('step num',ptDataField);
setIsSeparator(stepNum,true);
current := createParam('current',ptDataField);
setIsInput(current,false);
setIsOutput(current,false);
resetP := createParam('reset pattern',ptButton);
setIsOutput(resetP,false);
resetA := createParam('reset all',ptButton);
setIsOutput(resetA,false);
for i := 0 to IOs-1
do begin
stepIn[i] := createParam('seq '+inttostr(i+1),ptArray);
setIsOutput(stepIn[i],false);
for s:=0 to STEPs-1
do begin
setDataArrayValue(stepIn[i],s,0);
end;
setLength(stepIn[i],STEPs);
end;
setIsSeparator(stepIn[0],true);
for i := 0 to IOs-1
do begin
stepOut[i] := createParam('seq '+inttostr(i+1),ptArray);
setIsInput(stepOut[i],false);
for s:=0 to STEPs-1
do begin
setDataArrayValue(stepOut[i],s,0);
end;
setLength(stepOut[i],STEPs);
end;
for i:=0 to MEMs-1
do begin
memory[i] := createParam('mem '+inttostr(i+1),ptArray);
setIsInput(memory[i],false);
setIsOutput(memory[i],false);
setDontSave(memory[i],false);
setLength(memory[i],STEPs);
// i hope this only happens once, at the very beginning
for s:=0 to STEPs-1
do begin
setDataArrayValue(memory[i],s,0);
end;
end;
writeln('initted');
// load will hold a value from a switch group,
// so it will begin with a value.
// setvalue(current, getValue(load));
end;
var choice,next,
prev, x, m : integer;
var v : single;
var temp : tStep;
// Callbackprocedure
Procedure Callback(N:integer);
begin
case N of
resetP: begin
choice := round(getValue(current));
writeln('reset pattern '+inttostr(choice));
setLength(stepOut[choice],STEPs);
setLength(memory[choice],STEPs);
for s:=0 to STEPs-1
do begin
setDataArrayValue(memory[choice],s,0);
setDataArrayValue(stepOut[choice],s,0);
end;
end;
resetA: begin
writeln('resetting all patterns');
for m:=0 to MEMs-1
do begin
for s:=0 to STEPs-1
do begin
setDataArrayValue(memory[m],s,0);
end;
end;
end;
copy: begin
choice := round(getvalue(copy));
writeln('copy is '+inttostr(choice));
// setValue( copys, choice );
end;
store: begin
choice := round( getValue(load) );
for i := 0 to IOs-1
do begin
m := ((choice-1) * PATTERNs) + i;
writeln('storing in '+inttostr(m));
setLength(stepOut[i],STEPs);
setLength(memory[m],STEPs);
for s := 0 to STEPs-1
do begin
temp[s] := getDataArrayValue(stepIn[i],s);
setDataArrayValue(memory[m],s,temp[s]);
setDataArrayValue(stepOut[i],s,temp[s]);
end;
end;
end;//store
stepNum: begin
if getValue(stepNum) = 1
then begin
next := round( getValue(load) );
prev := round( getValue(current) );
if next <> prev
then begin
writeln('setting current to load');
setValue(current, next);
end;
end
else if getValue(stepNum) = 31
then begin
next := round( getValue(load) );
prev := round( getValue(current) );
if next <> prev
then begin
for i:=0 to IOs-1
do begin
n := ((next-1) * IOs) + i;
writeln('getting values from '+inttostr(n));
setLength(stepOut[i],STEPs);
for s:=0 to STEPs-1
do begin
temp[s] := getDataArrayValue(memory[n],s);
setDataArrayValue(stepOut[i],s,temp[s]);
end;
end;
setValue(current,next);
end;
end;
end;//stepNum
// this case handles 'copy to new pattern'
load: begin
prev := round( getValue(current));
for i:=0 to IOs-1
do begin
p := ((prev-1) * IOs) + i;
writeln('auto-saving into '+inttostr(p));
setLength(memory[p],STEPs);
setLength(stepOut[i],STEPs);
for s:=0 to STEPs-1
do begin
temp[s] := getDataArrayValue(stepIn[i],s);
setDataArrayValue(memory[p],s,temp[s]);
setDataArrayValue(stepOut[i],s,temp[s]);
end;
end;
choice := round( getValue(copy) );
if choice = 1
then begin
next := round( getValue(load) );
prev := round( getValue(current) );
for i:=0 to IOs-1
do begin
n := ((next-1) * IOs) + i;
p := ((prev-1) * IOs) + i;
writeln('loading from '+inttostr(p)+' into '+inttostr(n));
setLength(memory[n],STEPs);
for s:=0 to STEPs-1
do begin
temp[s] := getDataArrayValue(memory[p],s);
setDataArrayValue(memory[n],s,temp[s]);
end;
end;
// Don't leave copy on!
setValue(copy,0);
end;
end;
end;
end;
// Global variables
//var loadPattern : integer;
//var stepPos : integer;
//////////////////////////////
// main proc
//////////////////////////////
Procedure Process;
begin
// v2
end;Who is online
Users browsing this forum: No registered users and 76 guests
