sound and music


advancemusic

sound and music

none

none

Advances (and plays) one line of a currently paused music track. You can use advancemusic to programmatically control the tempo of a song (typically inside a worker), to speed it up or slow it down as required.

advancemusic


attenuate

sound and music

none

none

Turns on attenuation of the calling turtle’s sound output. See setattenuation, noattenuate

attenuate


attenuation

sound and music

none

number

Returns the attenuation value, which is 0.3 by default. This value affects all turtles that attenuate. See setattenutation, attenuate

show attenuation


audiowait

sound and music

none

none

Causes toot, noise and playsound to ‘block’ or hold up turtle execution while they play. See noaudiowait

audiowait


beep

sound and music

none

none

Triggers the system beep.

beep


clearmusic

sound and music

none

none

Clears all music from memory.

clearmusic


clearsong

sound and music

musicname (word)

none

Clears the specified song (music) from memory.

clearsong "mymusic


clearsound

sound and music

soundname (word)

none

Clears the specified sound from memory.

clearsound "mysound


clearsounds

sound and music

none

none

Clears all user-defined sounds from memory.

clearsounds


loadsound

sound and music

soundname (word) | filename (word)

none

Loads the given sound filename into the given sound definition. turtleSpaces uses the ‘ogg’ file format. See playsound

loadsound "honk "honk.ogg


loopsound

sound and music

word

none

Repeatedly plays the sound indicated by the provided word. Stop it with stopsound. See stopsound

loopsound "sheep


musicspeed

sound and music

none

number

Returns the current music speed.

show musicspeed


musicvolume

sound and music

none

number

Returns the calling turtle’s music volume.

show musicvolume


noaudiowait

sound and music

none

none

Causes the calling turtle not to wait while TOOT and NOISE are played.

noaudiowait


noattenuate

sound and music

none

none

Disables audio attenuation for the calling turtle. See attenuate

noattenuate


noise

sound and music

frequency (number) | duration (number)

none

Generates noise output of the specified frequency, and duration in 60ths of a second. See toot

noise 2000 100


noteschannel

sound and music

none

number

Returns the current channel used to play notes by the playnotes primitive. See setnoteschannel

show noteschannel


notespeed

sound and music

none

number

Returns the current speed of playnotes playback.

show notespeed


pausemusic

sound and music

none

none

Pauses playback of music, if music is playing. See resumemusic

pausemusic


playnotes

sound and music

notes [list]

none

Plays back the provided list of notes. L specifies note length.

playnotes [L3 A3 L2 Bb3 C#3]


playmusic

sound and music

musicname (word)

none

Begins playing the named music. The music needs to have first been loaded into memory using loadmusic

playmusic "mysong


playsound

sound and music

“sound (word)

none

Plays a sound, where “sound can be a loaded sound or a ‘built-in’ one from the list given in the example.

air crack laugh stapler
air2 crash laughter static
air3 crinkle lid step
alarm crow lightbulb step2
alarm2 descent lion switch
alien dice meow switch2
alien2 doh missile tear
alien3 doodoo oof thwap
applause door paddle tiger
arcade drip pew ting
augh drop pingpong ting2
aw dunk plastic tinpan
bark evil plastic2 tires
beep explosion please toaster
beep2 fall pong tuee
beep3 fire pop tweet
beep4 fire2 powerup ufo
bell ghost radio ufo2
bell2 glass ratchet ufo3
blastoff glitch rattle ufo4
blub gong rattle2 ufo5
boing growl rattle3 ufo6
bong gun ringring warning
buc gun2 rocket whip
button gun3 rooster whip2
buzz gurgle saw whoosh
candy ha scanner wind
carkeys hangup scissors wind2
carstart hangup2 sheep window
cellphone hit sheep2 witch
cheers honk sheep3 wood
chomp honk2 slap wrapper
clang interference slide zap
click jingle sneeze zap2
click2 knock soda zap3
click3 laser spin zblrf
close latch spinout zip
cluck latch2 squeak zipper


quiet

sound and music

none

none

Stops playback of all sounds from all turtles. This doesn’t mute auto playback in general, only stops the currently playing sounds.

quiet


resumemusic

sound and music

none

none

Resumes paused music playback.

resumemusic


say

sound and music

word or list

none

Causes the operating systems speech-synthesis (if available) to speak the given word or list. Note that this may not be available on some systems, and should not be used as a primary means of communicating with the user.

say "hello


setattenuation

sound and music

number

none

Default is 0.3. When a sound is played, the distance between the emitter and receiver (view turtle) is multiplied by the attenuation value to calculate the resultant volume of the sound at the receiver. Basically this makes sounds quieter the farther away the view turtle is from the turtle making the sound. This is a global setting that affects all turtles. See attenuation, attenuate

setattenuation


setbeep

word

none

Sets the system beep to the sound named by the provided word. See beep

setbeep “sheep

beep


setinstrument

sound and music

instrumentfile (word)

none

Loads an instrument file (saved from tracker) for use with playnotes. See tracker, playnotes

setinstrument "xylophone.snd


setmusicspeed

sound and music

speed (number)

none

Sets the speed of music playback.

setmusicspeed 128


setmusicvolume

sound and music

percent (number)

none

Sets the volume (amplitude) of music playback using a value from 0 to 100.

setmusicvolume 50


setnoteschannel

sound and music

number

none

Sets the music channel to be used to play back notes with playnotes

setnoteschannel 1


setnotespeed

sound and music

speed (number)

none

Sets the speed of note playback.

setnotespeed 128


setsoundvolume

sound and music

volume (number)

none

Sets the volume of digital and analog sound playback using a range of 0 to 100, where 0 is off and 100 is full. This is turtle-specific. See setmusicvolume

setsoundvolume 50


setsquelch

sound and music

number

none

Sets the ‘squelch’ value, sounds with a(n attenuated) volume under that specified value will not be sent to the audio engine for processing (they will not play.) There are a limited number of audio channels for sounds, and squelch will prevent them from being filled up with barely audible sounds. Squelch is a global setting that affects all turtles in all spaces. See squelch

setsquelch 50


setvolume

sound and music

volume (number)

none

Sets the overall volume level, taking a value from 0 (off) to 100 (full).

setvolume 50


soundvolume

sound and music

none

number

Returns the current sound volume.

show soundvolume


squelch

sound and music

none

number

Returns the ‘squelch’ value, the volume level sounds under which are not played. See setsquelch

show squelch


stopmusic

sound and music

none

none

Stops music playback. See playmusic

stopmusic


stopsound

sound and music

none

none

Stops any sounds currently being played by the calling turtle, including loopsound. See playsound, loopsound

stopsound


toot tone

sound and music

frequency (number) | duration (number)

none

none

Toot generates a tone of the provided frequency (specified in Hertz) and duration (in 60ths of a second). The alias 'tone' is included for compatibility with other Logos.

to siren :freq
if :freq CODE(0x6001a7b60) 440 [stop]
toot :freq 3
siren :freq + 5
toot :freq 3
end


tracker

sound and music

none

none

Opens the ‘tracker’, a music editor. turtleSpaces supports creation and playback of 6-channel waveform-generated music. See the help file available inside the tracker

tracker


volume

sound and music

none

number

Returns the current ‘master’ volume.

show volume