JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

Profile: desktop, common

Overview

Chord of instruments and drums

Example Play La major and drum

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{
                    Chord{
                        part:2
                        voices:[
                            Voice{part:2 instrument:24 pitch:57 velocity:1}
                            ,Voice{part:2 instrument:24 pitch:61 velocity:1}
                            ,Voice{part:2 instrument:24 pitch:64 velocity:1}
                            ]
                        drums:[
                            Drum{part:2 instrument:35 velocity:1}
                            ,Drum{part:2 instrument:49 velocity:1}
                            ]
                        }.play(120);
                    }
                }
            }
        }
    }
 

Profile: desktop

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicdrumsDrum[]

Array of drums

publicpartNumber

Part of whole note ie 16=sixteenth note

publicvoicesVoice[]

Array of voices

Inherited Variables

Function Summary

public play(playTempo: Number) : Void

Play

Play

Parameters
playTempo
 

Inherited Functions