Overview
Single drum
Example Play quarter note of Acoustic Snare
package testbox;
import javafx.stage.*;
import javafx.scene.*;
import crudfx.control.*;
import crudfx.interop.*;
import crudfx.sound.*;
Stage{
width:400
height:400
scene:Scene{
content:UINode{
content:StandardButton{
text:"Play"
action:function():Void{
Drum{
instrument:38
velocity:1
tempo:120
part:4
}.play(120);
}
}
}
}
}
Profile: desktop
Variable Summary
| access | name | type | Can Read | Can Init | Can Write | Default Value | description |
|---|---|---|---|---|---|---|---|
| public | instrument | Number | ![]() | ![]() | ![]() |
35-81 |
|
| public | part | Number | ![]() | ![]() | ![]() |
Part of whole note ie 16=sixteenth note |
|
| public | velocity | Number | ![]() | ![]() | ![]() |
0.0 - 1.0 |
Inherited Variables
Function Summary
- public play(playTempo: Number) : Void

