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:19] – [Update startup.scd file] 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>
 +====== Playing music With Supercollider =====
 +
 +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',
 +        patternName: 'testKick',
 +        patternLength: 4,
 +        IOIs: [1,1,1,1],
 +        bools: [true,false,true,false]
 +    }
 +)
 +e.players.kick.rhythmMap = 'testKick'
 +e.players.kick.maskMap = 'testKick'
 +e.play('kick')
 +</code>
 +It should sound something like this:
 +{{ :superdirt-supercollider-testkick-audio.mp3 |}}
 +
 +Next to hear more sounds run this code:
 +<code javascript>
 +K.setupSuperDirtPlayer(e,'hat')
 +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)
 +e.players.hat.rhythmMap = 'straight'
 +e.players.hat.maskMap = 'hat'
 +e.play('hat')
 +</code>
 +This sound should be added:
 +{{ :superdirt-supercollider-testhat-audio.mp3 |}}
 +
 +Run this to hear 2 more sounds:
 +<code javascript>
 +K.setupSuperDirtPlayer(e,'clap')
 +K.simpleSamplePattern (e, 'clap', 'drumtraks', 1)
 +testClap = new K.RhythmPattern ('clap',4,[1,1,1,1],[false,true,false,true])
 +testClap.add(e)
 +e.players.clap.rhythmMap = 'straight'
 +e.players.clap.maskMap = 'clap'
 +e.play('clap')
 +
 +K.setupSuperDirtPlayer(e,'tom')
 +K.simpleSamplePattern (e, 'tom', 'made', 0)
 +testTom = new K.RhythmPattern ('tom',4,[0.5,1,1,1,0.5],[true,false,true,false,true,true])
 +testTom.add(e)
 +e.players.tom.rhythmMap = 'straight'
 +e.players.tom.maskMap = 'tom'
 +e.play('tom')
 +</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.1703117958.txt.gz
  • Last modified: 2023/12/20 16:19
  • by steve.wang