This is an old revision of the document!
Example of using Konduktiva with SuperDirt through Helper Functions
.load ./konduktiva-revised-2.js
.load ./testingKonduktiva-revised.js
.load ./konduktiva-superdirt-revised.js
.load ./defaultSuperDirtPlayers-revised.js
// you need the scheduler to make sure that the players all do their thing on time; this is what keeps everything going at some tempo
setupScheduler(e)
e.startScheduler()
// you change the tempo like this
e.changeTempo(80)
e.changeTempo(180)
setupSuperDirtPlayer(e,'kick')
simpleSamplePattern (e, 'kick', '808bd', 4)
simpleRhythmPattern (e,
{
voice: 'kick',
patternName: 'testKick',
patternLength: 4,
IOIs: [1,1,1,1],
bools: [true,true,true,true]
}
)
--------------------------------------------------------------------------
testKick = new RhythmPattern ('kick','testKick',4,[1,1,1,1],[true,true,true,true])
testKick = new RhythmPattern ('kick','testKick',4,[1,1,1,1],[true,false,true,false])
testKick
testKick.add(e)
e.play('kick')
e.stop('kick')
setupSuperDirtPlayer(e,'hat')
simpleSamplePattern (e, 'hat', 'electro1', 0)
testHat = new RhythmPattern ('hat','testHat',4,[0.5,1,1,1,0.5],[false,true,true,true,true])
testHat
testHat.add(e)
e.play('hat')
setupSuperDirtPlayer(e,'clap')
simpleSamplePattern (e, 'clap', 'drumtraks', 1)
testClap = new RhythmPattern ('clap','testClap',4,[1,1,1,1],[false,true,false,true])
testClap
testClap.add(e)
e.play('clap')
setupSuperDirtPlayer(e,'tom')
simpleSamplePattern (e, 'tom', 'made', 0)
testTom = new RhythmPattern ('tom','testTom',4,[0.5,1,1,1,0.5],[true,false,true,false,true,true])
testTom
testTom.add(e)
e.play('tom')
e.stopAll()
e.allPlayerStatus()