Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| with-superdirt [2023/12/20 16:18] – C steve.wang | with-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: | ||
| + | **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:// | ||
| + | |||
| + | The link below will explain what SuperDirt is but following the installation instructions in the link is **NOT** recommended. | ||
| + | |||
| + | [[https:// | ||
| ====== 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 // | ||
| + | |||
| + | Manually update | ||
| < | < | ||
| - | superDirtSamplesPath | + | e.superDirtPath |
| </ | </ | ||
| WARNING: Change user to your username. | WARNING: Change user to your username. | ||
| Line 71: | Line 80: | ||
| ); | ); | ||
| </ | </ | ||
| - | < | + | ====== Playing music With Supercollider ===== |
| - | .load ./ | + | |
| - | .load ./ | + | |
| - | .load ./ | + | |
| - | .load ./ | + | |
| - | + | ||
| - | // 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,' | + | |
| - | simpleSamplePattern (e, ' | + | |
| - | 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,' | ||
| + | K.simpleSamplePattern (e, ' | ||
| + | K.simpleRhythmPattern (e, | ||
| { | { | ||
| voice: ' | voice: ' | ||
| Line 96: | Line 92: | ||
| patternLength: | patternLength: | ||
| IOIs: [1,1,1,1], | IOIs: [1,1,1,1], | ||
| - | bools: [true,true,true,true] | + | bools: [true,false,true,false] |
| } | } | ||
| ) | ) | ||
| - | + | e.players.kick.rhythmMap | |
| - | -------------------------------------------------------------------------- | + | e.players.kick.maskMap |
| - | + | ||
| - | testKick | + | |
| - | testKick | + | |
| - | testKick | + | |
| - | testKick.add(e) | + | |
| e.play(' | e.play(' | ||
| - | e.stop(' | + | </ |
| + | It should sound something like this: | ||
| + | {{ : | ||
| - | setupSuperDirtPlayer(e,' | + | Next to hear more sounds run this code: |
| - | simpleSamplePattern (e, ' | + | <code javascript> |
| - | testHat = new RhythmPattern ('hat',' | + | K.setupSuperDirtPlayer(e,' |
| - | testHat | + | K.simpleSamplePattern (e, ' |
| + | testHat = new K.RhythmPattern(' | ||
| testHat.add(e) | testHat.add(e) | ||
| + | e.players.hat.rhythmMap = ' | ||
| + | e.players.hat.maskMap = ' | ||
| e.play(' | e.play(' | ||
| + | </ | ||
| + | This sound should be added: | ||
| + | {{ : | ||
| - | setupSuperDirtPlayer(e,' | + | Run this to hear 2 more sounds: |
| - | simpleSamplePattern (e, ' | + | <code javascript> |
| - | testClap = new RhythmPattern ('clap',' | + | K.setupSuperDirtPlayer(e,' |
| - | testClap | + | K.simpleSamplePattern (e, ' |
| + | testClap = new K.RhythmPattern (' | ||
| testClap.add(e) | testClap.add(e) | ||
| + | e.players.clap.rhythmMap = ' | ||
| + | e.players.clap.maskMap = ' | ||
| e.play(' | e.play(' | ||
| - | setupSuperDirtPlayer(e,' | + | K.setupSuperDirtPlayer(e,' |
| - | simpleSamplePattern (e, ' | + | K.simpleSamplePattern (e, ' |
| - | testTom = new RhythmPattern ('tom',' | + | testTom = new K.RhythmPattern (' |
| - | testTom | + | |
| testTom.add(e) | testTom.add(e) | ||
| + | e.players.tom.rhythmMap = ' | ||
| + | e.players.tom.maskMap = ' | ||
| e.play(' | e.play(' | ||
| - | |||
| - | e.stopAll() | ||
| - | e.allPlayerStatus() | ||
| </ | </ | ||
| + | These two sounds should be added. | ||
| + | {{ : | ||
| + | {{ : | ||
| + | |||
| + | All four together shoulkd sound like this: | ||
| + | {{ : | ||