You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just recently downloaded STRAUSS and have been playing around with the examples. In several of the examples where there is a chord used, I've been getting a Key Error when I try to run the cells. For example, in the AudioCaption example, when I try to run the sonification function in third cell (without the captioning), i.e.,
#caption_en = 'In the following audio, a glockenspiel is used to represent stars of varying colour.'
# render at default 48 kHz rate
soni = Sonification(score, events, generator, system) #, caption=caption_en)
soni.render()
soni.notebook_display(show_waveform=0)
I get the following error:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[12], [line 6](vscode-notebook-cell:?execution_count=12&line=6)
[4](vscode-notebook-cell:?execution_count=12&line=4) soni = Sonification(score, events, generator, system)
[5](vscode-notebook-cell:?execution_count=12&line=5) # caption=caption_en)
----> [6](vscode-notebook-cell:?execution_count=12&line=6) soni.render()
[7](vscode-notebook-cell:?execution_count=12&line=7) soni.notebook_display(show_waveform=0)
File c:\Users\soley\anaconda3\envs\soni\Lib\site-packages\strauss\sonification.py:162, in Sonification.render(self, downsamp)
[159](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/sonification.py:159) sourcemap['note'] = note
[161](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/sonification.py:161) # run generator to play each note
--> [162](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/sonification.py:162) sstream = self.generator.play(sourcemap)
[163](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/sonification.py:163) playlen = sstream.values.size
[164](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/sonification.py:164) if 'phi' in sourcemap:
File c:\Users\soley\anaconda3\envs\soni\Lib\site-packages\strauss\generator.py:871, in Sampler.play(self, mapping)
[865](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/generator.py:865) utils.linear_to_nested_dict_reassign(mapping, params)
[866](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/generator.py:866) # for p in self.preset.keys():
[867](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/generator.py:867) # if p not in mapping:
[868](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/generator.py:868) # mapping[p] = self.preset[p]
[869](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/generator.py:869)
[870](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/generator.py:870) # sample to use
--> [871](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/generator.py:871) samplefunc = self.samples[params['note']]
[873](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/generator.py:873) # note length
[874](file:///C:/Users/soley/anaconda3/envs/soni/Lib/site-packages/strauss/generator.py:874) if params['note_length'] == 'sample':
KeyError: 'Db3'
Do you have any idea what might be causing this and/or how to fix it?
The text was updated successfully, but these errors were encountered:
I've just recently downloaded STRAUSS and have been playing around with the examples. In several of the examples where there is a chord used, I've been getting a Key Error when I try to run the cells. For example, in the AudioCaption example, when I try to run the sonification function in third cell (without the captioning), i.e.,
I get the following error:
Do you have any idea what might be causing this and/or how to fix it?
The text was updated successfully, but these errors were encountered: