Tune Shark V3
Tune Shark V3 is a powerful audio engine that is built to give you full control over your sounds. It allows you to apply numerous audio effects, precisely measure sound outputs, and more!
This is a remaster of the now deprecated Tune Shark extension by SharkPool.
General Setup
Note: All Tune Shark sounds are globally accessible in your project. This means all sprites will be able to access a loaded sound.
You can import "Tune Shark" sounds via URL/URI using this block. It is important to note that URLs must be a direct link to an audio file
Alternatively, you can import "Tune Shark" sounds from pre-existing sounds from the "Sounds" tab in the editor.
This block simply creates a copy of the first inputted sound and gives it the name of the second inputted sound.
Granted, you could just use the import sound from url block, but this block removes the wait time to import.
This block allows you to bind or unbind the first inputted sound to the second. This means when you play "MySound2", "MySound" will play as well.
This does not go the same way in reverse.
Audio Playback
Similar to Scratch, this will start a sound from the beginning.
You can also start sounds at certain times (in seconds) in the track using this block.
Similar to the above block, this block will start a sound at a certain point, then waits until the sound reaches the stopping point.
This block will stop the inputted sound.
This block will pause/unpause the inputted sound.
This block controls all loaded sounds. You can:
- start all sounds
- stop all sounds
- pause all sounds
- unpause all sounds
Operations
Toggling this operator on will cause Tune Shark sounds to stop when the green flag or stop sign is clicked.
Toggling this operator on will allow multiple instances of a sound to play at once.
Normally, you can only play one instance of a sound at a time.
Toggling this operator on will make the inputted ound play in reverse. Toggling it off will return it back to normal.
Toggling this operator on will allow the inputted sound to loop.
You can mess around with the loop starting point and ending point with this block.
This block will delete the inputted sound.
This block will delete all loaded sounds.
This block will return an array of the names of all loaded Tune Shark sounds.
Similarly, this block returns an array of the names of all loaded Tune Shark sounds that are currently playing.
This event block runs whenever the inputted sound starts or ends.
Returns various information of a sound:
| Options | What they Check for |
|---|---|
| exists | if the sound exists |
| playing | if the sound is playing |
| paused | if the sound is paused |
| looped | if the sound is looping |
| overlaped | if the sound allows instancing |
| reversed | if the sound is reversed |
| binded | if the sound is binded to another |
Returns various information of a sound:
| Options | What they Do |
|---|---|
| length | sound length (in seconds) |
| current time | current position in a sound |
| source | source URL/URI of a sound |
| estimated bpm | estimated beats-per-minute |
| channels | the number of channels in a sound |
| sample rate | sample rate of a sound |
| fft data | a live Array of loudness values across all frequencies |
| binds | an array of sound names binded to this sound |
| ...various audio effects | returns the inputted parameters for the effect |
You can read sound outputs using this block.
If you select "loudness", it returns a normalized volume of the outputted noise at a specific point in the sound.
Similarly, "raw noise" returns the outputted volume, but its not normalized
Selecting "tone" will return the outputted pitch of a sound at a specific point.
The channel input selects which sound channel to extract the output data from.
Typically, if there are 2 channels, channel 1 is "Left Ear" and channel 2 is "Right Ear".
This block will crop the inputted sound at the selected time parameters (in seconds). It returns a new WAV file data.uri.
This block will concatenate 2 loaded sounds and return a WAV file data.uri.
Audio Effects
This block simply sets the volume of the inputted sound.
This block resets the values of each audio effect in a sound to the default (not including volume).
Sets the effect of a selected sound to a inputted value.
| Effect List | What they Do |
|---|---|
| pitch | changes the speed and tone of the sound |
| detune | changes the speed and semitone of the sound |
| speed | changes the speed of the sound without affecting pitch |
| pan | shifts sound to the left (negative) or right (positive) ear |
| gain | boosts the sounds volume beyond 100 |
| distortion | distorts/crushes sound |
| attack | fade-in time when sound starts |
| release | fade-out time when sound stops |
Adds reverb to an inputted sound.
Warning: Initializing reverb can cause framerate drops as its heavy to setup. For dynamic on/off use, you can use the Delay effect
| Parameters | What they Do |
|---|---|
| time | the length (or room space) of the reverb effect |
| decay | the rate of how long the reverb fades over time |
| mix | percentage of how dry or wet the sound is |
Adds an echoing delay effect to a sound.
| Parameters | What they Do |
|---|---|
| time | interval between each echo |
| feedback | intensity of each subsequent echo |
| mix | percentage of the original sound and the delayed sound |
Modulates the pan of a sound in a 3D space.
| Parameters | What they Do |
|---|---|
| x | pan left/right |
| y | pan top/bottom |
| z | pan close/far |
Modulates the volume of a sound periodically, creating a tremolo effect.
| Parameters | What they Do |
|---|---|
| speed | how fast the volume fluctuates |
| depth | intensity of the volume variation. A higher depth means more dramatic volume changes |
| mix | amount of the tremolo effect applied |
Applies a fuzzy distortion to a sound.
| Parameters | What they Do |
|---|---|
| low | amount of distortion applied to low frequencies |
| med-low | amount of distortion applied to mid-low frequencies |
| med-high | amount of distortion applied to mid-high frequencies |
| high | amount of distortion applied to high frequencies |
| mix | proportion of unfuzzed sound and fuzzed sound |
Reduces a sound's resolution and frequency, creating a chiptune-like, retro effect.
| Parameters | What they Do |
|---|---|
| bits | bit depth. Lower values result in more distortion |
| freq | sampling frequency. Lower values create a grittier effect |
Highpass: Filters out lower frequencies below the specified cutoff, allowing higher frequencies to pass through.
Lowpass: Filters out higher frequencies above the specified cutoff, allowing lower frequencies to pass through.
| Parameters | What they Do |
|---|---|
| frequency | cutoff frequency for the filter |
| peak | resonance at the cutoff frequency |
Combines the original sound with a delayed version, creating a sweeping, "jet-like" sound.
| Parameters | What they Do |
|---|---|
| time | delay time for the effect |
| speed | modulation controlling how quickly it oscillates |
| depth | intensity of the effect |
| feed | feedback level, controlling how much flanged sound enters |
| mix | proportion of the original and flanged sound |
Compresses the dynamic range of a sound, making quiet sounds louder and loud sounds quieter.
| Parameters | What they Do |
|---|---|
| threshold | volume level at which compression begins |
| knee | smoothness of the transition into compression |
| attack | how quickly the compressor responds to volume changes |
| release | how quickly the compression effect fades after the volume decreases |
| ratio | amount of compression applied |
Adjusts the balance between different frequency bands of the sound. This is a 3-Band Equalizer.
| Parameters | What they Do |
|---|---|
| gain low | gain applied to low frequencies |
| gain med | gain applied to mid frequencies |
| gain high | gain applied to high frequencies |
| cutoff low | low-frequency cutoff point |
| cutoff high | high-frequency cutoff point |