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

Profile: desktop, common

Overview

Single voice

Example Play Middle C quarter note of piano

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{
                    Voice{
                        instrument:0
                        pitch:60
                        velocity:1
                        tempo:120
                        part:4
                        }.play(120);
                    }
                }
            }
        }
    }
 

Profile: desktop

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicinstrumentNumber

0-127

publicpartNumber

Part of whole note ie 16=sixteenth note

publicpitchNumber

0-127, 60 = Middle C

publicvelocityNumber

0.0 - 1.0

Inherited Variables

Function Summary

public play(playTempo: Number) : Void

Play

Play

Parameters
playTempo
 

Inherited Functions