First time here? Check out the FAQ!
x

What is the best way to store a value permanently?

0 votes
354 views
I'm working on a vowel detector which can learn. The process is:

- Sing a vowel (for example A)

- Extract Formant information

- While singing click a button to store the formant information

So far I've used triggeredSampleAndHolds to store the values, but when I stop the Sound those values are gone. So I thought about using the DiskRecorder and the DiskPlayer to write/read a 1 samp long file. This works but I can't use them at the same time because Kyma tells me "the samples file is being recorded and played back at the same time".

Long story short, I'm looking for a way to save values into files which I can access after stopping the Sound. The best way in my opinion would be a txt file which contains all the values for one person, but I can't think of a way to do that. I guess this can be done using SmallTalk. Any suggestions?

Thanks!
asked Jun 10, 2015 in Using Kyma by kymaguy (Virtuoso) (10,580 points)
Couldn't you just capture the settings as a preset?  There are ways to algorithmically trigger the snapshot if you want it to happen under some specific conditions in the audio input.
Oh... I thought algorithmically GeneratedEvents can't be saved in the preset... I'll us a triggeredSTGC then - Thank you! :) But while we are at it, how can I algorithmically trigger a snapshot? Just curious..

3 Answers

0 votes
Yes, the value of TriggeredSoundToGlobalControllers can be stored in preset snapshots. Also I you can store and recall presets programatically using the recent addition to the prototypes called 'PresetChange'
answered Jun 12, 2015 by cristian-vogel (Master) (8,410 points)
Thanks, Cristian, haven't used the PresetChange until now, that will do it :)
0 votes
Also worth exploring is a method of writing values to a MemoryWriter, then printing them to disk. Maybe you could hack the intended usage of FrameSyncroniser to do that?
answered Jun 12, 2015 by cristian-vogel (Master) (8,410 points)
0 votes

But while we are at it, how can I algorithmically trigger a snapshot? Just curious..

To capture the current settings in a Preset (and assign it a random name), send or generate MIDI !ProgramNumber 130.

  1. Set the VCS Presets Program Changes channel to 1 (by choosing Configure MIDI from the DSP menu).
  2. In a TriggeredSoundToGlobalController
  • Set GeneratedEvent to !ProgramChange
  • Set Trigger to the condition you want to capture the preset (in the Attached Example, I trigger it whenever the !Frequency fader has changed)
  • Set Value to 130
  • Put this TriggeredSoundToGlobalController in a Mixer with the Sound whose settings you'd like to snapshot
answered Jun 18, 2015 by ssc (Savant) (127,080 points)
...