with-superdirt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
with-superdirt [2023/12/20 16:18] – C steve.wangwith-superdirt [2024/06/06 07:24] (current) steve.wang
Line 1: Line 1:
 ====== Example of using Konduktiva with SuperDirt through Helper Functions ====== ====== Example of using Konduktiva with SuperDirt through Helper Functions ======
-**Warning:** This tutorial assumes you have already installed Konduktiva successfully using the [[https://github.com/renickbell/konduktiva|Konduktiva installation]] instructions and have read through and understood the [[:first_steps|first steps tutorial]]. The tutorial also assumes that you have imported Konduktiva to K variable and assigned any of the example MusicalEnvironments to e. 
  
 +**Overview: ** This tutorial will teach you how to use SuperDirt with Konduktiva. Installation instructions for SuperDirt is also provided here.
 +
 +**Things To Note:** This tutorial assumes you have already installed Konduktiva successfully using the [[https://github.com/renickbell/konduktiva|Konduktiva installation]] instructions.
 +
 +The link below will explain what SuperDirt is but following the installation instructions in the link is **NOT** recommended.
 +
 +[[https://github.com/musikinformatik/SuperDirt|SuperDirt Explanation]]
 ====== Install Super Dirt Samples ===== ====== Install Super Dirt Samples =====
 One way is to run this inside supercollider: One way is to run this inside supercollider:
Line 25: Line 31:
  
 ====== Inform Konduktiva of Super Dirt Samples Location ===== ====== Inform Konduktiva of Super Dirt Samples Location =====
-Update superDirtSamplesPath variable:+ 
 +Check if //e.superDirtPath// is defined if it is not you will have have to manually define it with the step below. If it is defined move on to the **Update startup.scd file** part. 
 + 
 +Manually update superDirtSamplesPath variable:
 <code> <code>
-superDirtSamplesPath = "/home/user/.local/share/SuperCollider/downloaded-quarks/Dirt-Samples/"+e.superDirtPath = "/home/user/.local/share/SuperCollider/downloaded-quarks/Dirt-Samples/"
 </code> </code>
 WARNING: Change user to your username. WARNING: Change user to your username.
Line 71: Line 80:
 ); );
 </code> </code>
-<code> +====== Playing music With Supercollider =====
-.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, +Open Supercollider and ensure you have Konduktiva loaded to K and any example MusicalEnvironment. Next run this code to hear some drumb noises: 
 +<code javascript> 
 +K.setupSuperDirtPlayer(e,'kick'
 +K.simpleSamplePattern (e, 'kick', '808bd', 4) 
 +K.simpleRhythmPattern (e,
     {     {
         voice: 'kick',         voice: 'kick',
Line 96: Line 92:
         patternLength: 4,         patternLength: 4,
         IOIs: [1,1,1,1],         IOIs: [1,1,1,1],
-        bools: [true,true,true,true]+        bools: [true,false,true,false]
     }     }
 ) )
- +e.players.kick.rhythmMap = 'testKick' 
--------------------------------------------------------------------------- +e.players.kick.maskMap = 'testKick'
- +
-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.play('kick')
-e.stop('kick')+</code> 
 +It should sound something like this: 
 +{{ :superdirt-supercollider-testkick-audio.mp3 |}}
  
-setupSuperDirtPlayer(e,'hat'+Next to hear more sounds run this code: 
-simpleSamplePattern (e, 'hat', 'electro1', 0) +<code javascript> 
-testHat = new RhythmPattern ('hat','testHat',4,[0.5,1,1,1,0.5],[false,true,true,true,true]) +K.setupSuperDirtPlayer(e,'hat'
-testHat+K.simpleSamplePattern (e, 'hat', 'electro1', 0) 
 +testHat = new K.RhythmPattern('hat',4,[0.5,1,1,1,0.5],[false,true,true,true,true])
 testHat.add(e) testHat.add(e)
 +e.players.hat.rhythmMap = 'straight'
 +e.players.hat.maskMap = 'hat'
 e.play('hat') e.play('hat')
 +</code>
 +This sound should be added:
 +{{ :superdirt-supercollider-testhat-audio.mp3 |}}
  
-setupSuperDirtPlayer(e,'clap'+Run this to hear 2 more sounds: 
-simpleSamplePattern (e, 'clap', 'drumtraks', 1) +<code javascript> 
-testClap = new RhythmPattern ('clap','testClap',4,[1,1,1,1],[false,true,false,true]) +K.setupSuperDirtPlayer(e,'clap'
-testClap +K.simpleSamplePattern (e, 'clap', 'drumtraks', 1) 
 +testClap = new K.RhythmPattern ('clap',4,[1,1,1,1],[false,true,false,true])
 testClap.add(e) testClap.add(e)
 +e.players.clap.rhythmMap = 'straight'
 +e.players.clap.maskMap = 'clap'
 e.play('clap') e.play('clap')
  
-setupSuperDirtPlayer(e,'tom'+K.setupSuperDirtPlayer(e,'tom'
-simpleSamplePattern (e, 'tom', 'made', 0) +K.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 = new K.RhythmPattern ('tom',4,[0.5,1,1,1,0.5],[true,false,true,false,true,true])
-testTom +
 testTom.add(e) testTom.add(e)
 +e.players.tom.rhythmMap = 'straight'
 +e.players.tom.maskMap = 'tom'
 e.play('tom') e.play('tom')
- 
-e.stopAll() 
-e.allPlayerStatus() 
 </code> </code>
 +These two sounds should be added.
 +{{ :superdirt-supercollider-testclap-audio.mp3 |}}
 +{{ :superdirt-supercollider-testtom-audio.mp3 |}}
 +
 +All four together shoulkd sound like this:
 +{{ :superdirt-supercollider-together-audio.mp3 |}}
  • with-superdirt.1703117921.txt.gz
  • Last modified: 2023/12/20 16:18
  • by steve.wang