command line

1000’s of new SFX in one click!

Need some inspiration? How about creating thousands of new sounds in one click? The command line version of GameSynth will let you do just that! The GameSynthC executable is located in the same folder than the GameSynth tool, and in this post we will see how it can be used to render patches automatically from scripts or to create random sound effects.

 

Rendering patches from a script or a tool

GameSynthC currently provides two commands. The first one, render, allows you to automate the rendering of patches into wave files from your build pipeline or from a tool.

The syntax is as follows:

GameSynthC -render -input [-number] [-variation] [-folder]

The input argument represents the path to the patch (or folder of patches) to render.

The arguments inside the brackets are optional:

  • the first one is the number of variations to generate for each patch (one by default).
  • the second one is the percentage of variation to apply (the default is 0%).
  • the third one is the output folder (by default, it is the folder where the patches are located).

a01

Therefore, if you don’t use any of the optional arguments, you will generate a single wave file, based on the exact values of the parameters in your patch, and it will be saved in the same folder than that patch. For example:

GameSynthC -render -input=“C:\GSPatches\SwordHit.gspatch”

However, the following command will generate 100 sounds based on that same patch, each with 25% of variation, and then it will save them in the “Waves” folder:

GameSynthC -render -input=“C:\GSPatches\SwordHit.gspatch” -number=100
–variation=25 –output=“D:\Game\Assets\Waves”

This means that you can now automatically generate the number of variations you need directly from a script or from another tool. Note that what the percentage of variation actually means will depend on the random ranges you assigned to the various parameters of your patch.

 

Generating random sounds

The second command of GameSynthC, random, creates a number of totally random sounds. In order to do this, GameSynthC calls the random patch creation function of the Modular model for each sound to generate, and then renders the corresponding wave file.

If you are not familiar with this awesome function yet, you can try it by selecting the Modular model, and choosing the “Create random patch” command of the context menu (or press Ctrl + P). Each time, a new procedural audio patch will be created!

a02

Of course, these patches are always structurally correct and always generate sound… so it is a great way to spark your creativity!

The syntax for this second command is described below:

GameSynthC -random -output [-name] [-number] [-patch]

Only the output folder is mandatory. This is how we indicate where the generated sounds will be saved.

The following arguments are optional:

  • the base name of the sounds (‘random’ by default).
  • the number of random sounds to generate (the default is 1).
  • a ‘patch’ value that is set to ‘true’ to save the patch along the wave file, or ‘false’ otherwise (this is the default).
    • a03

      For example, the following command will create exactly one sound effect named “random.wav” and save it in the c:\sfx folder:

      GameSynthC -random –output=”C:\sfx”

      This next command, however, will create 15 random sound effects, named newSFX1.wav to newSFX15.wav, and save them in the C:\sfx folder along with the patches that were used to generate them.

      GameSynthC -random –output=”C:\sfx” –name=”newSFX” –number=15
      –patch=TRUE

      This brings us back to the title of this post: by integrating this function to a script, a tool, or simply by writing a one-line batch file for it, you can indeed create a thousand new sounds in a single click every time you run it!

      If you generate the patch files at the same time, you can browse the audio files and whenever you find something interesting, open the corresponding patch. This is a great way to learn how to patch in the Modular model of GameSynth and to get new ideas for your audio projects!

      GameSynth