MCPcopy Create free account
hub / github.com/LMMS/lmms / addString

Method addString

plugins/vibed/string_container.cpp:45–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44
45void stringContainer::addString(int _harm,
46 const float _pick,
47 const float _pickup,
48 const float * _impulse,
49 const float _randomize,
50 const float _string_loss,
51 const float _detune,
52 const int _oversample,
53 const bool _state,
54 const int _id )
55{
56 float harm;
57 switch( _harm )
58 {
59 case 0:
60 harm = 0.25f;
61 break;
62 case 1:
63 harm = 0.5f;
64 break;
65 case 2:
66 harm = 1.0f;
67 break;
68 case 3:
69 harm = 2.0f;
70 break;
71 case 4:
72 harm = 3.0f;
73 break;
74 case 5:
75 harm = 4.0f;
76 break;
77 case 6:
78 harm = 5.0f;
79 break;
80 case 7:
81 harm = 6.0f;
82 break;
83 case 8:
84 harm = 7.0f;
85 break;
86 default:
87 harm = 1.0f;
88 }
89
90 m_strings.append( new vibratingString( m_pitch * harm,
91 _pick,
92 _pickup,
93 const_cast<float*>(_impulse),
94 m_bufferLength,
95 m_sampleRate,
96 _oversample,
97 _randomize,
98 _string_loss,
99 _detune,
100 _state ) );
101 m_exists[_id] = true;
102}

Callers 15

playNoteMethod · 0.80
initMethod · 0.80
loadMethod · 0.80
getParameterDumpMethod · 0.80
getProgramNamesMethod · 0.80
loadPresetFileMethod · 0.80
tryLoadMethod · 0.80
setParameterDumpMethod · 0.80
openPresetMethod · 0.80
savePresetMethod · 0.80
loadChunkMethod · 0.80

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected