Configuration Reference

Configuration property fixed at build time - All other configuration properties are overridable at runtime

Configuration property

Type

Default

Whether a production application makes sounds, like in dev mode. This is for applications that run on a machine with someone in front of it, such as a desktop application or a kiosk.

The application must also depend on io.quarkiverse.sonify:quarkus-sonify-dev.

Environment variable: QUARKUS_SONIFY_PRODUCTION_ENABLED

boolean

false

Whether the application makes sounds while its tests run.

The application must also depend on io.quarkiverse.sonify:quarkus-sonify-dev.

Environment variable: QUARKUS_SONIFY_TEST_ENABLED

boolean

false

Whether sounds are played. Set it to false to silence everything without removing the extension.

Environment variable: QUARKUS_SONIFY_ENABLED

boolean

true

The overall volume, from 0 (silent) to 1 (loudest).

Environment variable: QUARKUS_SONIFY_VOLUME

double

0.4

The shortest time between the start of the sound of a request and the start of the sound of its response, so that the two are heard apart even when the response is immediate. A request that takes longer than this is not delayed.

Environment variable: QUARKUS_SONIFY_RESPONSE_GAP

Duration 

350MS

How long a sound may last: sound files, computed audio, tones, MIDI and notes are cut after it. Up to 10 seconds.

A sound that is still playing is not started again, so a long sound does not pile up when many requests ask for it.

Environment variable: QUARKUS_SONIFY_MAX_SOUND_LENGTH

Duration 

2S

The built-in set of sounds to use for everything that is not overridden.

Environment variable: QUARKUS_SONIFY_THEME

taps, bells

taps

The sound of a request with this HTTP method, instead of the sound of the theme: the path of a WAV or MIDI file, notes after notes: (such as notes:C5/8 E5/8 G5/4), or off.

A file is looked up in the resources of the application first, and then on the file system. At most its first two seconds are played.

Environment variable: QUARKUS_SONIFY_METHOD__HTTP_METHOD_

Map<String,String>

The sound of a response with this status, instead of the sound of the theme: the path of a WAV or MIDI file, notes after notes:, or off.

The key is either a status code ("404") or a whole class of them ("4xx"). A status code wins over its class.

Environment variable: QUARKUS_SONIFY_STATUS__STATUS_

Map<String,String>

The sound with this name, as used by @PlaySound and SoundPlayer: the path of a WAV or MIDI file, notes after notes:, or off. A name that is not configured gets a short sound of its own, derived from the name.

Environment variable: QUARKUS_SONIFY_SOUND__SOUND_NAME_

Map<String,String>

A soundfont, whose instruments play the MIDI sounds: MIDI files, and sequences defined in code. A SoundFont 2 (.sf2) or DLS (.dls) file, looked up in the resources of the application first, and then on the file system. Without it, MIDI is played with the default instruments of the JDK.

Environment variable: QUARKUS_SONIFY_SOUNDFONT

string

About the Duration format

To write duration values, use the standard java.time.Duration format. See the Duration#parse() Java API documentation for more information.

You can also use a simplified format, starting with a number:

  • If the value is only a number, it represents time in seconds.

  • If the value is a number followed by ms, it represents time in milliseconds.

In other cases, the simplified format is translated to the java.time.Duration format for parsing:

  • If the value is a number followed by h, m, or s, it is prefixed with PT.

  • If the value is a number followed by d, it is prefixed with P.