Adding Formants to an EmuDB - Hywel-Stoakes/EmuRSummerSchool GitHub Wiki

How to add a formant track to an existing Emu Database:

  • First load the db
require(emuR)
Name_of_DB <- load_emuDB("path to your database")
  • Then we need to edit the arguments to the formant function

To add Formant files we use the forest function that is found in the wrassp package. We can then find the parameters using the formals() function. This will load all of the available parameters that can be changed.

fm.params <- formals(wrassp::forest)
  • Then add the ssff track and save it to the database
add_ssffTrackDefinition(emuDBhandle = Name_of_DB, # change as needed
                        name = "FORMANTS", # This needs to be left as FORMANTS
                        columnName = "fm",
                        fileExtension = "fms")

Making Tracks visible in the Emu WebApp

The way to make the formant track visible once it has been added to the database is a two stage process

  1. First we need to edit the perspectives.
list_perspectives(test_DB)  # Check the perspectives already in the db (usually just `default`).
  1. Then We will add the signals to the default perspective:

set_signalCanvasesOrder(emuDBhandle = Name_of_DB, # change as needed
                        perspectiveName = "default",
                        order = c("OSCI","SPEC"))

We then set the level (annotation tier) that we would like to include with the perspective (I have just added a single tier/level called etic in the example below).


set_levelCanvasesOrder(emuDBhandle = Name_of_DB, 
                       perspectiveName = "default", 
                       order = c("level1")) # this will be a level already in the database

Serve the Database

Now we can serve the database so we can check the new perspective;

serve(Name_of_DB)