Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

setModulator()

Purpose

Set audio modulator

Description

Set a modulator on an audio channel

Syntax

setModulator( channel, wave, frequency, scale )

Arguments

channel audio channel from 0 to 15

wave wave type (0 = Square, 1 = Saw, 2 = Triangle, 3 = Sine, 4 = Noise )

frequency frequency 10Hz to 20Khz (10 - 20000)

scale modulator scale

Example

waveType = [ "Square", "Saw", "Triangle", "Sine", "Noise" ]
w = 0
press = false
modFreq = 0
modScale = 0
playNote( 0, 3, 432, 1, 0, 0.5 )

loop
    clear()
    c = controls( 0 )
    if c.right and !press then
        w += 1
        press = false
    endIf
    if c.left and !press then
        w -= 1
        press = false
    endIf
    if !c.right and !c.left then
        press = false
    endIf
    modFreq += c.ly
    modScale += c.ry
    w = clamp( w, 0, 4 )
    modFreq = max( modFreq, 0 )
    modScale = max( modScale, 0 )
    setModulator( 0, w, modFreq, modScale )
    printAt( 0, 0, "Press left or right directional buttons to change modulation wave type" )
    printAt( 0, 1, "Wave Type: " + waveType[w] )
    printAt( 0, 3, "Move the left control stick up or down to adjust modulation frequency" )
    printAt( 0, 4, "Modulation Frequency: " + modFreq )
    printAt( 0, 6, "Move the right control stick up or down to adjust modulation scale" )
    printat( 0, 7, "Modulation Scale: " + modScale )
    update()
repeat

Associated Commands

audioLength(), getChannelStatus(), loadAudio(), note2Freq(), playAudio(), playNote(), setClipper(), setFilter(), setPan(), setVolume(), startChannel(), stopChannel()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.